diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java index db1fdabd..a3256219 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/StopCommand.java @@ -44,9 +44,13 @@ public class StopCommand extends SWCommand { Bukkit.getServer().shutdown(); } - @ClassMapper(value = Player.class, local = true) - public TypeValidator validator() { - return (commandSender, player, messageSender) -> { + @ClassMapper(value = CommandSender.class, local = true) + public TypeValidator validator() { + return (commandSender, sender, messageSender) -> { + if (!(sender instanceof Player)) { + return true; + } + Player player = (Player) sender; if (Permission.hasPermission(player, Permission.WORLD)) { return true; }