Fix permissions issue

This commit is contained in:
2025-03-24 09:29:21 -07:00
parent 34ae3eecdd
commit 0452e74706
4 changed files with 11 additions and 1 deletions

View File

@@ -23,6 +23,10 @@ public class SetMaxPlayersCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
if (!commandSender.hasPermission(plugin.config.getString("permission", "lncvrt.setmaxplayers.use"))) {
commandSender.sendMessage(ChatColor.RED + "You don't have permission!");
return true;
}
if (strings.length != 1) {
commandSender.sendMessage(ChatColor.RED + "Correct usage: /setmaxplayers <amount>");
return true;