Search in sources :

Example 1 with EzySimpleUserRemovedEvent

use of com.tvd12.ezyfoxserver.event.EzySimpleUserRemovedEvent in project ezyfox-server by youngmonkeys.

the class EzySimpleAppUserDelegate method handleUserRemovedEvent.

protected void handleUserRemovedEvent(EzyUser user, EzyConstant reason) {
    EzyEvent event = new EzySimpleUserRemovedEvent(user, reason);
    appContext.handleEvent(EzyEventType.USER_REMOVED, event);
}
Also used : EzyEvent(com.tvd12.ezyfoxserver.event.EzyEvent) EzySimpleUserRemovedEvent(com.tvd12.ezyfoxserver.event.EzySimpleUserRemovedEvent)

Example 2 with EzySimpleUserRemovedEvent

use of com.tvd12.ezyfoxserver.event.EzySimpleUserRemovedEvent in project ezyfox-server by youngmonkeys.

the class EzyDisconnectEventImplTest method test.

@Test
public void test() {
    EzyUser user = newUser();
    EzyUserRemovedEvent event = new EzySimpleUserRemovedEvent(user, EzyDisconnectReason.IDLE);
    assert event.getUser() == user;
    assert event.getReason() == EzyDisconnectReason.IDLE;
}
Also used : EzyUser(com.tvd12.ezyfoxserver.entity.EzyUser) EzyUserRemovedEvent(com.tvd12.ezyfoxserver.event.EzyUserRemovedEvent) EzySimpleUserRemovedEvent(com.tvd12.ezyfoxserver.event.EzySimpleUserRemovedEvent) BaseCoreTest(com.tvd12.ezyfoxserver.testing.BaseCoreTest) Test(org.testng.annotations.Test)

Aggregations

EzySimpleUserRemovedEvent (com.tvd12.ezyfoxserver.event.EzySimpleUserRemovedEvent)2 EzyUser (com.tvd12.ezyfoxserver.entity.EzyUser)1 EzyEvent (com.tvd12.ezyfoxserver.event.EzyEvent)1 EzyUserRemovedEvent (com.tvd12.ezyfoxserver.event.EzyUserRemovedEvent)1 BaseCoreTest (com.tvd12.ezyfoxserver.testing.BaseCoreTest)1 Test (org.testng.annotations.Test)1