Skip to content
This repository was archived by the owner on Jul 29, 2021. It is now read-only.

Commit 653f11c

Browse files
committed
Fix some things that broke on new skript versions
1 parent 5243b63 commit 653f11c

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
build/
44
out/
55
server/
6+
dependencies/spigot*

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies {
4747
//Since it uses NMS/OBC stuffs, it's required to manually add the bukkit jars.
4848
compile fileTree(dir: 'dependencies', include: '*.jar')
4949
//Skript
50-
compile 'ch.njol:skript:2.2-dev32'
50+
compile 'ch.njol:skript:2.2-dev35b'
5151
//Generex API. Used to expressions to generate strings from regex
5252
compileWithJar files('dependencies/Generex.jar')
5353
//ViaVersion

dependencies/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Since it uses some NMS/OBC codes, It is necessary to manually add the spigot jars here.
44

5+
Note that gradle will use the Bukkit api from the first jar loaded and thus
6+
**you must prefix the latest Bukkit jar with `!!` so that gradle loads it first.**
7+
If you do not do this **TuSKe will not compile**.
8+
59
1_12_R1: `spigot-1.12-R0.1-SNAPSHOT`
610
1_11_R1: `spigot-1.11-R0.1-SNAPSHOT`
711
1_10_R1: `spigot-1.10-R0.1-SNAPSHOT`

src/main/java/com/github/tukenuke/tuske/effects/EffMakeDrop.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import ch.njol.skript.classes.Changer;
44
import ch.njol.skript.registrations.Classes;
5-
import ch.njol.skript.util.Slot;
5+
import ch.njol.skript.util.slot.Slot;
66
import com.github.tukenuke.tuske.TuSKe;
77
import com.github.tukenuke.tuske.util.Registry;
88
import org.bukkit.Material;

src/main/java/com/github/tukenuke/tuske/expressions/gui/ExprGUIValue.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import ch.njol.skript.Skript;
77
import ch.njol.skript.classes.Changer;
88
import ch.njol.skript.registrations.Classes;
9-
import ch.njol.skript.util.CursorSlot;
10-
import ch.njol.skript.util.InventorySlot;
11-
import ch.njol.skript.util.Slot;
9+
import ch.njol.skript.util.slot.CursorSlot;
10+
import ch.njol.skript.util.slot.InventorySlot;
11+
import ch.njol.skript.util.slot.Slot;
1212
import com.github.tukenuke.tuske.manager.gui.v2.GUIInventory;
1313
import com.github.tukenuke.tuske.sections.gui.EffMakeGUI;
1414
import com.github.tukenuke.tuske.util.EffectSection;

src/main/java/com/github/tukenuke/tuske/util/VariableUtil.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import ch.njol.skript.variables.Variables;
44
import org.bukkit.event.Event;
55

6+
import java.util.Map;
67
import java.util.HashMap;
78
import java.util.TreeMap;
89
import java.util.WeakHashMap;
@@ -21,7 +22,7 @@ public static VariableUtil getInstance() {
2122
private VariableUtil() {
2223

2324
}
24-
public WeakHashMap<Event, Object> map = ReflectionUtils.getField(Variables.class, null, "localVariables");
25+
public Map<Event, Object> map = ReflectionUtils.getField(Variables.class, null, "localVariables");
2526
/**
2627
* Some hacking methods to copy variables from one event, and paste
2728
* to another. It allows to run the section using the same variables
@@ -39,8 +40,8 @@ public Object copyVariables(Event from){
3940
//TuSKe.debug(newVariablesMap, variablesMap);
4041
if (newVariablesMap == null)
4142
return null;
42-
HashMap<String, Object> single = ReflectionUtils.getField(newVariablesMap.getClass(), newVariablesMap, "hashMap");
43-
TreeMap<String, Object> list = ReflectionUtils.getField(newVariablesMap.getClass(), newVariablesMap, "treeMap");
43+
Map<String, Object> single = ReflectionUtils.getField(newVariablesMap.getClass(), newVariablesMap, "hashMap");
44+
Map<String, Object> list = ReflectionUtils.getField(newVariablesMap.getClass(), newVariablesMap, "treeMap");
4445
single.putAll(ReflectionUtils.getField(variablesMap.getClass(), variablesMap, "hashMap"));
4546
list.putAll(ReflectionUtils.getField(variablesMap.getClass(), variablesMap, "treeMap"));
4647
return newVariablesMap;

0 commit comments

Comments
 (0)