Bugfix: new gates do not work when opening them.

This commit is contained in:
Tobias Ottenweller 2013-06-23 18:47:17 +02:00
parent ea52e4d87e
commit d24f0b8fd1

View File

@ -46,8 +46,19 @@ public class CommandOpen extends BaseCommand
public void perform()
{
try {
boolean needsGateManagerUpdate = false;
if (gate.getGateBlockLocations().isEmpty()) {
needsGateManagerUpdate = true;
}
gate.setOpen(true);
GateBlockChangeSender.updateGateBlocks(gate);
if (needsGateManagerUpdate) {
Plugin.getPlugin().getGatesManager().handleGateLocationChange(gate, null, null, null);
}
sendMessage(ChatColor.GREEN + "The gate was opened.");
}
catch (Exception e) {