Skip to content

Commit

Permalink
Changed
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAbsolutionism committed Dec 20, 2024
1 parent 8b1bd18 commit 3c97cbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/main/java/ch/njol/skript/conditions/CondItemDespawn.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
public class CondItemDespawn extends PropertyCondition<Item> {

static {
PropertyCondition.register(CondItemDespawn.class, PropertyType.CAN_WILL, "(despawn naturally|naturally despawn)", "itementities");
PropertyCondition.register(CondItemDespawn.class, PropertyType.WILL, "(despawn naturally|naturally despawn)", "itementities");
PropertyCondition.register(CondItemDespawn.class, PropertyType.CAN, "(despawn naturally|naturally despawn)", "itementities");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ public enum PropertyType {
* Indicates that the condition is in a form of <code>something will/be something</code>,
* also possibly in the negated form
*/
WILL,

/**
* Indicates that the condition is in a multiform of <code>something will/be something</code> and <code>something can something</code>
* also possibly in the negated form
*/
CAN_WILL
WILL
}

private Expression<? extends T> expr;
Expand Down Expand Up @@ -134,11 +128,6 @@ public static void register(Class<? extends Condition> condition, PropertyType p
"%" + type + "% will " + property,
"%" + type + "% (will (not|neither)|won't) " + property);
}
case CAN_WILL -> {
Skript.registerCondition(condition,
"%" + type + "% (will|can) " + property,
"%" + type + "% (will (not|neither)|won't|can not|can't) " + property);
}
default -> {
assert false;
}
Expand Down Expand Up @@ -194,7 +183,7 @@ public static String toString(Condition condition, PropertyType propertyType, @N
yield (condition.isNegated() ? "don't have" : "have");
}
}
case WILL, CAN_WILL -> (condition.isNegated() ? "won't " : "will ") + "be";
case WILL -> (condition.isNegated() ? "won't " : "will ") + "be";
default -> {
assert false;
yield null;
Expand Down

0 comments on commit 3c97cbf

Please sign in to comment.