Fix hologram leaderboards not showing

This commit is contained in:
ceze88 2024-02-23 17:07:31 +01:00
parent 3129adce6f
commit fd158996df
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ public class Hologram {
private final Location location;
public Hologram(HologramType type, Location location, List<String> lines) {
this.hologramId = location.toString() + UUID.randomUUID();
this.hologramId = type + "_" + UUID.randomUUID();
this.type = type;
this.location = location;

View File

@ -73,9 +73,9 @@ public class HologramTask extends BukkitRunnable {
FileManager.Config locationsConfig = fileManager.getConfig(new File(plugin.getDataFolder(), "locations.yml"));
FileConfiguration locationsConfigLoad = locationsConfig.getFileConfiguration();
if (locationsConfigLoad.getString("Location.Hologram.Leaderboard." + type) != null) {
if (locationsConfigLoad.getString("Location.Hologram.Leaderboard." + type.getFriendlyName()) != null) {
spawnHologram(type, plugin.getFileManager().getLocation(locationsConfig,
"Location.Hologram.Leaderboard." + type, true), getHologramLines(type));
"Location.Hologram.Leaderboard." + type.getFriendlyName(), true), getHologramLines(type));
}
}