aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'features/globalSettings/index.js')
-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)
})