diff --git a/src/main/java/net/buildtheearth/buildteamtools/modules/navigation/components/tpll/listeners/TpllListener.java b/src/main/java/net/buildtheearth/buildteamtools/modules/navigation/components/tpll/listeners/TpllListener.java index 8df177e7..f0d4a6fd 100644 --- a/src/main/java/net/buildtheearth/buildteamtools/modules/navigation/components/tpll/listeners/TpllListener.java +++ b/src/main/java/net/buildtheearth/buildteamtools/modules/navigation/components/tpll/listeners/TpllListener.java @@ -7,6 +7,7 @@ import net.buildtheearth.buildteamtools.modules.network.NetworkModule; import net.buildtheearth.buildteamtools.modules.network.api.OpenStreetMapAPI; import net.buildtheearth.buildteamtools.modules.network.model.BuildTeam; +import net.buildtheearth.buildteamtools.modules.network.model.Permissions; import net.buildtheearth.buildteamtools.modules.network.model.Region; import net.buildtheearth.model.GeographicalCoordinate; import org.bukkit.event.EventHandler; @@ -38,6 +39,8 @@ public void onTpll(PlayerCommandPreprocessEvent event) { // Check if the NavigationModule is enabled if (!NavigationModule.getInstance().isEnabled()) return; + if (!event.getPlayer().hasPermission(Permissions.AUTO_TPLL)) return; + // Check if the command is a TPLL command if (!isTpllCommand(event)) return; diff --git a/src/main/java/net/buildtheearth/buildteamtools/modules/network/model/Permissions.java b/src/main/java/net/buildtheearth/buildteamtools/modules/network/model/Permissions.java index 5881ddb9..eff6782f 100644 --- a/src/main/java/net/buildtheearth/buildteamtools/modules/network/model/Permissions.java +++ b/src/main/java/net/buildtheearth/buildteamtools/modules/network/model/Permissions.java @@ -32,4 +32,6 @@ public class Permissions { public static final String NOTIFY_UPDATE = "btt.notify.update"; + public static final String AUTO_TPLL = "btt.global.autotpll"; + } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 88125a51..d6a781e0 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -51,6 +51,7 @@ permissions: btt.navigator.use: true btt.warp.use: true btt.bp.use: true + btt.global.autotpll: true btt.permpack.builder: description: Contains all permissions for builders / trusted players default: op