diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java index 4fe166860..f2a63704c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java @@ -208,7 +208,7 @@ public class AchievementManager extends MiniPlugin { int level = get(sender, Achievement.GLOBAL_MINEPLEX_LEVEL).getLevel(); - if (sender.getName().equalsIgnoreCase("Phinary")) + if (sender.getName().equalsIgnoreCase("Phinary") || sender.getName().equalsIgnoreCase("Horus")) level = -level; else if (sender.getName().equalsIgnoreCase("B2_mp")) return 101; @@ -220,6 +220,8 @@ public class AchievementManager extends MiniPlugin level = Math.max(level, 15); else if (rank.Has(Rank.MODERATOR)) level = Math.max(level, 5); + else if (rank.Has(Rank.JNR_DEV)) + level = Math.max(level, 25); return level; } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java index d54efdff3..3024ff2f4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java @@ -17,6 +17,7 @@ import mineplex.core.cosmetic.ui.button.ActivateGadgetButton; import mineplex.core.cosmetic.ui.button.DeactivateGadgetButton; import mineplex.core.cosmetic.ui.button.GadgetButton; import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.gadgets.MorphBlock; import mineplex.core.gadget.gadgets.MorphNotch; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; @@ -68,6 +69,13 @@ public class GadgetPage extends ShopPageBase //setItem(slot, new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), "Disabled " + gadget.GetName(), new String[] { "Sorry! Currently disabled until fix is made for 1.8 players!" }, 1, false, false)); //return; } + else if (gadget instanceof MorphBlock) + { + //Prevent stacker bug + if (getPlayer().getPassenger() != null) + return; + } + List itemLore = new ArrayList(); if (gadget.GetCost(CurrencyType.Coins) >= 0) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java index 528b66253..ff2949dd6 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java @@ -7,6 +7,18 @@ import java.util.HashMap; import java.util.List; import java.util.Map.Entry; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.HandlerList; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.inventory.ItemStack; + import mineplex.core.antihack.AntiHack; import mineplex.core.common.Rank; import mineplex.core.common.util.C; @@ -23,18 +35,6 @@ import mineplex.core.punish.PunishmentSorter; import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventoryCustom; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.HandlerList; -import org.bukkit.event.Listener; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.inventory.InventoryCloseEvent; -import org.bukkit.inventory.ItemStack; - public class PunishPage extends CraftInventoryCustom implements Listener { private Punish _plugin; @@ -232,14 +232,12 @@ public class PunishPage extends CraftInventoryCustom implements Listener examplePrefixEx + " Forcefield", examplePrefixEx + " Speed Hack", examplePrefixEx + " Reach Hack", - examplePrefixEx + " Speed Hack", examplePrefixEx + " Other Hack", " ", examplePrefix + "Hack Reports (SR & FR);", examplePrefixEx + " Forcefield", examplePrefixEx + " Speed Hack", examplePrefixEx + " Reach Hack", - examplePrefixEx + " Speed Hack", examplePrefixEx + " Other Hack", examplePrefixEx + " Fly Hack", } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java index 570eb152c..7f4ef7667 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java @@ -327,6 +327,11 @@ public class TreasureLocation implements Listener _hologram.start(); } + public Treasure getCurrentTreasure() + { + return _currentTreasure; + } + public void openShop(Player player) { _shop.attemptShopOpen(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java index 8eb5f02a3..39de66bf0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java @@ -125,6 +125,22 @@ public class TreasureManager extends MiniPlugin return _rewardManager.getRewards(player, rewardType); } + public boolean isOpening(Player player) + { + for (TreasureLocation treasureLocation : _treasureLocations) + { + Treasure treasure = treasureLocation.getCurrentTreasure(); + + if (treasure == null) + continue; + + if (treasure.getPlayer().equals(player)) + return true; + } + + return false; + } + public BlockRestore getBlockRestore() { return _blockRestore; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 2e1dbc813..dcaac1d40 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -1,16 +1,13 @@ package mineplex.hub; import java.util.ArrayList; -import java.util.Calendar; import java.util.HashMap; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -import org.bukkit.Color; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.Sound; import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; import org.bukkit.entity.Egg; import org.bukkit.entity.Entity; @@ -54,7 +51,6 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAction; import mineplex.core.common.util.UtilAlg; -import mineplex.core.common.util.UtilFirework; import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; @@ -91,11 +87,11 @@ import mineplex.hub.commands.GadgetToggle; import mineplex.hub.commands.GameModeCommand; import mineplex.hub.commands.NewsCommand; import mineplex.hub.modules.ForcefieldManager; +import mineplex.hub.modules.HubVisibilityManager; import mineplex.hub.modules.JumpManager; import mineplex.hub.modules.NewsManager; import mineplex.hub.modules.ParkourManager; import mineplex.hub.modules.TextManager; -import mineplex.hub.modules.HubVisibilityManager; import mineplex.hub.modules.WorldManager; import mineplex.hub.poll.PollManager; import mineplex.hub.tutorial.TutorialManager; @@ -899,6 +895,11 @@ public class HubManager extends MiniClientPlugin return _gadgetManager; } + public TreasureManager GetTreasure() + { + return _treasureManager; + } + public MountManager GetMount() { return _mountManager; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java index c7b57d2e4..43002d101 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java @@ -28,6 +28,8 @@ import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.event.StackerEvent; +import mineplex.core.gadget.gadgets.MorphBlock; +import mineplex.core.gadget.types.GadgetType; import mineplex.core.projectile.IThrown; import mineplex.core.projectile.ProjectileManager; import mineplex.core.projectile.ProjectileUser; @@ -105,15 +107,33 @@ public class StackerManager extends MiniPlugin implements IThrown return; } + if (Manager.GetGadget().getActive(stacker, GadgetType.Morph) instanceof MorphBlock) + { + UtilPlayer.message(stacker, F.main("Stacker", "You cannot stack while using the Block Morph.")); + return; + } + + if (Manager.GetTreasure().isOpening(stacker)) + return; + stackerEvent = new StackerEvent(stackee); Bukkit.getServer().getPluginManager().callEvent(stackerEvent); if (stackerEvent.isCancelled()) return; - if (stackee instanceof Player && !Manager.CanBump(((Player)stackee))) + if (stackee instanceof Player) { - UtilPlayer.message(stacker, F.main("Stacker", F.name(UtilEnt.getName(stackee)) + " is not playing stacker.")); - return; + if (!Manager.CanBump(((Player)stackee))) + { + UtilPlayer.message(stacker, F.main("Stacker", F.name(UtilEnt.getName(stackee)) + " is not playing stacker.")); + return; + } + + if (Manager.GetTreasure().isOpening((Player) stackee)) + { + UtilPlayer.message(stacker, F.main("Stacker", F.main("Stacker", F.name(UtilEnt.getName(stackee)) + " is opening a chest!"))); + return; + } } if (stackee instanceof LivingEntity)