mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 10:37:41 +01:00
Revert "Added allow-flight boolean flag for regions"
This conflicted with plugins maually setting a player's allow flight setting
This reverts commit 16ce56c1ad
.
This commit is contained in:
parent
fe62c8d0c5
commit
a7d198893e
@ -1,6 +1,4 @@
|
|||||||
5.5.2:
|
5.5.2:
|
||||||
- Added 'allow-flight' flag, which allows or disallows flight per-region
|
|
||||||
- Restructured /region list
|
|
||||||
- A cancellable event is now fired if WorldGuard disallows PvP. (for developers!)
|
- A cancellable event is now fired if WorldGuard disallows PvP. (for developers!)
|
||||||
- Made /region setparent check worldguard.region.setparent.own/member.<parent> instead of worldguard.region.setparent.own/member.<child>.
|
- Made /region setparent check worldguard.region.setparent.own/member.<parent> instead of worldguard.region.setparent.own/member.<child>.
|
||||||
- Allowed passing #<index> in place of a region ID, where <index> is the index as displayed by /region list.
|
- Allowed passing #<index> in place of a region ID, where <index> is the index as displayed by /region list.
|
||||||
@ -389,4 +387,4 @@ EduardBaer, TomyLobo, and halvors
|
|||||||
- Added block lag fix.
|
- Added block lag fix.
|
||||||
|
|
||||||
1.0
|
1.0
|
||||||
- Initial release.
|
- Initial release.
|
1
src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java
Executable file → Normal file
1
src/main/java/com/sk89q/worldguard/bukkit/FlagStateManager.java
Executable file → Normal file
@ -220,7 +220,6 @@ public static class PlayerFlagState {
|
|||||||
public Boolean lastExitAllowed = null;
|
public Boolean lastExitAllowed = null;
|
||||||
public Boolean notifiedForLeave = false;
|
public Boolean notifiedForLeave = false;
|
||||||
public Boolean notifiedForEnter = false;
|
public Boolean notifiedForEnter = false;
|
||||||
public Boolean lastAllowFlight = null;
|
|
||||||
public World lastWorld;
|
public World lastWorld;
|
||||||
public int lastBlockX;
|
public int lastBlockX;
|
||||||
public int lastBlockY;
|
public int lastBlockY;
|
||||||
|
20
src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java
Executable file → Normal file
20
src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java
Executable file → Normal file
@ -65,7 +65,6 @@
|
|||||||
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
||||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||||
import org.bukkit.GameMode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles all events thrown in relation to a player.
|
* Handles all events thrown in relation to a player.
|
||||||
@ -159,7 +158,6 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
String farewell = set.getFlag(DefaultFlag.FAREWELL_MESSAGE);//, localPlayer);
|
String farewell = set.getFlag(DefaultFlag.FAREWELL_MESSAGE);//, localPlayer);
|
||||||
Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER);//, localPlayer);
|
Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER);//, localPlayer);
|
||||||
Boolean notifyLeave = set.getFlag(DefaultFlag.NOTIFY_LEAVE);//, localPlayer);
|
Boolean notifyLeave = set.getFlag(DefaultFlag.NOTIFY_LEAVE);//, localPlayer);
|
||||||
Boolean allowFlight = set.getFlag(DefaultFlag.ALLOW_FLIGHT);//, localPlayer);
|
|
||||||
|
|
||||||
if (state.lastFarewell != null && (farewell == null
|
if (state.lastFarewell != null && (farewell == null
|
||||||
|| !state.lastFarewell.equals(farewell))) {
|
|| !state.lastFarewell.equals(farewell))) {
|
||||||
@ -199,24 +197,6 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
+ ChatColor.WHITE
|
+ ChatColor.WHITE
|
||||||
+ regionList);
|
+ regionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allowFlight == null) {
|
|
||||||
if ((plugin.getServer().getDefaultGameMode() == GameMode.CREATIVE
|
|
||||||
&& player.getGameMode() == GameMode.CREATIVE)
|
|
||||||
|| player.getGameMode() == GameMode.CREATIVE) {
|
|
||||||
allowFlight = true;
|
|
||||||
} else {
|
|
||||||
allowFlight = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.getAllowFlight() && !allowFlight) {
|
|
||||||
player.setAllowFlight(false);
|
|
||||||
state.lastAllowFlight = true;
|
|
||||||
} else if (!player.getAllowFlight() && allowFlight) {
|
|
||||||
player.setAllowFlight(true);
|
|
||||||
state.lastAllowFlight = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
state.lastGreeting = greeting;
|
state.lastGreeting = greeting;
|
||||||
state.lastFarewell = farewell;
|
state.lastFarewell = farewell;
|
||||||
|
3
src/main/java/com/sk89q/worldguard/protection/flags/DefaultFlag.java
Executable file → Normal file
3
src/main/java/com/sk89q/worldguard/protection/flags/DefaultFlag.java
Executable file → Normal file
@ -80,7 +80,6 @@ public final class DefaultFlag {
|
|||||||
public static final DoubleFlag PRICE = new DoubleFlag("price");
|
public static final DoubleFlag PRICE = new DoubleFlag("price");
|
||||||
public static final SetFlag<String> BLOCKED_CMDS = new SetFlag<String>("blocked-cmds", RegionGroup.ALL, new CommandStringFlag(null));
|
public static final SetFlag<String> BLOCKED_CMDS = new SetFlag<String>("blocked-cmds", RegionGroup.ALL, new CommandStringFlag(null));
|
||||||
public static final SetFlag<String> ALLOWED_CMDS = new SetFlag<String>("allowed-cmds", RegionGroup.ALL, new CommandStringFlag(null));
|
public static final SetFlag<String> ALLOWED_CMDS = new SetFlag<String>("allowed-cmds", RegionGroup.ALL, new CommandStringFlag(null));
|
||||||
public static final BooleanFlag ALLOW_FLIGHT = new BooleanFlag("allow-flight", RegionGroup.ALL);
|
|
||||||
|
|
||||||
public static final Flag<?>[] flagsList = new Flag<?>[] {
|
public static final Flag<?>[] flagsList = new Flag<?>[] {
|
||||||
PASSTHROUGH, BUILD, CONSTRUCT, PVP, CHEST_ACCESS, PISTONS,
|
PASSTHROUGH, BUILD, CONSTRUCT, PVP, CHEST_ACCESS, PISTONS,
|
||||||
@ -95,7 +94,7 @@ public final class DefaultFlag {
|
|||||||
MUSHROOMS, LEAF_DECAY, GRASS_SPREAD,
|
MUSHROOMS, LEAF_DECAY, GRASS_SPREAD,
|
||||||
FIRE_SPREAD, LAVA_FIRE, LAVA_FLOW, WATER_FLOW,
|
FIRE_SPREAD, LAVA_FIRE, LAVA_FLOW, WATER_FLOW,
|
||||||
TELE_LOC, SPAWN_LOC,
|
TELE_LOC, SPAWN_LOC,
|
||||||
BLOCKED_CMDS, ALLOWED_CMDS, PRICE, BUYABLE, ALLOW_FLIGHT,
|
BLOCKED_CMDS, ALLOWED_CMDS, PRICE, BUYABLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user