mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 11:17:19 +00:00
Support npc and object definitions in plugin tests
This commit is contained in:
1 parent
71158b3b5e
commit
86fba62ab9
10 files changed
+182
-72
No files matched your search
@@ -22,7 +22,11 @@ object Definitions {
|
||||
}
|
||||
|
||||
fun npc(id: Int): NpcDefinition? {
|
||||
return NpcDefinition.lookup(id)
|
||||
try {
|
||||
return NpcDefinition.lookup(id)
|
||||
} catch (e: NullPointerException) {
|
||||
throw RuntimeException("Failed to find npc $id: count=${NpcDefinition.count()}")
|
||||
}
|
||||
}
|
||||
|
||||
fun npc(name: String): NpcDefinition? {
|
||||
|
||||
Reference in new issue
Block a user