diff --git a/nms/nms-common/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/gui/ExternGuiTester.kt b/nms/nms-common/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/gui/ExternGuiTester.kt index 9cb481e..c709954 100644 --- a/nms/nms-common/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/gui/ExternGuiTester.kt +++ b/nms/nms-common/src/main/kotlin/xyz/alexcrea/cuanvil/dependency/gui/ExternGuiTester.kt @@ -10,13 +10,16 @@ interface ExternGuiTester { fun testIfGui(inventory: 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 val clazz = getContainerClass(inventory) ?: return false val clazzName = clazz.name + //TODO maybe instead of testing non default, better to be testing we are default ? if (expectWesjd(clazzName)) return true if (expectXenondevUI(clazzName)) return true + if (expectVanePortal(clazzName)) return true return false } @@ -37,5 +40,10 @@ interface ExternGuiTester { && name.endsWith(XenondevUISufix) } + fun expectVanePortal(name: String): Boolean { + val expected = "org.oddlama.vane.core.menu.AnvilMenu\$AnvilContainer" + + return name == expected + } } \ No newline at end of file