Remove isCurrentEvent for compatibility
This commit is contained in:
parent
cd039aeeaf
commit
9b8ff05f38
@ -57,7 +57,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.SkriptLang</groupId>
|
<groupId>com.github.SkriptLang</groupId>
|
||||||
<artifactId>Skript</artifactId>
|
<artifactId>Skript</artifactId>
|
||||||
<version>2.6.1</version>
|
<version>2.10.1</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@ -67,7 +67,7 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.16.5-R0.1-SNAPSHOT</version>
|
<version>1.16.5-R0.1-SNAPSHOT</version>
|
||||||
|
@ -29,10 +29,7 @@ public class ExprChannel extends SimpleExpression<String> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean init(final Expression<?>[] expressions, final int matchedPattern, final Kleenean isDelayed, final SkriptParser.ParseResult parseResult) {
|
public boolean init(final Expression<?>[] expressions, final int matchedPattern, final Kleenean isDelayed, final SkriptParser.ParseResult parseResult) {
|
||||||
if (!ScriptLoader.isCurrentEvent(RedisMessageEvent.class)) {
|
|
||||||
Skript.error("Cannot use 'redis channel' outside of a redis message event", ErrorQuality.SEMANTIC_ERROR);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,10 +31,7 @@ public class ExprMessage extends SimpleExpression<String> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean init(final Expression<?>[] expressions, final int matchedPattern, final Kleenean isDelayed, final SkriptParser.ParseResult parseResult) {
|
public boolean init(final Expression<?>[] expressions, final int matchedPattern, final Kleenean isDelayed, final SkriptParser.ParseResult parseResult) {
|
||||||
if (!ScriptLoader.isCurrentEvent(RedisMessageEvent.class)) {
|
|
||||||
Skript.error("Cannot use 'redis message' outside of a redis message event", ErrorQuality.SEMANTIC_ERROR);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,10 +32,7 @@ public class ExprMessageDate extends SimpleExpression<Date> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean init(final Expression<?>[] expressions, final int matchedPattern, final Kleenean isDelayed, final SkriptParser.ParseResult parseResult) {
|
public boolean init(final Expression<?>[] expressions, final int matchedPattern, final Kleenean isDelayed, final SkriptParser.ParseResult parseResult) {
|
||||||
if (!ScriptLoader.isCurrentEvent(RedisMessageEvent.class)) {
|
|
||||||
Skript.error("Cannot use 'redis message date' outside of a redis message event", ErrorQuality.SEMANTIC_ERROR);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user