Made mute server properly register and use the right permission for it

This commit is contained in:
Teriuihi 2021-07-31 03:46:37 +02:00
parent 49a6fc6f87
commit a36ac260f1
3 changed files with 5 additions and 3 deletions

View File

@ -238,7 +238,7 @@ public final class Config {
}
public static String SERVERMUTEPERMISSION = "chat.server-mute";
public static String SERVERMUTEPERMISSION = "command.mute-server";
private static void permissions() {
SERVERMUTEPERMISSION = getString("permissions.server-mute", SERVERMUTEPERMISSION);

View File

@ -28,7 +28,7 @@ public class MuteServer implements CommandExecutor {
return;
}
ChatPlugin.getInstance().toggleServerMuted();
sender.sendMessage(MiniMessage.get().parse("You have " + (!Utility.hasPermission(uuid, Config.GCPERMISSION) ? "<green>muted</green>" : "<red>unmuted</red>")) + " chat for this server."); // TODO load from config and minimessage
sender.sendMessage(MiniMessage.get().parse("You have " + (!Utility.hasPermission(uuid, Config.GCPERMISSION) ? "<green>muted</green>" : "<red>unmuted</red>") + " chat for this server.")); // TODO load from config and minimessage
}
}.runTaskAsynchronously(ChatPlugin.getInstance());
return false;

View File

@ -22,4 +22,6 @@ commands:
ignore:
permission: command.ignore
unignore:
permission: command.ignore
permission: command.ignore
muteserver:
permission: command.mute-server