aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--featureClass/class.js2
-rw-r--r--featureClass/featureManager.js9
-rw-r--r--features/betterGuis/index.js3
-rw-r--r--features/betterGuis/museumGui.js2
-rw-r--r--features/dungeonSolvers/index.js2
-rw-r--r--features/fragBot/index.js4
-rw-r--r--features/globalSettings/index.js2
-rw-r--r--metadata.json4
8 files changed, 16 insertions, 12 deletions
diff --git a/featureClass/class.js b/featureClass/class.js
index 11b3492..c9977d8 100644
--- a/featureClass/class.js
+++ b/featureClass/class.js
@@ -124,7 +124,7 @@ class Feature {
if(this.FeatureManager.commandFuncs[name]){
this.FeatureManager.commandFuncs[name].call(this, ...(args || []))
}else{
- ChatLib.chat("&cThis command is not available atm")
+ ChatLib.chat(this.FeatureManager.messagePrefix + "This command is not available atm")
}
}, this)
}
diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js
index 5287a6f..0d9101b 100644
--- a/featureClass/featureManager.js
+++ b/featureClass/featureManager.js
@@ -1,11 +1,9 @@
/// <reference types="../../CTAutocomplete" />
/// <reference lib="es2015" />
-import LocationSetting from "../features/settings/settingThings/location";
import logger from "../logger";
const File = Java.type("java.io.File")
import metadata from "../metadata.js"
import { registerForge as registerForgeBase, unregisterForge as unregisterForgeBase} from "./forgeEvents.js"
-import soopyV2Server from "../socketConnection"
class FeatureManager {
constructor(){
@@ -60,6 +58,7 @@ class FeatureManager {
this.registerEvent("worldUnload", this.saveFeatureSettings, this)
this.registerEvent("gameUnload", this.saveFeatureSettings, this)
+ this.registerEvent("gameUnload", this.unloadAllFeatures, this)
this.registerCommand("soopyunloadfeature", (args)=>{
new Thread(()=>{
@@ -376,6 +375,12 @@ class FeatureManager {
return this
}
+ unloadAllFeatures(){
+ Object.keys(this.features).forEach((feature)=>{
+ this.unloadFeature(feature)
+ })
+ }
+
isFeatureLoaded(feature){
return !!this.features[feature]
}
diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js
index 2f22b04..7475d4a 100644
--- a/features/betterGuis/index.js
+++ b/features/betterGuis/index.js
@@ -1,9 +1,8 @@
/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
-import logger from "../../logger";
import ToggleSetting from "../settings/settingThings/toggle";
-// import MuseumGui from "./museumGui";
+// import MuseumGui from "./museumGui.js";
class BetterGuis extends Feature {
constructor() {
diff --git a/features/betterGuis/museumGui.js b/features/betterGuis/museumGui.js
index c3c47d0..23d9e94 100644
--- a/features/betterGuis/museumGui.js
+++ b/features/betterGuis/museumGui.js
@@ -7,7 +7,7 @@ import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"
import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"
import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"
import renderLibs from "../../../guimanager/renderLibs"
-import utils from "../../utils/utils"
+import * as utils from "../../utils/utils"
class MuseumGui {
constructor(){
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index 5ca1ed5..954c4b8 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -97,7 +97,7 @@ class DungeonSolvers extends Feature {
}
if (this.lividData.sayLividColors2.length === 9) {
if(this.lividFindChat.getValue()){
- ChatLib.chat("Correct livid is: " + this.lividData.lividColor[lividName] + lividName)
+ ChatLib.chat(this.FeatureManager.messagePrefix + "Correct livid is: " + this.lividData.lividColor[lividName] + lividName)
}
this.lividData.correctLividColor = lividName
}
diff --git a/features/fragBot/index.js b/features/fragBot/index.js
index 67bb9a3..e3a571f 100644
--- a/features/fragBot/index.js
+++ b/features/fragBot/index.js
@@ -61,10 +61,10 @@ class FragBot extends Feature {
fragbotCommand(...args){
if(this.hostingFragBot){
this.hostingFragBot = false
- ChatLib.chat("&aFragbot has been disabled")
+ ChatLib.chat(this.FeatureManager.messagePrefix + "Fragbot has been disabled")
}else{
this.hostingFragBot = true
- ChatLib.chat("&aNow acting as a fragbot, run /fragbot again to disable")
+ ChatLib.chat(this.FeatureManager.messagePrefix + "Now acting as a fragbot, run /fragbot again to disable")
}
}
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index dd3d922..c044a4e 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -200,7 +200,7 @@ class Hud extends Feature {
}
newKey(key, event){
- ChatLib.chat("&c[SOOPY V2] Copied api key!")
+ ChatLib.chat(this.FeatureManager.messagePrefix + "Copied api key!")
this.apiKeySetting.setValue(key)
}
diff --git a/metadata.json b/metadata.json
index 67c574b..36b7b4f 100644
--- a/metadata.json
+++ b/metadata.json
@@ -5,8 +5,8 @@
"entry": "index.js",
"description": "Soopy addons v2",
"name": "SoopyV2",
- "version": "2.0.9",
- "versionId": 119,
+ "version": "2.0.10",
+ "versionId": 120,
"requires": [
"soopyApis",
"soopyAddonsData",