From 523d3216c5d44b53634c6eb5229d1a5fa129da1e Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 4 Aug 2011 02:27:58 -0500 Subject: [PATCH] /f config [setting] [value] command now accepts setting names which are inside quotation marks, to prevent confusion since they're also in quotation marks in conf.json --- src/com/massivecraft/factions/commands/FCommandConfig.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/commands/FCommandConfig.java b/src/com/massivecraft/factions/commands/FCommandConfig.java index 9bb1e4d2..634c6274 100644 --- a/src/com/massivecraft/factions/commands/FCommandConfig.java +++ b/src/com/massivecraft/factions/commands/FCommandConfig.java @@ -51,7 +51,11 @@ public class FCommandConfig extends FBaseCommand { } } - String fieldName = properFieldNames.get(parameters.get(0).toLowerCase()); + String field = parameters.get(0).toLowerCase(); + if (field.startsWith("\"") && field.endsWith("\"")) { + field = field.substring(1, field.length() - 1); + } + String fieldName = properFieldNames.get(field); if (fieldName == null || fieldName.isEmpty()) { sendMessage("No configuration setting \""+parameters.get(0)+"\" exists.");