mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 09:37:51 +01:00
Add Weeping Vines and Twisting Vines to vine-growth flag
This commit is contained in:
parent
66fd84ba2f
commit
613406aab4
@ -597,7 +597,7 @@ public void onBlockSpread(BlockSpreadEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (newType == Material.VINE || newType == Material.KELP) {
|
||||
if (Materials.isVine(newType)) {
|
||||
if (wcfg.disableVineGrowth) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
@ -1286,6 +1286,19 @@ public static boolean isCrop(Material type) {
|
||||
|| type == Material.BAMBOO_SAPLING;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test whether the material should be handled as vine. Used by the vine-growth flag
|
||||
* @param newType the material
|
||||
* @return true if the material should be handled as vine
|
||||
*/
|
||||
public static boolean isVine(Material newType) {
|
||||
return newType == Material.VINE ||
|
||||
newType == Material.KELP ||
|
||||
newType == Material.TWISTING_VINES ||
|
||||
newType == Material.WEEPING_VINES;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test whether the given material is affected by
|
||||
* {@link Flags#USE}.
|
||||
|
Loading…
Reference in New Issue
Block a user