Merge branch 'develop' of ssh://184.154.0.242:7999/min/Mineplex into alex-compvanilla

This commit is contained in:
AlexTheCoder 2016-02-17 21:44:51 -05:00
commit 4158c12227
5 changed files with 8 additions and 8 deletions

View File

@ -211,7 +211,7 @@ public class EventModule extends MiniPlugin
@EventHandler(priority = EventPriority.LOWEST)
public void commandHandler(PlayerCommandPreprocessEvent event)
{
if (!Manager.GetGame().InProgress())
if (Manager.GetGame() == null || !Manager.GetGame().InProgress())
return;
if (!event.getMessage().toLowerCase().startsWith("/e "))
@ -1837,7 +1837,7 @@ public class EventModule extends MiniPlugin
@EventHandler
public void StackEntity(PlayerInteractEntityEvent event)
{
if (!Manager.GetGame().IsLive())
if (Manager.GetGame() == null || !Manager.GetGame().IsLive())
return;
if (event.getRightClicked().getVehicle() != null)

View File

@ -79,10 +79,7 @@ public class TNTGenerator
public void pickup(Player player, Item item)
{
if (_ent == null)
{
_ent.remove();
return;
}
if (!_ent.equals(item))
return;

View File

@ -148,6 +148,8 @@ public class PerkMadScientist extends Perk implements IThrown
}
Zombie zombie = (Zombie) e.getEntity();
if (zombie.getCustomName() == null)
return;
Player targetPlayer = (Player) e.getTarget();
String name = ChatColor

View File

@ -123,7 +123,8 @@ public class MiscManager implements Listener
return;
// Prevent players from hub warping off clock in Master Builders
if (!player.getItemInHand().getItemMeta().getDisplayName().contains("Hub"))
String displayName = player.getItemInHand().getItemMeta().getDisplayName();
if (displayName == null || !displayName.contains("Hub"))
return;
if (!Recharge.Instance.usable(event.getPlayer(), "Return to Hub"))

View File

@ -60,7 +60,7 @@ public class GameChatManager implements Listener
@EventHandler
public void HandleChat(AsyncPlayerChatEvent event)
{
if (event.isCancelled())
if (event.isCancelled() || event.getMessage().isEmpty())
return;
Player sender = event.getPlayer();
@ -166,7 +166,7 @@ public class GameChatManager implements Listener
else
message = event.getFormat().split(sender.getName())[1].replace("%2$s", "") + _manager.GetChat().getFilteredMessage(sender, event.getMessage());
if (_manager.GetGame().GetState() != GameState.Live)
if (_manager.GetGame() == null || _manager.GetGame().GetState() != GameState.Live)
{
event.setFormat(levelStr + rankStr + senderName + " " + C.cWhite + "%2$s");