Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
727 B
25 lines
727 B
package org.openrs2.archive.web
|
|
|
|
import org.thymeleaf.context.IExpressionContext
|
|
import org.thymeleaf.expression.IExpressionObjectFactory
|
|
|
|
public object ByteUnitsExpressionFactory : IExpressionObjectFactory {
|
|
private const val NAME = "byteunits"
|
|
private val ALL_NAMES = setOf(NAME)
|
|
|
|
override fun getAllExpressionObjectNames(): Set<String> {
|
|
return ALL_NAMES
|
|
}
|
|
|
|
override fun buildObject(context: IExpressionContext, expressionObjectName: String): Any? {
|
|
return if (expressionObjectName == NAME) {
|
|
ByteUnits
|
|
} else {
|
|
null
|
|
}
|
|
}
|
|
|
|
override fun isCacheable(expressionObjectName: String): Boolean {
|
|
return expressionObjectName == NAME
|
|
}
|
|
}
|
|
|