mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 00:38:11 +00:00
Update to Kotlin 1.60 and Gradle 4.9
Removes the dependency on legacy script compilation and now relies on script discovery. In addition, the Gradle build scripts were refactored and updated to be compatible with Gradle 5.0 and make use of the new java-library configurations.
This commit is contained in:
@@ -3,7 +3,6 @@ package org.apollo.game.model.entity.attr;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jruby.RubySymbol;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
@@ -118,8 +117,6 @@ public final class AttributeMap {
|
||||
return new NumericalAttribute((Double) value);
|
||||
case STRING:
|
||||
return new StringAttribute((String) value);
|
||||
case SYMBOL:
|
||||
return new StringAttribute(((RubySymbol) value).asJavaString(), true);
|
||||
case BOOLEAN:
|
||||
return new BooleanAttribute((Boolean) value);
|
||||
}
|
||||
|
||||
@@ -13,11 +13,11 @@ import org.apollo.game.model.event.PlayerEvent
|
||||
import org.apollo.game.plugin.PluginContext
|
||||
import org.apollo.net.message.Message
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.script.templates.ScriptTemplateDefinition
|
||||
import kotlin.script.experimental.annotations.KotlinScript
|
||||
import kotlin.script.experimental.annotations.KotlinScriptFileExtension
|
||||
|
||||
@ScriptTemplateDefinition(
|
||||
scriptFilePattern = ".*\\.plugin\\.kts"
|
||||
)
|
||||
@KotlinScript("Apollo Plugin Script")
|
||||
@KotlinScriptFileExtension("plugin.kts")
|
||||
abstract class KotlinPluginScript(private var world: World, val context: PluginContext) {
|
||||
var startListener: (World) -> Unit = { _ -> }
|
||||
var stopListener: (World) -> Unit = { _ -> }
|
||||
|
||||
Reference in New Issue
Block a user