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.
 
 
 
 
openrs2/archive/src/main/kotlin/org/openrs2/archive/web/ByteUnitsExpressionFactory.kt

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
}
}