Bugfix: new gates do not work when opening them.
This commit is contained in:
parent
ea52e4d87e
commit
d24f0b8fd1
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user