Fix 1.7 (pre UUID) compatibility

This commit is contained in:
Gabriele C 2016-08-04 12:01:30 +02:00
parent 5d6f3e1f06
commit 54c2d3e6e9
2 changed files with 4 additions and 4 deletions

View File

@ -50,11 +50,11 @@ public class RestrictionSettings implements SettingsClass {
newProperty("settings.restrictions.ForceSingleSession", true); newProperty("settings.restrictions.ForceSingleSession", true);
@Comment({ @Comment({
"If enabled, every player will be teleported to the world spawnpoint", "If enabled, every player that spawn in one of the world listed in \"ForceSpawnLocOnJoin.worlds\"",
"after successful authentication.", "will be teleported to the spawnpoint after successful authentication.",
"The quit location of the player will be overwritten.", "The quit location of the player will be overwritten.",
"This is different from \"teleportUnAuthedToSpawn\" that teleport player", "This is different from \"teleportUnAuthedToSpawn\" that teleport player",
"back to his quit location after the authentication."}) "to the spawnpoint on join."})
public static final Property<Boolean> FORCE_SPAWN_LOCATION_AFTER_LOGIN = public static final Property<Boolean> FORCE_SPAWN_LOCATION_AFTER_LOGIN =
newProperty("settings.restrictions.ForceSpawnLocOnJoin.enabled", false); newProperty("settings.restrictions.ForceSpawnLocOnJoin.enabled", false);

View File

@ -26,7 +26,7 @@ public final class Utils {
// so we can have uuid support. // so we can have uuid support.
try { try {
return player.getUniqueId().toString(); return player.getUniqueId().toString();
} catch (Exception ignore) { } catch (NoSuchMethodError ignore) {
return player.getName(); return player.getName();
} }
} }