HomeSpawnPlus

HomeSpawnPlus

342k Downloads

Various bugs about homes

Zedd7 opened this issue ยท 15 comments

commented

Hi again !

Using HSP 2.0 build 600 and storage YAML_SINGLE_FILE, I noticed some bugs :

  1. Since 2.0, HSP doesn't allow me to have more than 6 homes. This is weird because I am operator on my server, have the permissions hsp.* and hsp.unlimited (see pastebin for this one) and usual players are limited to 5 homes on the main world, not 6.
    pastebin : http://pastebin.com/vX3qWkJM
  2. I'm not sure if this is a bug or my imagination, but I think that you added a feature allowing to have public homes using /hi public . Instead of allowing everyone to teleport to this home using /hit , HSP only allow the player "public" to teleport to it.
  3. The command /setdefaulthome or /sdh is not working anymore since 2.0, nothing shows up in console or chat :/

As usual, tell me if you need help for fixing this ;)

PS : I know that you don't really support the YAML storage method, but half of HSP's features are bugged with it, you should maybe disable it and only allow YAML_SINGLE_FILE ? :p

commented

OK I took a look at the code tonight and it turns out it already supports localization - my mistake on first glance thinking that it didn't.

Upon reviewing your screenshot further, the problem is that the input format is incorrect. HSP expect a format of something like: "1j 4h" (note the space), your input is "1j4h". The space is required.

Not having a space will throw an error, and if you look closely, you can see the error message includes the properly formatted space separator.

If you feel this is confusing for your users, you can override the message CMD_HOME_INVITE_BAD_TIME to include a note about the fact that spaces are required. See this link for how to customize HSP messages.

commented

Unfortunately, this doesn't work with space either :/

2015-02-14_19 49 09

I tried the followings :

/hi player home 1j
/hi player home '1j'
/hi player home "1j"
/hi player home 1j 4h
/hi player home 1 j 4 h
/hi player home 1 j

commented

/sdh now works fine, thanks ;)

commented

Thanks for the pastebin of your config on item 1, made it very easy to reproduce and track down the problem.

Regarding Item 2, "public" was defined as a special keyword that HSP uses to identify public homes. To the one player out there whose name really is "public", if he/she happens to play on a Bukkit server running HSP, home invites might not work properly for him/her but I figure that was an edge case and while somewhat hacky, was preferable to having to modify the schema to add this use case.

If it's ever reported as a bug because the player "public" has an issue on an HSP server, I'll look into it more then and possibly consider inflicting a DB schema change on everyone if it's a serious problem.

That said, were you reporting an actual bug public homes not working or just some confusion that creating public homes seems the same as inviting a user named "public"?

commented

hoping not to inject stupidity... but can the keyword just be renamed _public, public_key, public_home, public_<some_unlikely_hash>

commented

It could - but the syntax would remain the same, so I'm not sure what that accomplish. Unless you really do have a user named "public" on your server and this is causing confusion?

commented

Using the keyword "public" is not an issue for me. If someone ever join my server with that name, he will only be able to teleport to homes that are public anyway right ?

The issue with this feature is that only the player named "public" is allowed to teleport to a public home. I may use this feature wrong as I could not find the documentation about it, so could you resume it to me or link the doc please ?

commented

Hmm. I thought it was documented on the DBO pages, but it appears to not be. I suspect it was documented in the DBO ticket that requested the feature, which is no longer available since I forward tickets to github here now.

I wrote up some quick documentation based on a review of the code:

https://github.com/andune/HomeSpawnPlus/wiki/HomeInvite

This reflects my understanding of how the feature works, but since I wrote it many months ago and can't find my previous reference to the feature in the ticket that requested it, I could very well be missing some things. Feel free to report back here if it doesn't work as described and I'll adjust the documentation to resolve any differences.

commented

Hi !
Home limits are now working properly with build 602, but it's not the case anymore with /hi

This is what happens if I execute /hi andune home 5m : http://pastebin.com/TKgc35YJ

But this works fine if I remove the "5m" or replace it by "perm"

commented

For the future, please open new tickets for new issues so I can track issues independently and fix them.

Regarding this issue, I can't reproduce the error. Here is the build info I am running:

>version HomeSpawnPlus
[13:03:25 INFO]: HomeSpawnPlus version 2.0-SNAPSHOT-b602
[13:03:25 INFO]: Author: andune
>version
[13:03:27 INFO]: This server is running CraftBukkit version git-Spigot-"7c1eafc" (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
>

And here is a screenshot of the command I am running that works for me:

screen shot 2015-01-31 at 1 06 40 pm

commented

I'm running the exact same command in the same build(s) :/

I think there are good chances that this is it tied to the storage system I use. (YAML single file)

Moving from Yaml (mutliple files) to Yaml-one-file fixed a lot of bugs I had but made this one appears.

What would you like me to pastebin in order to locate the bug ?

commented

As best I can tell, the stack trace you are reporting is completely unaffected by the back-end storage type. In the latest build (603), I have added some additional error handling in the time parsing routine that was throwing the error in your stack trace. While I don't expect it will "fix" whatever is going wrong, it will no longer blow up with the stack trace and will instead print a warning to the log with the input that it's complaining about. That might give us some clues as to what's really happening that's different between your server and my tests.

Separately, I'm unaware of any issues related specifically to YAML single vs. multi-file. Both are in good working order as far as I know, with some minor caveats around performance for larger size servers. So if you see any issues specifically related to the YAML back ends not working properly, feel free to open new tickets on them.

I am considering the future of Bukkit/Sponge as HSP intends to support both with a common code base. It seems Sponge is not going to use YAML. If I end up adding support for a new format (it looks like Sponge has selected HOCON), I will consider adding it to both implementations. The YAML back end in HSP is heavily tied to Bukkit's implementation so it will likely not carry over to Sponge. Good news is HSP has always had good backup/restore support so it should be possible to easily move from one back end to another without much fuss.

commented

This is the result with build 606 :

2015-02-04_11 34 47

As you can see I tried several variants of 1d4h (in french, english, with or without ' ', with " ") and here is the result :

11:37:12 [INFO] Z3dd7 issued server command: /homeinvite scarpe ile 1d4h
11:37:12 [WARNING] [HomeSpawnPlus] parseTimeInput given input of 1d4h that doesn't match any known time unit
11:37:12 [WARNING] [HomeSpawnPlus] parseTimeInput Caught NumberFormatException for arg 1d4h: For input string: "1d4"

commented

OK. I had suspected this possibility. The parsing routines aren't localized for different languages. HSP has good i18n support for the messages it prints out, but the time parsing routines are English only at this time. I believe I have the "short/long" form locales available in the localization files so this is possible to fix, but it will take some work due to the nature of the commonLibs I use and how the code is broken up.

Definitely doable, but will take me some time to get to.

commented

Ok, take your time, /hi without duration still works anyway :p