diff --git a/plugin/src/main/java/de/epiceric/shopchest/config/hologram/parser/FormatParser.java b/plugin/src/main/java/de/epiceric/shopchest/config/hologram/parser/FormatParser.java
index d84151f..7745a9d 100644
--- a/plugin/src/main/java/de/epiceric/shopchest/config/hologram/parser/FormatParser.java
+++ b/plugin/src/main/java/de/epiceric/shopchest/config/hologram/parser/FormatParser.java
@@ -215,6 +215,9 @@ public class FormatParser {
public
Token> createFunctions(Iterable> tokens, Function providerFunction, Map> providerTypes) {
Chain> tokensChain = Chain.getChain(tokens);
+ if (tokensChain == null) {
+ return null;
+ }
// Node
Chain> nodeChain = tokensChain;
@@ -496,7 +499,65 @@ public class FormatParser {
equalityChain = equalityChain.getAfter();
}
- return tokensChain == null ? null : tokensChain.getValue();
+ // Logic operator
+ Chain> logicChain = tokensChain;
+ while (logicChain != null) {
+ final Token> token = logicChain.getValue();
+ // Operator check
+ if (token.getType() == Token.LOGIC_OPERATOR) {
+ final Chain> previousChain = logicChain.getBefore();
+ final Chain> nextChain = logicChain.getAfter();
+ // First member does not exist
+ if (previousChain == null) {
+ throw new RuntimeException("Try to apply a logic operator without first member");
+ }
+ // Second member does not exist
+ if (nextChain == null) {
+ throw new RuntimeException("Try to apply a logic operator without second member");
+ }
+ // Get First member
+ final Condition