Send message on failing reset (Java heap space)
Dieser Commit ist enthalten in:
Ursprung
64fdf9bf16
Commit
032c0894de
@ -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())){
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren