Skip to content

Commit d4de9de

Browse files
committed
Update README and fix small parsing issue in rename command
1 parent 60a5a32 commit d4de9de

File tree

3 files changed

+63
-36
lines changed

3 files changed

+63
-36
lines changed

README.md

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,67 @@
1010
| feed | adminhax.commands.feed | fill your hunger bar | /feed <player> | |
1111
| heal | adminhax.commands.heal | heal | /heal <player> | |
1212
| repair | adminhax.commands.repair | repair items | /repair [hand \| hotbar \|inventory \|armor \|all] <player> | |
13+
| rename | adminhax.commands.rename | rename items | /rename <name> | |
1314
| godmode | adminhax.commands.godmode | toggle godmode/invincibility | /godmode [get \| toggle] <player> | |
1415
| broadcast | adminhax.commands.broadcast | Send a message to the whole server | /broadcast <message> | broadcastmsg |
1516
| adminhaxreload | adminhax.reload | reloads the AdminHax config and locale | /adminhaxreload | |
1617

1718
## Permissions
1819

19-
| Permission | Default | Description |
20-
|------------------------------------------|---------|--------------------------------------------------------|
21-
| adminhax.commands.other.speed.walk | op | change others' walk speed |
22-
| adminhax.commands.other.speed.fly | op | change others' fly speed |
23-
| adminhax.commands.other.fly | op | make others fly |
24-
| adminhax.commands.other.feed | op | fill others' hunger bar |
25-
| adminhax.commands.other.heal | op | heal others to max health |
26-
| adminhax.commands.other.repair | op | repair other people's items |
27-
| adminhax.commands.other.repair.hand | op | repair the item in others' hand |
28-
| adminhax.commands.other.repair.hotbar | op | repair the items in others' hotbar |
29-
| adminhax.commands.other.repair.inventory | op | repair the items in others' inventory |
30-
| adminhax.commands.other.repair.armor | op | repair others' armor |
31-
| adminhax.commands.other.repair.all | op | repair everything in others' inventory and armor slots |
32-
| adminhax.commands.other.godmode | op | make others invincible |
33-
| adminhax.commands.other.godmode.get | op | see what others' godmode status is |
34-
| adminhax.commands.speed.walk | op | change your walk speed |
35-
| adminhax.commands.speed.fly | op | change your fly speed |
36-
| adminhax.commands.fly | op | fly |
37-
| adminhax.commands.feed | op | fill your hunger bar |
38-
| adminhax.commands.heal | op | heal to max health |
39-
| adminhax.commands.repair | op | repair items |
40-
| adminhax.commands.repair.hand | op | repair the item in your hand |
41-
| adminhax.commands.repair.hotbar | op | repair the items in your hotbar |
42-
| adminhax.commands.repair.inventory | op | repair the items in your inventory |
43-
| adminhax.commands.repair.armor | op | repair your armor |
44-
| adminhax.commands.repair.all | op | repair everything in your inventory and armor slots |
45-
| adminhax.commands.godmode | op | be invincible |
46-
| adminhax.commands.godmode.get | op | see what your godmode status is |
47-
| adminhax.commands.broadcast | op | broadcast a message server-wide |
48-
| adminhax.reload | op | reload the plugin configuration |
20+
| Speed Permission | Default | Description |
21+
|:-------------------------------------|:-------:|:-----------------------------|
22+
| `adminhax.commands.speed.walk` | op | change your walk speed |
23+
| `adminhax.commands.speed.fly` | op | change your fly speed |
24+
| ADMIN PERMISSIONS | ---- | ---------------------------- |
25+
| `adminhax.commands.other.speed.walk` | op | change others' walk speed |
26+
| `adminhax.commands.other.speed.fly` | op | change others' fly speed |
27+
28+
| Ability Permissions | Default | Description |
29+
|:--------------------------------------|:-------:|:-----------------------------------|
30+
| `adminhax.commands.fly` | op | fly |
31+
| `adminhax.commands.feed` | op | fill your hunger bar |
32+
| `adminhax.commands.heal` | op | heal to max health |
33+
| `adminhax.commands.godmode` | op | be invincible |
34+
| `adminhax.commands.godmode.get` | op | see what your godmode status is |
35+
| ADMIN PERMISSIONS | ---- | ---------------------------- |
36+
| `adminhax.commands.other.fly` | op | make others fly |
37+
| `adminhax.commands.other.feed` | op | fill others' hunger bar |
38+
| `adminhax.commands.other.heal` | op | heal others to max health |
39+
| `adminhax.commands.other.godmode` | op | make others invincible |
40+
| `adminhax.commands.other.godmode.get` | op | see what others' godmode status is |
41+
42+
| Repair Permissions | Default | Description |
43+
|:-------------------------------------------|:-------:|:-------------------------------------------------------|
44+
| `adminhax.commands.repair` | op | repair items |
45+
| `adminhax.commands.repair.hand` | op | repair the item in your hand |
46+
| `adminhax.commands.repair.hotbar` | op | repair the items in your hotbar |
47+
| `adminhax.commands.repair.inventory` | op | repair the items in your inventory |
48+
| `adminhax.commands.repair.armor` | op | repair your armor |
49+
| `adminhax.commands.repair.all` | op | repair everything in your inventory and armor slots |
50+
| ADMIN PERMISSIONS | ---- | ---------------------------- |
51+
| `adminhax.commands.other.repair` | op | repair other people's items |
52+
| `adminhax.commands.other.repair.hand` | op | repair the item in others' hand |
53+
| `adminhax.commands.other.repair.hotbar` | op | repair the items in others' hotbar |
54+
| `adminhax.commands.other.repair.inventory` | op | repair the items in others' inventory |
55+
| `adminhax.commands.other.repair.armor` | op | repair others' armor |
56+
| `adminhax.commands.other.repair.all` | op | repair everything in others' inventory and armor slots |
57+
58+
| Rename Permissions | Default | Description |
59+
|-------------------------------------------------|:-------:|---------------------------------------|
60+
| `adminhax.commands.rename` | op | allows the use of `/rename` |
61+
| `adminhax.commands.rename.color` | op | allows colors in `/rename` |
62+
| `adminhax.commands.rename.color.gradient` | op | allows gradients in `/rename` |
63+
| `adminhax.commands.rename.color.rainbow` | op | allows rainbow tag in `/rename` |
64+
| `adminhax.commands.rename.format` | op | allows format tags in `/rename` |
65+
| `adminhax.commands.rename.format.strikethrough` | op | allows strikethrough tag in `/rename` |
66+
| `adminhax.commands.rename.format.italic` | op | allows italic tag in `/rename` |
67+
| `adminhax.commands.rename.format.bold` | op | allows bold tag in `/rename` |
68+
| `adminhax.commands.rename.format.obfuscated` | op | allows obfuscated tag in `/rename |
69+
70+
| Misc Admin Permissions | Default | Description |
71+
|---------------------------------|:-------:|----------------------------------------------------------|
72+
| `adminhax.commands.broadcast` | op | broadcast a message server-wide |
73+
| `adminhax.reload ` | op | reload the plugin configuration |
74+
| `adminhax.bypass.rename.length` | op | bypass the configured max character length for `/rename` |
4975

5076
---

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>simplexity</groupId>
88
<artifactId>AdminHax</artifactId>
9-
<version>1.2.0</version>
9+
<version>1.2.1</version>
1010
<packaging>jar</packaging>
1111

1212
<name>AdminHax</name>
@@ -50,14 +50,14 @@
5050
</build>
5151

5252
<repositories>
53-
<repository>
54-
<id>papermc-repo</id>
55-
<url>https://repo.papermc.io/repository/maven-public/</url>
56-
</repository>
5753
<repository>
5854
<id>sonatype</id>
5955
<url>https://oss.sonatype.org/content/groups/public/</url>
6056
</repository>
57+
<repository>
58+
<id>papermc-repo</id>
59+
<url>https://repo.papermc.io/repository/maven-public/</url>
60+
</repository>
6161
</repositories>
6262

6363
<dependencies>

src/main/java/simplexity/adminhax/commands/basic/RenameItem.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
4242
}
4343
Component newName = parsedName(player, renameString);
4444
setItemName(newName, heldItem);
45+
String itemName = "<lang:" + heldItem.translationKey() + ">";
4546
player.sendRichMessage(Message.RENAME_SUCCESSFUL.getMessage(),
46-
Placeholder.unparsed("item", heldItem.translationKey()),
47+
Placeholder.parsed("item", itemName),
4748
Placeholder.component("name", newName));
4849
return true;
4950
}

0 commit comments

Comments
 (0)