Merge branch 'develop' of ssh://184.154.0.242:7999/min/Mineplex into alex-compvanilla
This commit is contained in:
commit
4158c12227
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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"))
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user