mirror of
https://github.com/taoneill/war.git
synced 2025-01-03 06:17:33 +01:00
Fix #437, add team config 'borderdrop' to permit item drop near walls
This commit is contained in:
parent
ef26173ba1
commit
b7cf69666c
@ -235,6 +235,7 @@ public class War extends JavaPlugin {
|
||||
teamDefaultConfig.put(TeamConfig.APPLYPOTION, "");
|
||||
teamDefaultConfig.put(TeamConfig.ECOREWARD, 0.0);
|
||||
teamDefaultConfig.put(TeamConfig.INVENTORYDROP, false);
|
||||
teamDefaultConfig.put(TeamConfig.BORDERDROP, false);
|
||||
|
||||
this.getDefaultInventories().clearLoadouts();
|
||||
HashMap<Integer, ItemStack> defaultLoadout = new HashMap<Integer, ItemStack>();
|
||||
|
@ -20,7 +20,8 @@ public enum TeamConfig {
|
||||
PLACEBLOCK (Boolean.class),
|
||||
APPLYPOTION(String.class),
|
||||
ECOREWARD(Double.class),
|
||||
INVENTORYDROP(Boolean.class);
|
||||
INVENTORYDROP(Boolean.class),
|
||||
BORDERDROP(Boolean.class);
|
||||
|
||||
private final Class<?> configType;
|
||||
|
||||
|
@ -139,7 +139,8 @@ public class WarPlayerListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (zone.isNearWall(player.getLocation()) && itemStack != null) {
|
||||
if (zone.isNearWall(player.getLocation()) && itemStack != null
|
||||
&& !team.getTeamConfig().resolveBoolean(TeamConfig.BORDERDROP)) {
|
||||
War.war.badMsg(player, "drop.item.border");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user