mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-23 02:25:26 +01:00
Add DURABILITY as alias of DATA-VALUE
This commit is contained in:
parent
c41689fee2
commit
675711b2b3
@ -34,10 +34,11 @@ public class IconSerializer {
|
|||||||
|
|
||||||
private static class Nodes {
|
private static class Nodes {
|
||||||
|
|
||||||
public static final
|
public static final String
|
||||||
String ID = "ID",
|
ID = "ID",
|
||||||
DATA_VALUE = "DATA-VALUE",
|
|
||||||
AMOUNT = "AMOUNT",
|
AMOUNT = "AMOUNT",
|
||||||
|
DATA_VALUE = "DATA-VALUE",
|
||||||
|
DURABILITY = "DURABILITY",
|
||||||
NAME = "NAME",
|
NAME = "NAME",
|
||||||
LORE = "LORE",
|
LORE = "LORE",
|
||||||
ENCHANT = "ENCHANTMENT",
|
ENCHANT = "ENCHANTMENT",
|
||||||
@ -98,7 +99,9 @@ public class IconSerializer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (section.isSet(Nodes.DATA_VALUE)) {
|
if (section.isSet(Nodes.DURABILITY)) {
|
||||||
|
icon.setDataValue((short) section.getInt(Nodes.DURABILITY));
|
||||||
|
} else if (section.isSet(Nodes.DATA_VALUE)) { // Alias
|
||||||
icon.setDataValue((short) section.getInt(Nodes.DATA_VALUE));
|
icon.setDataValue((short) section.getInt(Nodes.DATA_VALUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user