mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-24 01:58:18 +01:00
Merge leafdecay flag from zml2008
This commit is contained in:
parent
846cf63268
commit
26946feecc
@ -67,6 +67,7 @@ public void registerEvents() {
|
|||||||
pm.registerEvent(Event.Type.SIGN_CHANGE, this, Priority.High, plugin);
|
pm.registerEvent(Event.Type.SIGN_CHANGE, this, Priority.High, plugin);
|
||||||
pm.registerEvent(Event.Type.REDSTONE_CHANGE, this, Priority.High, plugin);
|
pm.registerEvent(Event.Type.REDSTONE_CHANGE, this, Priority.High, plugin);
|
||||||
pm.registerEvent(Event.Type.SNOW_FORM, this, Priority.High, plugin);
|
pm.registerEvent(Event.Type.SNOW_FORM, this, Priority.High, plugin);
|
||||||
|
pm.registerEvent(Event.Type.LEAVES_DECAY, this, Priority.High, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected WorldConfiguration getWorldConfig(World world) {
|
protected WorldConfiguration getWorldConfig(World world) {
|
||||||
@ -554,6 +555,17 @@ public void onSnowForm(SnowFormEvent event) {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLeavesDecay(LeavesDecayEvent event) {
|
||||||
|
if (event.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!plugin.getGlobalRegionManager().allows(DefaultFlag.LEAF_DECAY, event.getBlock().getLocation())) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Drops a sign item and removes a sign.
|
* Drops a sign item and removes a sign.
|
||||||
*
|
*
|
||||||
|
@ -44,6 +44,7 @@ public final class DefaultFlag {
|
|||||||
public static final StateFlag USE = new StateFlag("use", false);
|
public static final StateFlag USE = new StateFlag("use", false);
|
||||||
public static final StateFlag PLACE_VEHICLE = new StateFlag("vehicle-place", false);
|
public static final StateFlag PLACE_VEHICLE = new StateFlag("vehicle-place", false);
|
||||||
public static final StateFlag SNOW_FALL = new StateFlag("snow-fall", true);
|
public static final StateFlag SNOW_FALL = new StateFlag("snow-fall", true);
|
||||||
|
public static final StateFlag LEAF_DECAY = new StateFlag("leaf-decay", true);
|
||||||
public static final StringFlag GREET_MESSAGE = new StringFlag("greeting");
|
public static final StringFlag GREET_MESSAGE = new StringFlag("greeting");
|
||||||
public static final StringFlag FAREWELL_MESSAGE = new StringFlag("farewell");
|
public static final StringFlag FAREWELL_MESSAGE = new StringFlag("farewell");
|
||||||
public static final BooleanFlag NOTIFY_GREET = new BooleanFlag("notify-greet");
|
public static final BooleanFlag NOTIFY_GREET = new BooleanFlag("notify-greet");
|
||||||
@ -63,7 +64,7 @@ public final class DefaultFlag {
|
|||||||
TNT, LIGHTER, FIRE_SPREAD, LAVA_FIRE, CHEST_ACCESS, WATER_FLOW, LAVA_FLOW,
|
TNT, LIGHTER, FIRE_SPREAD, LAVA_FIRE, CHEST_ACCESS, WATER_FLOW, LAVA_FLOW,
|
||||||
USE, PLACE_VEHICLE, GREET_MESSAGE, FAREWELL_MESSAGE, NOTIFY_GREET,
|
USE, PLACE_VEHICLE, GREET_MESSAGE, FAREWELL_MESSAGE, NOTIFY_GREET,
|
||||||
NOTIFY_FAREWELL, DENY_SPAWN, HEAL_DELAY, HEAL_AMOUNT, TELE_LOC,
|
NOTIFY_FAREWELL, DENY_SPAWN, HEAL_DELAY, HEAL_AMOUNT, TELE_LOC,
|
||||||
TELE_PERM, SPAWN_LOC, SPAWN_PERM, BUYABLE, PRICE, SNOW_FALL,
|
TELE_PERM, SPAWN_LOC, SPAWN_PERM, BUYABLE, PRICE, SNOW_FALL, LEAF_DECAY,
|
||||||
GHAST_FIREBALL
|
GHAST_FIREBALL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user