Fixes a NullPointerException
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2024-04-30 15:40:45 +02:00
parent cb08163d6b
commit 295f0c68a4

View File

@ -385,7 +385,10 @@ public class SignClickListener implements Listener {
String oldPlaceholder = null; String oldPlaceholder = null;
if (targetPlaceholderSign != null) { if (targetPlaceholderSign != null) {
// Remove the old placeholder // Remove the old placeholder
oldPlaceholder = targetPlaceholderSign.getPlaceholders().get(targetSide).remove(destinationLine); Map<Integer, String> placeholders = targetPlaceholderSign.getPlaceholders().get(targetSide);
if (placeholders != null) {
oldPlaceholder = placeholders.remove(destinationLine);
}
} }
lines[destinationLine] = newText; lines[destinationLine] = newText;