public class BukkitConverters
extends java.lang.Object
Constructor and Description |
---|
BukkitConverters() |
Modifier and Type | Method and Description |
---|---|
static EquivalentConverter<WrappedDataWatcher> |
getDataWatcherConverter()
Retrieve a converter for the NMS DataWatcher class and our wrapper.
|
static EquivalentConverter<org.bukkit.entity.Entity> |
getEntityConverter(org.bukkit.World world)
Retrieve a converter for NMS entities and Bukkit entities.
|
static <TType> EquivalentConverter<TType> |
getIgnoreNull(EquivalentConverter<TType> delegate)
Wraps a given equivalent converter in NULL checks, ensuring that such values are ignored.
|
static EquivalentConverter<org.bukkit.inventory.ItemStack> |
getItemStackConverter()
Retrieve the converter used to convert NMS ItemStacks to Bukkit's ItemStack.
|
static <T> EquivalentConverter<java.util.List<T>> |
getListConverter(java.lang.Class<?> genericItemType,
EquivalentConverter<T> itemConverter) |
static EquivalentConverter<NbtBase<?>> |
getNbtConverter()
Retrieve an equivalent converter for net.minecraft.server NBT classes and their wrappers.
|
static EquivalentConverter<WrappedWatchableObject> |
getWatchableObjectConverter()
Retrieve a converter for watchable objects and the respective wrapper.
|
static EquivalentConverter<org.bukkit.WorldType> |
getWorldTypeConverter()
Retrieve a converter for Bukkit's world type enum and the NMS equivalent.
|
public static <T> EquivalentConverter<java.util.List<T>> getListConverter(java.lang.Class<?> genericItemType, EquivalentConverter<T> itemConverter)
public static EquivalentConverter<WrappedWatchableObject> getWatchableObjectConverter()
public static EquivalentConverter<WrappedDataWatcher> getDataWatcherConverter()
public static EquivalentConverter<org.bukkit.WorldType> getWorldTypeConverter()
public static EquivalentConverter<NbtBase<?>> getNbtConverter()
public static EquivalentConverter<org.bukkit.entity.Entity> getEntityConverter(org.bukkit.World world)
world
- - the current world.public static EquivalentConverter<org.bukkit.inventory.ItemStack> getItemStackConverter()
public static <TType> EquivalentConverter<TType> getIgnoreNull(EquivalentConverter<TType> delegate)
delegate
- - the underlying equivalent converter.