Rework Warp Storage Format
baailey opened this issue ยท 13 comments
Feature description
I would like a config option that allows players to set warps 'with similar names'. There is no way to disable this and I have only encountered this block when trying to use non-letter symbols.
How the feature is useful
Currently you can set a warp name wow
without running into the block when you set another warp named woow
. However, when you set a warp named $
, you are then blocked from being able to set a warp named #
, just to name one example. Personally, I don't really understand why it only blocks on non-letter warps, but nonetheless, I believe a config option for this block will resolve any problems.
Additionally, I do think a similar name block is good, but only when it's actually working. As stated before, wow
and woow
isn't blocked. Something I think other server owners might enjoy when it's properly functioning, unless current behaviour is intended.
Not to mention warps with *
may get weird with per warp permissions (most permission plugins interpret that as a wildcard symbol).
Why not allow customisation in the config to allow owners to block certain characters that could cause conflict with their file systems? I can understand the concern, but I imagine there are ways to make this work for those wanting it, no?
You haven't addressed why you need this. Is there a problem you are trying to solve? Otherwise, just use normal warp names.
To allow players to use any warp name they wish. Setting one warp using one of the certain characters blocks off countless others for players, which doesn't sound too fair to me when factoring in unique shop warps players can use to attract attention towards their store.
They can still use whatever characters they want in name, it's just that they can't have the same name with special characters in the same place.
Homes exist for this purpose. Players can have homes with the same name as another player's home. Warps are not intended for the purpose you seem to be using it for.
There seems to be a misunderstanding. I'm not saying players should be able to have warps under the same name, I'm saying they should be able to have warps using the special characters instead of limiting it only to one use. Right now you can set a warp named $
and that will block being able to set !, @, #, %
etc. It blocks off multiple other options for players.
Why not allow customisation in the config to allow owners to block certain characters that could cause conflict with their file systems? I can understand the concern, but I imagine there are ways to make this work for those wanting it, no?
There seems to be a misunderstanding. I'm not saying players should be able to have warps under the same name, I'm saying they should be able to have warps using the special characters instead of limiting it only to one use. Right now you can set a warp named
$
and that will block being able to set!, @, #, %
etc. It blocks off multiple other options for players.
All special characters are treated as _
when checking if they're unique.
Understood, JRoy already answered why this is not the case though. Warps are not saved with special characters preserved, so there is legitimately no way to differentiate between h#me
and h@me
for example. Both are saved as h_me
.
The solution is not to use special characters in your warps, or just accept that this is an issue you need to work around. In any case, my previous point was that this only appears to be an issue because you are misusing the warps feature. It is generally reserved for admin and not players. Homes are intended for player specific warps.
Why not allow customisation in the config to allow owners to block certain characters that could cause conflict with their file systems? I can understand the concern, but I imagine there are ways to make this work for those wanting it, no?
Because opening this up, creates more problems than it solves and being that it's an extremely niche use case, I'm not convinced that anybody but you would benefit from this. However, after looking at the code I'm not happy with the current implementation and will look into reworking warps probably to some UUID based system to avoid this special character mess all together.
I am eager to see what you have planned!
I do understand that yes, I may be the sole EssentialsX user that benefits from this, but I do appreciate the consideration nonetheless.
Some file systems don't allow certain characters in file names, such as ?
or *
. Since Essentials stores warps in file format, we need to account for that, and do that by replacing invalid characters with _
. However, if you have a warp named ?wow
and *wow
, their file name would both be _wow
which is why we send that generic error message.