From 5580a791b29a4c4db28d54bc43b112d2d159dfec Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Mon, 3 Feb 2014 12:53:46 +0100 Subject: [PATCH] Fixed not correct handling of gate delete notifications. --- src/de/craftinc/gates/dynmap/Plugin.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/de/craftinc/gates/dynmap/Plugin.java b/src/de/craftinc/gates/dynmap/Plugin.java index f9a8fae..1a1c91e 100644 --- a/src/de/craftinc/gates/dynmap/Plugin.java +++ b/src/de/craftinc/gates/dynmap/Plugin.java @@ -116,7 +116,12 @@ public class Plugin extends JavaPlugin implements GateChangeListener @Override public void gateChangedHandler(final Gate gate, final Map stringObjectMap) { - String oldID = (String)stringObjectMap.get(GateChangeListener.changedID); - this.markerUtil.updateMarker(gate, oldID); + if (stringObjectMap.containsKey(GateChangeListener.removedGate)) { + this.markerUtil.removeMarker(gate); + } + else { + String oldID = (String)stringObjectMap.get(GateChangeListener.changedID); + this.markerUtil.updateMarker(gate, oldID); + } } }