mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-22 18:45:24 +01:00
Fix unknown player [name] bug
Version up.
This commit is contained in:
parent
33f1a0dfb8
commit
d811b30d3f
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>world.bentobox</groupId>
|
<groupId>world.bentobox</groupId>
|
||||||
<artifactId>level</artifactId>
|
<artifactId>level</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.5.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>Level</name>
|
<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>
|
<description>Level is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland.</description>
|
||||||
|
@ -6,6 +6,7 @@ import java.util.Optional;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
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.api.user.User;
|
||||||
import world.bentobox.bentobox.util.Util;
|
import world.bentobox.bentobox.util.Util;
|
||||||
import world.bentobox.level.Level;
|
import world.bentobox.level.Level;
|
||||||
@ -34,7 +35,7 @@ public class AdminLevelCommand extends CompositeCommand {
|
|||||||
// Convert name to a UUID
|
// Convert name to a UUID
|
||||||
final UUID playerUUID = getPlugin().getPlayers().getUUID(args.get(0));
|
final UUID playerUUID = getPlugin().getPlayers().getUUID(args.get(0));
|
||||||
if (playerUUID == null) {
|
if (playerUUID == null) {
|
||||||
user.sendMessage("general.errors.unknown-player");
|
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
levelPlugin.calculateIslandLevel(getWorld(), user, playerUUID);
|
levelPlugin.calculateIslandLevel(getWorld(), user, playerUUID);
|
||||||
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
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.api.user.User;
|
||||||
import world.bentobox.level.Level;
|
import world.bentobox.level.Level;
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ public class IslandLevelCommand extends CompositeCommand {
|
|||||||
// Convert name to a UUID
|
// Convert name to a UUID
|
||||||
final UUID playerUUID = getPlugin().getPlayers().getUUID(args.get(0));
|
final UUID playerUUID = getPlugin().getPlayers().getUUID(args.get(0));
|
||||||
if (playerUUID == null) {
|
if (playerUUID == null) {
|
||||||
user.sendMessage("general.errors.unknown-player");
|
user.sendMessage("general.errors.unknown-player", TextVariables.NAME, args.get(0));
|
||||||
return true;
|
return true;
|
||||||
} else if (user.getUniqueId().equals(playerUUID) ) {
|
} else if (user.getUniqueId().equals(playerUUID) ) {
|
||||||
return this.calculateLevel(user);
|
return this.calculateLevel(user);
|
||||||
|
Loading…
Reference in New Issue
Block a user