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

View File

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

View File

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

View File

@ -123,7 +123,8 @@ public class MiscManager implements Listener
return; return;
// Prevent players from hub warping off clock in Master Builders // 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; return;
if (!Recharge.Instance.usable(event.getPlayer(), "Return to Hub")) if (!Recharge.Instance.usable(event.getPlayer(), "Return to Hub"))

View File

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