Fix/Reimplement removeDrops
This commit is contained in:
parent
f46f183dc5
commit
a704d9bc57
2 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -73,8 +73,10 @@ public class PlayerListener implements Listener {
|
|||
if (checkPermission(event, NoLimitPermissions.DROP))
|
||||
return;
|
||||
|
||||
if (mod.getConfig().getRemoveDrops())
|
||||
event.getItemDrop().remove();
|
||||
//event.setCancelled(true); // doesn't make much sense
|
||||
else
|
||||
event.setCancelled(true); // doesn't make much sense
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue