Do call the exit changed method of the gates manager.
This commit is contained in:
parent
ca74b2e3ed
commit
a579209037
@ -535,7 +535,7 @@ public class GatesManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: call this method!
|
|
||||||
public void handleGateExitChange(final Gate g, final Location oldExit)
|
public void handleGateExitChange(final Gate g, final Location oldExit)
|
||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
|
@ -22,6 +22,7 @@ import de.craftinc.gates.util.GateBlockChangeSender;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
import de.craftinc.gates.Plugin;
|
import de.craftinc.gates.Plugin;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
|
||||||
public class CommandExit extends BaseCommand
|
public class CommandExit extends BaseCommand
|
||||||
@ -47,8 +48,10 @@ public class CommandExit extends BaseCommand
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Location oldExit = gate.getExit();
|
||||||
gate.setExit(player.getLocation());
|
gate.setExit(player.getLocation());
|
||||||
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
||||||
|
Plugin.getPlugin().getGatesManager().handleGateExitChange(gate, oldExit);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
GateBlockChangeSender.updateGateBlocks(gate);
|
GateBlockChangeSender.updateGateBlocks(gate);
|
||||||
|
@ -20,6 +20,7 @@ package de.craftinc.gates.commands;
|
|||||||
import de.craftinc.gates.Plugin;
|
import de.craftinc.gates.Plugin;
|
||||||
import de.craftinc.gates.util.GateBlockChangeSender;
|
import de.craftinc.gates.util.GateBlockChangeSender;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@ -46,8 +47,10 @@ public class CommandExitOpen extends BaseCommand
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Location oldExit = gate.getExit();
|
||||||
gate.setExit(player.getLocation());
|
gate.setExit(player.getLocation());
|
||||||
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
sendMessage(ChatColor.GREEN + "The exit of gate '" + gate.getId() + "' is now where you stand.");
|
||||||
|
Plugin.getPlugin().getGatesManager().handleGateExitChange(gate, oldExit);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
boolean needsGateManagerUpdate = false;
|
boolean needsGateManagerUpdate = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user