diff --git a/MobArena.jar b/MobArena.jar index 9e1d298..1d1e3a6 100644 Binary files a/MobArena.jar and b/MobArena.jar differ diff --git a/src/com/garbagemule/MobArena/ArenaListener.java b/src/com/garbagemule/MobArena/ArenaListener.java index 66857c6..d319a20 100644 --- a/src/com/garbagemule/MobArena/ArenaListener.java +++ b/src/com/garbagemule/MobArena/ArenaListener.java @@ -620,20 +620,31 @@ public class ArenaListener public void onPlayerDropItem(PlayerDropItemEvent event) { Player p = event.getPlayer(); - // If the player is active in the arena, only cancel if sharing is not - // allowed + // If the player is active in the arena, only cancel if sharing is not allowed if (arena.inArena(p)) { if (!canShare) { Messenger.tellPlayer(p, Msg.LOBBY_DROP_ITEM); event.setCancelled(true); } } - - // Else, if the player is in the lobby or a spectator, just cancel - else if (arena.inLobby(p) || arena.inSpec(p)) { + + // If the player is in the lobby, just cancel + else if (arena.inLobby(p)) { Messenger.tellPlayer(p, Msg.LOBBY_DROP_ITEM); event.setCancelled(true); } + + // Same if it's a spectator, but... + else if (arena.inSpec(p)) { + Messenger.tellPlayer(p, Msg.LOBBY_DROP_ITEM); + event.setCancelled(true); + + // If the spectator isn't in the region, force them to leave + if (!region.contains(p.getLocation())) { + Messenger.tellPlayer(p, Msg.MISC_MA_LEAVE_REMINDER); + arena.playerLeave(p); + } + } /* * If the player is not in the arena in any way (as arena player, lobby diff --git a/src/com/garbagemule/MobArena/Msg.java b/src/com/garbagemule/MobArena/Msg.java index 7ea8ea9..da4f453 100644 --- a/src/com/garbagemule/MobArena/Msg.java +++ b/src/com/garbagemule/MobArena/Msg.java @@ -67,6 +67,7 @@ public enum Msg MISC_HELP("For a list of commands, type /ma help"), MISC_MULTIPLE_MATCHES("Did you mean one of these commands?"), MISC_NO_MATCHES("Command not found. Type /ma help"), + MISC_MA_LEAVE_REMINDER("Remember to use /ma leave when you are done."), MISC_NONE(""); private String msg, spoutMsg;