Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

spigot how to create custom items

 //You can create custom items in minecraft by:
ItemStack item = new ItemStack(Material.MATERIAL_NAME); //You are creating an itemstack with specified material.
ItemMeta meta = item.getItemMeta(); //You are getting the meta of the item.
meta.setDisplayName("Patrick"); //You are setting the display name of the item.
meta.addEnchant(Enchantment.DURABILITY, 3, true); //3 is the level of enchantment, and the true is setting if the enchantment level can be higher than the normal limit.
meta.addItemFlag(ItemFlags.HIDE_ENCHANTS); //This method allows you to hide some properties that shows up when you get on these.
item.setItemMeta(meta); //And the end of the process, you have to set the item's meta by this method.
 //If you want to see some more methods, you can use some IDE's or check out this website: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/ItemMeta.html
 //I hope it will help you guys <3
Comment

PREVIOUS NEXT
Code Example
Java :: java jcombobox get selected item 
Java :: java reflection get field value 
Java :: Java how to copy file 
Java :: empty character in java 
Java :: flutter Uri toString and String to Uri 
Java :: java close application 
Java :: statement delete sql java 
Java :: change visibility of textview andoird 
Java :: filll 2d array in java 
Java :: float to string java 
Java :: how to install java 8 on aws linux 
Java :: java get current date string 
Java :: java wait 
Java :: spring annotations xml configuration 
Java :: java timestamp 
Java :: open gps setting android intent 
Java :: how to check type of primitive value in java 
Java :: javafx open file dialog 
Java :: arraylist with values java 
Java :: java elapsedTime 
Java :: java file reader utf 8 
Java :: How to find the fibonacci of an integer value iteratively in Java? 
Java :: long to int java 8 
Java :: java font 
Java :: program in java. Get a string from user and also validate it’s length should be at least 1. Pass this string to a method that returns a new string with the first char added at the front and end, so "cat" yields "ccatc". 
Java :: java jshell run string as code 
Java :: Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available jks 
Java :: javafx set min window size 
Java :: android java remove action bar 
Java :: check last character of string java 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =