diff --git a/Plugins/.idea/modules.xml b/Plugins/.idea/modules.xml
index 7da29f6c1..ea2ba738a 100644
--- a/Plugins/.idea/modules.xml
+++ b/Plugins/.idea/modules.xml
@@ -7,14 +7,15 @@
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/ArcadeButton.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/ArcadeButton.java
index f51ec5a31..c2b087911 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/ArcadeButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/ArcadeButton.java
@@ -2,6 +2,7 @@ package mineplex.core.achievement.ui.button;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementCategory;
@@ -9,13 +10,13 @@ import mineplex.core.achievement.AchievementManager;
import mineplex.core.achievement.ui.AchievementShop;
import mineplex.core.achievement.ui.page.ArcadeMainPage;
import mineplex.core.donation.DonationManager;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.core.stats.StatsManager;
/**
* Created by Shaun on 8/22/2014.
*/
-public class ArcadeButton extends SingleButton
+public class ArcadeButton implements IButton
{
private AchievementShop _shop;
private AchievementManager _achievementManager;
@@ -35,7 +36,7 @@ public class ArcadeButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_shop.OpenPageForPlayer(player, new ArcadeMainPage(_achievementManager, _statsManager, _shop, _clientManager, _donationManager, "Arcade Games", player, _target));
player.playSound(player.getLocation(), Sound.CLICK, 1, 1);
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/CategoryButton.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/CategoryButton.java
index c64c8bef7..bfe41f073 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/CategoryButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/button/CategoryButton.java
@@ -2,6 +2,7 @@ package mineplex.core.achievement.ui.button;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementCategory;
@@ -9,13 +10,13 @@ import mineplex.core.achievement.AchievementManager;
import mineplex.core.achievement.ui.AchievementShop;
import mineplex.core.achievement.ui.page.AchievementPage;
import mineplex.core.donation.DonationManager;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.core.stats.StatsManager;
/**
* Created by Shaun on 8/22/2014.
*/
-public class CategoryButton extends SingleButton
+public class CategoryButton implements IButton
{
private AchievementShop _shop;
private AchievementCategory _category;
@@ -37,7 +38,7 @@ public class CategoryButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_shop.OpenPageForPlayer(player, new AchievementPage(_achievementManager, _statsManager, _category, _shop, _clientManager, _donationManager, player, _target));
player.playSound(player.getLocation(), Sound.CLICK, 1, 1);
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java
index 95ea3a8e6..884c4ad35 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/ui/page/AchievementPage.java
@@ -7,6 +7,7 @@ import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@@ -18,8 +19,8 @@ import mineplex.core.achievement.AchievementManager;
import mineplex.core.achievement.ui.AchievementShop;
import mineplex.core.common.util.C;
import mineplex.core.donation.DonationManager;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.core.stats.PlayerStats;
import mineplex.core.stats.StatsManager;
@@ -134,10 +135,9 @@ public class AchievementPage extends ShopPageBase _mount;
private MountPage _page;
@@ -19,7 +20,7 @@ public class ActivateMountButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PlayAcceptSound(player);
_mount.Enable(player);
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/ActivatePetButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/ActivatePetButton.java
index cd7cff9d0..447aa0a44 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/ActivatePetButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/ActivatePetButton.java
@@ -1,13 +1,14 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.cosmetic.ui.page.PetPage;
import mineplex.core.pet.Pet;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class ActivatePetButton extends SingleButton
+public class ActivatePetButton implements IButton
{
private Pet _pet;
private PetPage _page;
@@ -19,7 +20,7 @@ public class ActivatePetButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PlayAcceptSound(player);
_page.getPlugin().getPetManager().AddPetOwner(player, _pet.GetPetType(), player.getLocation());
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/CloseButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/CloseButton.java
index f9d116a77..01f1ec248 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/CloseButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/CloseButton.java
@@ -1,13 +1,13 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class CloseButton extends SingleButton
+public class CloseButton implements IButton
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
player.closeInventory();
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateGadgetButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateGadgetButton.java
index c608686c7..f5cd11834 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateGadgetButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateGadgetButton.java
@@ -1,12 +1,13 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.GadgetPage;
import mineplex.core.gadget.types.Gadget;
-import mineplex.core.shop.item.ComplexButton;
+import mineplex.core.shop.item.IButton;
-public class DeactivateGadgetButton extends ComplexButton
+public class DeactivateGadgetButton implements IButton
{
private Gadget _gadget;
private GadgetPage _page;
@@ -17,27 +18,12 @@ public class DeactivateGadgetButton extends ComplexButton
_page = page;
}
- @Override
- public void ClickedLeft(Player player)
+ public void onClick(Player player, ClickType clickType)
{
- _page.deactivateGadget(player, _gadget);
- }
-
- @Override
- public void ClickedRight(Player player)
- {
- _page.handleRightClick(player, _gadget);
- }
+ if (clickType.isLeftClick())
+ _page.deactivateGadget(player, _gadget);
+ else if (clickType.isRightClick())
+ _page.handleRightClick(player, _gadget);
- @Override
- public void ClickedShiftLeft(Player player)
- {
- _page.deactivateGadget(player, _gadget);
- }
-
- @Override
- public void ClickedShiftRight(Player player)
- {
- _page.handleRightClick(player, _gadget);
}
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateMountButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateMountButton.java
index feb6114f8..7b82d4d83 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateMountButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivateMountButton.java
@@ -1,12 +1,13 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.core.mount.Mount;
-public class DeactivateMountButton extends SingleButton
+public class DeactivateMountButton implements IButton
{
private Mount> _mount;
private ShopPageBase,?> _page;
@@ -17,8 +18,7 @@ public class DeactivateMountButton extends SingleButton
_page = page;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PlayAcceptSound(player);
_mount.Disable(player);
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivatePetButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivatePetButton.java
index a8518f575..4c18ff927 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivatePetButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/DeactivatePetButton.java
@@ -1,12 +1,13 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.pet.PetManager;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.page.ShopPageBase;
-public class DeactivatePetButton extends SingleButton
+public class DeactivatePetButton implements IButton
{
private ShopPageBase,?> _page;
private PetManager _petManager;
@@ -17,8 +18,7 @@ public class DeactivatePetButton extends SingleButton
_petManager = petManager;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PlayAcceptSound(player);
_petManager.RemovePet(player, true);
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/GadgetButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/GadgetButton.java
index 3d10c2700..48653877a 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/GadgetButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/GadgetButton.java
@@ -1,12 +1,13 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.GadgetPage;
import mineplex.core.gadget.types.Gadget;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class GadgetButton extends SingleButton
+public class GadgetButton implements IButton
{
private Gadget _gadget;
private GadgetPage _page;
@@ -18,7 +19,7 @@ public class GadgetButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.purchaseGadget(player, _gadget);
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/MountButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/MountButton.java
index adc7b1464..2fe47bf19 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/MountButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/MountButton.java
@@ -1,8 +1,9 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.page.ConfirmationPage;
import mineplex.core.common.CurrencyType;
import mineplex.core.cosmetic.CosmeticManager;
@@ -10,7 +11,7 @@ import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.page.MountPage;
import mineplex.core.mount.Mount;
-public class MountButton extends SingleButton
+public class MountButton implements IButton
{
private Mount> _mount;
private MountPage _page;
@@ -22,7 +23,7 @@ public class MountButton extends SingleButton
}
@Override
- public void Clicked(final Player player)
+ public void onClick(final Player player, ClickType clickType)
{
_page.getShop().OpenPageForPlayer(player, new ConfirmationPage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), new Runnable()
{
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenCostumes.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenCostumes.java
index a41ee33c4..347a007be 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenCostumes.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenCostumes.java
@@ -1,11 +1,12 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.Menu;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class OpenCostumes extends SingleButton
+public class OpenCostumes implements IButton
{
private Menu _menu;
@@ -15,7 +16,7 @@ public class OpenCostumes extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.openCostumes(player);
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenGadgets.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenGadgets.java
index 8654ff9f1..baeb5dbf5 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenGadgets.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenGadgets.java
@@ -5,6 +5,7 @@ import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.shop.item.IButton;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryClickEvent;
public class OpenGadgets implements IButton
@@ -17,8 +18,8 @@ public class OpenGadgets implements IButton
}
@Override
- public void Clicked(InventoryClickEvent event)
+ public void onClick(Player player, ClickType clickType)
{
- _page.getShop().OpenPageForPlayer((Player)event.getWhoClicked(), new GadgetPage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), "Gadgets", (Player)event.getWhoClicked()));
+ _page.getShop().OpenPageForPlayer(player, new GadgetPage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), "Gadgets", player));
}
}
\ No newline at end of file
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMorphs.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMorphs.java
index ec03a17fe..ec42fcc25 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMorphs.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMorphs.java
@@ -2,11 +2,12 @@ package mineplex.core.cosmetic.ui.button;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.cosmetic.ui.page.MorphPage;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class OpenMorphs extends SingleButton
+public class OpenMorphs implements IButton
{
private Menu _page;
@@ -15,8 +16,7 @@ public class OpenMorphs extends SingleButton
_page = page;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.getShop().OpenPageForPlayer(player, new MorphPage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), "Morphs", player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMounts.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMounts.java
index 9953e8690..42fbb4756 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMounts.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMounts.java
@@ -2,11 +2,12 @@ package mineplex.core.cosmetic.ui.button;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.cosmetic.ui.page.MountPage;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class OpenMounts extends SingleButton
+public class OpenMounts implements IButton
{
private Menu _page;
@@ -15,8 +16,7 @@ public class OpenMounts extends SingleButton
_page = page;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.getShop().OpenPageForPlayer(player, new MountPage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), "Mounts", player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMusic.java
index 3bdefba2b..72d1c2d18 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMusic.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenMusic.java
@@ -1,14 +1,15 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.Menu;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
/**
* Created by shaun on 14-09-15.
*/
-public class OpenMusic extends SingleButton
+public class OpenMusic implements IButton
{
private Menu _menu;
@@ -17,8 +18,7 @@ public class OpenMusic extends SingleButton
_menu = menu;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.openMusic(player);
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenParticles.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenParticles.java
index 4059a0a69..74720e5e6 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenParticles.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenParticles.java
@@ -2,11 +2,12 @@ package mineplex.core.cosmetic.ui.button;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.cosmetic.ui.page.ParticlePage;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class OpenParticles extends SingleButton
+public class OpenParticles implements IButton
{
private Menu _page;
@@ -15,8 +16,7 @@ public class OpenParticles extends SingleButton
_page = page;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.getShop().OpenPageForPlayer(player, new ParticlePage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), "Particles", player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenPets.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenPets.java
index 7b852fe68..1dd4118a9 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenPets.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/OpenPets.java
@@ -2,11 +2,12 @@ package mineplex.core.cosmetic.ui.button;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.cosmetic.ui.page.PetPage;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class OpenPets extends SingleButton
+public class OpenPets implements IButton
{
private Menu _page;
@@ -14,8 +15,9 @@ public class OpenPets extends SingleButton
{
_page = page;
}
+
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.getShop().OpenPageForPlayer(player, new PetPage(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), "Pets", player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/PetButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/PetButton.java
index 1991c4417..6578303c7 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/PetButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/PetButton.java
@@ -1,12 +1,13 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.pet.Pet;
import mineplex.core.cosmetic.ui.page.PetPage;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class PetButton extends SingleButton
+public class PetButton implements IButton
{
private Pet _pet;
private PetPage _page;
@@ -17,8 +18,7 @@ public class PetButton extends SingleButton
_page = page;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.purchasePet(player, _pet);
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/RenamePetButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/RenamePetButton.java
index 496459c40..06a55943c 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/RenamePetButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/RenamePetButton.java
@@ -2,12 +2,13 @@ package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.PetPage;
import mineplex.core.pet.Pet;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class RenamePetButton extends SingleButton
+public class RenamePetButton implements IButton
{
private PetPage _page;
@@ -17,7 +18,7 @@ public class RenamePetButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PlayAcceptSound(player);
Creature currentPet = _page.getPlugin().getPetManager().getActivePet(player.getName());
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/SelectTagButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/SelectTagButton.java
index e90ae129b..76461ce4a 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/SelectTagButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/SelectTagButton.java
@@ -1,11 +1,12 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.PetTagPage;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
-public class SelectTagButton extends SingleButton
+public class SelectTagButton implements IButton
{
private PetTagPage _page;
@@ -14,8 +15,7 @@ public class SelectTagButton extends SingleButton
_page = page;
}
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.SelectTag();
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/TreasureButton.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/TreasureButton.java
index 4c057de59..05855bcde 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/TreasureButton.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/TreasureButton.java
@@ -1,11 +1,12 @@
package mineplex.core.cosmetic.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.cosmetic.ui.page.Menu;
-import mineplex.core.shop.item.ComplexButton;
+import mineplex.core.shop.item.IButton;
-public class TreasureButton extends ComplexButton
+public class TreasureButton implements IButton
{
private Menu _menu;
private boolean _hasEnoughChests;
@@ -20,36 +21,24 @@ public class TreasureButton extends ComplexButton
_canPurchaseKey = canPurchaseKey;
}
- @Override
- public void ClickedLeft(Player player)
+ public void onClick(Player player, ClickType clickType)
{
- if (_hasEnoughChests && _hasEnoughKeys)
+ if (clickType.isLeftClick())
{
- _menu.openTreasure(player);
- player.closeInventory();
+ if (_hasEnoughChests && _hasEnoughKeys)
+ {
+ _menu.openTreasure(player);
+ player.closeInventory();
+ }
+ else if (_hasEnoughChests && _canPurchaseKey)
+ {
+ _menu.attemptPurchaseKey(player);
+ }
}
- else if (_hasEnoughChests && _canPurchaseKey)
+ else if (clickType.isRightClick())
{
- _menu.attemptPurchaseKey(player);
+ if (_canPurchaseKey)
+ _menu.attemptPurchaseKey(player);
}
}
-
- @Override
- public void ClickedRight(Player player)
- {
- if (_canPurchaseKey)
- _menu.attemptPurchaseKey(player);
- }
-
- @Override
- public void ClickedShiftLeft(Player player)
- {
- ClickedLeft(player);
- }
-
- @Override
- public void ClickedShiftRight(Player player)
- {
- ClickedRight(player);
- }
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java
index e9ebb9b66..a7c356559 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java
@@ -6,6 +6,7 @@ import java.util.List;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
@@ -16,8 +17,8 @@ import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.ItemGadget;
import mineplex.core.gadget.types.OutfitGadget;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
/**
* Created by shaun on 14-09-15.
@@ -62,10 +63,9 @@ public class CostumePage extends GadgetPage
addGlow(slot);
}
- AddButton(8, new ShopItem(Material.TNT, C.cRed + C.Bold + "Remove all Clothing", new String[] { }, 1, false), new SingleButton()
+ AddButton(8, new ShopItem(Material.TNT, C.cRed + C.Bold + "Remove all Clothing", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
boolean gadgetDisabled = false;
for (Gadget gadget : Plugin.getGadgetManager().getGadgets(GadgetType.Costume))
@@ -85,10 +85,9 @@ public class CostumePage extends GadgetPage
}
});
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java
index f0d0976bc..b319d3236 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java
@@ -6,6 +6,7 @@ import java.util.List;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.CurrencyType;
@@ -20,8 +21,8 @@ import mineplex.core.gadget.gadgets.MorphNotch;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.ItemGadget;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.ConfirmationPage;
import mineplex.core.shop.page.ShopPageBase;
@@ -51,10 +52,9 @@ public class GadgetPage extends ShopPageBase
slot = 28;
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java
index 689d4cc38..3a479d02d 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.CurrencyType;
@@ -25,8 +26,8 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.mount.Mount;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.ConfirmationPage;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.core.treasure.TreasureKey;
@@ -120,10 +121,9 @@ public class Menu extends ShopPageBase
AddButton(18 + 9,
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), ChatColor.RESET + C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
- new SingleButton()
+ new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
PlayAcceptSound(player);
gadget.Disable(player);
@@ -138,10 +138,9 @@ public class Menu extends ShopPageBase
AddButton(20 + 9,
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), ChatColor.RESET + C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
- new SingleButton()
+ new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
PlayAcceptSound(player);
gadget.Disable(player);
@@ -156,10 +155,9 @@ public class Menu extends ShopPageBase
AddButton(22 + 9,
new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), ChatColor.RESET + C.mItem + gadget.GetName(), new String[] {}, 1, false, false),
- new SingleButton()
+ new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
PlayAcceptSound(player);
gadget.Disable(player);
@@ -174,10 +172,9 @@ public class Menu extends ShopPageBase
AddButton(24 + 9,
new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), ChatColor.RESET + C.mItem + mount.GetName(), new String[] {}, 1, false, false),
- new SingleButton()
+ new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
PlayAcceptSound(player);
mount.Disable(player);
@@ -189,10 +186,9 @@ public class Menu extends ShopPageBase
if (Plugin.getPetManager().hasActivePet(Player.getName()))
{
AddButton(26 + 9, new ShopItem(Material.MONSTER_EGG, (byte)Plugin.getPetManager().getActivePet(Player.getName()).getType().getTypeId(), ChatColor.RESET + C.mItem + Plugin.getPetManager().getActivePet(Player.getName()).getCustomName(), new String[] {}, 1, false, false),
- new SingleButton()
+ new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
PlayAcceptSound(player);
Plugin.getPetManager().RemovePet(player, true);
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java
index 817680bba..d00fda4bb 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java
@@ -2,6 +2,7 @@ package mineplex.core.cosmetic.ui.page;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
@@ -12,7 +13,7 @@ import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
public class MorphPage extends GadgetPage
{
@@ -39,10 +40,9 @@ public class MorphPage extends GadgetPage
slot = 28;
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java
index d3509de89..a74adbf35 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java
@@ -6,6 +6,7 @@ import java.util.List;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.CurrencyType;
@@ -18,9 +19,8 @@ import mineplex.core.cosmetic.ui.button.MountButton;
import mineplex.core.donation.DonationManager;
import mineplex.core.mount.Mount;
import mineplex.core.shop.ShopBase;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
-import mineplex.core.shop.page.ConfirmationPage;
import mineplex.core.shop.page.ShopPageBase;
public class MountPage extends ShopPageBase
@@ -77,10 +77,9 @@ public class MountPage extends ShopPageBase
setItem(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), (mount.GetCost(CurrencyType.Coins) < 0 ? "" : "Purchase ") + mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java
index 64377c8f7..48c2a54ce 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java
@@ -2,6 +2,7 @@ package mineplex.core.cosmetic.ui.page;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
@@ -11,7 +12,7 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
/**
* Created by shaun on 14-09-15.
@@ -37,10 +38,9 @@ public class MusicPage extends GadgetPage
slot = 28;
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java
index 95459ee9a..717f79839 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java
@@ -2,6 +2,7 @@ package mineplex.core.cosmetic.ui.page;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
@@ -13,7 +14,7 @@ import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.MorphGadget;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
public class ParticlePage extends GadgetPage
{
@@ -40,10 +41,9 @@ public class ParticlePage extends GadgetPage
slot = 28;
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java
index 8f1daa133..5a0dad0d8 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java
@@ -15,6 +15,7 @@ import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Creature;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.CurrencyType;
@@ -32,8 +33,8 @@ import mineplex.core.pet.Pet;
import mineplex.core.pet.PetExtra;
import mineplex.core.pet.types.Elf;
import mineplex.core.pet.types.Pumpkin;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.AnvilContainer;
import mineplex.core.shop.page.ShopPageBase;
@@ -135,10 +136,9 @@ public class PetPage extends ShopPageBase
slot++;
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
Shop.OpenPageForPlayer(Player, new Menu(Plugin, Shop, ClientManager, DonationManager, player));
}
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TreasurePage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TreasurePage.java
index ee87373ff..471516c74 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TreasurePage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TreasurePage.java
@@ -10,23 +10,21 @@ import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import mineplex.core.account.CoreClientManager;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.ShopPageBase;
-/**
- * Created by Shaun on 8/22/2014.
- */
public class TreasurePage extends ShopPageBase
{
/**
- * This is unfinished
+ * This is unfinished, and unused.
* TODO
*/
@@ -115,10 +113,9 @@ public class TreasurePage extends ShopPageBase
Player.playSound(Player.getEyeLocation(), Sound.NOTE_PLING, 4, 1);
final int slot = _chestSlots.poll();
- AddButton(slot, new ShopItem(Material.CHEST, chestName, lore, 1, false), new SingleButton()
+ AddButton(slot, new ShopItem(Material.CHEST, chestName, lore, 1, false), new IButton()
{
- @Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
if (_canSelectChest)
{
diff --git a/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/PreferencesPage.java b/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/PreferencesPage.java
index 04219156b..e324fa5d3 100644
--- a/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/PreferencesPage.java
+++ b/Plugins/Mineplex.Core/src/mineplex/core/preferences/ui/PreferencesPage.java
@@ -3,6 +3,7 @@ package mineplex.core.preferences.ui;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryClickEvent;
import mineplex.core.account.CoreClientManager;
@@ -51,90 +52,90 @@ public class PreferencesPage extends ShopPageBase> extends ShopPageBase implements Runnable
@@ -61,18 +62,18 @@ public class ConfirmationPage inventory.getSize() - 1)
+ {
+ ((CraftPlayer) Player).getHandle().inventory.setItem(getPlayerSlot(slot), nmsStack);
+ }
+ else
+ {
+ getInventory().setItem(slot, nmsStack);
+ }
+ }
protected int getPlayerSlot(int slot)
{
@@ -101,6 +115,13 @@ public abstract class ShopPageBase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/PvpShopButton.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/PvpShopButton.java
index 1117664e5..145a424ef 100644
--- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/PvpShopButton.java
+++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/shop/PvpShopButton.java
@@ -1,12 +1,13 @@
package mineplex.game.clans.shop;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.ComplexButton;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.game.clans.clans.ClansManager;
-public class PvpShopButton> extends ComplexButton
+public class PvpShopButton> implements IButton
{
protected PageType Page;
protected PvpItem Item;
@@ -16,27 +17,16 @@ public class PvpShopButton()
{
@@ -153,7 +153,6 @@ public class MailMessage implements Notification
{
if (data)
{
- Player player = (Player) event.getWhoClicked();
player.playSound(player.getLocation(), Sound.SPLASH, 1, 0);
}
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/notification/api/Notification.java b/Plugins/Mineplex.Hub/src/mineplex/hub/notification/api/Notification.java
index 5e2997dc3..5d12539b6 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/notification/api/Notification.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/notification/api/Notification.java
@@ -1,6 +1,8 @@
package mineplex.hub.notification.api;
import org.bukkit.Material;
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryClickEvent;
public interface Notification
@@ -15,7 +17,7 @@ public interface Notification
public byte getData();
- public void clicked(InventoryClickEvent event);
+ public void clicked(Player player, ClickType clickType);
public NotificationPriority getPriority();
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/notification/gui/button/NotificationButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/notification/gui/button/NotificationButton.java
index e5a9e5afa..02a818d93 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/notification/gui/button/NotificationButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/notification/gui/button/NotificationButton.java
@@ -30,8 +30,8 @@ public class NotificationButton implements IButton
}
@Override
- public void Clicked(InventoryClickEvent event)
+ public void onClick(Player player, ClickType clickType)
{
- _notification.clicked(event);
+ _notification.clicked(player, clickType);
}
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/queue/ui/QueuePage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/queue/ui/QueuePage.java
index ec464962e..10f1a967e 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/queue/ui/QueuePage.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/queue/ui/QueuePage.java
@@ -16,6 +16,7 @@ import mineplex.hub.queue.QueueManager;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.inventory.InventoryClickEvent;
public class QueuePage extends ShopPageBase
@@ -73,18 +74,18 @@ public class QueuePage extends ShopPageBase
IButton okClicked = new IButton()
{
@Override
- public void Clicked(InventoryClickEvent event)
+ public void onClick(Player player, ClickType clickType)
{
- OkClicked((Player)event.getWhoClicked());
+ OkClicked(player);
}
};
IButton cancelClicked = new IButton()
{
@Override
- public void Clicked(InventoryClickEvent event)
+ public void onClick(Player player, ClickType clickType)
{
- CancelClicked((Player)event.getWhoClicked());
+ CancelClicked(player);
}
};
@@ -103,9 +104,9 @@ public class QueuePage extends ShopPageBase
IButton queueButton = new IButton()
{
@Override
- public void Clicked(InventoryClickEvent event)
+ public void onClick(Player player, ClickType clickType)
{
- queuePlayer("Dominate", (Player)event.getWhoClicked());
+ queuePlayer("Dominate", player);
}
};
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java
index d86b8300a..d5a5773b4 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerNpcPage.java
@@ -7,6 +7,7 @@ import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.Rank;
@@ -14,8 +15,8 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilTime;
import mineplex.core.donation.DonationManager;
import mineplex.core.logger.Logger;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.ShopPageBase;
import mineplex.hub.server.ServerInfo;
import mineplex.hub.server.ServerManager;
@@ -246,10 +247,10 @@ public class ServerNpcPage extends ShopPageBase im
}
}
- AddButton(40, new ShopItem(Material.GOLD_BLOCK, C.cAqua + yellowCount + " Game" + (yellowCount == 1 ? "" : "s") + " In Progress", new String[]{MESSAGE_SPECTATE}, yellowCount > 64 ? 1 : yellowCount, false), new SingleButton()
+ AddButton(40, new ShopItem(Material.GOLD_BLOCK, C.cAqua + yellowCount + " Game" + (yellowCount == 1 ? "" : "s") + " In Progress", new String[]{MESSAGE_SPECTATE}, yellowCount > 64 ? 1 : yellowCount, false), new IButton()
{
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_onMainPage = false;
}
@@ -296,10 +297,10 @@ public class ServerNpcPage extends ShopPageBase im
}
}
- AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new SingleButton()
+ AddButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[] { }, 1, false), new IButton()
{
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
clear();
_onMainPage = true;
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/JoinServerButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/JoinServerButton.java
index 71b96a761..d0a57ec41 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/JoinServerButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/JoinServerButton.java
@@ -1,12 +1,13 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ServerInfo;
import mineplex.hub.server.ui.IServerPage;
-public class JoinServerButton extends SingleButton
+public class JoinServerButton implements IButton
{
private IServerPage _page;
private ServerInfo _serverInfo;
@@ -18,7 +19,7 @@ public class JoinServerButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.SelectServer(player, _serverInfo);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBHButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBHButton.java
index 7a4559a6e..fea9423b6 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBHButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBHButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectBHButton extends SingleButton
+public class SelectBHButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectBHButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenBH(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBRButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBRButton.java
index 1c8535d2e..96b79c956 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBRButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectBRButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectBRButton extends SingleButton
+public class SelectBRButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectBRButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenBR(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectCSButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectCSButton.java
index 5615ad0b7..5fbff8fe3 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectCSButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectCSButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectCSButton extends SingleButton
+public class SelectCSButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectCSButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.openCS(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDMTButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDMTButton.java
index a6d850f38..68a647e6b 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDMTButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDMTButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectDMTButton extends SingleButton
+public class SelectDMTButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectDMTButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.openDMT(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDOMButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDOMButton.java
index 7b652aab4..5e1b1dbe2 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDOMButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectDOMButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectDOMButton extends SingleButton
+public class SelectDOMButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectDOMButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenDOM(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMINButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMINButton.java
index 66a192fd2..07f53d0ed 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMINButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMINButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectMINButton extends SingleButton
+public class SelectMINButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectMINButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenMIN(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMSButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMSButton.java
index 074527093..ca500cb25 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMSButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectMSButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectMSButton extends SingleButton
+public class SelectMSButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectMSButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.openMS(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSGButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSGButton.java
index 00abd1be5..7c062cddf 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSGButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSGButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectSGButton extends SingleButton
+public class SelectSGButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectSGButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenSG(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSSMButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSSMButton.java
index 7243acd9e..cc556a8c9 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSSMButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectSSMButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectSSMButton extends SingleButton
+public class SelectSSMButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectSSMButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenSSM(player);
}
diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectTDMButton.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectTDMButton.java
index 20c522104..e96b72eb5 100644
--- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectTDMButton.java
+++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/button/SelectTDMButton.java
@@ -1,11 +1,12 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
-public class SelectTDMButton extends SingleButton
+public class SelectTDMButton implements IButton
{
private ServerGameMenu _menu;
@@ -15,7 +16,7 @@ public class SelectTDMButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_menu.OpenTDM(player);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeleteCustomBuildButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeleteCustomBuildButton.java
index f4752631e..43af028d6 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeleteCustomBuildButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeleteCustomBuildButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
-public class DeleteCustomBuildButton extends SingleButton
+public class DeleteCustomBuildButton implements IButton
{
private CustomBuildPage _page;
private CustomBuildToken _customBuild;
@@ -18,7 +19,7 @@ public class DeleteCustomBuildButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.DeleteCustomBuild(_customBuild);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeselectItemButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeselectItemButton.java
index c348a94ca..bf196e681 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeselectItemButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/DeselectItemButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.item.Item;
import mineplex.minecraft.game.classcombat.shop.page.SkillPage;
-public class DeselectItemButton extends SingleButton
+public class DeselectItemButton implements IButton
{
private SkillPage _page;
private Item _item;
@@ -20,7 +21,7 @@ public class DeselectItemButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.DeselectItem(player, _item, _index);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/EditAndSaveCustomBuildButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/EditAndSaveCustomBuildButton.java
index 0cad598bc..597f95ebc 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/EditAndSaveCustomBuildButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/EditAndSaveCustomBuildButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
-public class EditAndSaveCustomBuildButton extends SingleButton
+public class EditAndSaveCustomBuildButton implements IButton
{
private CustomBuildPage _page;
private CustomBuildToken _customBuild;
@@ -18,7 +19,7 @@ public class EditAndSaveCustomBuildButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.EditAndSaveCustomBuild(_customBuild);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseItemButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseItemButton.java
index c1967364e..4b1f675ff 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseItemButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseItemButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.item.Item;
import mineplex.minecraft.game.classcombat.shop.page.SkillPage;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class PurchaseItemButton extends SingleButton
+public class PurchaseItemButton implements IButton
{
private SkillPage _page;
private Item _item;
@@ -18,7 +19,7 @@ public class PurchaseItemButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PurchaseItem(player, _item);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseSkillButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseSkillButton.java
index 117caf5a9..6f74e9ebd 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseSkillButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/PurchaseSkillButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.Skill.ISkill;
import mineplex.minecraft.game.classcombat.shop.page.SkillPage;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class PurchaseSkillButton extends SingleButton
+public class PurchaseSkillButton implements IButton
{
private SkillPage _page;
private ISkill _skill;
@@ -18,7 +19,7 @@ public class PurchaseSkillButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.PurchaseSkill(player, _skill);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectClassButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectClassButton.java
index fc6cd6e4b..5a2c9131d 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectClassButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectClassButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.Class.IPvpClass;
import mineplex.minecraft.game.classcombat.shop.page.ArmorPage;
-public class SelectClassButton extends SingleButton
+public class SelectClassButton implements IButton
{
ArmorPage _page;
private IPvpClass _pvpClass;
@@ -18,7 +19,7 @@ public class SelectClassButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.SelectClass(player, _pvpClass);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectCustomBuildButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectCustomBuildButton.java
index cd6c28c27..2af728cd1 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectCustomBuildButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectCustomBuildButton.java
@@ -1,12 +1,13 @@
package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken;
import mineplex.minecraft.game.classcombat.shop.page.CustomBuildPage;
-public class SelectCustomBuildButton extends SingleButton
+public class SelectCustomBuildButton implements IButton
{
private CustomBuildPage _page;
private CustomBuildToken _customBuild;
@@ -18,7 +19,7 @@ public class SelectCustomBuildButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
_page.SelectCustomBuild(_customBuild);
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectItemButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectItemButton.java
index 7ae9a97ff..603974b3f 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectItemButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectItemButton.java
@@ -2,12 +2,13 @@ package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.ComplexButton;
+import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.item.Item;
import mineplex.minecraft.game.classcombat.shop.page.SkillPage;
-public class SelectItemButton extends ComplexButton
+public class SelectItemButton implements IButton
{
private SkillPage _page;
private Item _item;
@@ -19,34 +20,24 @@ public class SelectItemButton extends ComplexButton
_item = item;
_canAfford = canAfford;
}
-
+
@Override
- public void ClickedLeft(Player player)
+ public void onClick(Player player, ClickType clickType)
{
- if (!_canAfford)
+ if (clickType.isLeftClick())
{
- player.playSound(player.getLocation(), Sound.NOTE_BASS_GUITAR, 1f, 0.5f);
- return;
+ if (!_canAfford)
+ {
+ player.playSound(player.getLocation(), Sound.NOTE_BASS_GUITAR, 1f, 0.5f);
+ return;
+ }
+
+ _page.SelectItem(player, _item);
+ }
+ else if (clickType.isRightClick())
+ {
+ _page.DeselectItem(player, _item);
}
-
- _page.SelectItem(player, _item);
- }
-
- @Override
- public void ClickedRight(Player player)
- {
- _page.DeselectItem(player, _item);
}
- @Override
- public void ClickedShiftLeft(Player player)
- {
- ClickedLeft(player);
- }
-
- @Override
- public void ClickedShiftRight(Player player)
- {
- ClickedRight(player);
- }
}
diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectSkillButton.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectSkillButton.java
index ce19eb281..f05170ff1 100644
--- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectSkillButton.java
+++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/button/SelectSkillButton.java
@@ -2,13 +2,13 @@ package mineplex.minecraft.game.classcombat.shop.button;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-import mineplex.core.shop.item.ComplexButton;
import mineplex.core.shop.item.IButton;
import mineplex.minecraft.game.classcombat.Skill.ISkill;
import mineplex.minecraft.game.classcombat.shop.page.SkillPage;
-public class SelectSkillButton extends ComplexButton
+public class SelectSkillButton implements IButton
{
private SkillPage _page;
private ISkill _skill;
@@ -22,34 +22,24 @@ public class SelectSkillButton extends ComplexButton
_level = level;
_canAfford = canAfford;
}
-
+
@Override
- public void ClickedLeft(Player player)
+ public void onClick(Player player, ClickType clickType)
{
- if (!_canAfford)
+ if (clickType.isLeftClick())
{
- player.playSound(player.getLocation(), Sound.NOTE_BASS_GUITAR, 1f, 0.5f);
- return;
+ if (!_canAfford)
+ {
+ player.playSound(player.getLocation(), Sound.NOTE_BASS_GUITAR, 1f, 0.5f);
+ return;
+ }
+
+ _page.SelectSkill(player, _skill, _level);
+ }
+ else if (clickType.isRightClick())
+ {
+ _page.DeselectSkill(player, _skill);
}
-
- _page.SelectSkill(player, _skill, _level);
- }
-
- @Override
- public void ClickedRight(Player player)
- {
- _page.DeselectSkill(player, _skill);
}
- @Override
- public void ClickedShiftLeft(Player player)
- {
- ClickedLeft(player);
- }
-
- @Override
- public void ClickedShiftRight(Player player)
- {
- ClickedRight(player);
- }
}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/addons/CompassAddon.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/addons/CompassAddon.java
index f7569f949..b28f531fe 100644
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/addons/CompassAddon.java
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/addons/CompassAddon.java
@@ -32,7 +32,7 @@ import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameTeam;
-import nautilus.game.arcade.gui.SpectatorShop;
+import nautilus.game.arcade.gui.spectatorMenu.SpectatorShop;
public class CompassAddon extends MiniPlugin
{
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/EvolveButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/EvolveButton.java
index 8bbbb7020..13cf3b4df 100644
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/EvolveButton.java
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/EvolveButton.java
@@ -1,12 +1,13 @@
package nautilus.game.arcade.game.games.searchanddestroy;
-import mineplex.core.shop.item.SingleButton;
+import mineplex.core.shop.item.IButton;
import nautilus.game.arcade.kit.Kit;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
-public class EvolveButton extends SingleButton
+public class EvolveButton implements IButton
{
private SearchAndDestroy _arcadeManager;
private Kit _kit;
@@ -18,7 +19,7 @@ public class EvolveButton extends SingleButton
}
@Override
- public void Clicked(Player player)
+ public void onClick(Player player, ClickType clickType)
{
// Make sure this player isn't a spectator
if (((CraftPlayer) player).getHandle().spectating)
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/GameHostShop.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/GameHostShop.java
deleted file mode 100644
index 9bdc7809c..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/GameHostShop.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package nautilus.game.arcade.gui;
-
-import java.util.Arrays;
-
-import org.bukkit.ChatColor;
-import org.bukkit.Material;
-import org.bukkit.entity.Player;
-import org.bukkit.inventory.ItemStack;
-import org.bukkit.inventory.meta.SkullMeta;
-
-import mineplex.core.account.CoreClientManager;
-import mineplex.core.donation.DonationManager;
-import mineplex.core.shop.ShopBase;
-import mineplex.core.shop.page.ShopPageBase;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.page.GameHostMenuPage;
-
-public class GameHostShop extends ShopBase
-{
- public GameHostShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
- {
- super(plugin, clientManager, donationManager, "Private Server Menu");
- }
-
- @Override
- protected ShopPageBase> BuildPagesFor(Player player)
- {
- return new GameHostMenuPage(Plugin, this, player);
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/BanButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/BanButton.java
deleted file mode 100644
index 0dd6a98e9..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/BanButton.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package nautilus.game.arcade.gui.button;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-
-import mineplex.core.shop.item.ComplexButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-import nautilus.game.arcade.gui.page.BanPage;
-
-public class BanButton extends ComplexButton
-{
- private ArcadeManager _arcadeManager;
- private GameHostShop _shop;
-
- public BanButton(ArcadeManager arcadeManager, GameHostShop shop)
- {
- _shop = shop;
- _arcadeManager = arcadeManager;
- }
-
- @Override
- public void Clicked(Player player, ClickType clickType)
- {
- _shop.OpenPageForPlayer(player, new BanPage(_arcadeManager, _shop, player));
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/EditRotationButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/EditRotationButton.java
deleted file mode 100644
index 90ca33923..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/EditRotationButton.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package nautilus.game.arcade.gui.button;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-
-import mineplex.core.shop.item.ComplexButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-import nautilus.game.arcade.gui.page.EditRotationPage;
-import nautilus.game.arcade.gui.page.GameHostOptionsPage;
-import nautilus.game.arcade.gui.page.GiveAdminPage;
-
-public class EditRotationButton extends ComplexButton
-{
- private ArcadeManager _arcadeManager;
- private GameHostShop _shop;
-
- public EditRotationButton(ArcadeManager arcadeManager, GameHostShop shop)
- {
- _shop = shop;
- _arcadeManager = arcadeManager;
- }
-
- @Override
- public void Clicked(Player player, ClickType clickType)
- {
- _shop.OpenPageForPlayer(player, new EditRotationPage(_arcadeManager, _shop, player));
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/GameSettingsButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/GameSettingsButton.java
deleted file mode 100644
index 9639c6eff..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/GameSettingsButton.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package nautilus.game.arcade.gui.button;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-
-import mineplex.core.shop.item.ComplexButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-import nautilus.game.arcade.gui.page.GameHostOptionsPage;
-import nautilus.game.arcade.gui.page.GiveAdminPage;
-
-public class GameSettingsButton extends ComplexButton
-{
- private ArcadeManager _arcadeManager;
- private GameHostShop _shop;
-
- public GameSettingsButton(ArcadeManager arcadeManager, GameHostShop shop)
- {
- _shop = shop;
- _arcadeManager = arcadeManager;
- }
-
- @Override
- public void Clicked(Player player, ClickType clickType)
- {
- _shop.OpenPageForPlayer(player, new GameHostOptionsPage(_arcadeManager, _shop, player));
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/GiveAdminButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/GiveAdminButton.java
deleted file mode 100644
index 66182b06c..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/GiveAdminButton.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package nautilus.game.arcade.gui.button;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-
-import mineplex.core.shop.item.ComplexButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-import nautilus.game.arcade.gui.page.GiveAdminPage;
-
-public class GiveAdminButton extends ComplexButton
-{
- private ArcadeManager _arcadeManager;
- private GameHostShop _shop;
-
- public GiveAdminButton(ArcadeManager arcadeManager, GameHostShop shop)
- {
- _shop = shop;
- _arcadeManager = arcadeManager;
- }
-
- @Override
- public void Clicked(Player player, ClickType clickType)
- {
- _shop.OpenPageForPlayer(player, new GiveAdminPage(_arcadeManager, _shop, player));
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/SetGameButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/SetGameButton.java
deleted file mode 100644
index da2a0f94d..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/SetGameButton.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package nautilus.game.arcade.gui.button;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-
-import mineplex.core.shop.item.ComplexButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-import nautilus.game.arcade.gui.page.GiveAdminPage;
-import nautilus.game.arcade.gui.page.SetGamePage;
-
-public class SetGameButton extends ComplexButton
-{
- private ArcadeManager _arcadeManager;
- private GameHostShop _shop;
-
- public SetGameButton(ArcadeManager arcadeManager, GameHostShop shop)
- {
- _shop = shop;
- _arcadeManager = arcadeManager;
- }
-
- @Override
- public void Clicked(Player player, ClickType clickType)
- {
- _shop.OpenPageForPlayer(player, new SetGamePage(_arcadeManager, _shop, player));
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/UnbanButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/UnbanButton.java
deleted file mode 100644
index 22b10335d..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/button/UnbanButton.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package nautilus.game.arcade.gui.button;
-
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-
-import mineplex.core.shop.item.ComplexButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-import nautilus.game.arcade.gui.page.BanPage;
-import nautilus.game.arcade.gui.page.UnbanPage;
-
-public class UnbanButton extends ComplexButton
-{
- private ArcadeManager _arcadeManager;
- private GameHostShop _shop;
-
- public UnbanButton(ArcadeManager arcadeManager, GameHostShop shop)
- {
- _shop = shop;
- _arcadeManager = arcadeManager;
- }
-
- @Override
- public void Clicked(Player player, ClickType clickType)
- {
- _shop.OpenPageForPlayer(player, new UnbanPage(_arcadeManager, _shop, player));
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/BanPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/BanPage.java
deleted file mode 100644
index 0f4f46388..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/BanPage.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package nautilus.game.arcade.gui.page;
-
-import java.util.HashSet;
-
-import org.bukkit.ChatColor;
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-import org.bukkit.inventory.ItemStack;
-
-import mineplex.core.common.util.C;
-import mineplex.core.common.util.UtilServer;
-import mineplex.core.shop.item.ComplexButton;
-import mineplex.core.shop.item.IButton;
-import mineplex.core.shop.item.ShopItem;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-
-public class BanPage extends PlayerPage
-{
- public BanPage(ArcadeManager plugin, GameHostShop shop, Player player)
- {
- super(plugin, shop, "Ban Players", player);
- BuildPage();
- }
-
- @Override
- public boolean showPlayer(Player player)
- {
- return !_manager.isAdmin(player);
- }
-
- @Override
- public void onClick(int slot, Player player)
- {
- RemoveButton(slot);
- _manager.ban(player);
- }
-
- @Override
- public String getDisplayString(Player player)
- {
- return "Click to Ban Player";
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/GiveAdminPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/GiveAdminPage.java
deleted file mode 100644
index 32ece4d58..000000000
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/GiveAdminPage.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package nautilus.game.arcade.gui.page;
-
-import org.bukkit.ChatColor;
-import org.bukkit.entity.Player;
-import org.bukkit.event.inventory.ClickType;
-import org.bukkit.inventory.ItemStack;
-
-import mineplex.core.common.util.C;
-import mineplex.core.common.util.UtilServer;
-import mineplex.core.shop.item.ComplexButton;
-import mineplex.core.shop.item.IButton;
-import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
-
-public class GiveAdminPage extends PlayerPage
-{
- public GiveAdminPage(ArcadeManager plugin, GameHostShop shop, Player player)
- {
- super(plugin, shop, "Give Admin", player);
- BuildPage();
- }
-
- @Override
- public boolean showPlayer(Player player)
- {
- return !_manager.isAdmin(player);
- }
-
- @Override
- public void onClick(int slot, Player player)
- {
- RemoveButton(slot);
- _manager.giveAdmin(player);
- }
-
- @Override
- public String getDisplayString(Player player)
- {
- return "Click to Make Admin";
- }
-}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/PrivateServerShop.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/PrivateServerShop.java
new file mode 100644
index 000000000..a6dbe14df
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/PrivateServerShop.java
@@ -0,0 +1,24 @@
+package nautilus.game.arcade.gui.privateServer;
+
+import org.bukkit.entity.Player;
+
+import mineplex.core.account.CoreClientManager;
+import mineplex.core.donation.DonationManager;
+import mineplex.core.shop.ShopBase;
+import mineplex.core.shop.page.ShopPageBase;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.page.MenuPage;
+
+public class PrivateServerShop extends ShopBase
+{
+ public PrivateServerShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
+ {
+ super(plugin, clientManager, donationManager, "Private Server Menu");
+ }
+
+ @Override
+ protected ShopPageBase> BuildPagesFor(Player player)
+ {
+ return new MenuPage(Plugin, this, player);
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/BanButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/BanButton.java
new file mode 100644
index 000000000..180bb8ee1
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/BanButton.java
@@ -0,0 +1,27 @@
+package nautilus.game.arcade.gui.privateServer.button;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
+
+import mineplex.core.shop.item.IButton;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+import nautilus.game.arcade.gui.privateServer.page.BanPage;
+
+public class BanButton implements IButton
+{
+ private ArcadeManager _arcadeManager;
+ private PrivateServerShop _shop;
+
+ public BanButton(ArcadeManager arcadeManager, PrivateServerShop shop)
+ {
+ _shop = shop;
+ _arcadeManager = arcadeManager;
+ }
+
+ @Override
+ public void onClick(Player player, ClickType clickType)
+ {
+ _shop.OpenPageForPlayer(player, new BanPage(_arcadeManager, _shop, player));
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/EditRotationButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/EditRotationButton.java
new file mode 100644
index 000000000..9e02640ae
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/EditRotationButton.java
@@ -0,0 +1,27 @@
+package nautilus.game.arcade.gui.privateServer.button;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
+
+import mineplex.core.shop.item.IButton;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+import nautilus.game.arcade.gui.privateServer.page.EditRotationPage;
+
+public class EditRotationButton implements IButton
+{
+ private ArcadeManager _arcadeManager;
+ private PrivateServerShop _shop;
+
+ public EditRotationButton(ArcadeManager arcadeManager, PrivateServerShop shop)
+ {
+ _shop = shop;
+ _arcadeManager = arcadeManager;
+ }
+
+ @Override
+ public void onClick(Player player, ClickType clickType)
+ {
+ _shop.OpenPageForPlayer(player, new EditRotationPage(_arcadeManager, _shop, player));
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/GiveAdminButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/GiveAdminButton.java
new file mode 100644
index 000000000..19fd20f85
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/GiveAdminButton.java
@@ -0,0 +1,27 @@
+package nautilus.game.arcade.gui.privateServer.button;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
+
+import mineplex.core.shop.item.IButton;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+import nautilus.game.arcade.gui.privateServer.page.GiveAdminPage;
+
+public class GiveAdminButton implements IButton
+{
+ private ArcadeManager _arcadeManager;
+ private PrivateServerShop _shop;
+
+ public GiveAdminButton(ArcadeManager arcadeManager, PrivateServerShop shop)
+ {
+ _shop = shop;
+ _arcadeManager = arcadeManager;
+ }
+
+ @Override
+ public void onClick(Player player, ClickType clickType)
+ {
+ _shop.OpenPageForPlayer(player, new GiveAdminPage(_arcadeManager, _shop, player));
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/OptionsButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/OptionsButton.java
new file mode 100644
index 000000000..4b1e934a3
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/OptionsButton.java
@@ -0,0 +1,27 @@
+package nautilus.game.arcade.gui.privateServer.button;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
+
+import mineplex.core.shop.item.IButton;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+import nautilus.game.arcade.gui.privateServer.page.OptionsPage;
+
+public class OptionsButton implements IButton
+{
+ private ArcadeManager _arcadeManager;
+ private PrivateServerShop _shop;
+
+ public OptionsButton(ArcadeManager arcadeManager, PrivateServerShop shop)
+ {
+ _shop = shop;
+ _arcadeManager = arcadeManager;
+ }
+
+ @Override
+ public void onClick(Player player, ClickType clickType)
+ {
+ _shop.OpenPageForPlayer(player, new OptionsPage(_arcadeManager, _shop, player));
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/SetGameButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/SetGameButton.java
new file mode 100644
index 000000000..80159ae1f
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/SetGameButton.java
@@ -0,0 +1,27 @@
+package nautilus.game.arcade.gui.privateServer.button;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
+
+import mineplex.core.shop.item.IButton;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+import nautilus.game.arcade.gui.privateServer.page.SetGamePage;
+
+public class SetGameButton implements IButton
+{
+ private ArcadeManager _arcadeManager;
+ private PrivateServerShop _shop;
+
+ public SetGameButton(ArcadeManager arcadeManager, PrivateServerShop shop)
+ {
+ _shop = shop;
+ _arcadeManager = arcadeManager;
+ }
+
+ @Override
+ public void onClick(Player player, ClickType clickType)
+ {
+ _shop.OpenPageForPlayer(player, new SetGamePage(_arcadeManager, _shop, player));
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/UnbanButton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/UnbanButton.java
new file mode 100644
index 000000000..affb50a28
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/button/UnbanButton.java
@@ -0,0 +1,27 @@
+package nautilus.game.arcade.gui.privateServer.button;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
+
+import mineplex.core.shop.item.IButton;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+import nautilus.game.arcade.gui.privateServer.page.UnbanPage;
+
+public class UnbanButton implements IButton
+{
+ private ArcadeManager _arcadeManager;
+ private PrivateServerShop _shop;
+
+ public UnbanButton(ArcadeManager arcadeManager, PrivateServerShop shop)
+ {
+ _shop = shop;
+ _arcadeManager = arcadeManager;
+ }
+
+ @Override
+ public void onClick(Player player, ClickType clickType)
+ {
+ _shop.OpenPageForPlayer(player, new UnbanPage(_arcadeManager, _shop, player));
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/BanPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/BanPage.java
new file mode 100644
index 000000000..5779e1f58
--- /dev/null
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/BanPage.java
@@ -0,0 +1,33 @@
+package nautilus.game.arcade.gui.privateServer.page;
+
+import org.bukkit.entity.Player;
+import nautilus.game.arcade.ArcadeManager;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
+
+public class BanPage extends PlayerPage
+{
+ public BanPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
+ {
+ super(plugin, shop, "Ban Players", player);
+ BuildPage();
+ }
+
+ @Override
+ public boolean showPlayer(Player player)
+ {
+ return !_manager.isAdmin(player);
+ }
+
+ @Override
+ public void clicked(int slot, Player player)
+ {
+ RemoveButton(slot);
+ _manager.ban(player);
+ }
+
+ @Override
+ public String getDisplayString(Player player)
+ {
+ return "Click to Ban Player";
+ }
+}
diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/GameHostPage.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/BasePage.java
similarity index 63%
rename from Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/GameHostPage.java
rename to Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/BasePage.java
index d63d50452..9629edc8c 100644
--- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/page/GameHostPage.java
+++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gui/privateServer/page/BasePage.java
@@ -1,33 +1,31 @@
-package nautilus.game.arcade.gui.page;
+package nautilus.game.arcade.gui.privateServer.page;
import java.util.Arrays;
-import java.util.function.Consumer;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
-import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
-import mineplex.core.donation.DonationManager;
+import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
-import mineplex.core.shop.item.SingleButton;
import mineplex.core.shop.page.ShopPageBase;
import nautilus.game.arcade.ArcadeManager;
-import nautilus.game.arcade.gui.GameHostShop;
+import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
import nautilus.game.arcade.managers.GameHostManager;
-public abstract class GameHostPage extends ShopPageBase
+public abstract class BasePage extends ShopPageBase
{
protected GameHostManager _manager;
- public GameHostPage(ArcadeManager plugin, GameHostShop shop, String pageName, Player player)
+ public BasePage(ArcadeManager plugin, PrivateServerShop shop, String pageName, Player player)
{
this(plugin, shop, pageName, player, 54);
}
- public GameHostPage(ArcadeManager plugin, GameHostShop shop, String pageName, Player player, int slots)
+ public BasePage(ArcadeManager plugin, PrivateServerShop shop, String pageName, Player player, int slots)
{
super(plugin, shop, plugin.GetClients(), plugin.GetDonation(), pageName, player, slots);
@@ -36,12 +34,12 @@ public abstract class GameHostPage extends ShopPageBase _whitelist = new HashSet();
private HashSet _blacklist = new HashSet();
- private GameHostShop _shop;
+ private PrivateServerShop _shop;
public GameHostManager(ArcadeManager manager)
{
Manager = manager;
- _shop = new GameHostShop(manager, manager.GetClients(), manager.GetDonation());
+ _shop = new PrivateServerShop(manager, manager.GetClients(), manager.GetDonation());
Manager.GetPluginManager().registerEvents(this, Manager.GetPlugin());
//Ultra Games