mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 14:14:46 +00:00
Made player script implementation closer to that of 1.12.
This commit is contained in:
1 parent
69b7a9aab4
commit
3a9789b3fd
12 files changed
+89
-119
No files matched your search
@@ -114,7 +114,7 @@ public class ScriptController {
|
||||
}
|
||||
|
||||
private File playerScriptsFile() {
|
||||
return new File(dir, "player_scripts.json");
|
||||
return new File(this.dir, "player_scripts.json");
|
||||
}
|
||||
|
||||
public boolean loadPlayerScripts() {
|
||||
@@ -122,11 +122,10 @@ public class ScriptController {
|
||||
File file = this.playerScriptsFile();
|
||||
|
||||
try {
|
||||
if(!file.exists()) {
|
||||
if (!file.exists()) {
|
||||
return false;
|
||||
} else {
|
||||
this.playerScripts.readFromNBT(NBTJsonUtil.LoadFile(file));
|
||||
shouldSave = false;
|
||||
return true;
|
||||
}
|
||||
} catch (Exception var3) {
|
||||
@@ -147,6 +146,7 @@ public class ScriptController {
|
||||
} catch (JsonException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void loadCategories(){
|
||||
|
||||
Reference in new issue
Block a user