Package net.neoforged.testframework
Interface TestListener
@ParametersAreNonnullByDefault
public interface TestListener
A listener which listens for changes in tests.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TestListener
instantiate
(Class<? extends TestListener> clazz) default void
onDisabled
(TestFramework framework, Test test, Entity changer) This method is called when a test is disabled.default void
onEnabled
(TestFramework framework, Test test, Entity changer) This method is called when a test is enabled.default void
onStatusChange
(TestFramework framework, Test test, Test.Status oldStatus, Test.Status newStatus, Entity changer) This method is called when a test changes its status.
-
Method Details
-
onStatusChange
default void onStatusChange(TestFramework framework, Test test, Test.Status oldStatus, Test.Status newStatus, @Nullable Entity changer) This method is called when a test changes its status.- Parameters:
framework
- the framework of the testtest
- the test that changed its statusoldStatus
- the old status of the testnewStatus
- the new status of the testchanger
- the entity that changed the status of the test
-
onEnabled
This method is called when a test is enabled.- Parameters:
framework
- the framework of the testtest
- the test that was enabledchanger
- the entity that enabled the test
-
onDisabled
This method is called when a test is disabled.- Parameters:
framework
- the framework of the testtest
- the test that was disabledchanger
- the entity that disabled the test
-
instantiate
-