Fix unknown player [name] bug

Version up.
This commit is contained in:
tastybento 2019-06-20 18:01:26 -07:00
parent 33f1a0dfb8
commit d811b30d3f
3 changed files with 6 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<groupId>world.bentobox</groupId>
<artifactId>level</artifactId>
<version>1.5.0</version>
<version>1.5.1-SNAPSHOT</version>
<name>Level</name>
<description>Level is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland.</description>

View File

@ -6,6 +6,7 @@ import java.util.Optional;
import java.util.UUID;
import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.util.Util;
import world.bentobox.level.Level;
@ -34,7 +35,7 @@ public class AdminLevelCommand extends CompositeCommand {
// Convert name to a UUID
final UUID playerUUID = getPlugin().getPlayers().getUUID(args.get(0));
if (playerUUID == null) {
user.sendMessage("general.errors.unknown-player");
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
return true;
} else {
levelPlugin.calculateIslandLevel(getWorld(), user, playerUUID);

View File

@ -4,6 +4,7 @@ import java.util.List;
import java.util.UUID;
import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.level.Level;
@ -31,7 +32,7 @@ public class IslandLevelCommand extends CompositeCommand {
// Convert name to a UUID
final UUID playerUUID = getPlugin().getPlayers().getUUID(args.get(0));
if (playerUUID == null) {
user.sendMessage("general.errors.unknown-player");
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
return true;
} else if (user.getUniqueId().equals(playerUUID) ) {
return this.calculateLevel(user);