Merge branch 'feature/private-servers' of ssh://184.154.0.242:7999/min/mineplex into feature/private-servers
This commit is contained in:
commit
679f7909b0
@ -7,14 +7,15 @@
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Core/Mineplex.Core.iml" filepath="$PROJECT_DIR$/Mineplex.Core/Mineplex.Core.iml" group="Core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Core.Common/Mineplex.Core.Common.iml" filepath="$PROJECT_DIR$/Mineplex.Core.Common/Mineplex.Core.Common.iml" group="Core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Database/Mineplex.Database.iml" filepath="$PROJECT_DIR$/Mineplex.Database/Mineplex.Database.iml" group="Core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Game.Clans/Mineplex.Game.Clans.iml" filepath="$PROJECT_DIR$/Mineplex.Game.Clans/Mineplex.Game.Clans.iml" group="Game" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Hub/Mineplex.Hub.iml" filepath="$PROJECT_DIR$/Mineplex.Hub/Mineplex.Hub.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.MapParser/Mineplex.MapParser.iml" filepath="$PROJECT_DIR$/Mineplex.MapParser/Mineplex.MapParser.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.BungeeSigns/Mineplex.Minecraft.BungeeSigns.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.BungeeSigns/Mineplex.Minecraft.BungeeSigns.iml" group="Bungee" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" group="Arcade" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" group="Arcade" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.ClassCombat/Mineplex.Minecraft.Game.ClassCombat.iml" group="Game" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" filepath="$PROJECT_DIR$/Mineplex.Minecraft.Game.Core/Mineplex.Minecraft.Game.Core.iml" group="Game" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.ServerData/Mineplex.ServerData.iml" filepath="$PROJECT_DIR$/Mineplex.ServerData/Mineplex.ServerData.iml" group="Core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Mineplex.ServerMonitor/Mineplex.ServerMonitor.iml" filepath="$PROJECT_DIR$/Mineplex.ServerMonitor/Mineplex.ServerMonitor.iml" group="Core" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml" filepath="$PROJECT_DIR$/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml" group="Arcade" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml" filepath="$PROJECT_DIR$/Nautilus.Game.Arcade/Nautilus.Game.Arcade.iml" group="Game" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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<AchievementManager, Achievemen
|
||||
|
||||
private void addBackButton()
|
||||
{
|
||||
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)
|
||||
{
|
||||
AchievementMainPage page;
|
||||
if (_category.getGameCategory() == AchievementCategory.GameCategory.ARCADE)
|
||||
|
@ -6,6 +6,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 mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.achievement.AchievementCategory;
|
||||
@ -14,8 +15,8 @@ import mineplex.core.achievement.ui.AchievementShop;
|
||||
import mineplex.core.achievement.ui.button.CategoryButton;
|
||||
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.stats.StatsManager;
|
||||
|
||||
/**
|
||||
@ -62,10 +63,9 @@ public class ArcadeMainPage extends AchievementMainPage
|
||||
|
||||
private void addBackButton()
|
||||
{
|
||||
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 AchievementMainPage(Plugin, _statsManager, Shop, ClientManager, DonationManager, _target.getName() + "'s Stats", player, _target));
|
||||
player.playSound(player.getLocation(), Sound.CLICK, 1, 1);
|
||||
|
@ -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 ActivateGadgetButton extends ComplexButton
|
||||
public class ActivateGadgetButton implements IButton
|
||||
{
|
||||
private Gadget _gadget;
|
||||
private GadgetPage _page;
|
||||
@ -18,26 +19,11 @@ public class ActivateGadgetButton extends ComplexButton
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedLeft(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
_page.activateGadget(player, _gadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedRight(Player player)
|
||||
{
|
||||
_page.handleRightClick(player, _gadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedShiftLeft(Player player)
|
||||
{
|
||||
_page.activateGadget(player, _gadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedShiftRight(Player player)
|
||||
{
|
||||
_page.handleRightClick(player, _gadget);
|
||||
if (clickType.isLeftClick())
|
||||
_page.activateGadget(player, _gadget);
|
||||
else if (clickType.isRightClick())
|
||||
_page.handleRightClick(player, _gadget);
|
||||
}
|
||||
}
|
||||
|
@ -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.MountPage;
|
||||
import mineplex.core.mount.Mount;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
|
||||
public class ActivateMountButton extends SingleButton
|
||||
public class ActivateMountButton implements IButton
|
||||
{
|
||||
private Mount<?> _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);
|
||||
|
@ -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());
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), new Runnable()
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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());
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>
|
||||
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));
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>
|
||||
|
||||
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<CosmeticManager, CosmeticShop>
|
||||
|
||||
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<CosmeticManager, CosmeticShop>
|
||||
|
||||
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<CosmeticManager, CosmeticShop>
|
||||
|
||||
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<CosmeticManager, CosmeticShop>
|
||||
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);
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>
|
||||
@ -77,10 +77,9 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>
|
||||
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));
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>
|
||||
{
|
||||
/**
|
||||
* This is unfinished
|
||||
* This is unfinished, and unused.
|
||||
* TODO
|
||||
*/
|
||||
|
||||
@ -115,10 +113,9 @@ public class TreasurePage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -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<PreferencesManager, Preference
|
||||
_toggleHubGames = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleHubGames((Player)event.getWhoClicked());
|
||||
toggleHubGames(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleHubPlayers = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleHubPlayers((Player)event.getWhoClicked());
|
||||
toggleHubPlayers(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleChat = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleChat((Player)event.getWhoClicked());
|
||||
toggleChat(player);
|
||||
}
|
||||
};
|
||||
|
||||
_togglePrivateChat = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
togglePrivateChat((Player)event.getWhoClicked());
|
||||
togglePrivateChat(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleHubPartyRequests = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleHubPartyRequests((Player)event.getWhoClicked());
|
||||
toggleHubPartyRequests(player);
|
||||
}
|
||||
};
|
||||
|
||||
_togglePendingFriendRequests = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
togglePendingFriendRequests((Player)event.getWhoClicked());
|
||||
togglePendingFriendRequests(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleHubInvisibility = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleHubInvisibility((Player)event.getWhoClicked());
|
||||
toggleHubInvisibility(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleHubForcefield = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleHubForcefield((Player)event.getWhoClicked());
|
||||
toggleHubForcefield(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleMacReports = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleMacReports((Player)event.getWhoClicked());
|
||||
toggleMacReports(player);
|
||||
}
|
||||
};
|
||||
|
||||
_toggleHubIgnoreVelocity = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleHubIgnoreVelocity((Player)event.getWhoClicked());
|
||||
toggleHubIgnoreVelocity(player);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
package mineplex.core.punish.UI;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.punish.Category;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
|
||||
public class PunishButton extends SingleButton
|
||||
public class PunishButton implements IButton
|
||||
{
|
||||
private PunishPage _punishPage;
|
||||
private Category _category;
|
||||
@ -23,8 +24,7 @@ public class PunishButton extends SingleButton
|
||||
_time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
_punishPage.AddInfraction(_category, _severity, _ban, _time);
|
||||
}
|
||||
|
@ -415,7 +415,8 @@ public class PunishPage extends CraftInventoryCustom implements Listener
|
||||
{
|
||||
if (_buttonMap.containsKey(event.getRawSlot()))
|
||||
{
|
||||
_buttonMap.get(event.getRawSlot()).Clicked(event);
|
||||
if (event.getWhoClicked() instanceof Player)
|
||||
_buttonMap.get(event.getRawSlot()).onClick(((Player) event.getWhoClicked()), event.getClick());
|
||||
}
|
||||
|
||||
event.setCancelled(true);
|
||||
|
@ -1,12 +1,13 @@
|
||||
package mineplex.core.punish.UI;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.punish.Punishment;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
|
||||
public class RemovePunishmentButton extends SingleButton
|
||||
public class RemovePunishmentButton implements IButton
|
||||
{
|
||||
private PunishPage _punishPage;
|
||||
private Punishment _punishment;
|
||||
@ -20,7 +21,7 @@ public class RemovePunishmentButton extends SingleButton
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
_punishPage.RemovePunishment(_punishment, _item);
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
package mineplex.core.shop.item;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftHumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
|
||||
public abstract class ComplexButton implements IButton
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
{
|
||||
Clicked(((Player) event.getWhoClicked()), event.getClick());
|
||||
|
||||
if (event.isLeftClick())
|
||||
{
|
||||
if (event.isShiftClick())
|
||||
ClickedShiftLeft((Player) event.getWhoClicked());
|
||||
else
|
||||
ClickedLeft((Player) event.getWhoClicked());
|
||||
}
|
||||
if (event.isRightClick())
|
||||
{
|
||||
if (event.isShiftClick())
|
||||
ClickedShiftRight((Player) event.getWhoClicked());
|
||||
else
|
||||
ClickedRight((Player) event.getWhoClicked());
|
||||
}
|
||||
}
|
||||
|
||||
public void ClickedLeft(Player player) { };
|
||||
public void ClickedShiftLeft(Player player) { };
|
||||
public void ClickedRight(Player player) { };
|
||||
public void ClickedShiftRight(Player player) { };
|
||||
|
||||
public void Clicked(Player player, ClickType clickType) { };
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package mineplex.core.shop.item;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
|
||||
public interface IButton
|
||||
{
|
||||
public void Clicked(InventoryClickEvent event);
|
||||
public void onClick(Player player, ClickType clickType);
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
package mineplex.core.shop.item;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
|
||||
public abstract class SingleButton implements IButton
|
||||
{
|
||||
public abstract void Clicked(Player player);
|
||||
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
{
|
||||
Clicked((Player)event.getWhoClicked());
|
||||
}
|
||||
}
|
@ -19,6 +19,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.event.inventory.InventoryClickEvent;
|
||||
|
||||
public class ConfirmationPage<PluginType extends MiniPlugin, ShopType extends ShopBase<PluginType>> extends ShopPageBase<PluginType, ShopType> implements Runnable
|
||||
@ -61,18 +62,18 @@ public class ConfirmationPage<PluginType extends MiniPlugin, ShopType extends Sh
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
@ -192,9 +193,9 @@ public class ConfirmationPage<PluginType extends MiniPlugin, ShopType extends Sh
|
||||
IButton returnButton = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
CancelClicked((Player)event.getWhoClicked());
|
||||
CancelClicked(player);
|
||||
}
|
||||
};
|
||||
|
||||
@ -212,9 +213,9 @@ public class ConfirmationPage<PluginType extends MiniPlugin, ShopType extends Sh
|
||||
IButton returnButton = new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(InventoryClickEvent event)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
CancelClicked((Player)event.getWhoClicked());
|
||||
CancelClicked(player);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3,11 +3,11 @@ package mineplex.core.shop.page;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClient;
|
||||
@ -15,7 +15,6 @@ import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.CurrencyType;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
@ -88,6 +87,21 @@ public abstract class ShopPageBase<PluginType extends MiniPlugin, ShopType exten
|
||||
setItem(slot, item);
|
||||
}
|
||||
}
|
||||
|
||||
protected void AddItemFakeCount(int slot, ItemStack item, int fakeCount)
|
||||
{
|
||||
net.minecraft.server.v1_7_R4.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
|
||||
nmsStack.count = fakeCount;
|
||||
|
||||
if (slot > 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<PluginType extends MiniPlugin, ShopType exten
|
||||
ButtonMap.put(slot, button);
|
||||
}
|
||||
|
||||
protected void AddButtonFakeCount(int slot, ItemStack item, IButton button, int fakeItemCount)
|
||||
{
|
||||
AddItemFakeCount(slot, item, fakeItemCount);
|
||||
|
||||
ButtonMap.put(slot, button);
|
||||
}
|
||||
|
||||
protected void addGlow(int slot)
|
||||
{
|
||||
UtilInv.addDullEnchantment(getItem(slot));
|
||||
@ -116,7 +137,7 @@ public abstract class ShopPageBase<PluginType extends MiniPlugin, ShopType exten
|
||||
{
|
||||
if (ButtonMap.containsKey(event.getRawSlot()))
|
||||
{
|
||||
ButtonMap.get(event.getRawSlot()).Clicked(event);
|
||||
ButtonMap.get(event.getRawSlot()).onClick(Player, event.getClick());
|
||||
}
|
||||
else if (event.getRawSlot() != -999)
|
||||
{
|
||||
|
16
Plugins/Mineplex.Game.Clans/Mineplex.Game.Clans.iml
Normal file
16
Plugins/Mineplex.Game.Clans/Mineplex.Game.Clans.iml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core" />
|
||||
<orderEntry type="module" module-name="Mineplex.Core.Common" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.ClassCombat" />
|
||||
<orderEntry type="module" module-name="Mineplex.Minecraft.Game.Core" />
|
||||
<orderEntry type="library" name="craftbukkit" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -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<PageType extends ShopPageBase<ClansManager, BuildingShop>> extends ComplexButton
|
||||
public class PvpShopButton<PageType extends ShopPageBase<ClansManager, BuildingShop>> implements IButton
|
||||
{
|
||||
protected PageType Page;
|
||||
protected PvpItem Item;
|
||||
@ -16,27 +17,16 @@ public class PvpShopButton<PageType extends ShopPageBase<ClansManager, BuildingS
|
||||
Page = page;
|
||||
Item = item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedLeft(Player player)
|
||||
{
|
||||
int balance = Page.getDonationManager().Get(player.getName()).getGold();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedShiftLeft(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
if (clickType == ClickType.LEFT)
|
||||
{
|
||||
int balance = Page.getDonationManager().Get(player.getName()).getGold();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedRight(Player player)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedShiftRight(Player player)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -142,9 +142,9 @@ public class MailMessage implements Notification
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clicked(final InventoryClickEvent event)
|
||||
public void clicked(final Player player, ClickType clickType)
|
||||
{
|
||||
if (event.getClick() == ClickType.SHIFT_RIGHT)
|
||||
if (clickType == ClickType.SHIFT_RIGHT)
|
||||
{
|
||||
_manager.archive(this, new Callback<Boolean>()
|
||||
{
|
||||
@ -153,7 +153,6 @@ public class MailMessage implements Notification
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
player.playSound(player.getLocation(), Sound.SPLASH, 1, 0);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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<QueueManager, QueueShop>
|
||||
@ -73,18 +74,18 @@ public class QueuePage extends ShopPageBase<QueueManager, QueueShop>
|
||||
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<QueueManager, QueueShop>
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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<ServerManager, ServerNpcShop> 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<ServerManager, ServerNpcShop> 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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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<ArcadeManager>
|
||||
{
|
||||
public GameHostShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, "Private Server Menu");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> BuildPagesFor(Player player)
|
||||
{
|
||||
return new GameHostMenuPage(Plugin, this, player);
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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";
|
||||
}
|
||||
}
|
@ -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";
|
||||
}
|
||||
}
|
@ -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<ArcadeManager>
|
||||
{
|
||||
public PrivateServerShop(ArcadeManager plugin, CoreClientManager clientManager, DonationManager donationManager)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, "Private Server Menu");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShopPageBase<ArcadeManager, ? extends ShopBase<ArcadeManager>> BuildPagesFor(Player player)
|
||||
{
|
||||
return new MenuPage(Plugin, this, player);
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
@ -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";
|
||||
}
|
||||
}
|
@ -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<ArcadeManager, GameHostShop>
|
||||
public abstract class BasePage extends ShopPageBase<ArcadeManager, PrivateServerShop>
|
||||
{
|
||||
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<ArcadeManager, GameHostS
|
||||
|
||||
public void addBackButton(int 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 GameHostMenuPage(Plugin, Shop, player));
|
||||
Shop.OpenPageForPlayer(player, new MenuPage(Plugin, Shop, player));
|
||||
}
|
||||
});
|
||||
}
|
@ -1,20 +1,22 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
package nautilus.game.arcade.gui.privateServer.page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.gui.GameHostShop;
|
||||
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||
|
||||
public class EditRotationPage extends GameHostPage
|
||||
public class EditRotationPage extends BasePage
|
||||
{
|
||||
public EditRotationPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
||||
public EditRotationPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Edit Rotation", player);
|
||||
BuildPage();
|
||||
@ -39,18 +41,30 @@ public class EditRotationPage extends GameHostPage
|
||||
String titleString = ChatColor.RESET + (enabled ? C.cGreen : C.cRed) + ChatColor.BOLD + type.GetLobbyName();
|
||||
String infoString = ChatColor.RESET + C.cGray + (enabled ? "Click to Disable" : "Click to Enable");
|
||||
ShopItem shopItem = new ShopItem(type.GetMaterial(), type.GetMaterialData(), titleString, new String[]{infoString}, 1, false, false);
|
||||
AddButton(slot, shopItem, new SingleButton()
|
||||
int itemCount = enabled ? 1 : 0;
|
||||
|
||||
AddButtonFakeCount(slot, shopItem, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
String announceString = C.Bold + type.GetLobbyName();
|
||||
|
||||
if (Plugin.GetServerConfig().GameList.contains(type))
|
||||
{
|
||||
Plugin.GetServerConfig().GameList.remove(type);
|
||||
announceString = C.cRed + announceString + " removed from rotation.";
|
||||
}
|
||||
else
|
||||
{
|
||||
Plugin.GetServerConfig().GameList.add(type);
|
||||
announceString = C.cGreen + announceString + " added to rotation.";
|
||||
}
|
||||
|
||||
Plugin.GetGame().Announce(announceString);
|
||||
Refresh();
|
||||
}
|
||||
});
|
||||
}, itemCount);
|
||||
|
||||
if (enabled)
|
||||
addGlow(slot);
|
@ -0,0 +1,34 @@
|
||||
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 GiveAdminPage extends PlayerPage
|
||||
{
|
||||
public GiveAdminPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Give Admin", player);
|
||||
BuildPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showPlayer(Player player)
|
||||
{
|
||||
return !_manager.isAdmin(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clicked(int slot, Player player)
|
||||
{
|
||||
RemoveButton(slot);
|
||||
_manager.giveAdmin(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayString(Player player)
|
||||
{
|
||||
return "Click to Make Admin";
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
package nautilus.game.arcade.gui.privateServer.page;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
@ -7,18 +7,17 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.gui.GameHostShop;
|
||||
import nautilus.game.arcade.gui.button.BanButton;
|
||||
import nautilus.game.arcade.gui.button.EditRotationButton;
|
||||
import nautilus.game.arcade.gui.button.GiveAdminButton;
|
||||
import nautilus.game.arcade.gui.button.SetGameButton;
|
||||
import nautilus.game.arcade.gui.button.GameSettingsButton;
|
||||
import nautilus.game.arcade.gui.button.UnbanButton;
|
||||
import nautilus.game.arcade.managers.GameHostManager;
|
||||
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||
import nautilus.game.arcade.gui.privateServer.button.BanButton;
|
||||
import nautilus.game.arcade.gui.privateServer.button.EditRotationButton;
|
||||
import nautilus.game.arcade.gui.privateServer.button.GiveAdminButton;
|
||||
import nautilus.game.arcade.gui.privateServer.button.SetGameButton;
|
||||
import nautilus.game.arcade.gui.privateServer.button.OptionsButton;
|
||||
import nautilus.game.arcade.gui.privateServer.button.UnbanButton;
|
||||
|
||||
public class GameHostMenuPage extends GameHostPage
|
||||
public class MenuPage extends BasePage
|
||||
{
|
||||
public GameHostMenuPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
||||
public MenuPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Private Server Menu", player, 9*3);
|
||||
BuildPage();
|
||||
@ -37,16 +36,16 @@ public class GameHostMenuPage extends GameHostPage
|
||||
AddButton(1 + 18, new ShopItem(Material.BOOK, "Edit Game Rotation", new String[]{}, 1, false), editRotationButton);
|
||||
|
||||
GiveAdminButton giveAdminButton = new GiveAdminButton(Plugin, Shop);
|
||||
AddButton(3 + 9, new ShopItem(Material.ENDER_CHEST, "Give Admin", new String[] {}, 1, false), giveAdminButton);
|
||||
AddButton(3 + 9, new ShopItem(Material.DIAMOND_SWORD, "Give Admin", new String[] {}, 1, false), giveAdminButton);
|
||||
|
||||
GameSettingsButton gameSettingsButton = new GameSettingsButton(Plugin, Shop);
|
||||
AddButton(5 + 9, new ShopItem(Material.LEVER, "Toggle Game Settings", new String[] {}, 1, false), gameSettingsButton);
|
||||
OptionsButton optionsButton = new OptionsButton(Plugin, Shop);
|
||||
AddButton(5 + 9, new ShopItem(Material.REDSTONE_COMPARATOR, "Game Options", new String[] {}, 1, false), optionsButton);
|
||||
|
||||
BanButton banButton = new BanButton(Plugin, Shop);
|
||||
AddButton(7 + 9, new ShopItem(Material.MONSTER_EGG, "Ban Player", new String[] {}, 1, false), banButton);
|
||||
AddButton(7 + 9, new ShopItem(Material.LAVA_BUCKET, "Ban Player", new String[] {}, 1, false), banButton);
|
||||
|
||||
UnbanButton unbanButton = new UnbanButton(Plugin, Shop);
|
||||
AddButton(7 + 18, new ShopItem(Material.PAPER, "Unban Player", new String[] {}, 1, false), unbanButton);
|
||||
AddButton(7 + 18, new ShopItem(Material.WATER_BUCKET, "Unban Player", new String[] {}, 1, false), unbanButton);
|
||||
}
|
||||
|
||||
private ItemStack getOwnerHead()
|
@ -1,21 +1,21 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
package nautilus.game.arcade.gui.privateServer.page;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.GameServerConfig;
|
||||
import nautilus.game.arcade.gui.GameHostShop;
|
||||
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||
|
||||
public class GameHostOptionsPage extends GameHostPage
|
||||
public class OptionsPage extends BasePage
|
||||
{
|
||||
private GameServerConfig _config;
|
||||
|
||||
public GameHostOptionsPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
||||
public OptionsPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Game Options", player);
|
||||
|
||||
@ -34,37 +34,46 @@ public class GameHostOptionsPage extends GameHostPage
|
||||
//GameTimeout
|
||||
//PlayerKickIdle
|
||||
|
||||
buildPreference(10, Material.BONE, "Force Team Balancing", _config.TeamForceBalance, new SingleButton()
|
||||
buildPreference(18, Material.LEVER, "Enforce Whitelist", true/* TODO */, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleWhitelist();
|
||||
}
|
||||
});
|
||||
|
||||
buildPreference(20, Material.BONE, "Force Team Balancing", _config.TeamForceBalance, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleTeamBalance();
|
||||
}
|
||||
});
|
||||
|
||||
buildPreference(12, Material.REDSTONE_TORCH_ON, "Game Auto Start", _config.GameAutoStart, new SingleButton()
|
||||
buildPreference(22, Material.REDSTONE_TORCH_ON, "Game Auto Start", _config.GameAutoStart, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleAutoStart();
|
||||
}
|
||||
});
|
||||
|
||||
buildPreference(14, Material.COMPASS, "Game Timeout", _config.GameTimeout, new SingleButton()
|
||||
buildPreference(24, Material.COMPASS, "Game Timeout", _config.GameTimeout, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleTimeout();
|
||||
}
|
||||
});
|
||||
|
||||
buildPreference(16, Material.WATCH, "Kick Idle Players", _config.PlayerKickIdle, new SingleButton()
|
||||
buildPreference(26, Material.WATCH, "Kick Idle Players", _config.PlayerKickIdle, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
toggleKickIdle();
|
||||
}
|
||||
@ -96,6 +105,12 @@ public class GameHostOptionsPage extends GameHostPage
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void toggleWhitelist()
|
||||
{
|
||||
// TODO CHISSPIE
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void buildPreference(int index, Material material, String name, boolean preference, IButton button)
|
||||
{
|
||||
buildPreference(index, material, (byte) 0, name, preference, button);
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
package nautilus.game.arcade.gui.privateServer.page;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -7,13 +7,13 @@ 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;
|
||||
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||
|
||||
public abstract class PlayerPage extends GameHostPage
|
||||
public abstract class PlayerPage extends BasePage
|
||||
{
|
||||
public PlayerPage(ArcadeManager plugin, GameHostShop shop, String pageName, Player player)
|
||||
public PlayerPage(ArcadeManager plugin, PrivateServerShop shop, String pageName, Player player)
|
||||
{
|
||||
super(plugin, shop, pageName, player);
|
||||
}
|
||||
@ -40,11 +40,11 @@ public abstract class PlayerPage extends GameHostPage
|
||||
|
||||
public abstract boolean showPlayer(Player player);
|
||||
|
||||
public abstract void onClick(int slot, Player player);
|
||||
public abstract void clicked(int slot, Player player);
|
||||
|
||||
public abstract String getDisplayString(Player player);
|
||||
|
||||
private class Button extends ComplexButton
|
||||
private class Button implements IButton
|
||||
{
|
||||
private int _slot;
|
||||
private Player _player;
|
||||
@ -56,9 +56,9 @@ public abstract class PlayerPage extends GameHostPage
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Clicked(Player player, ClickType clickType)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
onClick(_slot, _player);
|
||||
clicked(_slot, _player);
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,19 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
|
||||
import java.util.List;
|
||||
package nautilus.game.arcade.gui.privateServer.page;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.gui.GameHostShop;
|
||||
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||
|
||||
public class SetGamePage extends GameHostPage
|
||||
public class SetGamePage extends BasePage
|
||||
{
|
||||
public SetGamePage(ArcadeManager plugin, GameHostShop shop, Player player)
|
||||
public SetGamePage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Set Game", player);
|
||||
BuildPage();
|
||||
@ -37,13 +36,13 @@ public class SetGamePage extends GameHostPage
|
||||
{
|
||||
String infoString = ChatColor.RESET + C.cGray + "Click to make this next Game Type";
|
||||
ShopItem shopItem = new ShopItem(type.GetMaterial(), type.GetMaterialData(), type.GetLobbyName(), new String[]{infoString}, 1, false, false);
|
||||
AddButton(slot, shopItem, new SingleButton()
|
||||
AddButton(slot, shopItem, new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
Plugin.GetGame().setGame(type, player, true);
|
||||
Player.closeInventory();
|
||||
player.closeInventory();
|
||||
}
|
||||
});
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
package nautilus.game.arcade.gui.privateServer.page;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@ -9,15 +9,13 @@ import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
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;
|
||||
import nautilus.game.arcade.gui.privateServer.PrivateServerShop;
|
||||
|
||||
public class UnbanPage extends GameHostPage
|
||||
public class UnbanPage extends BasePage
|
||||
{
|
||||
public UnbanPage(ArcadeManager plugin, GameHostShop shop, Player player)
|
||||
public UnbanPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Unban Players", player);
|
||||
|
||||
@ -54,10 +52,10 @@ public class UnbanPage extends GameHostPage
|
||||
|
||||
private IButton getUnbanButton(final int slot, final String playerName)
|
||||
{
|
||||
return new ComplexButton()
|
||||
return new IButton()
|
||||
{
|
||||
@Override
|
||||
public void Clicked(Player player, ClickType clickType)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
_manager.getBlacklist().remove(playerName);
|
||||
RemoveButton(slot);
|
@ -1,4 +1,4 @@
|
||||
package nautilus.game.arcade.gui;
|
||||
package nautilus.game.arcade.gui.spectatorMenu;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
@ -8,7 +8,7 @@ import mineplex.core.shop.ShopBase;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.addons.CompassAddon;
|
||||
import nautilus.game.arcade.gui.page.SpectatorPage;
|
||||
import nautilus.game.arcade.gui.spectatorMenu.page.SpectatorPage;
|
||||
|
||||
/**
|
||||
* Created by shaun on 14-09-24.
|
@ -1,16 +1,17 @@
|
||||
package nautilus.game.arcade.gui.button;
|
||||
package nautilus.game.arcade.gui.spectatorMenu.button;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.ClickType;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
|
||||
/**
|
||||
* Created by shaun on 14-09-26.
|
||||
*/
|
||||
public class SpectatorButton extends SingleButton
|
||||
public class SpectatorButton implements IButton
|
||||
{
|
||||
private ArcadeManager _arcadeManager;
|
||||
private Player _player;
|
||||
@ -24,7 +25,7 @@ public class SpectatorButton extends SingleButton
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Clicked(Player player)
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
// Make sure this player is still a spectator
|
||||
if (!((CraftPlayer) player).getHandle().spectating)
|
@ -1,17 +1,15 @@
|
||||
package nautilus.game.arcade.gui.page;
|
||||
package nautilus.game.arcade.gui.spectatorMenu.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.scoreboard.Team;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.C;
|
||||
@ -23,8 +21,8 @@ import mineplex.core.shop.page.ShopPageBase;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.addons.CompassAddon;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.gui.SpectatorShop;
|
||||
import nautilus.game.arcade.gui.button.SpectatorButton;
|
||||
import nautilus.game.arcade.gui.spectatorMenu.SpectatorShop;
|
||||
import nautilus.game.arcade.gui.spectatorMenu.button.SpectatorButton;
|
||||
|
||||
/**
|
||||
* Created by shaun on 14-09-24.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user