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