From 77153e8880f3aecc682ac780abb7d5911a17c8b1 Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Thu, 23 Oct 2014 15:12:49 +0200 Subject: [PATCH] Fixed events... --- .idea/workspace.xml | 748 +++++++----------- .../plot/database/DBFunc.java | 27 +- .../plot/events/PlayerEnterPlotEvent.java | 12 +- .../plot/events/PlayerLeavePlotEvent.java | 12 +- .../plot/events/PlayerPlotDeniedEvent.java | 17 +- .../plot/events/PlayerPlotHelperEvent.java | 17 +- .../plot/events/PlayerPlotTrustedEvent.java | 17 +- 7 files changed, 355 insertions(+), 495 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2770c8f28..c7baa40bc 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -9,9 +9,13 @@ - - - + + + + + + + @@ -35,211 +39,118 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - + + + + + + + + + + + + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -258,13 +169,6 @@ @@ -349,6 +260,7 @@ + @@ -451,7 +363,7 @@ @@ -480,7 +392,6 @@ - @@ -553,7 +464,22 @@ - @@ -1064,13 +1006,12 @@ - - + + - @@ -1091,6 +1032,7 @@ + @@ -1139,8 +1081,6 @@ - - @@ -1164,7 +1104,9 @@ - @@ -1176,83 +1118,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1386,13 +1251,6 @@ - - - - - - - @@ -1411,7 +1269,6 @@ - @@ -1427,7 +1284,6 @@ - @@ -1438,19 +1294,10 @@ - - - - - - - - - @@ -1458,7 +1305,6 @@ - @@ -1466,106 +1312,28 @@ - - - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -1588,70 +1356,164 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java b/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java index 478d7676e..00bbe70da 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/database/DBFunc.java @@ -8,34 +8,15 @@ package com.intellectualcrafters.plot.database; -import static com.intellectualcrafters.plot.PlotMain.connection; +import com.intellectualcrafters.plot.Flag; +import com.intellectualcrafters.plot.Plot; +import com.intellectualcrafters.plot.PlotId; +import org.bukkit.OfflinePlayer; -import java.sql.DatabaseMetaData; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; -import org.bukkit.Bukkit; -import org.bukkit.OfflinePlayer; -import org.bukkit.block.Biome; - -import sun.security.pkcs11.Secmod.DbMode; - -import com.intellectualcrafters.plot.Flag; -import com.intellectualcrafters.plot.FlagManager; -import com.intellectualcrafters.plot.Logger; -import com.intellectualcrafters.plot.Logger.LogLevel; -import com.intellectualcrafters.plot.Plot; -import com.intellectualcrafters.plot.PlotHomePosition; -import com.intellectualcrafters.plot.PlotId; -import com.intellectualcrafters.plot.PlotMain; - /** * @author Citymonstret */ diff --git a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java index ecb53d4e5..026bc4027 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerEnterPlotEvent.java @@ -35,9 +35,13 @@ public class PlayerEnterPlotEvent extends PlayerEvent { return this.plot; } - @Override - public HandlerList getHandlers() { - return handlers; - } + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } } diff --git a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java index de87d4771..9eb41c20c 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerLeavePlotEvent.java @@ -34,8 +34,12 @@ public class PlayerLeavePlotEvent extends PlayerEvent { return this.plot; } - @Override - public HandlerList getHandlers() { - return handlers; - } + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } } diff --git a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java index bc72a4a90..c53eb260a 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotDeniedEvent.java @@ -1,12 +1,11 @@ package com.intellectualcrafters.plot.events; -import java.util.UUID; - +import com.intellectualcrafters.plot.Plot; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.Plot; +import java.util.UUID; /** * Created by Citymonstret on 2014-08-16. @@ -71,8 +70,12 @@ public class PlayerPlotDeniedEvent extends Event { return this.initiator; } - @Override - public HandlerList getHandlers() { - return handlers; - } + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } } diff --git a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java index 3eedfbad0..2bf20938b 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotHelperEvent.java @@ -1,12 +1,11 @@ package com.intellectualcrafters.plot.events; -import java.util.UUID; - +import com.intellectualcrafters.plot.Plot; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.Plot; +import java.util.UUID; /** * Created by Citymonstret on 2014-08-16. @@ -70,8 +69,12 @@ public class PlayerPlotHelperEvent extends Event { return this.initiator; } - @Override - public HandlerList getHandlers() { - return handlers; - } + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } } diff --git a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java index 142a9f84d..5510bb3a0 100644 --- a/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java +++ b/PlotSquared/src/com/intellectualcrafters/plot/events/PlayerPlotTrustedEvent.java @@ -1,12 +1,11 @@ package com.intellectualcrafters.plot.events; -import java.util.UUID; - +import com.intellectualcrafters.plot.Plot; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import com.intellectualcrafters.plot.Plot; +import java.util.UUID; /** * Created by Citymonstret on 2014-08-16. @@ -70,8 +69,12 @@ public class PlayerPlotTrustedEvent extends Event { return this.initiator; } - @Override - public HandlerList getHandlers() { - return handlers; - } + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } }