mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 06:36:44 +01:00
Add toggle allowing to opt out nashorn
This commit is contained in:
parent
a01ad5aa04
commit
ce287cf218
@ -42,7 +42,7 @@ dependencies {
|
|||||||
compile("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT"){ transitive = false }
|
compile("se.hyperver.hyperverse:Core:0.6.0-SNAPSHOT"){ transitive = false }
|
||||||
compile('com.sk89q:squirrelid:1.0.0-SNAPSHOT'){ transitive = false }
|
compile('com.sk89q:squirrelid:1.0.0-SNAPSHOT'){ transitive = false }
|
||||||
compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1'){ transitive = false }
|
compile('be.maximvdw:MVdWPlaceholderAPI:3.1.1'){ transitive = false }
|
||||||
implementation("org.incendo.serverlib:ServerLib:2.1.0")
|
implementation("org.incendo.serverlib:ServerLib:2.2.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
@ -102,7 +102,7 @@ shadowJar {
|
|||||||
include(dependency("org.khelekore:prtree:1.7.0-SNAPSHOT"))
|
include(dependency("org.khelekore:prtree:1.7.0-SNAPSHOT"))
|
||||||
include(dependency("com.sk89q:squirrelid:1.0.0-SNAPSHOT"))
|
include(dependency("com.sk89q:squirrelid:1.0.0-SNAPSHOT"))
|
||||||
include(dependency("com.intellectualsites.paster:Paster:1.0.2-SNAPSHOT"))
|
include(dependency("com.intellectualsites.paster:Paster:1.0.2-SNAPSHOT"))
|
||||||
include(dependency("org.incendo.serverlib:ServerLib:2.1.0"))
|
include(dependency("org.incendo.serverlib:ServerLib:2.2.0"))
|
||||||
}
|
}
|
||||||
relocate('net.kyori.text', 'com.plotsquared.formatting.text')
|
relocate('net.kyori.text', 'com.plotsquared.formatting.text')
|
||||||
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
|
relocate("io.papermc.lib", "com.plotsquared.bukkit.paperlib")
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.incendo.serverlib</groupId>
|
<groupId>org.incendo.serverlib</groupId>
|
||||||
<artifactId>ServerLib</artifactId>
|
<artifactId>ServerLib</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>2.2.0</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -109,8 +109,10 @@ public class DebugExec extends SubCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ScriptEngine getEngine() {
|
public ScriptEngine getEngine() {
|
||||||
if (this.engine == null) {
|
if (!Settings.Enabled_Components.DISABLE_NASHORN_SCRIPT_ENGINE) {
|
||||||
init();
|
if (this.engine == null) {
|
||||||
|
init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return this.engine;
|
return this.engine;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,6 @@ public class MainCommand extends Command {
|
|||||||
new Music();
|
new Music();
|
||||||
new DebugRoadRegen();
|
new DebugRoadRegen();
|
||||||
new Trust();
|
new Trust();
|
||||||
new DebugExec();
|
|
||||||
new FlagCommand();
|
new FlagCommand();
|
||||||
new Target();
|
new Target();
|
||||||
new Move();
|
new Move();
|
||||||
@ -139,6 +138,10 @@ public class MainCommand extends Command {
|
|||||||
// Referenced commands
|
// Referenced commands
|
||||||
instance.toggle = new Toggle();
|
instance.toggle = new Toggle();
|
||||||
instance.help = new Help(instance);
|
instance.help = new Help(instance);
|
||||||
|
|
||||||
|
if (!Settings.Enabled_Components.DISABLE_NASHORN_SCRIPT_ENGINE) {
|
||||||
|
new DebugExec();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
@ -593,6 +593,12 @@ public class Settings extends Config {
|
|||||||
public static List<String> TAB_COMPLETED_ALIASES = Arrays.asList("plot", "plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap");
|
public static List<String> TAB_COMPLETED_ALIASES = Arrays.asList("plot", "plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap");
|
||||||
@Comment("Whether PlotSquared should hook into MvDWPlaceholderAPI or not")
|
@Comment("Whether PlotSquared should hook into MvDWPlaceholderAPI or not")
|
||||||
public static boolean USE_MVDWAPI = true;
|
public static boolean USE_MVDWAPI = true;
|
||||||
|
@Comment({"Whether the Nashorn scripting engine should be enabled or not. Disabling this will ensure compatibility with Java 15+ by sacrificing scripting via Nashorn.",
|
||||||
|
"This is a temporary option going to be removed within the next major release (1.17/v6) where this issue has been addressed sanely without sacrifices but allowing you to update your Java version beforehand without loosing half of PlotSquared's commands.",
|
||||||
|
"By setting the following to true you eliminate:",
|
||||||
|
" - The functionality to use javascript in the worlds.yml prices' section",
|
||||||
|
" - The `/plot debugexec` command"})
|
||||||
|
public static boolean DISABLE_NASHORN_SCRIPT_ENGINE = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user