Fixed locale strings.

This commit is contained in:
Tastybento 2018-01-02 19:37:19 -08:00
parent d94469f320
commit 5e66722412
5 changed files with 28 additions and 23 deletions

View File

@ -3,18 +3,24 @@
# the one at http://yaml-online-parser.appspot.com #
###########################################################################################
### Credits ###
# Tastybento: maintainer
# Poslovitch: maintainer
#
# This translation is adapted to version : [alpha-0.0.1]
admin:
level:
parameters: "<player>"
description: "calculate the island level for player"
top:
description: "show the top ten list"
island:
islandLevelIs: "Island level is"
requiredPointsToNextLevel: "[points] points required until the next level"
levelDeaths: "([number] deaths)"
topten:
guiTitle: "Top Ten"
guiHeading: "[name]:[rank]"
islandLevel: "Level [level]"
level:
parameters: "[player]"
description: "calculate your island level or show the level of [player]"
islandLevelIs: "Island level is"
requiredPointsToNextLevel: "[points] points required until the next level"
deaths: "([number] deaths)"
top:
description: "show the Top Ten"
guiTitle: "Top Ten"
guiHeading: "[name]:[rank]"
islandLevel: "Level [level]"

View File

@ -184,7 +184,7 @@ public class ChunkScanner {
if (asker.isPresent()) {
// Tell the asker the result
if (asker.get().isPlayer() && asker.get().isOnline()) {
asker.get().sendLegacyMessage("Your level is " + result.score);
asker.get().sendRawMessage("Your level is " + result.score);
} else {
// Console
sendConsoleReport(asker);
@ -286,7 +286,7 @@ public class ChunkScanner {
reportLines.add("=================================");
for (String line : reportLines) {
asker.get().sendLegacyMessage(line);
asker.get().sendRawMessage(line);
}
}

View File

@ -42,18 +42,18 @@ public class LevelPresenter extends LevelPlugin {
public boolean calculateIslandLevel(final User sender, final UUID targetPlayer, boolean report) {
// Check if sender has island
if (!bSkyBlock.getIslands().hasIsland(targetPlayer)) {
sender.sendLegacyMessage("Target does not have an island");
sender.sendRawMessage("Target does not have an island");
return false;
}
// Player asking for their own island calc
if (!sender.isPlayer() || sender.getUniqueId().equals(targetPlayer) || sender.isOp() || sender.hasPermission(Settings.PERMPREFIX + "mod.info")) {
// Newer better system - uses chunks
if (!onLevelWaitTime(sender) || levelWait <= 0 || sender.isOp() || sender.hasPermission(Settings.PERMPREFIX + "mod.info")) {
sender.sendLegacyMessage(ChatColor.GREEN + "Calculating level, please wait...");
sender.sendRawMessage(ChatColor.GREEN + "Calculating level, please wait...");
setLevelWaitTime(sender);
new ChunkScanner(plugin, bSkyBlock.getIslands().getIsland(targetPlayer), sender);
} else {
sender.sendLegacyMessage( ChatColor.YELLOW + String.valueOf(getLevelWaitTime(sender)));
sender.sendRawMessage( ChatColor.YELLOW + String.valueOf(getLevelWaitTime(sender)));
}
} else {

View File

@ -28,8 +28,8 @@ public class AdminTop extends CompositeCommand {
UUID player = topTen.getKey();
rank++;
String item = String.valueOf(rank) + ":" + BSkyBlock.getInstance().getIslands().getIslandName(player) + " "
+ "topten.islandLevel" + String.valueOf(topTen.getValue());
user.sendLegacyMessage(item);
+ user.getTranslation("topten.islandLevel", "[level]", String.valueOf(topTen.getValue()));
user.sendRawMessage(item);
}
return true;
@ -39,7 +39,7 @@ public class AdminTop extends CompositeCommand {
public void setup() {
this.setPermission(Settings.PERMPREFIX + "admin.top");
this.setOnlyPlayer(false);
this.setParameters("admin.top.usage");
this.setDescription("admin.top.description");
}
}

View File

@ -31,8 +31,7 @@ public class IslandLevel extends CompositeCommand {
// Self level request
levelPlugin.calculateIslandLevel(user, user.getUniqueId(), false);
} else {
user.sendMessage("addon.level.level-is", "[level]", String.valueOf(levelPlugin.getIslandLevel(playerUUID)));
user.sendLegacyMessage("Level = " + String.valueOf(levelPlugin.getIslandLevel(playerUUID)));
user.sendMessage("island.level.islandLevelIs", "[level]", String.valueOf(levelPlugin.getIslandLevel(playerUUID)));
return true;
}
} else {