From bbc77790da778ccf0cda483eee8b8eec2218b349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86therSurfer?= Date: Sat, 20 Jul 2013 19:29:21 -0400 Subject: [PATCH] fix FactionsEventChunkChange bug, tryClaim changes the board in between the time it instantiates this event and it calls getType --- .../massivecraft/factions/event/FactionsEventChunkChange.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/event/FactionsEventChunkChange.java b/src/com/massivecraft/factions/event/FactionsEventChunkChange.java index b2414c3a..97c53f26 100644 --- a/src/com/massivecraft/factions/event/FactionsEventChunkChange.java +++ b/src/com/massivecraft/factions/event/FactionsEventChunkChange.java @@ -25,6 +25,7 @@ public class FactionsEventChunkChange extends FactionsEventAbstractSender private final PS chunk; public PS getChunk() { return this.chunk; } + private final Faction currentFaction; private final Faction newFaction; public Faction getNewFaction() { return this.newFaction; } @@ -36,6 +37,7 @@ public class FactionsEventChunkChange extends FactionsEventAbstractSender { super(sender); this.chunk = chunk.getChunk(true); + this.currentFaction = BoardColls.get().getFactionAt(chunk); this.newFaction = newFaction; } @@ -45,8 +47,6 @@ public class FactionsEventChunkChange extends FactionsEventAbstractSender public FactionsEventChunkChangeType getType() { - Faction currentFaction = BoardColls.get().getFactionAt(chunk); - if (currentFaction.isNone()) return FactionsEventChunkChangeType.BUY; if (newFaction.isNormal()) return FactionsEventChunkChangeType.CONQUER;