Do not register top-level commands if config setting isn't true

https://github.com/BentoBoxWorld/Warps/issues/57
This commit is contained in:
tastybento 2019-11-07 15:52:49 -08:00
parent a013a1e6a1
commit c73bf8bad7
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.8.1</build.version>
<build.version>1.8.2</build.version>
</properties>
<!-- Profiles will allow to automatically change build version. -->

View File

@ -83,7 +83,7 @@ public class Warp extends Addon {
// Save default config.yml
this.saveDefaultConfig();
// Load the plugin's config
if (this.loadSettings()) {
if (this.loadSettings() && settings.isAllowInOtherWorlds()) {
// Load the master warp and warps command
new WarpCommand(this);
new WarpsCommand(this);