Some of the new item code clearly hasn't been tested
gerzytet opened this issue · 3 comments
Since beta releases are pulled straight from the development branch, we should always personally test new things before commiting.
However, some of the new item manipulation placeholders/executors have clear bugs that would have been caught with manual testing.
For example:
var itemStackType = Java.type('org.bukkit.inventory.ItenStack')
A typo of "ItemStack", copy-pasted between $idname and $lore
validation = {
"overloads": [
[{"name": "slot", "type": "int"}]
]
}
...
if(overload == 1){
overloads are indexed from 0, so this path never gets selected
var itemStackType = Java.type('org.bukkit.inventory.ItemStack')
validation = {
"overloads": [
[{"name":"name", "type": "string"}, {"name": "item", "type": itemStackType}]
]
}
type needs a class instance from itemStackType.class
I'm not ungrateful for all the work you've done implementing these, but please go back and test/correct your code.
@gerzytet I'm really sorry not to tested it yet. I am so busy recently, with lots of school works. I'm gonna fix what you gave ASAP.
What I'm gonna do:
- overload index error on $playerinv
- itemStackType should have class instance with
itemStackType.class
- Author name should be changed as wysohn said.
- Executors for sponge needed.
- Unit tests for new ones.
The order of the list of things you said you are going to do is indeed the correct order.
Don’t worry about adding any new executors or unit tests until you’ve confirmed all the existing ones work.
In the future, try writing them directly inside of the executors/placeholders folder and reloading to get immediate feedback.
@gerzytet gotcha.