Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sammwyy committed Oct 20, 2021
1 parent 84cbc9e commit 8b4e5e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Improved sixth (6th) game.
- Added warning error if translation key doesn't exist.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/_2lstudios/squidgame/arena/Arena.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public void resetArena() {
this.spectators.clear();
this.games.clear();

this.games.add(new G6GlassesGame(this, mainConfig.getInt("game-settings.game-time.6", 60)));
this.games.add(new G1RedGreenLightGame(this, mainConfig.getInt("game-settings.game-time.1", 60)));
this.games.add(new G6GlassesGame(this, mainConfig.getInt("game-settings.game-time.6", 60)));
this.games.add(new G7SquidGame(this, mainConfig.getInt("game-settings.game-time.7", 600)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void init() {
this.addItem(0, this.createItem("§eSpawn point", Material.COMPASS, "§r\n§7Set at your current location\n§r"), 3,
2);
this.addItem(1, this.createItem("§eGlass Zone", Material.GLASS, "§r\n§7Set with your location wand\n§r"), 5, 2);
this.addItem(1, this.createItem("§eGoal Zone", Material.ARMOR_STAND, "§r\n§7Set with your location wand\n§r"),
this.addItem(2, this.createItem("§eGoal Zone", Material.ARMOR_STAND, "§r\n§7Set with your location wand\n§r"),
7, 2);

this.addItem(99, this.createItem("§cBack", Material.BARRIER), 5, 4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ public String getI18n(final String key) {

private String formatMessage(final String message) {
final String translatedMessage = this.getI18n(message);
final String formatColor = ChatColor.translateAlternateColorCodes('&', translatedMessage);
final String formatColor = ChatColor.translateAlternateColorCodes('&',
translatedMessage == null
? "§6§lWARNING: §eMissing translation key §7" + message + " §ein message.yml file"
: translatedMessage);
final String replacedVariables = PlaceholderAPIHook.formatString(formatColor, this.getBukkitPlayer());
return replacedVariables;
}
Expand Down

0 comments on commit 8b4e5e6

Please sign in to comment.