diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java index 58891d04..e0ec0872 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java @@ -15,8 +15,8 @@ import de.steamwar.bausystem.region.flags.flagvalues.FreezeMode; import de.steamwar.bausystem.region.flags.flagvalues.ProtectMode; import de.steamwar.bausystem.region.flags.flagvalues.TNTMode; import de.steamwar.core.TPSWatcher; +import de.steamwar.sql.SteamwarUser; import lombok.experimental.UtilityClass; -import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.inventory.meta.ItemMeta; @@ -25,7 +25,6 @@ import java.util.Calendar; import java.util.HashMap; import java.util.Map; import java.util.Set; -import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; @@ -223,7 +222,8 @@ public class Constants { return new ConstantDoubleValue(() -> player.getLocation().getZ()); }); CONSTANTS.put("name", player -> { - return new ConstantStringValue(player::getDisplayName); + SteamwarUser user = SteamwarUser.get(player.getUniqueId()); + return new ConstantStringValue(user::getUserName); }); CONSTANTS.put("sneaking", player -> { return new ConstantBooleanValue(player::isSneaking);