mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Added physics.vine-like-rope-ladders to make ladders work like vines.
This commit is contained in:
parent
ab274151d4
commit
200d47ab09
@ -81,6 +81,7 @@ public class WorldConfiguration {
|
||||
public boolean redstoneSponges;
|
||||
public boolean noPhysicsGravel;
|
||||
public boolean noPhysicsSand;
|
||||
public boolean ropeLadders;
|
||||
public boolean allowPortalAnywhere;
|
||||
public Set<Integer> preventWaterDamage;
|
||||
public boolean blockLighter;
|
||||
@ -312,6 +313,7 @@ private void loadConfiguration() {
|
||||
|
||||
noPhysicsGravel = getBoolean("physics.no-physics-gravel", false);
|
||||
noPhysicsSand = getBoolean("physics.no-physics-sand", false);
|
||||
ropeLadders = getBoolean("physics.vine-like-rope-ladders", false);
|
||||
allowPortalAnywhere = getBoolean("physics.allow-portal-anywhere", false);
|
||||
preventWaterDamage = new HashSet<Integer>(getIntList("physics.disable-water-damage-blocks", null));
|
||||
|
||||
|
@ -472,6 +472,13 @@ public void onBlockPhysics(BlockPhysicsEvent event) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == BlockID.LADDER && wcfg.ropeLadders) {
|
||||
if (event.getBlock().getRelative(0, 1, 0).getType() == Material.LADDER) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user