1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-29 06:34:17 +02:00

4 Commits

Author SHA1 Message Date
Shiewk 1a9cf76a93 1.4.1 2024-08-25 11:12:39 +02:00
Shiewk b3ec076cae Fix chat input title delay 2024-08-25 10:59:29 +02:00
Shiewk 3cb3314f4c Allow opening own ender chest 2024-08-22 15:28:25 +02:00
Shiewk fb785fb53a Improve styling 2024-08-22 13:57:31 +02:00
5 changed files with 16 additions and 17 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) ![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 ## 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). 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){ if (sender instanceof HumanEntity human){
final Player player = PlayerUtil.findOnlinePlayer(args[0]); final Player player = PlayerUtil.findOnlinePlayer(args[0]);
if (player != null) { if (player != null) {
if (human.getUniqueId().equals(player.getUniqueId())){ human.sendMessage(CHAT_PREFIX.append(
human.sendMessage(Component.text("You can't open your own ender chest.").color(FAIL_COLOR)); Component.text("Opening ender chest of ").color(PRIMARY_COLOR)
} else { .append(Component.text(player.getName()).color(SECONDARY_COLOR))
human.sendMessage(CHAT_PREFIX.append( .append(Component.text("."))
Component.text("Opening ender chest of ").color(PRIMARY_COLOR) ));
.append(Component.text(player.getName()).color(SECONDARY_COLOR)) human.openInventory(player.getEnderChest());
.append(Component.text("."))
));
human.openInventory(player.getEnderChest());
}
} else { } else {
human.sendMessage(Component.text("This player is not online.").color(FAIL_COLOR)); human.sendMessage(Component.text("This player is not online.").color(FAIL_COLOR));
} }
@@ -27,7 +27,7 @@ public class ChatInput {
this.player = player; this.player = player;
this.prompt = prompt; this.prompt = prompt;
this.action = action; this.action = action;
this.remainingTicks = remainingSeconds * 20; this.remainingTicks = remainingSeconds * 20 + 1;
} }
static void tickAll() { static void tickAll() {
@@ -84,10 +84,13 @@ public class SocialSpyListener implements Listener {
public static void command(Player player, String command){ public static void command(Player player, String command){
for (CommandSender target : targets) { for (CommandSender target : targets) {
target.sendMessage(text("[SocialSpy] ") target.sendMessage(text("[", PRIMARY_COLOR)
.append(player.displayName().colorIfAbsent(SECONDARY_COLOR)) .append(text("SocialSpy", SECONDARY_COLOR))
.append(text(": " + command).color(SECONDARY_COLOR)) .append(text("] "))
.color(PRIMARY_COLOR)); .append(player.displayName().colorIfAbsent(PRIMARY_COLOR))
.append(text(": ", PRIMARY_COLOR))
.append(text(command, SECONDARY_COLOR))
);
} }
} }