File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
common/src/main/kotlin/me/scoretwo/fastscript Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
88}
99
1010group = " me.scoretwo"
11- version = " 1.1.4 -SNAPSHOT"
11+ version = " 1.1.5 -SNAPSHOT"
1212description = " FastScript is a Spigot plugin, which can run JavaScript-based scripts more efficiently."
1313
1414defaultTasks = mutableListOf (" ShadowJar" , " publishToMavenLocal" )
@@ -23,8 +23,8 @@ allprojects {
2323 jcenter()
2424 mavenCentral()
2525 mavenLocal()
26- maven(" http://repo.iroselle.com /repository/maven-snapshots/" )
27- maven(" http://repo.iroselle.com /repository/maven-public/" )
26+ maven(" http://mc3.roselle.vip:609 /repository/maven-snapshots/" )
27+ maven(" http://mc3.roselle.vip:609 /repository/maven-public/" )
2828 maven(" https://maven.aliyun.com/nexus/content/groups/public/" )
2929 maven(" https://nexus.velocitypowered.com/repository/velocity-artifacts-snapshots/" )
3030 maven(" https://repo.spongepowered.org/maven" )
Original file line number Diff line number Diff line change @@ -176,7 +176,11 @@ class ScriptManager {
176176
177177 // unload fileListener
178178 folders.forEach {
179- it.value.monitor?.stop()
179+ try {
180+ it.value.monitor?.stop()
181+ } catch (t: Throwable ) {
182+
183+ }
180184 }
181185
182186 val protects = mutableMapOf<String , CustomScript >()
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class ExpansionCommand: SimpleCommand(arrayOf("expansion")) {
4848 return true
4949 }
5050
51- val text = args.sliceArray(0 .. (if (! noReturn) args.size - 1 else args.size - 2 )).joinToString(" " )
51+ val text = args.sliceArray(0 .. (if (! noReturn) args.size - 1 else args.size - 2 )).joinToString(" " )
5252
5353 val result = expansion.eval(text, sender)
5454
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ class JavaScriptExpansion: TypeEngineExpansion() {
88 override val name = " JavaScript"
99 override val sign = " nashorn"
1010 override val fileSuffix = " js"
11- override val engine: ScriptEngine = NashornScriptEngineFactory ().scriptEngine
11+ override val engine: ScriptEngine = scriptEngineManager.getEngineByName( " nashorn " ) ? : NashornScriptEngineFactory ().scriptEngine
1212
1313}
You can’t perform that action at this time.
0 commit comments