Package ch.njol.skript.bukkitutil
Class BukkitUnsafe
java.lang.Object
ch.njol.skript.bukkitutil.BukkitUnsafe
Contains helpers for Bukkit's not so safe stuff.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable org.bukkit.Material
getMaterialFromId
(int id) static @Nullable org.bukkit.Material
Deprecated.static @Nullable org.bukkit.Material
Get a material from a namespaced ID.static void
modifyItemStack
(org.bukkit.inventory.ItemStack stack, String arguments)
-
Constructor Details
-
BukkitUnsafe
public BukkitUnsafe()
-
-
Method Details
-
getMaterialFromMinecraftId
@Deprecated @Nullable public static @Nullable org.bukkit.Material getMaterialFromMinecraftId(String id) Deprecated.PrefergetMaterialFromNamespacedId(String)
for including modded item supportGet a material from a minecraft id.- Parameters:
id
- Namespaced ID with or without a namespace. IDs without a namespace will be treated as minecraft namespaced IDs. ('minecraft:dirt' and 'dirt' are equivalent.)- Returns:
- The Material which the id represents, or null if no material can be matched.
-
getMaterialFromNamespacedId
Get a material from a namespaced ID. For example, 'minecraft:iron_ingot' -> Material.IRON_INGOT; 'mod:an_item' -> Material.MOD_AN_ITEM- Parameters:
id
- Namespaced ID with or without a namespace. IDs without a namespace will be treated as minecraft namespaced IDs. ('minecraft:dirt' and 'dirt' are equivalent.)- Returns:
- The Material which the id represents, or null if no material can be matched.
-
modifyItemStack
-
getMaterialFromId
@Nullable public static @Nullable org.bukkit.Material getMaterialFromId(int id)
-
getMaterialFromNamespacedId(String)
for including modded item support