Fix numerous trello bugs
- Stacker as Block morph - Punish mistake - Achievement mistake - Stacking a chest opener
This commit is contained in:
parent
a2f6a8cbd3
commit
fe80ed373a
@ -326,7 +326,7 @@ public enum Achievement
|
||||
|
||||
SUPER_PAINTBALL_FLAWLESS_VICTORY("Flawless Victory", 1000,
|
||||
new String[]{"Super Paintball.Wins"},
|
||||
new String[]{"Win a team with your entire team alive"},
|
||||
new String[]{"Win a game with your entire team alive"},
|
||||
new int[]{1},
|
||||
AchievementCategory.SUPER_PAINTBALL),
|
||||
|
||||
|
@ -208,9 +208,9 @@ 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"))
|
||||
else if (sender.getName().equalsIgnoreCase("B2_mp") || sender.getName().equalsIgnoreCase("Horus"))
|
||||
return 101;
|
||||
else if (rank.Has(Rank.OWNER))
|
||||
level = Math.max(level, 50 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel());
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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<CosmeticManager, CosmeticShop>
|
||||
//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<String> itemLore = new ArrayList<String>();
|
||||
|
||||
if (gadget.GetCost(CurrencyType.Coins) >= 0)
|
||||
|
@ -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",
|
||||
}
|
||||
|
@ -324,6 +324,11 @@ public class TreasureLocation implements Listener
|
||||
_hologram.start();
|
||||
}
|
||||
|
||||
public Treasure getCurrentTreasure()
|
||||
{
|
||||
return _currentTreasure;
|
||||
}
|
||||
|
||||
public void openShop(Player player)
|
||||
{
|
||||
_shop.attemptShopOpen(player);
|
||||
|
@ -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;
|
||||
|
@ -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<HubClient>
|
||||
return _gadgetManager;
|
||||
}
|
||||
|
||||
public TreasureManager GetTreasure()
|
||||
{
|
||||
return _treasureManager;
|
||||
}
|
||||
|
||||
public MountManager GetMount()
|
||||
{
|
||||
return _mountManager;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user