aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-29 12:06:18 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-05-29 12:06:18 +0800
commit9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b (patch)
treeaa20f5314241d517b0a50b123926077685fb700e /features/globalSettings
parenta6593709b0e1e99e241b6c163fe66623685b6efc (diff)
parent51cdd4ca4ea64e1a9a67b99c274693a54f7f535d (diff)
downloadSoopyV2-9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b.tar.gz
SoopyV2-9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b.tar.bz2
SoopyV2-9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b.zip
Merge branch 'master' of https://github.com/Soopyboo32/SoopyV2
Diffstat (limited to 'features/globalSettings')
-rw-r--r--features/globalSettings/index.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index b77fd0e..ef566c9 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -73,6 +73,27 @@ class GlobalSettings extends Feature {
this.registerEvent("tick", this.fixNEU)
}
+ try { //This enables links from soopymc.my.to to be shown in patcher image preview
+ let hasHost = false
+
+ for (let host of Java.type("gg.essential.util.TrustedHostsUtil").INSTANCE.getTrustedHosts()) {
+ if (host.getName() === "soopymc") {
+ hasHost = true
+ }
+ }
+
+ if (!hasHost) {
+ let TrustedHost = Java.type("gg.essential.api.utils.TrustedHostsUtil").TrustedHost
+ let TreeSet = Java.type("java.util.TreeSet")
+ let hosts = new TreeSet()
+ hosts.add("soopymc.my.to")
+
+ let host = new TrustedHost(124123, "soopymc", hosts)
+
+ Java.type("gg.essential.util.TrustedHostsUtil").INSTANCE.addTrustedHost(host)
+ }
+ } catch (e) { }
+
this.registerCommand("soopyweight", (user = Player.getName()) => {
this.soopyWeight(user)
})