add item descriptions
This commit is contained in:
parent
1d19cddcef
commit
1c33159e64
3 changed files with 25 additions and 1 deletions
|
@ -126,6 +126,8 @@ public abstract class GuiContainer extends Gui
|
|||
s = Color.YELLOW + "" + stack.getSize() + " " + Color.RESET + s;
|
||||
s = s + Color.RESET;
|
||||
list.add(s);
|
||||
if(stack.getItem().getDescription() != null)
|
||||
list.add(stack.getItem().getDescription());
|
||||
stack.getItem().addInformation(stack, this.gm.player, list);
|
||||
if(stack.getItem().isAdminItem())
|
||||
list.add(Color.RED + "Admin-Gegenstand");
|
||||
|
|
|
@ -192,6 +192,7 @@ public class Block {
|
|||
protected double maxZ;
|
||||
private State defaultState;
|
||||
private String display;
|
||||
private String description;
|
||||
private CheatTab tab;
|
||||
private SoundType sound;
|
||||
private Equipment miningTool;
|
||||
|
@ -419,6 +420,12 @@ public class Block {
|
|||
return this;
|
||||
}
|
||||
|
||||
public final Block setDisplay(String name, String desc) {
|
||||
this.display = name;
|
||||
this.description = desc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Block setTab(CheatTab tab) {
|
||||
this.tab = tab;
|
||||
return this;
|
||||
|
@ -609,6 +616,10 @@ public class Block {
|
|||
public final String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public final String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
|
||||
protected Property[] getProperties() {
|
||||
|
|
|
@ -32,6 +32,7 @@ public class Item {
|
|||
private int maxDamage = 0;
|
||||
private Item containerItem;
|
||||
private String display;
|
||||
private String description;
|
||||
private CheatTab tab;
|
||||
private Color color = null;
|
||||
private int defColor = 0xffffffff;
|
||||
|
@ -47,7 +48,7 @@ public class Item {
|
|||
|
||||
public Item(Block block) {
|
||||
this.block = block;
|
||||
this.setDisplay(this.block.getDisplay());
|
||||
this.setDisplay(this.block.getDisplay(), this.block.getDescription());
|
||||
this.setTab(this.block.getTab());
|
||||
if(this.block.isMagnetic())
|
||||
this.setMagnetic();
|
||||
|
@ -84,6 +85,12 @@ public class Item {
|
|||
return this;
|
||||
}
|
||||
|
||||
public final Item setDisplay(String name, String desc) {
|
||||
this.display = name;
|
||||
this.description = desc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Item setContainerItem(Item containerItem) {
|
||||
this.containerItem = containerItem;
|
||||
return this;
|
||||
|
@ -153,6 +160,10 @@ public class Item {
|
|||
return this.display;
|
||||
}
|
||||
|
||||
public final String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public final Item getContainerItem() {
|
||||
return this.containerItem;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue