diff --git a/Core/src/main/java/com/plotsquared/core/command/MainCommand.java b/Core/src/main/java/com/plotsquared/core/command/MainCommand.java index ee93a2809..e151c50cb 100644 --- a/Core/src/main/java/com/plotsquared/core/command/MainCommand.java +++ b/Core/src/main/java/com/plotsquared/core/command/MainCommand.java @@ -42,6 +42,8 @@ import com.plotsquared.core.util.Expression; import com.plotsquared.core.util.Permissions; import com.plotsquared.core.util.task.RunnableVal2; import com.plotsquared.core.util.task.RunnableVal3; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.LinkedList; @@ -55,6 +57,8 @@ import java.util.concurrent.CompletableFuture; aliases = {"plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap"}) public class MainCommand extends Command { + private static final Logger logger = LoggerFactory.getLogger("P2/" + MainCommand.class.getSimpleName()); + private static MainCommand instance; public Help help; public Toggle toggle; @@ -144,7 +148,12 @@ public class MainCommand extends Command { } for (final Class command : commands) { - injector.getInstance(command); + try { + injector.getInstance(command); + } catch (final Exception e) { + logger.error("Failed to register command {}", command.getCanonicalName()); + e.printStackTrace(); + } } // Referenced commands diff --git a/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java b/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java index 40cd70346..2002bba37 100644 --- a/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java +++ b/Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java @@ -158,7 +158,7 @@ public class ConsolePlayer extends PlotPlayer { lastPlot.set(location.getPlot()); } } - try (final MetaDataAccess locationMetaDataAccess = accessPersistentMetaData(PlayerMetaDataKeys.TEMPORARY_LOCATION)) { + try (final MetaDataAccess locationMetaDataAccess = accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LOCATION)) { locationMetaDataAccess.set(location); } }