Makes sure to queue newly created signs for update
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
This commit is contained in:
parent
0e9985b674
commit
59ac1e9107
@ -4,6 +4,7 @@ import me.clip.placeholderapi.PlaceholderAPI;
|
|||||||
import net.knarcraft.placeholdersigns.PlaceholderSigns;
|
import net.knarcraft.placeholdersigns.PlaceholderSigns;
|
||||||
import net.knarcraft.placeholdersigns.config.PlaceholderSignsPermission;
|
import net.knarcraft.placeholdersigns.config.PlaceholderSignsPermission;
|
||||||
import net.knarcraft.placeholdersigns.container.PlaceholderSign;
|
import net.knarcraft.placeholdersigns.container.PlaceholderSign;
|
||||||
|
import net.knarcraft.placeholdersigns.container.QueuedPlaceholderSign;
|
||||||
import net.knarcraft.placeholdersigns.handler.PlaceholderSignHandler;
|
import net.knarcraft.placeholdersigns.handler.PlaceholderSignHandler;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.block.sign.Side;
|
import org.bukkit.block.sign.Side;
|
||||||
@ -63,6 +64,7 @@ public class SignTextListener implements Listener {
|
|||||||
// Register a new placeholder sign
|
// Register a new placeholder sign
|
||||||
PlaceholderSign placeholderSign = new PlaceholderSign(event.getBlock().getLocation(), placeholderSide, null);
|
PlaceholderSign placeholderSign = new PlaceholderSign(event.getBlock().getLocation(), placeholderSide, null);
|
||||||
signHandler.registerSign(placeholderSign);
|
signHandler.registerSign(placeholderSign);
|
||||||
|
PlaceholderSigns.getInstance().getUpdateQueueHandler().queueSign(new QueuedPlaceholderSign(placeholderSign, 0));
|
||||||
signHandler.save();
|
signHandler.save();
|
||||||
} else if (!placeholders.isEmpty()) {
|
} else if (!placeholders.isEmpty()) {
|
||||||
// Overwrite the placeholders of the existing placeholder sign
|
// Overwrite the placeholders of the existing placeholder sign
|
||||||
|
Loading…
Reference in New Issue
Block a user