From 8caeab1aa5a4b5dfc5e0dd9a4a5268af41d2e06b Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Mon, 22 Aug 2016 17:10:54 +0200 Subject: [PATCH] Renamed package --- src/buttondevteam/bucket/MainPlugin.java | 6 +++--- .../alisolarflare/aliarrow/AliArrowListener.java | 5 +++-- .../alisolarflare/aliarrow/AliArrowSubPlugin.java | 4 ++-- .../bucket/alisolarflare/aliarrow/AliArrowTask.java | 4 ++-- src/buttondevteam/bucket/core/CoreSubPlugin.java | 2 +- src/buttondevteam/bucket/core/PlayerListener.java | 11 ++++++++--- src/buttondevteam/bucket/core/TBMCCoreAPI.java | 4 ++-- src/buttondevteam/bucket/core/TBMCPlayer.java | 2 +- src/buttondevteam/bucket/core/TBMCPlayerAddEvent.java | 2 +- .../bucket/core/TBMCPlayerJoinEvent.java | 2 +- .../bucket/core/TBMCPlayerLoadEvent.java | 2 +- .../bucket/core/TBMCPlayerQuitEvent.java | 2 +- .../bucket/core/TBMCPlayerSaveEvent.java | 2 +- 13 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/buttondevteam/bucket/MainPlugin.java b/src/buttondevteam/bucket/MainPlugin.java index 7dc3b30..bebb345 100644 --- a/src/buttondevteam/bucket/MainPlugin.java +++ b/src/buttondevteam/bucket/MainPlugin.java @@ -1,4 +1,4 @@ -package buttondevteam; +package buttondevteam.bucket; import java.util.logging.Logger; @@ -6,8 +6,8 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; -import buttondevteam.alisolarflare.aliarrow.AliArrowSubPlugin; -import buttondevteam.core.CoreSubPlugin; +import buttondevteam.bucket.alisolarflare.aliarrow.AliArrowSubPlugin; +import buttondevteam.bucket.core.CoreSubPlugin; public class MainPlugin extends JavaPlugin { public static MainPlugin Instance; diff --git a/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowListener.java b/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowListener.java index 436904c..c84d467 100644 --- a/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowListener.java +++ b/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowListener.java @@ -1,4 +1,4 @@ -package buttondevteam.alisolarflare.aliarrow; +package buttondevteam.bucket.alisolarflare.aliarrow; import org.bukkit.entity.Arrow; import org.bukkit.entity.EntityType; @@ -6,7 +6,8 @@ import org.bukkit.entity.Projectile; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.ProjectileLaunchEvent; -import buttondevteam.MainPlugin; + +import buttondevteam.bucket.MainPlugin; public class AliArrowListener implements Listener { private final MainPlugin plugin; diff --git a/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowSubPlugin.java b/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowSubPlugin.java index 8fe0065..824d82c 100644 --- a/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowSubPlugin.java +++ b/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowSubPlugin.java @@ -1,8 +1,8 @@ -package buttondevteam.alisolarflare.aliarrow; +package buttondevteam.bucket.alisolarflare.aliarrow; import java.util.logging.Level; -import buttondevteam.MainPlugin; +import buttondevteam.bucket.MainPlugin; public class AliArrowSubPlugin { private MainPlugin plugin; diff --git a/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowTask.java b/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowTask.java index 013e8fe..11f642a 100644 --- a/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowTask.java +++ b/src/buttondevteam/bucket/alisolarflare/aliarrow/AliArrowTask.java @@ -1,10 +1,10 @@ -package buttondevteam.alisolarflare.aliarrow; +package buttondevteam.bucket.alisolarflare.aliarrow; import org.bukkit.Particle; import org.bukkit.entity.Arrow; import org.bukkit.scheduler.BukkitRunnable; -import buttondevteam.MainPlugin; +import buttondevteam.bucket.MainPlugin; public class AliArrowTask extends BukkitRunnable{ MainPlugin plugin; diff --git a/src/buttondevteam/bucket/core/CoreSubPlugin.java b/src/buttondevteam/bucket/core/CoreSubPlugin.java index 5482cc8..19fc006 100644 --- a/src/buttondevteam/bucket/core/CoreSubPlugin.java +++ b/src/buttondevteam/bucket/core/CoreSubPlugin.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import java.util.logging.Level; diff --git a/src/buttondevteam/bucket/core/PlayerListener.java b/src/buttondevteam/bucket/core/PlayerListener.java index 06293da..33a25f2 100644 --- a/src/buttondevteam/bucket/core/PlayerListener.java +++ b/src/buttondevteam/bucket/core/PlayerListener.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -10,12 +10,17 @@ public class PlayerListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST) public void OnPlayerJoin(PlayerJoinEvent event) { - if (TBMCPlayer.LoadPlayer(event.getPlayer()) == null) + TBMCPlayer player = TBMCPlayer.LoadPlayer(event.getPlayer()); + if (player == null) event.getPlayer().sendMessage("§c[TBMC] Failed to load player data! Please contact a mod."); + else + TBMCPlayer.JoinPlayer(player); } @EventHandler(priority = EventPriority.HIGHEST) public void OnPlayerLeave(PlayerQuitEvent event) { - TBMCPlayer.SavePlayer(TBMCPlayer.GetPlayer(event.getPlayer())); + TBMCPlayer player = TBMCPlayer.GetPlayer(event.getPlayer()); + TBMCPlayer.SavePlayer(player); + TBMCPlayer.QuitPlayer(player); } } diff --git a/src/buttondevteam/bucket/core/TBMCCoreAPI.java b/src/buttondevteam/bucket/core/TBMCCoreAPI.java index e8d92fb..cfd7cac 100644 --- a/src/buttondevteam/bucket/core/TBMCCoreAPI.java +++ b/src/buttondevteam/bucket/core/TBMCCoreAPI.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import java.io.File; import java.io.IOException; @@ -14,7 +14,7 @@ import org.apache.commons.io.IOUtils; import org.json.JSONArray; import org.json.JSONObject; -import buttondevteam.MainPlugin; +import buttondevteam.bucket.MainPlugin; public final class TBMCCoreAPI { /** diff --git a/src/buttondevteam/bucket/core/TBMCPlayer.java b/src/buttondevteam/bucket/core/TBMCPlayer.java index db3ee4e..972ba0f 100644 --- a/src/buttondevteam/bucket/core/TBMCPlayer.java +++ b/src/buttondevteam/bucket/core/TBMCPlayer.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import java.io.File; import java.io.IOException; diff --git a/src/buttondevteam/bucket/core/TBMCPlayerAddEvent.java b/src/buttondevteam/bucket/core/TBMCPlayerAddEvent.java index 180a607..834d274 100644 --- a/src/buttondevteam/bucket/core/TBMCPlayerAddEvent.java +++ b/src/buttondevteam/bucket/core/TBMCPlayerAddEvent.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; diff --git a/src/buttondevteam/bucket/core/TBMCPlayerJoinEvent.java b/src/buttondevteam/bucket/core/TBMCPlayerJoinEvent.java index 1427bb4..3480acc 100644 --- a/src/buttondevteam/bucket/core/TBMCPlayerJoinEvent.java +++ b/src/buttondevteam/bucket/core/TBMCPlayerJoinEvent.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; diff --git a/src/buttondevteam/bucket/core/TBMCPlayerLoadEvent.java b/src/buttondevteam/bucket/core/TBMCPlayerLoadEvent.java index f74b8b9..3f6582f 100644 --- a/src/buttondevteam/bucket/core/TBMCPlayerLoadEvent.java +++ b/src/buttondevteam/bucket/core/TBMCPlayerLoadEvent.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.event.Event; diff --git a/src/buttondevteam/bucket/core/TBMCPlayerQuitEvent.java b/src/buttondevteam/bucket/core/TBMCPlayerQuitEvent.java index 4b4bab8..bae3509 100644 --- a/src/buttondevteam/bucket/core/TBMCPlayerQuitEvent.java +++ b/src/buttondevteam/bucket/core/TBMCPlayerQuitEvent.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; diff --git a/src/buttondevteam/bucket/core/TBMCPlayerSaveEvent.java b/src/buttondevteam/bucket/core/TBMCPlayerSaveEvent.java index 646e8b8..4e8f46b 100644 --- a/src/buttondevteam/bucket/core/TBMCPlayerSaveEvent.java +++ b/src/buttondevteam/bucket/core/TBMCPlayerSaveEvent.java @@ -1,4 +1,4 @@ -package buttondevteam.core; +package buttondevteam.bucket.core; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.event.Event;