Fix/Reimplement removeDrops

This commit is contained in:
Jascha Starke 2013-09-25 17:23:09 +02:00
parent f46f183dc5
commit a704d9bc57
2 changed files with 7 additions and 5 deletions

View file

@ -105,14 +105,14 @@ public class LimitConfig extends Configuration implements IConfigurationSubGroup
/**
* LimitDropsInsteadPrevent
*
* When enabled items that are dropped by creative players are removed (burning in the hellfire or so, they just
* When enabled items that are dropped by creative players are removed (burning in the hellfire or such, they just
* disappear). When disabled the items stay in the inventory of the player.
*
* default: false
* default: true
*/
@IsConfigurationNode(order = 200)
public boolean getRemoveDrops() {
return config.getBoolean("removeDrops", false);
return config.getBoolean("removeDrops", true);
}

View file

@ -73,8 +73,10 @@ public class PlayerListener implements Listener {
if (checkPermission(event, NoLimitPermissions.DROP))
return;
event.getItemDrop().remove();
//event.setCancelled(true); // doesn't make much sense
if (mod.getConfig().getRemoveDrops())
event.getItemDrop().remove();
else
event.setCancelled(true); // doesn't make much sense
}
}