mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
big cleanup & update legacy code
This commit is contained in:
parent
eaa9adf213
commit
6ede990987
38 changed files with 282 additions and 312 deletions
|
|
@ -6,14 +6,14 @@ interface ExternGuiTester {
|
|||
|
||||
val wesjdAnvilGuiName: String?
|
||||
|
||||
fun getContainerClass(inventory: InventoryView): Class<Any>?
|
||||
fun getContainerClass(view: InventoryView): Class<Any>?
|
||||
|
||||
fun testIfGui(inventory: InventoryView): Boolean {
|
||||
fun testIfGui(view: InventoryView): Boolean {
|
||||
// this mean we are on test
|
||||
//TODO review why needed knowing previous mitigations should works
|
||||
if(inventory.javaClass.name.endsWith("AnvilViewMock")) return false
|
||||
if(view.javaClass.name.endsWith("AnvilViewMock")) return false
|
||||
|
||||
val clazz = getContainerClass(inventory) ?: return false
|
||||
val clazz = getContainerClass(view) ?: return false
|
||||
|
||||
val clazzName = clazz.name
|
||||
//TODO maybe instead of testing non default, better to be testing we are default ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue