I am trying to make some items untradeable. Let's use a mystery box for example.
I followed a tutorial by someone and it said in "Itemconstants.java" under the "switch (item.getId()) {" put "case (item id): underneathe it and it will make the item untradeable.
[CODE] public static boolean isTradeable(Item item) {
if (item.getDefinitions().isLended()
|| ItemConstants.getItemDefaultCharges(item.getId()) != -1)
return false;
switch (item.getId()) {
case 6199: //Mystery Box
default:
return true;
}
}
}[/CODE]
When I went ingame, I could still trade the mystery box. Does anyone know how to actually make an item untradeable? I will need to make chaotics untradeable aswel.
All help is greatly appreciated!
I am trying to make some items untradeable. Let's use a mystery box for example.
I followed a tutorial by someone and it said in "Itemconstants.java" under the "switch (item.getId()) {" put "case (item id): underneathe it and it will make the item untradeable.
[CODE] public static boolean isTradeable(Item item) {
if (item.getDefinitions().isLended()
|| ItemConstants.getItemDefaultCharges(item.getId()) != -1)
return false;
switch (item.getId()) {
case 6199: //Mystery Box
default:
return true;
}
}
}[/CODE]
When I went ingame, I could still trade the mystery box. Does anyone know how to actually make an item untradeable? I will need to make chaotics untradeable aswel.
All help is greatly appreciated!
Emily x
Share this post
Link to post
Share on other sites