Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException: /sethome #25

Closed
Feeriix opened this issue Jan 2, 2015 · 4 comments
Closed

IndexOutOfBoundsException: /sethome #25

Feeriix opened this issue Jan 2, 2015 · 4 comments

Comments

@Feeriix
Copy link

Feeriix commented Jan 2, 2015

Log:
http://pastebin.com/E95Zmawz

Event:
onHomeCommand:
- homeLocalWorld

onNamedHomeCommand:
- homeNamedHome

Costs $100 to set a home. Using build #578.

@andune
Copy link
Owner

andune commented Jan 2, 2015

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.

andune added a commit to andune/anduneCommonLib that referenced this issue Jan 2, 2015
@andune
Copy link
Owner

andune commented Jan 2, 2015

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.

@Feeriix
Copy link
Author

Feeriix commented Jan 2, 2015

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.

@andune
Copy link
Owner

andune commented Jan 8, 2015

Closing issue as assumed fix since I've been unable to reproduce locally and have added code that should prevent the reported error from happening. Feel free to re-open if this is still an issue in the most recent HSP builds.

@andune andune closed this as completed Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants