diff --git a/src/main/java/com/andrew121410/mc/world16essentials/commands/KeepSpawnLoaded.java b/src/main/java/com/andrew121410/mc/world16essentials/commands/KeepSpawnLoaded.java index 62721ed9..59bbe4ff 100644 --- a/src/main/java/com/andrew121410/mc/world16essentials/commands/KeepSpawnLoaded.java +++ b/src/main/java/com/andrew121410/mc/world16essentials/commands/KeepSpawnLoaded.java @@ -21,6 +21,9 @@ public KeepSpawnLoaded(World16Essentials plugin) { this.plugin.getCommand("keepspawnloaded").setExecutor(this); this.plugin.getCommand("keepspawnloaded").setTabCompleter((commandSender, command, s, strings) -> { + if (!(commandSender instanceof Player player)) return null; + if (!player.hasPermission("world16.keepspawnloaded")) return null; + if (strings.length == 1) { return Arrays.asList("true", "false"); }