Created
March 25, 2022 23:12
-
-
Save nathanfranke/0db5c4b3ff97c48adb08697fd2663182 to your computer and use it in GitHub Desktop.
minecraft paper create potion item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final ItemStack item = new ItemStack(Material.POTION); | |
final PotionMeta meta = (PotionMeta)item.getItemMeta(); | |
meta.setBasePotionData(new PotionData(PotionType.MUNDANE)); | |
item.setItemMeta(meta); | |
player.getInventory().setItem(0, item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val item = ItemStack(Material.POTION) | |
val meta = item.itemMeta as PotionMeta | |
meta.basePotionData = PotionData(PotionType.SPEED) | |
item.itemMeta = meta | |
player.inventory.setItem(0, item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment