NLthijs48 / AreaShop

A Bukkit/Spigot (Minecraft server) plugin that facilitates renting and buying WorldGuard regions
GNU General Public License v3.0
55 stars 90 forks source link

Time display improvements: Shorten units if necessary #116

Open TheRealExus opened 8 years ago

TheRealExus commented 8 years ago

Hello, I have a bug report also, custom language file does not allow variables like %price%. I need the message of them to extending the rent to say $4 has been taken from your account.

Also I need to request a new variable. %timeleft% I need you to revamp this variable so it displays day, hour, and minute. 2 at a time on the sign, (ex: 2days 23hrs) (1hrs 12min) Add this please! and remove the 120 minute/hour display, I want it to display 1hr 12min instead of 72min... At least make that toggleable. Please fix this, this is the only plugin I have found that is good. (revamp or make new variable that is customizable.)

https://gyazo.com/03f3c1b85062cbf68ce158ed24cf0aad There is the link. The sign on the right is what I want. Thank you for reading, I put it up straight forward so it is understandable. :)

NLthijs48 commented 8 years ago

Currently not all messages in the language file support variables yet. Basically the ones that use a variable (other than the numbered ones like %0%) already do support it, and the other messages do not. I have already updated a bunch of messages to support them for the upcoming update, but for example the command messages have not yet been changed. It is a bit of a tedious job to go through all places where a message is printed (there are 414 of them), add variable support and update it in the language file, so that is why it is taking a while. Next to this changing messages will break translations, so then the translators need to do that message again. I'm trying to update all of them to support it for the next version though. For now you might be able to use the dev build if the message you want to use is changed already.

Now about the timeleft variables, it displays it in this way because this is 1) not too long too fit on the sign, 2) most of the times precise enough. The system you are suggestion would be perfect if the full words would fit on the sign, like 2 hours 15 minutes, but sadly it does not. I might be able to pull it off by having 2 types for each time length, a short and a full version. Then I could simply try the long version first, and if it does not fit then it swaps them to the short version one by one until it fits.

I will keep this ticket here as a feature request for the timeleft changes.

TheRealExus commented 8 years ago

I played many prison servers, trust me, it is not a problem when it comes to size. Thanks for replying. Usually every server that had prison cells said 2+ hours, idk what is up with the plus, but it would be nice if players can see 2d 23h instead of 2d. Can you give me an estimate on when the next update will be? Just so I don't expect it to be way sooner than it is.

NLthijs48 commented 8 years ago

it is not a problem when it comes to size

Well it is if it does not fit onto a sign. One thing I forgot to mention is that I would like to prevent abbreviations as much as possible, a lot of server are in English, but the players playing on it are often speaking another language in their country and can only understand English for a bit. So using short notations of hour like h is not clear for such players. With AreaShop I try to keep it as easy to use for players as I can get it, so that is why I try to avoid such things as much as I can. If I add a different time display more towards your suggestion, then I think I do it next to the current implementation because the current one is the most easy to read (although in some cases it might not be super precise).

I can give you no estimation at all about if and when this will be implemented. The rough plan is to implement these things, then release an update, and then plan the next one. But if I for some reason am working with time handling already or have other reasons to look at this code, then I might already do it for the next update.