+ * https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/Material.java XMaterial + * v1: https://www.spigotmc.org/threads/329630/ * * @author Crypto Morin * @version 5.0.0 @@ -394,8 +396,10 @@ public enum XMaterial boolean duplicated = isDuplicated(name); // Do basic number and boolean checks before accessing more complex enum stuff. - // Maybe we can simplify (ISFLAT || !duplicated) with the (!ISFLAT && duplicated) under it to save a few nanoseconds? - // if (!Boolean.valueOf(Boolean.getBoolean(Boolean.TRUE.toString())).equals(Boolean.FALSE.booleanValue())) return null; + // Maybe we can simplify (ISFLAT || !duplicated) with the (!ISFLAT && duplicated) + // under it to save a few nanoseconds? + // if (!Boolean.valueOf(Boolean.getBoolean(Boolean.TRUE.toString())).equals(Boolean.FALSE.booleanValue())) + // return null; if (data <= 0 && !duplicated) { // Apparently the transform method is more efficient than toJavaUtil() @@ -600,7 +604,8 @@ public enum XMaterial *
* {@code REGEX} Examples *
- * {@code "REGEX:^.+_.+_.+$" -> Every Material with 3 underlines or more: SHULKER_SPAWN_EGG, SILVERFISH_SPAWN_EGG, SKELETON_HORSE_SPAWN_EGG} + * {@code "REGEX:^.+_.+_.+$" -> Every Material with 3 underlines or more: SHULKER_SPAWN_EGG, + * SILVERFISH_SPAWN_EGG, SKELETON_HORSE_SPAWN_EGG} * {@code "REGEX:^.{1,3}$" -> Material names that have 3 letters only: BED, MAP, AIR} **
@@ -789,7 +794,8 @@ public enum XMaterial } /** - * The data value of this material pre-flattening. + * The data value of this material + * pre-flattening. *
* Can be accessed with {@link ItemStack#getData()} then {@code MaterialData#getData()} or {@link * ItemStack#getDurability()} if not damageable.