Adding option to user Data-Information
Dieser Commit ist enthalten in:
Ursprung
6f430209ea
Commit
89c4ca9e47
@ -53,8 +53,16 @@ public class SWInventory implements Listener, Inventory {
|
||||
setItem(pos, m, name, new ArrayList<>(), false, c);
|
||||
}
|
||||
|
||||
public void setItem(int pos, Material m, byte meta, String name, InvCallback c){
|
||||
setItem(pos, m, meta, name, new ArrayList<>(), false, c);
|
||||
}
|
||||
|
||||
public void setItem(int pos, Material m, String name, List<String> lore, boolean e, InvCallback c){
|
||||
SWItem item = new SWItem(m, name, lore, e, c);
|
||||
setItem(pos, m, (byte)0, name, new ArrayList<>(), false, c);
|
||||
}
|
||||
|
||||
public void setItem(int pos, Material m, byte meta, String name, List<String> lore, boolean e, InvCallback c){
|
||||
SWItem item = new SWItem(m, meta, name, lore, e, c);
|
||||
setItem(pos, item);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,11 @@ public class SWItem {
|
||||
}
|
||||
|
||||
public SWItem(Material material, String name, List<String> lore, boolean enchanted, InvCallback c){
|
||||
itemStack = new ItemStack(material, 1, (short)0);
|
||||
this(material, (byte)0, name, lore, enchanted, c);
|
||||
}
|
||||
|
||||
public SWItem(Material material, byte meta, String name, List<String> lore, boolean enchanted, InvCallback c){
|
||||
itemStack = new ItemStack(material, 1, (short)0, meta);
|
||||
itemMeta = itemStack.getItemMeta();
|
||||
itemMeta.setDisplayName(name);
|
||||
if(lore != null && !lore.isEmpty())
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren