Skip to content

Commit

Permalink
🐛 Fixed optional post storing variable threw an exception when not sp…
Browse files Browse the repository at this point in the history
…ecified
  • Loading branch information
ItsTheSky committed Sep 4, 2024
1 parent ce3286f commit c90e18e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class CreatePost extends AsyncEffect {
static {
Skript.registerEffect(
CreatePost.class,
"create [a] [new] post in [channel] %forumchannel% (with name|named) %string% [with message] %string/messagecreatebuilder/embedbuilder% [with [the] tags %-strings%] [and store (it|the thread) in %~objects%]"
"create [a] [new] post in [channel] %forumchannel% (with name|named) %string% [with message] %string/messagecreatebuilder/embedbuilder% [with [the] tags %-strings%] [and store (it|the thread) in %~-objects%]"
);
}

Expand All @@ -61,7 +61,7 @@ public boolean init(Expression<?>[] expressions, int i, Kleenean kleenean, Skrip
exprTags = (Expression<String>) expressions[3];
exprResult = (Expression<Object>) expressions[4];

return Changer.ChangerUtils.acceptsChange(exprResult, Changer.ChangeMode.SET, ThreadChannel.class);
return exprResult == null || Changer.ChangerUtils.acceptsChange(exprResult, Changer.ChangeMode.SET, ThreadChannel.class);
}

@Override
Expand Down

0 comments on commit c90e18e

Please sign in to comment.