get Additional Args
Declares extra, per-instance parameters this entity type accepts — values baked into an individual entity's persistent data at creation, so two entities of the same type can carry different settings.
Override to declare the parameters (ordered name → PDC type pairs). They are then:
supplied positionally at spawn —
spawnEntity(location, listOf("5")), or via the built-in/emob <entity> <arg1> <arg2> …command (parsed in declared order);read back with additionalKey + EffectiveDataContainerUtils, typically inside editEntity or a behaviour.
override fun getAdditionalArgs() = AdditionalArgs(
ExamplePlugin.instance,
listOf("power" to PersistentDataType.INTEGER)
)
// reading it back:
val power = EffectiveDataContainerUtils.getContainerValue(
entity, additionalKey("power"), PersistentDataType.INTEGER
)Content copied to clipboard
Returns null (the default) for entities without extra parameters.