From 6f8d6f8a407c1f9b96297949d2d1559167e7a2e8 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Mon, 10 Aug 2015 01:55:50 -0500 Subject: [PATCH] Move Bonus and Poll to core --- .../mineplex/core}/bonuses/BonusAmount.java | 2 +- .../core}/bonuses/BonusClientData.java | 2 +- .../mineplex/core}/bonuses/BonusManager.java | 45 +++++++++---------- .../core}/bonuses/BonusRepository.java | 2 +- .../mineplex/core}/bonuses/StreakRecord.java | 2 +- .../mineplex/core}/bonuses/VoteHandler.java | 2 +- .../bonuses/animations/AnimationCarl.java | 3 +- .../bonuses/commands/AnimationCommand.java | 4 +- .../core}/bonuses/commands/GuiCommand.java | 7 ++- .../core}/bonuses/commands/TicketCommand.java | 4 +- .../core}/bonuses/event/CarlSpinnerEvent.java | 2 +- .../mineplex/core}/bonuses/gui/BonusGui.java | 15 +++---- .../mineplex/core}/bonuses/gui/SpinGui.java | 10 ++--- .../bonuses/gui/buttons/CarlSpinButton.java | 6 +-- .../bonuses/gui/buttons/DailyBonusButton.java | 10 ++--- .../core}/bonuses/gui/buttons/PollButton.java | 6 +-- .../bonuses/gui/buttons/RankBonusButton.java | 6 +-- .../bonuses/gui/buttons/RewardButton.java | 3 +- .../core}/bonuses/gui/buttons/VoteButton.java | 18 +++----- .../src/mineplex/core}/poll/DisplayType.java | 2 +- .../mineplex/core}/poll/PlayerPollData.java | 2 +- .../src/mineplex/core}/poll/Poll.java | 4 +- .../src/mineplex/core}/poll/PollManager.java | 6 +-- .../mineplex/core}/poll/PollRepository.java | 2 +- .../src/mineplex/core}/poll/PollStats.java | 2 +- .../core}/poll/command/PollCommand.java | 10 ++--- .../Mineplex.Hub/src/mineplex/hub/Hub.java | 3 +- .../src/mineplex/hub/HubManager.java | 6 +-- 28 files changed, 82 insertions(+), 104 deletions(-) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/BonusAmount.java (98%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/BonusClientData.java (98%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/BonusManager.java (94%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/BonusRepository.java (99%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/StreakRecord.java (90%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/VoteHandler.java (95%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/animations/AnimationCarl.java (96%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/commands/AnimationCommand.java (87%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/commands/GuiCommand.java (71%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/commands/TicketCommand.java (94%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/event/CarlSpinnerEvent.java (95%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/BonusGui.java (71%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/SpinGui.java (94%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/buttons/CarlSpinButton.java (93%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/buttons/DailyBonusButton.java (96%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/buttons/PollButton.java (97%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/buttons/RankBonusButton.java (97%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/buttons/RewardButton.java (90%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/bonuses/gui/buttons/VoteButton.java (89%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/DisplayType.java (91%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/PlayerPollData.java (97%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/Poll.java (95%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/PollManager.java (97%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/PollRepository.java (99%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/PollStats.java (97%) rename Plugins/{Mineplex.Hub/src/mineplex/hub => Mineplex.Core/src/mineplex/core}/poll/command/PollCommand.java (96%) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusAmount.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusAmount.java similarity index 98% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusAmount.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusAmount.java index 17b12a1c7..76e746f43 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusAmount.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusAmount.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses; +package mineplex.core.bonuses; import java.util.List; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusClientData.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusClientData.java similarity index 98% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusClientData.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusClientData.java index d145a7e35..08cccac7f 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusClientData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusClientData.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses; +package mineplex.core.bonuses; import java.sql.Date; import java.sql.Timestamp; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusManager.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java similarity index 94% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusManager.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java index c997deaf8..268664bdf 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java @@ -1,10 +1,9 @@ -package mineplex.hub.bonuses; +package mineplex.core.bonuses; import java.sql.Date; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Calendar; -import java.util.Iterator; import java.util.TimeZone; import mineplex.core.MiniClientPlugin; @@ -28,21 +27,21 @@ import mineplex.core.hologram.HologramManager; import mineplex.core.npc.Npc; import mineplex.core.npc.NpcManager; import mineplex.core.reward.RewardManager; +import mineplex.core.stats.StatsManager; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.votifier.VotifierCommand; import mineplex.database.Tables; -import mineplex.hub.bonuses.animations.AnimationCarl; -import mineplex.hub.bonuses.commands.AnimationCommand; -import mineplex.hub.bonuses.commands.GuiCommand; -import mineplex.hub.bonuses.commands.TicketCommand; -import mineplex.hub.bonuses.event.CarlSpinnerEvent; -import mineplex.hub.bonuses.gui.BonusGui; +import mineplex.core.bonuses.animations.AnimationCarl; +import mineplex.core.bonuses.commands.AnimationCommand; +import mineplex.core.bonuses.commands.GuiCommand; +import mineplex.core.bonuses.commands.TicketCommand; +import mineplex.core.bonuses.event.CarlSpinnerEvent; +import mineplex.core.bonuses.gui.BonusGui; import mineplex.database.tables.records.BonusRecord; -import mineplex.hub.bonuses.gui.SpinGui; -import mineplex.hub.poll.PollManager; +import mineplex.core.bonuses.gui.SpinGui; +import mineplex.core.poll.PollManager; import mineplex.serverdata.commands.ServerCommandManager; -import org.jooq.DSLContext; import org.jooq.SQLDialect; import org.jooq.impl.DSL; @@ -50,12 +49,9 @@ import org.bukkit.Bukkit; import org.bukkit.Sound; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity; import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerInteractEntityEvent; -import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.plugin.java.JavaPlugin; @@ -114,6 +110,7 @@ public class BonusManager extends MiniClientPlugin implements I private NpcManager _npcManager; private HologramManager _hologramManager; private RewardManager _rewardManager; + private StatsManager _statsManager; public boolean _enabled; private Npc _carlNpc; private AnimationCarl _animation; @@ -122,7 +119,7 @@ public class BonusManager extends MiniClientPlugin implements I private StreakRecord _dailyStreak; private StreakRecord _voteStreak; - public BonusManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, PollManager pollManager, NpcManager npcManager, HologramManager hologramManager, RewardManager rewardManager) + public BonusManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, PollManager pollManager, NpcManager npcManager, HologramManager hologramManager, RewardManager rewardManager, StatsManager statsManager) { super("Bonus", plugin); _repository = new BonusRepository(plugin, this, donationManager); @@ -132,6 +129,7 @@ public class BonusManager extends MiniClientPlugin implements I _hologramManager = hologramManager; _rewardManager = rewardManager; _pollManager = pollManager; + _statsManager = statsManager; // Hope to god this works! _canVote = true; @@ -648,11 +646,11 @@ public class BonusManager extends MiniClientPlugin implements I { if (data) { - UtilPlayer.message(player, F.main("Bonus", "Rewarded " + F.elem(gems + " Gems"))); + UtilPlayer.message(player, F.main("Carl", "Rewarded " + F.elem(gems + " Gems"))); } else { - UtilPlayer.message(player, F.main("Bonus", "Failed to process Gems")); + UtilPlayer.message(player, F.main("Carl", "Failed to process Gems")); } } }, "BonusManager", player.getName(), player.getUniqueId(), gems, true); @@ -667,11 +665,11 @@ public class BonusManager extends MiniClientPlugin implements I { if (data) { - UtilPlayer.message(player, F.main("Bonus", "Rewarded " + F.elem(gold + " Gold"))); + UtilPlayer.message(player, F.main("Carl", "Rewarded " + F.elem(gold + " Gold"))); } else { - UtilPlayer.message(player, F.main("Bonus", "Failed to process Gold")); + UtilPlayer.message(player, F.main("Carl", "Failed to process Gold")); } } }, "BonusManager", player.getName(), coreClient.getAccountId(), gold, true); @@ -686,11 +684,11 @@ public class BonusManager extends MiniClientPlugin implements I { if (data) { - UtilPlayer.message(player, F.main("Bonus", "Rewarded " + F.elem(coins + " Coins"))); + UtilPlayer.message(player, F.main("Carl", "Rewarded " + F.elem(coins + " Coins"))); } else { - UtilPlayer.message(player, F.main("Bonus", "Failed to process Coins")); + UtilPlayer.message(player, F.main("Carl", "Failed to process Coins")); } } }, "BonusManager", player.getName(), coreClient.getAccountId(), coins, true); @@ -714,7 +712,7 @@ public class BonusManager extends MiniClientPlugin implements I public void run() { bonusClient.setTickets(newTickets); - UtilPlayer.message(player, F.main("Bonus", "Rewarded " + F.elem(tickets + " Carl Spin Ticket"))); + UtilPlayer.message(player, F.main("Carl", "Rewarded " + F.elem(tickets + " Carl Spin Ticket"))); } }); } @@ -729,7 +727,8 @@ public class BonusManager extends MiniClientPlugin implements I if (experience > 0) { - // TODO + _statsManager.incrementStat(player, "Global.ExpEarned", experience); + UtilPlayer.message(player, F.main("Carl", "Rewarded " + F.elem(experience + " Experience"))); } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java similarity index 99% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusRepository.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java index 2f53ae3ac..ea14f4141 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/BonusRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses; +package mineplex.core.bonuses; import java.sql.CallableStatement; import java.sql.Connection; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/StreakRecord.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/StreakRecord.java similarity index 90% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/StreakRecord.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/StreakRecord.java index 901ef4ad6..7757a2c8c 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/StreakRecord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/StreakRecord.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses; +package mineplex.core.bonuses; public class StreakRecord { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/VoteHandler.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/VoteHandler.java similarity index 95% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/VoteHandler.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/VoteHandler.java index 73e11305b..4dec15845 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/VoteHandler.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/VoteHandler.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses; +package mineplex.core.bonuses; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/animations/AnimationCarl.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/animations/AnimationCarl.java similarity index 96% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/animations/AnimationCarl.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/animations/AnimationCarl.java index 02783c89a..89ec4d85d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/animations/AnimationCarl.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/animations/AnimationCarl.java @@ -1,7 +1,6 @@ -package mineplex.hub.bonuses.animations; +package mineplex.core.bonuses.animations; import mineplex.core.common.util.UtilAction; -import mineplex.core.common.util.UtilMath; import mineplex.core.reward.Reward; import mineplex.core.reward.RewardData; import mineplex.core.treasure.animation.Animation; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/AnimationCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/AnimationCommand.java similarity index 87% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/AnimationCommand.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/AnimationCommand.java index 28e2f493a..0494fc2f0 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/AnimationCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/AnimationCommand.java @@ -1,10 +1,10 @@ -package mineplex.hub.bonuses.commands; +package mineplex.core.bonuses.commands; import org.bukkit.entity.Player; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; -import mineplex.hub.bonuses.BonusManager; +import mineplex.core.bonuses.BonusManager; public class AnimationCommand extends CommandBase{ diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/GuiCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/GuiCommand.java similarity index 71% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/GuiCommand.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/GuiCommand.java index 655a94199..c3ef35edd 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/GuiCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/GuiCommand.java @@ -1,12 +1,11 @@ -package mineplex.hub.bonuses.commands; +package mineplex.core.bonuses.commands; import org.bukkit.entity.Player; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; -import mineplex.core.reward.RewardManager; -import mineplex.hub.bonuses.BonusManager; -import mineplex.hub.bonuses.gui.BonusGui; +import mineplex.core.bonuses.BonusManager; +import mineplex.core.bonuses.gui.BonusGui; public class GuiCommand extends CommandBase{ diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/TicketCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java similarity index 94% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/TicketCommand.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java index 14afed1e8..20aa7ad66 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/commands/TicketCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java @@ -1,10 +1,10 @@ -package mineplex.hub.bonuses.commands; +package mineplex.core.bonuses.commands; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; -import mineplex.hub.bonuses.BonusManager; +import mineplex.core.bonuses.BonusManager; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/event/CarlSpinnerEvent.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/event/CarlSpinnerEvent.java similarity index 95% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/event/CarlSpinnerEvent.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/event/CarlSpinnerEvent.java index fed71229b..a07e1770e 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/event/CarlSpinnerEvent.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/event/CarlSpinnerEvent.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.event; +package mineplex.core.bonuses.event; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/BonusGui.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/BonusGui.java similarity index 71% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/BonusGui.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/BonusGui.java index ea7978621..48b2e0a6e 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/BonusGui.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/BonusGui.java @@ -1,17 +1,16 @@ -package mineplex.hub.bonuses.gui; +package mineplex.core.bonuses.gui; import mineplex.core.gui.SimpleGui; import mineplex.core.reward.RewardManager; -import mineplex.hub.bonuses.BonusManager; -import mineplex.hub.bonuses.gui.buttons.CarlSpinButton; -import mineplex.hub.bonuses.gui.buttons.DailyBonusButton; -import mineplex.hub.bonuses.gui.buttons.PollButton; -import mineplex.hub.bonuses.gui.buttons.RankBonusButton; -import mineplex.hub.bonuses.gui.buttons.VoteButton; +import mineplex.core.bonuses.BonusManager; +import mineplex.core.bonuses.gui.buttons.CarlSpinButton; +import mineplex.core.bonuses.gui.buttons.DailyBonusButton; +import mineplex.core.bonuses.gui.buttons.PollButton; +import mineplex.core.bonuses.gui.buttons.RankBonusButton; +import mineplex.core.bonuses.gui.buttons.VoteButton; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; -import org.omg.CORBA._PolicyStub; public class BonusGui extends SimpleGui { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/SpinGui.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java similarity index 94% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/SpinGui.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java index 9e9bbefa9..80268a046 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/SpinGui.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.gui; +package mineplex.core.bonuses.gui; import java.util.ArrayList; @@ -14,14 +14,10 @@ import mineplex.core.reward.RewardManager; import mineplex.core.reward.RewardRarity; import mineplex.core.reward.RewardType; import mineplex.core.shop.item.ShopItem; -import mineplex.core.treasure.animation.LootLegendaryAnimation; -import mineplex.core.treasure.animation.LootMythicalAnimation; -import mineplex.core.treasure.animation.LootRareAnimation; -import mineplex.core.treasure.animation.LootUncommonAnimation; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.hub.bonuses.BonusManager; -import mineplex.hub.bonuses.gui.buttons.RewardButton; +import mineplex.core.bonuses.BonusManager; +import mineplex.core.bonuses.gui.buttons.RewardButton; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/CarlSpinButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/CarlSpinButton.java similarity index 93% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/CarlSpinButton.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/CarlSpinButton.java index 4c295f5dd..006135c5d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/CarlSpinButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/CarlSpinButton.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.gui.buttons; +package mineplex.core.bonuses.gui.buttons; import java.util.ArrayList; @@ -13,8 +13,8 @@ import mineplex.core.common.util.C; import mineplex.core.gui.GuiItem; import mineplex.core.reward.RewardManager; import mineplex.core.shop.item.ShopItem; -import mineplex.hub.bonuses.BonusClientData; -import mineplex.hub.bonuses.BonusManager; +import mineplex.core.bonuses.BonusClientData; +import mineplex.core.bonuses.BonusManager; public class CarlSpinButton implements GuiItem { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/DailyBonusButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/DailyBonusButton.java similarity index 96% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/DailyBonusButton.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/DailyBonusButton.java index 8ee34647f..897852d8d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/DailyBonusButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/DailyBonusButton.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.gui.buttons; +package mineplex.core.bonuses.gui.buttons; import java.util.ArrayList; @@ -16,10 +16,10 @@ import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.shop.item.ShopItem; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.hub.bonuses.BonusAmount; -import mineplex.hub.bonuses.BonusClientData; -import mineplex.hub.bonuses.BonusManager; -import mineplex.hub.bonuses.StreakRecord; +import mineplex.core.bonuses.BonusAmount; +import mineplex.core.bonuses.BonusClientData; +import mineplex.core.bonuses.BonusManager; +import mineplex.core.bonuses.StreakRecord; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/PollButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/PollButton.java similarity index 97% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/PollButton.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/PollButton.java index 008a024ce..e669f2ad3 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/PollButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/PollButton.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.gui.buttons; +package mineplex.core.bonuses.gui.buttons; import java.util.ArrayList; import java.util.HashMap; @@ -13,8 +13,8 @@ import mineplex.core.gui.SimpleGuiItem; import mineplex.core.gui.botton.BackBotton; import mineplex.core.gui.pages.TimedMessageWindow; import mineplex.core.itemstack.ItemStackFactory; -import mineplex.hub.poll.Poll; -import mineplex.hub.poll.PollManager; +import mineplex.core.poll.Poll; +import mineplex.core.poll.PollManager; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/RankBonusButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/RankBonusButton.java similarity index 97% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/RankBonusButton.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/RankBonusButton.java index b394a398e..21e6fd318 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/RankBonusButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/RankBonusButton.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.gui.buttons; +package mineplex.core.bonuses.gui.buttons; import java.util.ArrayList; @@ -16,8 +16,8 @@ import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.shop.item.ShopItem; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.hub.bonuses.BonusAmount; -import mineplex.hub.bonuses.BonusManager; +import mineplex.core.bonuses.BonusAmount; +import mineplex.core.bonuses.BonusManager; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/RewardButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/RewardButton.java similarity index 90% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/RewardButton.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/RewardButton.java index 5f7b0050b..73ff6c9cc 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/RewardButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/RewardButton.java @@ -1,11 +1,10 @@ -package mineplex.hub.bonuses.gui.buttons; +package mineplex.core.bonuses.gui.buttons; import org.bukkit.event.inventory.ClickType; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import mineplex.core.gui.GuiItem; -import mineplex.core.reward.Reward; import mineplex.core.reward.RewardData; public class RewardButton implements GuiItem diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/VoteButton.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java similarity index 89% rename from Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/VoteButton.java rename to Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java index 969fc2f9d..da9360afc 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/bonuses/gui/buttons/VoteButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/buttons/VoteButton.java @@ -1,4 +1,4 @@ -package mineplex.hub.bonuses.gui.buttons; +package mineplex.core.bonuses.gui.buttons; import java.util.ArrayList; @@ -10,25 +10,17 @@ import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilTime.TimeUnit; import mineplex.core.gui.GuiItem; import mineplex.core.gui.ItemRefresher; -import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.shop.item.ShopItem; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; -import mineplex.hub.bonuses.BonusAmount; -import mineplex.hub.bonuses.BonusClientData; -import mineplex.hub.bonuses.BonusManager; -import mineplex.hub.bonuses.StreakRecord; - -import net.minecraft.server.v1_7_R4.ChatSerializer; -import net.minecraft.server.v1_7_R4.IChatBaseComponent; -import net.minecraft.server.v1_7_R4.PacketPlayOutChat; +import mineplex.core.bonuses.BonusAmount; +import mineplex.core.bonuses.BonusClientData; +import mineplex.core.bonuses.BonusManager; +import mineplex.core.bonuses.StreakRecord; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import org.bukkit.event.inventory.ClickType; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/DisplayType.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/DisplayType.java similarity index 91% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/DisplayType.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/DisplayType.java index 3045f5277..c593307e9 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/DisplayType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/DisplayType.java @@ -1,4 +1,4 @@ -package mineplex.hub.poll; +package mineplex.core.poll; import mineplex.core.common.Rank; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PlayerPollData.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/PlayerPollData.java similarity index 97% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/PlayerPollData.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/PlayerPollData.java index e0de0ec32..3465fae3b 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PlayerPollData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/PlayerPollData.java @@ -1,4 +1,4 @@ -package mineplex.hub.poll; +package mineplex.core.poll; import mineplex.core.common.util.NautHashMap; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/Poll.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/Poll.java similarity index 95% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/Poll.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/Poll.java index 1998173ff..715b1f275 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/Poll.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/Poll.java @@ -1,6 +1,4 @@ -package mineplex.hub.poll; - -import mineplex.core.common.Rank; +package mineplex.core.poll; /** * Created by Shaun on 8/16/2014. diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java similarity index 97% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java index 7fb0e00fd..5fa00cf3d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollManager.java @@ -1,4 +1,4 @@ -package mineplex.hub.poll; +package mineplex.core.poll; import java.sql.ResultSet; import java.sql.SQLException; @@ -23,9 +23,7 @@ import mineplex.core.common.util.Callback; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.core.donation.DonationManager; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; -import mineplex.hub.poll.command.PollCommand; +import mineplex.core.poll.command.PollCommand; public class PollManager extends MiniDbClientPlugin { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java similarity index 99% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollRepository.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java index e38e980ec..53884c66f 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java @@ -1,4 +1,4 @@ -package mineplex.hub.poll; +package mineplex.core.poll; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollStats.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollStats.java similarity index 97% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollStats.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/PollStats.java index 591302c01..5f3ecdb2a 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/PollStats.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollStats.java @@ -1,4 +1,4 @@ -package mineplex.hub.poll; +package mineplex.core.poll; /** * Created by Shaun on 8/26/2014. diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/command/PollCommand.java similarity index 96% rename from Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java rename to Plugins/Mineplex.Core/src/mineplex/core/poll/command/PollCommand.java index fe5997c79..bafdb1dbe 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/poll/command/PollCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/command/PollCommand.java @@ -1,4 +1,4 @@ -package mineplex.hub.poll.command; +package mineplex.core.poll.command; import java.text.DecimalFormat; import java.util.List; @@ -13,10 +13,10 @@ import mineplex.core.common.jsonchat.JsonMessage; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; -import mineplex.hub.poll.PlayerPollData; -import mineplex.hub.poll.Poll; -import mineplex.hub.poll.PollManager; -import mineplex.hub.poll.PollStats; +import mineplex.core.poll.PlayerPollData; +import mineplex.core.poll.Poll; +import mineplex.core.poll.PollManager; +import mineplex.core.poll.PollStats; /** * Created by Shaun on 8/17/2014. diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index c99d09044..f5a62d294 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -39,7 +39,6 @@ import mineplex.core.recharge.Recharge; import mineplex.core.resourcepack.ResUnloadCheck; import mineplex.core.resourcepack.ResPackManager; import mineplex.core.serverConfig.ServerConfiguration; -import mineplex.core.spawn.Spawn; import mineplex.core.stats.StatsManager; import mineplex.core.status.ServerStatusManager; import mineplex.core.task.TaskManager; @@ -49,7 +48,7 @@ import mineplex.core.updater.Updater; import mineplex.core.velocity.VelocityFix; import mineplex.core.visibility.VisibilityManager; import mineplex.hub.modules.StackerManager; -import mineplex.hub.poll.PollManager; +import mineplex.core.poll.PollManager; import mineplex.hub.queue.QueueManager; import mineplex.hub.server.ServerManager; import mineplex.minecraft.game.classcombat.Class.ClassManager; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 03ffee480..bfb01019f 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -86,7 +86,7 @@ import mineplex.core.task.TaskManager; import mineplex.core.treasure.TreasureManager; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.hub.bonuses.BonusManager; +import mineplex.core.bonuses.BonusManager; import mineplex.hub.commands.ForcefieldRadius; import mineplex.hub.commands.GadgetToggle; import mineplex.hub.commands.GameModeCommand; @@ -98,7 +98,7 @@ import mineplex.hub.modules.NewsManager; import mineplex.hub.modules.ParkourManager; import mineplex.hub.modules.TextManager; import mineplex.hub.modules.WorldManager; -import mineplex.hub.poll.PollManager; +import mineplex.core.poll.PollManager; import mineplex.hub.profile.gui.GUIProfile; import mineplex.hub.tutorial.TutorialManager; import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; @@ -214,7 +214,7 @@ public class HubManager extends MiniClientPlugin ((CraftWorld)Bukkit.getWorlds().get(0)).getHandle().pvpMode = true; - new BonusManager(plugin, clientManager, donationManager, pollManager , npcManager, hologramManager, rewardManager); + new BonusManager(plugin, clientManager, donationManager, pollManager , npcManager, hologramManager, rewardManager, statsManager); // NotificationManager notificationManager = new NotificationManager(plugin, clientManager, donationManager);