package tk.martijn_heil.kingdomessentials.signs;


import lombok.Getter;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

import static com.google.common.base.Preconditions.checkArgument;

public class ExecutableSignRegister
{
    @Getter private List<ExecutableSign> registeredSigns = new ArrayList<>();


    public void addExecutableSign(ExecutableSign sign)
    {
        checkArgument(!registeredSigns.contains(sign), "this sign is already registered.");
    }


    @Nullable
    public ExecutableSign get(String action)
    {
        for (ExecutableSign sign : registeredSigns)
        {
            if(sign.getAction().equals(action)) return sign;
        }

        return null;
    }
}

@@ -499,16 +499,57 @@
 ered.%22);
+%0A%0A        this.registeredSigns.add(sign);
 %0A    %7D%0A%0A

Fix a new ExecutableSign not being added to the register