fix: citizens hologram import

This commit is contained in:
D3v1s0m 2025-04-18 12:27:21 +05:30
parent c34a665692
commit 643b143868
No known key found for this signature in database
GPG key ID: FA1F770C7B1D40C1

View file

@ -24,7 +24,7 @@ public class HologramTrait extends SectionCitizensTrait {
if (linesSection != null) { if (linesSection != null) {
List<String> keys = new ArrayList<>(linesSection.getKeys(false)); List<String> keys = new ArrayList<>(linesSection.getKeys(false));
for (int i = keys.size() - 1; i >= 0; i--) { for (int i = keys.size() - 1; i >= 0; i--) {
String line = linesSection.getConfigurationSection(keys.get(i)).getString("text"); String line = linesSection.isConfigurationSection(keys.get(i)) ? linesSection.getConfigurationSection(keys.get(i)).getString("text") : linesSection.getString(keys.get(i));
if (line != null) { if (line != null) {
Component component = textSerializer.deserialize(line); Component component = textSerializer.deserialize(line);
npc.getHologram().addTextLineComponent(component); npc.getHologram().addTextLineComponent(component);