Merge branches 'develop' and 'feature/report-v2' of github.com:Mineplex-LLC/Minecraft-PC into feature/report-v2

This commit is contained in:
Keir Nellyer 2016-05-29 00:27:48 +01:00
commit 075c2d21e9
10 changed files with 75 additions and 8 deletions

View File

@ -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) &&

View File

@ -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));

View File

@ -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()))))

View File

@ -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 MiniClientPlugin<ClientClan>implements 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);

View File

@ -19,7 +19,7 @@ public class InvseeCommand extends CommandBase<InvseeManager>
{
public InvseeCommand(InvseeManager plugin)
{
super(plugin, Rank.ADMIN, "invsee");
super(plugin, Rank.CMOD, "invsee");
}
@Override
@ -27,7 +27,7 @@ public class InvseeCommand extends CommandBase<InvseeManager>
{
if (args.length == 0)
{
UtilPlayer.message(caller, F.help("/invsee <playername/playeruuid>", "View a player's inventory", Rank.ADMIN));
UtilPlayer.message(caller, F.help("/invsee <playername/playeruuid>", "View a player's inventory", Rank.CMOD));
return;
}
UUID uuid = null;

View File

@ -10,7 +10,7 @@ public class WorldEventCommand extends MultiCommandBase<WorldEventManager>
{
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));

View File

@ -146,6 +146,9 @@ public class WorldManager extends MiniPlugin
iterator.remove();
culled++;
}
if (culled != 0)
{
log("Culled " + culled + " " + type);
}
}
}

View File

@ -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();

View File

@ -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"))

View File

@ -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;
}
}