SPIGOT-7195, SPIGOT-7197: Add DataPack API

By: Doc <nachito94@msn.com>
This commit is contained in:
Bukkit/Spigot
2023-05-30 19:05:41 +10:00
parent dc42ac1025
commit f45d2e6a77
10 changed files with 283 additions and 0 deletions

View File

@@ -11061,4 +11061,14 @@ public enum Material implements Keyed, Translatable {
public String getItemTranslationKey() {
return Bukkit.getUnsafe().getItemTranslationKey(this);
}
/**
* Gets if the Material is enabled by the features in a world.
*
* @param world the world to check
* @return true if this material can be used in this World.
*/
public boolean isEnabledByFeature(@NotNull World world) {
return Bukkit.getDataPackManager().isEnabledByFeature(this, world);
}
}