Improved error messages when setting a gate location.

This commit is contained in:
Tobias Ottenweller 2013-06-23 19:09:20 +02:00
parent 6df27c14a0
commit 0695b3e202

View File

@ -18,7 +18,6 @@ package de.craftinc.gates.commands;
import java.util.Set; import java.util.Set;
import java.util.logging.Level;
import de.craftinc.gates.util.GateBlockChangeSender; import de.craftinc.gates.util.GateBlockChangeSender;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
@ -83,9 +82,10 @@ public class CommandLocation extends BaseLocationCommand
} }
catch (Exception e) catch (Exception e)
{ {
sendMessage(ChatColor.RED + "Setting the location for the gate failed! See server log for more information"); GateBlockChangeSender.updateGateBlocks(gate);
Plugin.log(Level.WARNING, e.getMessage());
e.printStackTrace(); sendMessage(ChatColor.RED + "There seems to be no frame at your new location! The gate got closed!" + ChatColor.AQUA + "You should build a frame now and execute:");
sendMessage(new CommandOpen().getUsageTemplate(true, true));
} }
} }