Send block changes on command execution.
This commit is contained in:
parent
1d08c79cff
commit
78283a4f34
@ -18,6 +18,7 @@ package de.craftinc.gates.commands;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import de.craftinc.gates.Plugin;
|
||||
@ -49,6 +50,7 @@ public class CommandClose extends BaseCommand
|
||||
try
|
||||
{
|
||||
gate.setOpen(false);
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
sendMessage(ChatColor.GREEN + "The gate was closed.");
|
||||
}
|
||||
catch(Exception e)
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package de.craftinc.gates.commands;
|
||||
|
||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import de.craftinc.gates.Plugin;
|
||||
@ -47,6 +48,7 @@ public class CommandDelete extends BaseCommand
|
||||
public void perform()
|
||||
{
|
||||
Plugin.getPlugin().getGatesManager().handleDeletion(gate);
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
sendMessage(ChatColor.GREEN + "Gate with id '" + gate.getId() + "' was deleted.");
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
package de.craftinc.gates.commands;
|
||||
|
||||
|
||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import de.craftinc.gates.Plugin;
|
||||
@ -47,6 +48,7 @@ public class CommandOpen extends BaseCommand
|
||||
try
|
||||
{
|
||||
gate.setOpen(true);
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
sendMessage(ChatColor.GREEN + "The gate was opened.");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -18,6 +18,7 @@ package de.craftinc.gates.commands;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import de.craftinc.gates.Plugin;
|
||||
@ -51,7 +52,8 @@ public class CommandSetExit extends BaseCommand
|
||||
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
||||
}
|
||||
catch (Exception e) {
|
||||
sendMessage(ChatColor.RED + "Setting the exit for the gate failed! See server log for more information");
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
sendMessage(ChatColor.RED + "Setting the exit for the gate failed! See server log for more information");
|
||||
Plugin.log(Level.WARNING, e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package de.craftinc.gates.commands;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
import de.craftinc.gates.Plugin;
|
||||
@ -46,6 +47,7 @@ public class CommandSetHidden extends BaseCommand
|
||||
try
|
||||
{
|
||||
gate.setHidden(true);
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
sendMessage(ChatColor.GREEN + "The gate '" + gate.getId() + "' is now hidden.");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -20,6 +20,7 @@ package de.craftinc.gates.commands;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
|
||||
@ -72,6 +73,8 @@ public class CommandSetLocation extends BaseLocationCommand
|
||||
Plugin.log(Level.WARNING, e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
GateBlockChangeSender.updateGateBlocks(gate);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user