@Deprecated public interface UnsafeValues
Their existence and behavior is not guaranteed across future versions. They may be poorly named, throw exceptions, have misleading parameters, or any other bad programming practice.
Modifier and Type | Method and Description |
---|---|
void |
checkSupported(PluginDescriptionFile pdf)
Deprecated.
|
net.kyori.adventure.text.serializer.gson.GsonComponentSerializer |
colorDownsamplingGsonComponentSerializer()
Deprecated.
|
net.kyori.adventure.text.flattener.ComponentFlattener |
componentFlattener()
Deprecated.
|
ItemStack |
deserializeItem(byte[] data)
Deprecated.
|
Material |
fromLegacy(Material material)
Deprecated.
|
BlockData |
fromLegacy(Material material,
byte data)
Deprecated.
|
Material |
fromLegacy(MaterialData material)
Deprecated.
|
Material |
fromLegacy(MaterialData material,
boolean itemPriority)
Deprecated.
|
int |
getDataVersion()
Deprecated.
|
ItemRarity |
getItemRarity(Material material)
Deprecated.
Gets the item rarity of a material.
|
ItemRarity |
getItemStackRarity(ItemStack itemStack)
Deprecated.
Gets the item rarity of the itemstack.
|
Material |
getMaterial(String material,
int version)
Deprecated.
|
int |
getProtocolVersion()
Deprecated.
Returns the server's protocol version.
|
String |
getTimingsServerName()
Deprecated.
Server name to report to timings v2
|
String |
getTranslationKey(Block block)
Deprecated.
Return the translation key for the Block, so the client can translate it into the active
locale when using a
TranslatableComponent . |
String |
getTranslationKey(EntityType type)
Deprecated.
Return the translation key for the EntityType, so the client can translate it into the active
locale when using a
TranslatableComponent .This is null , when the EntityType isn't known to NMS (custom entities) |
String |
getTranslationKey(ItemStack itemStack)
Deprecated.
Return the translation key for the ItemStack, so the client can translate it into the active
locale when using a
TranslatableComponent . |
String |
getTranslationKey(Material mat)
Deprecated.
Return the translation key for the Material, so the client can translate it into the active
locale when using a
TranslatableComponent . |
default VersionFetcher |
getVersionFetcher()
Deprecated.
Called once by the version command on first use, then cached.
|
net.kyori.adventure.text.serializer.gson.GsonComponentSerializer |
gsonComponentSerializer()
Deprecated.
|
static boolean |
isLegacyPlugin(Plugin plugin)
Deprecated.
|
boolean |
isSupportedApiVersion(String apiVersion)
Deprecated.
|
boolean |
isValidRepairItemStack(@NotNull ItemStack itemToBeRepaired,
@NotNull ItemStack repairMaterial)
Deprecated.
Checks if an itemstack can be repaired with another itemstack.
|
net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer |
legacyComponentSerializer()
Deprecated.
|
Advancement |
loadAdvancement(NamespacedKey key,
String advancement)
Deprecated.
Load an advancement represented by the specified string into the server.
|
ItemStack |
modifyItemStack(ItemStack stack,
String arguments)
Deprecated.
|
int |
nextEntityId()
Deprecated.
Creates and returns the next EntityId available.
|
net.kyori.adventure.text.serializer.plain.PlainComponentSerializer |
plainComponentSerializer()
Deprecated.
|
byte[] |
processClass(PluginDescriptionFile pdf,
String path,
byte[] clazz)
Deprecated.
|
boolean |
removeAdvancement(NamespacedKey key)
Deprecated.
Delete an advancement which was loaded and saved by
loadAdvancement(org.bukkit.NamespacedKey, java.lang.String) . |
void |
reportTimings()
Deprecated.
|
byte[] |
serializeItem(ItemStack item)
Deprecated.
|
Material |
toLegacy(Material material)
Deprecated.
|
net.kyori.adventure.text.flattener.ComponentFlattener componentFlattener()
net.kyori.adventure.text.serializer.plain.PlainComponentSerializer plainComponentSerializer()
net.kyori.adventure.text.serializer.gson.GsonComponentSerializer gsonComponentSerializer()
net.kyori.adventure.text.serializer.gson.GsonComponentSerializer colorDownsamplingGsonComponentSerializer()
net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer legacyComponentSerializer()
void reportTimings()
Material fromLegacy(MaterialData material)
Material fromLegacy(MaterialData material, boolean itemPriority)
int getDataVersion()
void checkSupported(PluginDescriptionFile pdf) throws InvalidPluginException
InvalidPluginException
byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz)
Advancement loadAdvancement(NamespacedKey key, String advancement)
Exception
to be thrown.key
- the unique advancement keyadvancement
- representation of the advancementboolean removeAdvancement(NamespacedKey key)
loadAdvancement(org.bukkit.NamespacedKey, java.lang.String)
.
Server.reloadData()
in order
to fully remove it from the running instance.key
- the unique advancement keyString getTimingsServerName()
default VersionFetcher getVersionFetcher()
boolean isSupportedApiVersion(String apiVersion)
static boolean isLegacyPlugin(Plugin plugin)
byte[] serializeItem(ItemStack item)
ItemStack deserializeItem(byte[] data)
String getTranslationKey(Material mat)
TranslatableComponent
.String getTranslationKey(Block block)
TranslatableComponent
.String getTranslationKey(EntityType type)
TranslatableComponent
.null
, when the EntityType isn't known to NMS (custom entities)String getTranslationKey(ItemStack itemStack)
TranslatableComponent
.int nextEntityId()
Use this when sending custom packets, so that there are no collisions on the client or server.
ItemRarity getItemRarity(Material material)
Material.isItem()
before this.material
- the material to get the rarity ofItemRarity getItemStackRarity(ItemStack itemStack)
itemStack
- the itemstack to get the rarity ofboolean isValidRepairItemStack(@NotNull @NotNull ItemStack itemToBeRepaired, @NotNull @NotNull ItemStack repairMaterial)
Material.isItem()
).itemToBeRepaired
- the itemstack to be repairedrepairMaterial
- the repair materialint getProtocolVersion()
Copyright © 2021. All rights reserved.