Added placeVehicle Flag

This commit is contained in:
DarkLiKally 2011-02-28 19:15:37 +01:00
parent 2dc95da6e0
commit c6b3507bf4
4 changed files with 9 additions and 1 deletions

View File

@ -84,6 +84,7 @@ regions:
mobdamage: on
waterflow: on
leverandbutton: on
placevehicle: on
iconomy:
enable: on

View File

@ -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);

View File

@ -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:

View File

@ -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);