1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Use main branch for development from now on (#5)

This commit is contained in:
Shy
2024-12-16 14:48:39 +01:00
committed by GitHub
6 changed files with 17 additions and 18 deletions
+1 -1
View File
@@ -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).
+1 -1
View File
@@ -1 +1 @@
pluginVersion = 1.4.0
pluginVersion = 1.4.1
@@ -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));
}
@@ -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() {
@@ -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))
);
}
}
@@ -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){