IndexOutOfBoundsException: /sethome
Feeriix opened this issue ยท 4 comments
Log:
http://pastebin.com/E95Zmawz
Event:
onHomeCommand:
- homeLocalWorld
onNamedHomeCommand:
- homeNamedHome
Costs $100 to set a home. Using build #578.
The error indicates an issue with localization, when trying to print the "insufficient funds" message. What localization are you using? Have you modified any of the strings locally? Here is the default message in english:
COST_INSUFFICIENT_FUNDS=Insufficient funds, you need at least %price% (you only have %balance%)
I will try to reproduce, but as best I can see between the code and the default message, there are no obvious errors that would create this issue (I've seen it before with other messages so I'm familiar with what to look for). It's possible this is broken in a different translation, so knowing which locale you use and any message customizations you may have made will be key to solving this issue.
On further review, as indicated, I believe there's a possible scenario where a null value in the price component was still able to make it's way through to the localization routines. That should be fixed in the latest version on Jenkins. However, this really is just fixing the stack trace issue - I expect with this fix what your users will see now is something like:
Insufficient funds, you need at least 100 (you only have null)
Which would indicate a problem with the economy integration. If this happens, please open a new ticket with all relevant details of your economy situation: which economy plugin & version, bukkit version, HSP version, using Vault and what version, etc.
Using English locale, had this written in hsp.properties:
CMD_SETHOME_HOME_SET=Home "%name%" set successfully.\n%green%Make sure you put a bed nearby your home location.
Will try the new build when I get the chance. Thanks for the quick reply.