From cd3a9e2bf22cc78f6fd64535a5f10177be7c3054 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Tue, 2 Feb 2016 17:56:57 +0100 Subject: [PATCH] Fix to convertGet --- .../massivecore/store/SenderEntity.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/com/massivecraft/massivecore/store/SenderEntity.java b/src/com/massivecraft/massivecore/store/SenderEntity.java index 0b2455af..6fde5009 100644 --- a/src/com/massivecraft/massivecore/store/SenderEntity.java +++ b/src/com/massivecraft/massivecore/store/SenderEntity.java @@ -65,6 +65,7 @@ public abstract class SenderEntity> extends Entity // CONVENIENCE: DATABASE // -------------------------------------------- // + // GENERIC public T convertGet(T value, T defaultValue, String permission) { // Create @@ -77,17 +78,10 @@ public abstract class SenderEntity> extends Entity return ret; } - // Boolean specific - public boolean convertGet(Boolean wrapper, String permission) + // BOOLEAN + public boolean convertGet(Boolean value, String permission) { - // Create - boolean ret = super.convertGet(wrapper); - - // Permission Requirement - if (ret && ! PermUtil.has(this.getSender(), permission)) return false; - - // Return - return ret; + return this.convertGet(value, false, permission); } // -------------------------------------------- //