- args = new Object[dataArray.length - 1];
- for (int i = 1; i < dataArray.length; i++) {
- args[i - 1] = dataArray[i];
+ args = new Object[dataArray.length - 2];
+ for (int i = 2; i < dataArray.length; i++) {
+ args[i - 2] = dataArray[i];
+ }
+ }
+ }
+
+ List<String> whitelist = Instance.getConfig().getList(
+ Config.SERVER_WHITELIST);
+ if (whitelist == null) {
+ whitelist = new ArrayList<String>();
+ }
+
+ if (whitelist.isEmpty()) {
+ wl = false;
+ }
+
+ rw = Instance.getConfig().getBoolean(Config.SERVER_RW, rw);
+ if (!subkey.isEmpty()) {
+ List<String> allowed = Instance.getConfig().getList(
+ Config.SERVER_ALLOWED_SUBKEYS);
+ if (allowed.contains(subkey)) {
+ if ((subkey + "|").contains("|rw|")) {
+ rw = true;
+ }
+ if ((subkey + "|").contains("|wl|")) {
+ wl = false; // |wl| = bypass whitelist
+ whitelist = new ArrayList<String>();