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

Clean up the messages.yml, Using of variables #40

Closed
RedstoneFuture opened this issue Aug 4, 2022 · 1 comment · Fixed by #81
Closed

Clean up the messages.yml, Using of variables #40

RedstoneFuture opened this issue Aug 4, 2022 · 1 comment · Fixed by #81
Assignees
Labels
accepted The idea / proposed amendment was accepted in principle refactoring

Comments

@RedstoneFuture
Copy link
Owner

Clean up the messages.yml / Using of message categories

The advantage here is that the admin knows better what these settings are when setting them up. It becomes altogether clearer.

Example: OLD

game_starts_new_in: Game starts new in &e%seconds% &7seconds
game_ends_in_minutes: Game ends in &e%minutes% &7minutes
game_ends_in_seconds: Game ends in &e%seconds% &7seconds
game_starts_in: Game starts in &e%seconds% &7seconds
not_enough_players: '&cThere are not enough players online'
teams_unequal: '&cThe teams are unequal distributed'
game_starts: '&aThe game starts'
fall_protection: '&cFall protection inactive in %seconds% seconds'
fall_protection_inactive: '&cFall protection inactive'
fall_protection_deactivated: '&cFall protection deactivated by sneaking'

NEW:

lobby:
  not_enough_players: '&cThere are not enough players online'
  teams_unequal: '&cThe teams are unequal distributed'
game_timer:
  game_starts_new_in: Game starts new in &e%seconds% &7seconds
  starts: '&aThe game starts'
  game_ends_in_minutes: Game ends in &e%minutes% &7minutes
  game_ends_in_seconds: Game ends in &e%seconds% &7seconds
endgame_timer:
  game_starts_in: Game starts in &e%seconds% &7seconds
fall_protection:
  timer: '&cFall protection inactive in %seconds% seconds'
  inactive: '&cFall protection inactive'
  deactivated: '&cFall protection deactivated by sneaking'

Using of variables for the settings in the messages.yml as for the config.yml:

The advantage here is that you no longer have to read the config within the plugin. In addition, you can also see which messages are no longer used in the plugin.

    public static boolean isContactAuth() {
        return cfg.getBoolean("contact_auth_server");
    }

public static boolean isContactAuth() {
return cfg.getBoolean("contact_auth_server");
}

@RedstoneFuture RedstoneFuture added the enhancement New feature or request label Aug 4, 2022
@RedstoneFuture RedstoneFuture self-assigned this Aug 4, 2022
@RedstoneFuture RedstoneFuture added refactoring and removed enhancement New feature or request labels Aug 4, 2022
@RedstoneFuture RedstoneFuture added the not evaluated idea The idea must be evaluated and accepted label Nov 2, 2022
@daniel-naegele
Copy link
Collaborator

Approved

@daniel-naegele daniel-naegele added accepted The idea / proposed amendment was accepted in principle and removed not evaluated idea The idea must be evaluated and accepted labels Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The idea / proposed amendment was accepted in principle refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants