From a704d9bc577a92c5c4aa0c204b65086b9c324a57 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Wed, 25 Sep 2013 17:23:09 +0200 Subject: [PATCH] Fix/Reimplement removeDrops --- .../minecraft/limitedcreative/limits/LimitConfig.java | 6 +++--- .../minecraft/limitedcreative/limits/PlayerListener.java | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java index 961271e..295312b 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java @@ -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); } diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java index 03e8559..d3c2a58 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java @@ -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 } }