Added some prints for debugging.
This commit is contained in:
parent
afe693d491
commit
09b9c65ef6
@ -306,6 +306,10 @@ public class GatesManager
|
||||
|
||||
protected void addGateByLocations(final Gate g)
|
||||
{
|
||||
if (g.getGateBlockLocations().isEmpty()) {
|
||||
System.out.println("gate has no block locations!");
|
||||
}
|
||||
|
||||
for (Location l : g.getGateBlockLocations()) {
|
||||
SimpleLocation sl = new SimpleLocation(l);
|
||||
gatesByLocation.put(sl, g);
|
||||
|
@ -73,5 +73,7 @@ public class CommandInfo extends BaseCommand
|
||||
gate.getExit().getWorld().getName());
|
||||
else
|
||||
sendMessage(ChatColor.DARK_AQUA + "NOTE: this gate has no exit");
|
||||
|
||||
System.out.println("frame: " + gate.getGateFrameBlocks());
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ public class CommandLocation extends BaseLocationCommand
|
||||
}
|
||||
|
||||
Plugin.getPlugin().getGatesManager().handleGateLocationChange(gate, oldLocation, oldGateBlockLocations, oldFrameBlocks);
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
|
||||
sendMessage(ChatColor.GREEN + "The location of '" + gate.getId() + "' is now at your current location.");
|
||||
}
|
||||
@ -86,8 +87,6 @@ public class CommandLocation extends BaseLocationCommand
|
||||
Plugin.log(Level.WARNING, e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ public class CommandNew extends BaseLocationCommand
|
||||
}
|
||||
|
||||
gate = new Gate(id);
|
||||
gatesManager.handleNewGate(gate);
|
||||
sendMessage(ChatColor.GREEN + "Gate with id '" + id + "' was created.");
|
||||
|
||||
|
||||
@ -77,6 +76,8 @@ public class CommandNew extends BaseLocationCommand
|
||||
sendMessage("Now you should build a frame and execute:");
|
||||
sendMessage(new CommandLocation().getUsageTemplate(true, true));
|
||||
}
|
||||
|
||||
gatesManager.handleNewGate(gate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,14 +45,12 @@ public class CommandOpen extends BaseCommand
|
||||
|
||||
public void perform()
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
gate.setOpen(true);
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
sendMessage(ChatColor.GREEN + "The gate was opened.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
catch (Exception e) {
|
||||
sendMessage(ChatColor.RED + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ public class PlayerMoveListener implements Listener
|
||||
GateBlockChangeSender.updateGateBlocks(event.getPlayer(), event.getTo());
|
||||
}
|
||||
|
||||
|
||||
GatesManager gateManager = Plugin.getPlugin().getGatesManager();
|
||||
Gate gateAtLocation = gateManager.getGateAtLocation(event.getTo());
|
||||
|
||||
@ -60,6 +59,8 @@ public class PlayerMoveListener implements Listener
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("player: " + event.getPlayer() + " location: " + event.getTo());
|
||||
|
||||
|
||||
// Check for permission
|
||||
if (!hasPermission(event.getPlayer(), gateAtLocation)
|
||||
|
Loading…
x
Reference in New Issue
Block a user