mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-03-01 02:31:22 +01:00
Use isTagged instead of getValues.
The implementation of getValues is quite atrocious for this purpose.
This commit is contained in:
parent
36d25c08c6
commit
2b854f0d72
@ -849,7 +849,7 @@ public static boolean isMushroom(Material material) {
|
|||||||
* @return true if a leaf block
|
* @return true if a leaf block
|
||||||
*/
|
*/
|
||||||
public static boolean isLeaf(Material material) {
|
public static boolean isLeaf(Material material) {
|
||||||
return Tag.LEAVES.getValues().contains(material);
|
return Tag.LEAVES.isTagged(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -899,7 +899,7 @@ public static boolean isPortal(Material material) {
|
|||||||
* @return true if a rail block
|
* @return true if a rail block
|
||||||
*/
|
*/
|
||||||
public static boolean isRailBlock(Material material) {
|
public static boolean isRailBlock(Material material) {
|
||||||
return Tag.RAILS.getValues().contains(material);
|
return Tag.RAILS.isTagged(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -935,7 +935,7 @@ public static boolean isMinecart(Material material) {
|
|||||||
* @return true if a Boat item
|
* @return true if a Boat item
|
||||||
*/
|
*/
|
||||||
public static boolean isBoat(Material material) {
|
public static boolean isBoat(Material material) {
|
||||||
return Tag.ITEMS_BOATS.getValues().contains(material);
|
return Tag.ITEMS_BOATS.isTagged(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1159,10 +1159,10 @@ public static boolean isBed(Material material) {
|
|||||||
* @return true if covered by the use flag
|
* @return true if covered by the use flag
|
||||||
*/
|
*/
|
||||||
public static boolean isUseFlagApplicable(Material material) {
|
public static boolean isUseFlagApplicable(Material material) {
|
||||||
if (Tag.BUTTONS.getValues().contains(material)
|
if (Tag.BUTTONS.isTagged(material)
|
||||||
|| Tag.DOORS.getValues().contains(material)
|
|| Tag.DOORS.isTagged(material)
|
||||||
|| Tag.WOODEN_PRESSURE_PLATES.getValues().contains(material)
|
|| Tag.WOODEN_PRESSURE_PLATES.isTagged(material)
|
||||||
|| Tag.WOODEN_TRAPDOORS.getValues().contains(material)) {
|
|| Tag.WOODEN_TRAPDOORS.isTagged(material)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
switch (material) {
|
switch (material) {
|
||||||
@ -1227,7 +1227,7 @@ public static boolean isItemAppliedToBlock(Material item, Material block) {
|
|||||||
public static boolean isConsideredBuildingIfUsed(Material type) {
|
public static boolean isConsideredBuildingIfUsed(Material type) {
|
||||||
return type == Material.REPEATER
|
return type == Material.REPEATER
|
||||||
|| type == Material.COMPARATOR
|
|| type == Material.COMPARATOR
|
||||||
|| Tag.FLOWER_POTS.getValues().contains(type);
|
|| Tag.FLOWER_POTS.isTagged(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user