mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-05 07:01:21 +01:00
fix joining from other arenas (hopefully), readd missing block destroy check
This commit is contained in:
parent
806583f41a
commit
10147532a5
@ -169,11 +169,14 @@ public class ArenaListener
|
||||
return false;
|
||||
// Below this, arena is running - ACStache
|
||||
|
||||
Block b = event.getBlock();
|
||||
if (arena.removeBlock(b) || b.getType() == Material.TNT)
|
||||
return true;
|
||||
|
||||
if (softRestore) {
|
||||
if (arena.isProtected())
|
||||
return false;
|
||||
|
||||
Block b = event.getBlock();
|
||||
BlockState state = b.getState();
|
||||
Repairable r = null;
|
||||
|
||||
@ -188,7 +191,7 @@ public class ArenaListener
|
||||
|
||||
arena.addRepairable(r);
|
||||
|
||||
if(!softRestoreDrops)
|
||||
if (!softRestoreDrops)
|
||||
b.setTypeId(0);
|
||||
return true;
|
||||
}
|
||||
|
@ -34,6 +34,12 @@ public class JoinCommand implements Command
|
||||
return false;
|
||||
}
|
||||
|
||||
// Deny joining from other arenas
|
||||
if (am.getArenaWithPlayer(p) != null) {
|
||||
Messenger.tellPlayer(p, Msg.JOIN_ALREADY_PLAYING);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Per-arena sanity checks
|
||||
if (!arena.canJoin(p)) {
|
||||
return false;
|
||||
|
@ -149,7 +149,7 @@ public class ItemParser
|
||||
}
|
||||
|
||||
private static ItemStack withDataAndAmount(String item, String data, String amount) {
|
||||
Material m = getMaterial(item.toUpperCase());
|
||||
Material m = getMaterial(item);
|
||||
short d = getData(data, m);
|
||||
int a = getAmount(amount);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user