From e5da93f359ddcad40d0a5217825007c50f53ce49 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Sat, 17 Aug 2019 18:42:31 -0400 Subject: [PATCH] Added a null check for the very unlikely chance that the command isn't found. --- .../intellectualsites/plotsquared/bukkit/BukkitMain.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java index 0bba5cc09..15e1ef219 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/BukkitMain.java @@ -289,9 +289,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain @Override public void registerCommands() { final BukkitCommand bukkitCommand = new BukkitCommand(); final PluginCommand plotCommand = getCommand("plots"); - plotCommand.setExecutor(bukkitCommand); - plotCommand.setAliases(Arrays.asList("p", "ps", "plotme", "plot")); - plotCommand.setTabCompleter(bukkitCommand); + if (plotCommand != null) { + plotCommand.setExecutor(bukkitCommand); + plotCommand.setAliases(Arrays.asList("p", "ps", "plotme", "plot")); + plotCommand.setTabCompleter(bukkitCommand); + } } @Override public File getDirectory() {