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
|
## 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
@@ -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))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public abstract class PlayerUtil {
|
|||||||
return "CONSOLE";
|
return "CONSOLE";
|
||||||
}
|
}
|
||||||
OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);
|
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){
|
public static @Nullable UUID offlinePlayerUUIDByName(String name){
|
||||||
|
|||||||
Reference in New Issue
Block a user