Fix CustomCommandListener
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
b68bbdca14
Commit
d43e4cd10c
@ -41,7 +41,7 @@ public class SlotCommand extends SWCommand {
|
||||
}
|
||||
|
||||
@Register(help = true)
|
||||
public void genericHelp(Player p) {
|
||||
public void genericHelp(Player p, String... args) {
|
||||
BauSystem.MESSAGE.send("OTHER_NOCLIP_SLOT_INFO", p);
|
||||
}
|
||||
|
||||
|
@ -246,13 +246,15 @@ public class CustomCommandListener implements Listener {
|
||||
int length = (int) output(p).toYAPION(new LengthOutput()).getLength();
|
||||
StringBuilder menuName = new StringBuilder();
|
||||
menuName.append("§eScript Commands ");
|
||||
if (length > 58982) {
|
||||
if (length == 655336) {
|
||||
menuName.append(" §8(§cVoll§8)");
|
||||
double percentage = ((int) ((length / 655336.0) * 1000)) / 10.0;
|
||||
if (percentage > 99) {
|
||||
menuName.append("§c");
|
||||
} else if (percentage >= 75) {
|
||||
menuName.append("§6");
|
||||
} else {
|
||||
menuName.append(" §8(§6Fast Voll§8)");
|
||||
}
|
||||
menuName.append("§a");
|
||||
}
|
||||
menuName.append(percentage).append("§7%");
|
||||
SWListInv<MenuCommand> menuCommandSWListInv = new SWListInv<>(p, menuName.toString(), false, menuCommands, (clickType, menuCommand) -> {
|
||||
if (!clickType.isCreativeAction()) {
|
||||
playerMap.get(p).removeIf(customCommand -> customCommand == menuCommand);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren