Made mute server properly register and use the right permission for it
This commit is contained in:
parent
49a6fc6f87
commit
a36ac260f1
|
|
@ -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() {
|
private static void permissions() {
|
||||||
SERVERMUTEPERMISSION = getString("permissions.server-mute", SERVERMUTEPERMISSION);
|
SERVERMUTEPERMISSION = getString("permissions.server-mute", SERVERMUTEPERMISSION);
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public class MuteServer implements CommandExecutor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ChatPlugin.getInstance().toggleServerMuted();
|
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());
|
}.runTaskAsynchronously(ChatPlugin.getInstance());
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,6 @@ commands:
|
||||||
ignore:
|
ignore:
|
||||||
permission: command.ignore
|
permission: command.ignore
|
||||||
unignore:
|
unignore:
|
||||||
permission: command.ignore
|
permission: command.ignore
|
||||||
|
muteserver:
|
||||||
|
permission: command.mute-server
|
||||||
Loading…
Reference in New Issue
Block a user