From 09bd3ca139e5926e84b256505465e4fda5d7473f Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Thu, 16 Jul 2015 19:10:37 -0700 Subject: [PATCH] Support for zero commands requiring access trust. Now the list of commands requiring access trust to execute in land claims can be empty without any odd side-effects. --- src/me/ryanhamshire/GriefPrevention/GriefPrevention.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index b453cd0..37fdc55 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -826,7 +826,10 @@ public class GriefPrevention extends JavaPlugin String [] commands = accessTrustSlashCommands.split(";"); for(int i = 0; i < commands.length; i++) { - this.config_claims_commandsRequiringAccessTrust.add(commands[i].trim().toLowerCase()); + if(!commands[i].isEmpty()) + { + this.config_claims_commandsRequiringAccessTrust.add(commands[i].trim().toLowerCase()); + } } //try to parse the list of commands which should be monitored for spam