Modifier and Type | Field and Description |
---|---|
static MaterialProperty<Integer> |
EMISSION
Gets the amount of light a block material emits
|
static MaterialProperty<Boolean> |
HASDATA
The material has a data value that further defines the type of Item or
Block
|
static MaterialTypeProperty |
ISARMOR
The material is a type of armor
|
static MaterialTypeProperty |
ISBOOTS
The material is a type of wearable boots
|
static MaterialTypeProperty |
ISBUCKET
The material is a type of bucket (milk bucket is excluded)
|
static MaterialTypeProperty |
ISBUTTON
The material is a type of button (item type excluded)
|
static MaterialTypeProperty |
ISCHESTPLATE
The material is a type of wearable chestplate
|
static MaterialTypeProperty |
ISCOMPARATOR
The material is a type of comparator (item type excluded)
|
static MaterialTypeProperty |
ISDIODE
The material is a type of diode (item type excluded)
|
static MaterialTypeProperty |
ISDOOR
The material is a type of door block.
|
static MaterialProperty<Boolean> |
ISFUEL
The material is a type of fuel that can be burned in a furnace
|
static MaterialProperty<Boolean> |
ISHEATABLE
The material is a type of heatable item that can be crafted using a
furnace
|
static MaterialTypeProperty |
ISHELMET
The material is a type of wearable helmet
|
static MaterialTypeProperty |
ISINTERACTABLE
The material can be interacted with, such as buttons and levers.
|
static MaterialTypeProperty |
ISLAVA
The material is lava
|
static MaterialTypeProperty |
ISLEATHERARMOR
The material is a type of armor made of leather, such as leather boots or leather helmet.
|
static MaterialTypeProperty |
ISLEAVES
The material is a type of Leaves
|
static MaterialTypeProperty |
ISLEGGINGS
The material is a type of wearable leggings
|
static MaterialTypeProperty |
ISLIQUID
The material is a liquid like water or lava
|
static MaterialTypeProperty |
ISMINECART
The material is a type of Minecart item
|
static MaterialTypeProperty |
ISPISTONBASE
The material is a type of piston base
|
static MaterialTypeProperty |
ISPOTION
The material is a type of Potion.
|
static MaterialProperty<Boolean> |
ISPOWERSOURCE
The material can supply redstone power and redstone wire connects to it
|
static MaterialTypeProperty |
ISPRESSUREPLATE
The material is a type of pressure plate
|
static MaterialTypeProperty |
ISRAILS
The material is a type of rails
|
static MaterialTypeProperty |
ISREDSTONETORCH
The material is a type of redstone torch
|
static MaterialTypeProperty |
ISSIGN
The material is a type of sign (item type is excluded)
|
static MaterialTypeProperty |
ISSWORD
The material is a type of wieldable sword
|
static MaterialTypeProperty |
ISWATER
The material is water
|
Constructor and Description |
---|
MaterialUtil() |
Modifier and Type | Method and Description |
---|---|
static org.bukkit.material.MaterialData |
getData(org.bukkit.Material type,
int rawData)
Deprecated.
|
static org.bukkit.Material |
getFirst(String... names)
Gets the very first material name in the list that matches a valid material.
|
static org.bukkit.Material |
getMaterial(String name)
Gets a Material by name.
This assumes the 1.13 API, which means old legacy materials can be obtained by prefixing LEGACY_. |
static int |
getRawData(org.bukkit.block.Block block)
Deprecated.
|
static int |
getRawData(org.bukkit.inventory.ItemStack item) |
static int |
getRawData(org.bukkit.material.MaterialData materialData)
Deprecated.
|
static int |
getRawData(org.bukkit.TreeSpecies treeSpecies)
Deprecated.
|
static boolean |
isLegacyType(org.bukkit.Material type)
Gets whether a particular Material type is legacy.
|
static boolean |
isType(org.bukkit.block.Block block,
org.bukkit.Material... types)
Checks whether the material of a block is contained in the types
|
static boolean |
isType(org.bukkit.inventory.ItemStack itemStack,
org.bukkit.Material... types)
Checks whether the material of the item is contained in the types
|
static boolean |
isType(org.bukkit.Material material,
org.bukkit.Material... types)
Checks whether the material is contained in the types
|
public static final MaterialTypeProperty ISDOOR
public static final MaterialTypeProperty ISPISTONBASE
public static final MaterialTypeProperty ISREDSTONETORCH
public static final MaterialTypeProperty ISDIODE
public static final MaterialTypeProperty ISBUTTON
public static final MaterialTypeProperty ISCOMPARATOR
public static final MaterialTypeProperty ISBUCKET
public static final MaterialTypeProperty ISRAILS
public static final MaterialTypeProperty ISSIGN
public static final MaterialTypeProperty ISPRESSUREPLATE
public static final MaterialTypeProperty ISMINECART
public static final MaterialTypeProperty ISSWORD
public static final MaterialTypeProperty ISBOOTS
public static final MaterialTypeProperty ISLEGGINGS
public static final MaterialTypeProperty ISCHESTPLATE
public static final MaterialTypeProperty ISHELMET
public static final MaterialTypeProperty ISARMOR
public static final MaterialTypeProperty ISLEATHERARMOR
public static final MaterialTypeProperty ISINTERACTABLE
public static final MaterialTypeProperty ISWATER
public static final MaterialTypeProperty ISLAVA
public static final MaterialTypeProperty ISLIQUID
public static final MaterialTypeProperty ISLEAVES
public static final MaterialTypeProperty ISPOTION
public static final MaterialProperty<Boolean> ISHEATABLE
public static final MaterialProperty<Boolean> ISFUEL
public static final MaterialProperty<Boolean> ISPOWERSOURCE
public static final MaterialProperty<Boolean> HASDATA
public static final MaterialProperty<Integer> EMISSION
@Deprecated public static int getRawData(org.bukkit.TreeSpecies treeSpecies)
@Deprecated public static int getRawData(org.bukkit.block.Block block)
public static int getRawData(org.bukkit.inventory.ItemStack item)
@Deprecated public static int getRawData(org.bukkit.material.MaterialData materialData)
@Deprecated public static org.bukkit.material.MaterialData getData(org.bukkit.Material type, int rawData)
type
- of the materialrawData
- for the materialpublic static boolean isType(org.bukkit.inventory.ItemStack itemStack, org.bukkit.Material... types)
itemStack
- containing the material type to checktypes
- to look inpublic static boolean isType(org.bukkit.Material material, org.bukkit.Material... types)
material
- to checktypes
- to look inpublic static boolean isType(org.bukkit.block.Block block, org.bukkit.Material... types)
block
- to compare the types withtypes
- to look inpublic static boolean isLegacyType(org.bukkit.Material type)
type
- public static org.bukkit.Material getFirst(String... names)
names
- public static org.bukkit.Material getMaterial(String name)
name
- Copyright © 2019. All rights reserved.