mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-24 01:58:18 +01:00
Added the option to disable the use of player move events. Note that this also disables features which use it such as the region entry/exit and greeting/farewell flags.
This commit is contained in:
parent
17741822c1
commit
4194b2ca86
@ -45,7 +45,7 @@ public class ConfigurationManager {
|
||||
"#\r\n" +
|
||||
"# This is the global configuration file. Anything placed into here will\r\n" +
|
||||
"# be applied to all worlds. However, each world has its own configuration\r\n" +
|
||||
"# file to allow you to replace any setting in here for that world only.\r\n" +
|
||||
"# file to allow you to replace most settings in here for that world only.\r\n" +
|
||||
"#\r\n" +
|
||||
"# About editing this file:\r\n" +
|
||||
"# - DO NOT USE TABS. You MUST use spaces or Bukkit will complain. If\r\n" +
|
||||
@ -85,6 +85,7 @@ public class ConfigurationManager {
|
||||
public boolean useRegionsScheduler;
|
||||
public boolean activityHaltToggle = false;
|
||||
public boolean autoGodMode;
|
||||
public boolean usePlayerMove;
|
||||
|
||||
/**
|
||||
* Construct the object.
|
||||
@ -113,6 +114,8 @@ public void load() {
|
||||
"regions.use-scheduler", true);
|
||||
autoGodMode = config.getBoolean(
|
||||
"auto-invincible-permission", false);
|
||||
usePlayerMove = config.getBoolean(
|
||||
"use-player-move-event", true);
|
||||
|
||||
// Load configurations for each world
|
||||
for (World world : plugin.getServer().getWorlds()) {
|
||||
|
@ -106,8 +106,10 @@ public void registerEvents() {
|
||||
registerEvent("PLAYER_RESPAWN", Priority.High);
|
||||
registerEvent("PLAYER_ITEM_HELD", Priority.High);
|
||||
registerEvent("PLAYER_BED_ENTER", Priority.High);
|
||||
registerEvent("PLAYER_MOVE", Priority.High);
|
||||
registerEvent("PLAYER_COMMAND_PREPROCESS", Priority.High);
|
||||
if (plugin.getGlobalStateManager().usePlayerMove) {
|
||||
registerEvent("PLAYER_MOVE", Priority.High);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,8 +151,7 @@ public void onEnable() {
|
||||
flagStateManager = new FlagStateManager(this);
|
||||
|
||||
if (configuration.useRegionsScheduler) {
|
||||
getServer().getScheduler().scheduleAsyncRepeatingTask(this,
|
||||
flagStateManager, FlagStateManager.RUN_DELAY, FlagStateManager.RUN_DELAY);
|
||||
getServer().getScheduler().scheduleAsyncRepeatingTask(this, flagStateManager, FlagStateManager.RUN_DELAY, FlagStateManager.RUN_DELAY);
|
||||
}
|
||||
|
||||
if (configuration.suppressTickSyncWarnings) {
|
||||
|
Loading…
Reference in New Issue
Block a user