Bukkit plugin Kaputte Items geben.

07/24/2013 17:44 SBotDE#1
Hey,
wie kann ich schon benutze items geben ? z.B ein Benutzdes Eisen Schwert was fast kaputt ist ?


MfG
07/24/2013 17:58 ComputerBaer#2
Dafür gibt es beim ItemStack zwei mögliche Konstruktoren:
Code:
ItemStack(int type, int amount, short damage)
ItemStack(Material type, int amount, short damage)
Ein DiamantSchwert, das nurnoch zwei Schläge aushält, wäre also so:
Code:
ItemStack schwert = new ItemStack(Material.DIAMOND_SWORD, 1, 2)
07/24/2013 18:18 SBotDE#3
ok Danke!