Makes sure to queue newly created signs for update
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2024-04-30 15:24:49 +02:00
parent 0e9985b674
commit 59ac1e9107

View File

@ -4,6 +4,7 @@ import me.clip.placeholderapi.PlaceholderAPI;
import net.knarcraft.placeholdersigns.PlaceholderSigns;
import net.knarcraft.placeholdersigns.config.PlaceholderSignsPermission;
import net.knarcraft.placeholdersigns.container.PlaceholderSign;
import net.knarcraft.placeholdersigns.container.QueuedPlaceholderSign;
import net.knarcraft.placeholdersigns.handler.PlaceholderSignHandler;
import org.bukkit.Location;
import org.bukkit.block.sign.Side;
@ -63,6 +64,7 @@ public class SignTextListener implements Listener {
// Register a new placeholder sign
PlaceholderSign placeholderSign = new PlaceholderSign(event.getBlock().getLocation(), placeholderSide, null);
signHandler.registerSign(placeholderSign);
PlaceholderSigns.getInstance().getUpdateQueueHandler().queueSign(new QueuedPlaceholderSign(placeholderSign, 0));
signHandler.save();
} else if (!placeholders.isEmpty()) {
// Overwrite the placeholders of the existing placeholder sign