diff --git a/README.md b/README.md index ecd553e..4bb240c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ SModeration provides a nice user interface that can be used instead of chat comm ![SMod Menu Sort](https://github.com/Shiewk/SModeration/assets/152653291/23e3862d-0915-47bd-9c47-6d8d10f8ab69) -It has helpful functions like filtering and sorting options. +It has helpful functions like filtering, searching and sorting options. ## Commands This plugin has many commands, for a complete list of commands and their usage, please see [the commands list](https://github.com/Shiewk/SModeration/blob/main/docs/commands.md). diff --git a/gradle.properties b/gradle.properties index d4d2098..e5ed16c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -pluginVersion = 1.4.0 \ No newline at end of file +pluginVersion = 1.4.1 \ No newline at end of file diff --git a/src/main/java/de/shiewk/smoderation/command/EnderchestSeeCommand.java b/src/main/java/de/shiewk/smoderation/command/EnderchestSeeCommand.java index 63cc554..f8e4e14 100644 --- a/src/main/java/de/shiewk/smoderation/command/EnderchestSeeCommand.java +++ b/src/main/java/de/shiewk/smoderation/command/EnderchestSeeCommand.java @@ -28,16 +28,12 @@ public class EnderchestSeeCommand implements TabExecutor { if (sender instanceof HumanEntity human){ final Player player = PlayerUtil.findOnlinePlayer(args[0]); if (player != null) { - if (human.getUniqueId().equals(player.getUniqueId())){ - human.sendMessage(Component.text("You can't open your own ender chest.").color(FAIL_COLOR)); - } else { - human.sendMessage(CHAT_PREFIX.append( - Component.text("Opening ender chest of ").color(PRIMARY_COLOR) - .append(Component.text(player.getName()).color(SECONDARY_COLOR)) - .append(Component.text(".")) - )); - human.openInventory(player.getEnderChest()); - } + human.sendMessage(CHAT_PREFIX.append( + Component.text("Opening ender chest of ").color(PRIMARY_COLOR) + .append(Component.text(player.getName()).color(SECONDARY_COLOR)) + .append(Component.text(".")) + )); + human.openInventory(player.getEnderChest()); } else { human.sendMessage(Component.text("This player is not online.").color(FAIL_COLOR)); } diff --git a/src/main/java/de/shiewk/smoderation/input/ChatInput.java b/src/main/java/de/shiewk/smoderation/input/ChatInput.java index 036bd6a..198f079 100644 --- a/src/main/java/de/shiewk/smoderation/input/ChatInput.java +++ b/src/main/java/de/shiewk/smoderation/input/ChatInput.java @@ -27,7 +27,7 @@ public class ChatInput { this.player = player; this.prompt = prompt; this.action = action; - this.remainingTicks = remainingSeconds * 20; + this.remainingTicks = remainingSeconds * 20 + 1; } static void tickAll() { diff --git a/src/main/java/de/shiewk/smoderation/listener/SocialSpyListener.java b/src/main/java/de/shiewk/smoderation/listener/SocialSpyListener.java index ad8329e..15aac2b 100644 --- a/src/main/java/de/shiewk/smoderation/listener/SocialSpyListener.java +++ b/src/main/java/de/shiewk/smoderation/listener/SocialSpyListener.java @@ -84,10 +84,13 @@ public class SocialSpyListener implements Listener { public static void command(Player player, String command){ for (CommandSender target : targets) { - target.sendMessage(text("[SocialSpy] ") - .append(player.displayName().colorIfAbsent(SECONDARY_COLOR)) - .append(text(": " + command).color(SECONDARY_COLOR)) - .color(PRIMARY_COLOR)); + target.sendMessage(text("[", PRIMARY_COLOR) + .append(text("SocialSpy", SECONDARY_COLOR)) + .append(text("] ")) + .append(player.displayName().colorIfAbsent(PRIMARY_COLOR)) + .append(text(": ", PRIMARY_COLOR)) + .append(text(command, SECONDARY_COLOR)) + ); } } diff --git a/src/main/java/de/shiewk/smoderation/util/PlayerUtil.java b/src/main/java/de/shiewk/smoderation/util/PlayerUtil.java index 2d0f157..fe05416 100644 --- a/src/main/java/de/shiewk/smoderation/util/PlayerUtil.java +++ b/src/main/java/de/shiewk/smoderation/util/PlayerUtil.java @@ -25,7 +25,7 @@ public abstract class PlayerUtil { return "CONSOLE"; } OfflinePlayer player = Bukkit.getOfflinePlayer(uuid); - return player.getName() == null ? "Unknown Player" + uuid : player.getName(); + return player.getName() == null ? "Unknown Player " + uuid : player.getName(); } public static @Nullable UUID offlinePlayerUUIDByName(String name){