mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 18:47:44 +01:00
Added placeVehicle Flag
This commit is contained in:
parent
2dc95da6e0
commit
c6b3507bf4
@ -84,6 +84,7 @@ regions:
|
||||
mobdamage: on
|
||||
waterflow: on
|
||||
leverandbutton: on
|
||||
placevehicle: on
|
||||
|
||||
iconomy:
|
||||
enable: on
|
||||
|
@ -39,6 +39,8 @@ public class WorldGuardPlugin extends JavaPlugin {
|
||||
new WorldGuardBlockListener(this);
|
||||
private final WorldGuardEntityListener entityListener =
|
||||
new WorldGuardEntityListener(this);
|
||||
private final WorldGuardVehicleListener vehicleListener =
|
||||
new WorldGuardVehicleListener(this);
|
||||
|
||||
private final CommandHandler commandHandler = new CommandHandler(this);
|
||||
private final GlobalRegionManager globalRegionManager = new GlobalRegionManager(this);
|
||||
@ -56,6 +58,7 @@ public void onEnable() {
|
||||
playerListener.registerEvents();
|
||||
blockListener.registerEvents();
|
||||
entityListener.registerEvents();
|
||||
vehicleListener.registerEvents();
|
||||
|
||||
// 25 equals about 1s real time
|
||||
this.getServer().getScheduler().scheduleSyncRepeatingTask(this, new TimedFlagsTimer(this), 25 * 5, 25 * 5);
|
||||
|
@ -33,6 +33,7 @@ public class GlobalFlags {
|
||||
public boolean canLighter = true;
|
||||
public boolean canTnt = true;
|
||||
public boolean canLeverandbutton = true;
|
||||
public boolean canPlaceVehicle = true;
|
||||
public boolean allowCreeper = true;
|
||||
public boolean allowMobDamage = true;
|
||||
public boolean allowWaterflow = true;
|
||||
@ -54,6 +55,8 @@ public boolean getDefaultValue(FlagType type)
|
||||
return this.canTnt;
|
||||
case LEVER_AND_BUTTON:
|
||||
return this.canLeverandbutton;
|
||||
case PLACE_VEHICLE:
|
||||
return this.canPlaceVehicle;
|
||||
case CREEPER_EXPLOSION:
|
||||
return this.allowCreeper;
|
||||
case MOB_DAMAGE:
|
||||
|
@ -38,7 +38,7 @@ public enum FlagType {
|
||||
|
||||
PASSTHROUGH, BUILD, PVP, MOB_DAMAGE, CREEPER_EXPLOSION,
|
||||
TNT, LIGHTER, FIRE_SPREAD, LAVA_FIRE, CHEST_ACCESS, WATER_FLOW,
|
||||
LEVER_AND_BUTTON, GREET_MESSAGE, FAREWELL_MESSAGE, DENY_SPAWN,
|
||||
LEVER_AND_BUTTON, PLACE_VEHICLE, GREET_MESSAGE, FAREWELL_MESSAGE, DENY_SPAWN,
|
||||
HEAL_DELAY, HEAL_AMOUNT, TELE_LOC, TELE_PERM, SPAWN_LOC, SPAWN_PERM,
|
||||
BUYABLE, PRICE
|
||||
|
||||
@ -60,6 +60,7 @@ public enum FlagType {
|
||||
registerFlag("chest", FlagType.CHEST_ACCESS, FlagDataType.STATE);
|
||||
registerFlag("waterflow", FlagType.WATER_FLOW, FlagDataType.STATE);
|
||||
registerFlag("leverandbutton", FlagType.LEVER_AND_BUTTON, FlagDataType.STATE);
|
||||
registerFlag("placevehicle", FlagType.PLACE_VEHICLE, FlagDataType.STATE);
|
||||
|
||||
registerFlag("buyable", FlagType.BUYABLE, FlagDataType.BOOLEAN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user