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:
@@ -14,7 +14,7 @@ SModeration provides a nice user interface that can be used instead of chat comm
|
||||
|
||||

|
||||
|
||||
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
@@ -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());
|
||||
}
|
||||
} 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))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user