fix skript 2.6 support

This commit is contained in:
Govindas 2021-06-24 18:28:51 +03:00
parent 2a4d7f6a6d
commit 1e039c1bfe
3 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<groupId>com.btk5h</groupId>
<artifactId>skript-db</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<packaging>jar</packaging>
<repositories>

View File

@ -105,7 +105,6 @@ public class EffExecuteStatement extends Effect {
if (getNext() != null) {
//if local variables are present
if (locals != null) {
//bring back local variables
//populate SQL data into variables
@ -121,7 +120,9 @@ public class EffExecuteStatement extends Effect {
//SkriptDB.getPlugin(SkriptDB.class).getServer().getPluginManager().callEvent(event);
}
if (isSync || finalSync) {
if (locals != null) {
Variables.setLocalVariables(e, locals);
}
if (!(res instanceof String)) {
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
}
@ -129,7 +130,9 @@ public class EffExecuteStatement extends Effect {
Variables.removeLocals(e);
} else {
Bukkit.getScheduler().runTask(SkriptDB.getInstance(), () -> {
if (locals != null) {
Variables.setLocalVariables(e, locals);
}
if (!(res instanceof String)) {
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
}
@ -141,7 +144,6 @@ public class EffExecuteStatement extends Effect {
});
}
}
}
});
}

View File

@ -1,5 +1,5 @@
name: skript-db
version: 1.3.1
version: 1.3.2
main: com.btk5h.skriptdb.SkriptDB
depend: [Skript]
authors: [btk5h, FranKusmiruk, Govindas]