diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java index 66de795..8df6984 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandReset.java @@ -4,11 +4,14 @@ import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.world.ArenaSection; import de.steamwar.bausystem.world.Welt; +import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import java.util.logging.Level; + public class CommandReset implements CommandExecutor { @Override @@ -24,8 +27,13 @@ public class CommandReset implements CommandExecutor { for(ArenaSection section : BauSystem.getSections()){ if(section.inRegion(player.getLocation())){ - section.reset(); - player.sendMessage(BauSystem.PREFIX + "§7Region zurückgesetzt"); + try { + section.reset(); + player.sendMessage(BauSystem.PREFIX + "§7Region zurückgesetzt"); + }catch(Exception e){ + player.sendMessage(BauSystem.PREFIX + "§cFehler beim Zurücksetzen der Region"); + Bukkit.getLogger().log(Level.WARNING, "Failed reset", e); + } return false; } }