diff --git a/Core/src/main/java/com/intellectualcrafters/plot/PS.java b/Core/src/main/java/com/intellectualcrafters/plot/PS.java index 945fc1e81..92248870f 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/PS.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/PS.java @@ -182,10 +182,6 @@ public class PS { PS.debug("Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master"); } } - // Commands - if (Settings.Enabled_Components.COMMANDS) { - this.IMP.registerCommands(); - } if (Settings.Enabled_Components.EVENTS) { this.IMP.registerPlayerEvents(); this.IMP.registerInventoryEvents(); @@ -232,6 +228,10 @@ public class PS { AbstractTitle.TITLE_CLASS = this.IMP.initTitleManager(); // Chat ChatManager.manager = this.IMP.initChatManager(); + // Commands + if (Settings.Enabled_Components.COMMANDS) { + this.IMP.registerCommands(); + } // Economy if (Settings.Enabled_Components.ECONOMY) { TaskManager.runTask(new Runnable() { diff --git a/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java b/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java index 127faebc5..d7d6d2d49 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/object/PlotPlayer.java @@ -60,10 +60,14 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer { * @param value */ public void setMeta(String key, Object value) { - if (this.meta == null) { - this.meta = new ConcurrentHashMap<>(); + if (value == null) { + deleteMeta(key); + } else { + if (this.meta == null) { + this.meta = new ConcurrentHashMap<>(); + } + this.meta.put(key, value); } - this.meta.put(key, value); } /** diff --git a/Core/src/main/java/com/plotsquared/general/commands/Command.java b/Core/src/main/java/com/plotsquared/general/commands/Command.java index e6226bf64..9e68dffcb 100644 --- a/Core/src/main/java/com/plotsquared/general/commands/Command.java +++ b/Core/src/main/java/com/plotsquared/general/commands/Command.java @@ -59,6 +59,9 @@ public abstract class Command { this.required = required; this.category = cat; this.aliases = Arrays.asList(id); + if (this.parent != null) { + this.parent.register(this); + } } public Command(Command parent, boolean isStatic) {