SteamWar/BauSystem2.0
Archiviert
12
0

Fix name constant
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-01-07 11:06:24 +01:00
Ursprung 0c4fa56a83
Commit 54b17fa62d

Datei anzeigen

@ -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);