diff --git a/Plugins/Mineplex.Core/src/mineplex/core/chat/Chat.java b/Plugins/Mineplex.Core/src/mineplex/core/chat/Chat.java index fcdb2aafa..ffbafc0b6 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/chat/Chat.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/chat/Chat.java @@ -337,7 +337,7 @@ public class Chat extends MiniPlugin !Recharge.Instance.use(sender, "All Chat Message", 3000, false, false)) { UtilPlayer.message(sender, C.cYellow + "You can only chat once every 3 seconds to prevent spam."); - UtilPlayer.message(sender, C.cYellow + "Buy a Rank at " + C.cGreen + "www.mineplex.com/shop" + C.cYellow + " to remove this limit!"); + UtilPlayer.message(sender, C.cYellow + "FREE $5 Gift Card with code " + C.cGreen + "Mineplex5 " + C.cYellow + "on any rank " + C.cGreen + "http://goo.gl/z7bOh2 !"); event.setCancelled(true); } else if (!_clientManager.Get(sender).GetRank().has(Rank.MODERATOR) && diff --git a/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java b/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java index 5e76bf104..3018daa85 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/packethandler/PacketHandler.java @@ -31,7 +31,7 @@ public class PacketHandler extends MiniPlugin super("PacketHandler", plugin); } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.LOWEST) public void onPlayerJoin(PlayerJoinEvent event) { _playerVerifierMap.put(event.getPlayer(), new PacketVerifier(event.getPlayer(), this)); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java index 8247f16c0..11f7fdf5d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java @@ -329,7 +329,7 @@ public class ClansGame extends MiniPlugin ClanInfo clan = _clans.getClan(player); ClanInfo mimicClan = _clans.getClanAdmin().getMimic(player, false); ClanInfo blockClan = _clans.getClanUtility().getClaim(loc) == null ? null : _clans.getClan(_clans.getClanUtility().getClaim(loc).Owner); - if (blockClan.equals(mimicClan)) access = ClanRelation.SELF; + if (blockClan != null && blockClan.equals(mimicClan)) access = ClanRelation.SELF; // Doors, chests, & furnaces if (blockClan != null && (!blockClan.equals(clan) && !blockClan.equals(mimicClan)) && (event.getAction() == Action.RIGHT_CLICK_BLOCK && (loc.getBlock().getType().name().contains("DOOR") || UtilItem.doesHaveGUI(loc.getBlock().getType())))) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 69af91170..dca0a3881 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -81,6 +81,7 @@ import mineplex.minecraft.game.classcombat.Class.ClientClass; import mineplex.minecraft.game.classcombat.Class.IPvpClass; import mineplex.minecraft.game.classcombat.Class.repository.token.CustomBuildToken; import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager; +import mineplex.minecraft.game.classcombat.Skill.Mage.events.FissureModifyBlockEvent; import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.classcombat.item.ItemFactory; import mineplex.minecraft.game.classcombat.shop.ClassCombatShop; @@ -99,6 +100,7 @@ import org.bukkit.entity.Horse; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.SignChangeEvent; @@ -310,6 +312,15 @@ public class ClansManager extends MiniClientPluginimplements IRelati ClanTerritory territory = _clanUtility.getClaim(location); return territory == null || !territory.Safe; }); + registerEvents(new Listener() + { + @EventHandler + public void on(FissureModifyBlockEvent event) + { + Material targetType = event.getTargetBlock().getType(); + event.setCancelled(targetType == Material.POTATO || targetType == Material.CARROT); + } + }); _worldEvent.setFactory(skillManager); _classManager = new ClassManager(plugin, _clientManager, donationManager, skillManager, itemFactory, webServerAddress); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java index 00f0e24b8..36b0466a8 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/invsee/commands/InvseeCommand.java @@ -19,7 +19,7 @@ public class InvseeCommand extends CommandBase { public InvseeCommand(InvseeManager plugin) { - super(plugin, Rank.ADMIN, "invsee"); + super(plugin, Rank.CMOD, "invsee"); } @Override @@ -27,7 +27,7 @@ public class InvseeCommand extends CommandBase { if (args.length == 0) { - UtilPlayer.message(caller, F.help("/invsee ", "View a player's inventory", Rank.ADMIN)); + UtilPlayer.message(caller, F.help("/invsee ", "View a player's inventory", Rank.CMOD)); return; } UUID uuid = null; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/command/WorldEventCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/command/WorldEventCommand.java index 7a830d9c6..73d55f096 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/command/WorldEventCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/command/WorldEventCommand.java @@ -10,7 +10,7 @@ public class WorldEventCommand extends MultiCommandBase { public WorldEventCommand(WorldEventManager plugin) { - super(plugin, Rank.SNR_MODERATOR, "worldevent", "we", "event"); + super(plugin, Rank.ADMIN, "worldevent", "we", "event"); AddCommand(new StartCommand(Plugin)); AddCommand(new ClearCommand(Plugin)); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/world/WorldManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/world/WorldManager.java index e6b7bf983..e302d1a26 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/world/WorldManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/world/WorldManager.java @@ -146,6 +146,9 @@ public class WorldManager extends MiniPlugin iterator.remove(); culled++; } - log("Culled " + culled + " " + type); + if (culled != 0) + { + log("Culled " + culled + " " + type); + } } } diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Leap.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Leap.java index f1dcbb780..06bdda17a 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Leap.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Assassin/Leap.java @@ -78,7 +78,7 @@ public class Leap extends SkillActive { //Action if (!wallkick) - UtilAction.velocity(player, 1 + 0.15 * level, 0.2, 1, true); + UtilAction.velocity(player, 1.2, 0.2, 1, true); else { Vector vec = player.getLocation().getDirection(); diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java index 45833b8d1..8fd59a6d1 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/FissureData.java @@ -8,6 +8,8 @@ import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.minecraft.game.classcombat.Skill.Mage.events.FissureModifyBlockEvent; import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.block.Block; @@ -122,6 +124,11 @@ public class FissureData { return false; } + FissureModifyBlockEvent event = UtilServer.CallEvent(new FissureModifyBlockEvent(block)); + if (event.isCancelled()) + { + return false; + } if (block.getType().toString().contains("BANNER")) return false; if (block.getRelative(BlockFace.UP).getType().toString().contains("BANNER")) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/events/FissureModifyBlockEvent.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/events/FissureModifyBlockEvent.java new file mode 100644 index 000000000..fe34bd51e --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Mage/events/FissureModifyBlockEvent.java @@ -0,0 +1,46 @@ +package mineplex.minecraft.game.classcombat.Skill.Mage.events; + +import org.bukkit.block.Block; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +public class FissureModifyBlockEvent extends Event implements Cancellable +{ + private static final HandlerList HANDLER_LIST = new HandlerList(); + + private final Block _targetBlock; + + private boolean _cancelled; + + public FissureModifyBlockEvent(Block targetBlock) + { + this._targetBlock = targetBlock; + } + + public boolean isCancelled() + { + return this._cancelled; + } + + public void setCancelled(boolean cancelled) + { + this._cancelled = cancelled; + } + + public Block getTargetBlock() + { + return this._targetBlock; + } + + @Override + public HandlerList getHandlers() + { + return HANDLER_LIST; + } + + public static HandlerList getHandlerList() + { + return HANDLER_LIST; + } +}