forked from Limework/skript-db
fix skript 2.6 support
This commit is contained in:
parent
2a4d7f6a6d
commit
1e039c1bfe
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.btk5h</groupId>
|
<groupId>com.btk5h</groupId>
|
||||||
<artifactId>skript-db</artifactId>
|
<artifactId>skript-db</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -105,7 +105,6 @@ public class EffExecuteStatement extends Effect {
|
|||||||
|
|
||||||
if (getNext() != null) {
|
if (getNext() != null) {
|
||||||
//if local variables are present
|
//if local variables are present
|
||||||
if (locals != null) {
|
|
||||||
//bring back local variables
|
//bring back local variables
|
||||||
|
|
||||||
//populate SQL data into variables
|
//populate SQL data into variables
|
||||||
@ -121,7 +120,9 @@ public class EffExecuteStatement extends Effect {
|
|||||||
//SkriptDB.getPlugin(SkriptDB.class).getServer().getPluginManager().callEvent(event);
|
//SkriptDB.getPlugin(SkriptDB.class).getServer().getPluginManager().callEvent(event);
|
||||||
}
|
}
|
||||||
if (isSync || finalSync) {
|
if (isSync || finalSync) {
|
||||||
Variables.setLocalVariables(e, locals);
|
if (locals != null) {
|
||||||
|
Variables.setLocalVariables(e, locals);
|
||||||
|
}
|
||||||
if (!(res instanceof String)) {
|
if (!(res instanceof String)) {
|
||||||
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
|
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
|
||||||
}
|
}
|
||||||
@ -129,7 +130,9 @@ public class EffExecuteStatement extends Effect {
|
|||||||
Variables.removeLocals(e);
|
Variables.removeLocals(e);
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTask(SkriptDB.getInstance(), () -> {
|
Bukkit.getScheduler().runTask(SkriptDB.getInstance(), () -> {
|
||||||
Variables.setLocalVariables(e, locals);
|
if (locals != null) {
|
||||||
|
Variables.setLocalVariables(e, locals);
|
||||||
|
}
|
||||||
if (!(res instanceof String)) {
|
if (!(res instanceof String)) {
|
||||||
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
|
((Map<String, Object>) res).forEach((name, value) -> setVariable(e, name, value));
|
||||||
}
|
}
|
||||||
@ -140,7 +143,6 @@ public class EffExecuteStatement extends Effect {
|
|||||||
Variables.removeLocals(e);
|
Variables.removeLocals(e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: skript-db
|
name: skript-db
|
||||||
version: 1.3.1
|
version: 1.3.2
|
||||||
main: com.btk5h.skriptdb.SkriptDB
|
main: com.btk5h.skriptdb.SkriptDB
|
||||||
depend: [Skript]
|
depend: [Skript]
|
||||||
authors: [btk5h, FranKusmiruk, Govindas]
|
authors: [btk5h, FranKusmiruk, Govindas]
|
||||||
|
Loading…
Reference in New Issue
Block a user