#1218 Add onLogout to commands.yml
This commit is contained in:
@@ -150,6 +150,21 @@ public class CommandManagerTest {
|
||||
verifyNoMoreInteractions(bukkitService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExecuteCommandOnLogout() {
|
||||
// given
|
||||
copyJarFileAsCommandsYml(TEST_FILES_FOLDER + "commands.complete.yml");
|
||||
initManager();
|
||||
|
||||
// when
|
||||
manager.runCommandsOnLogout(player);
|
||||
|
||||
// then
|
||||
verify(bukkitService).dispatchConsoleCommand("broadcast Bobby (127.0.0.3) logged out");
|
||||
verifyNoMoreInteractions(bukkitService);
|
||||
verifyZeroInteractions(geoIpService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExecuteCommandsOnRegisterWithIncompleteConfig() {
|
||||
// given
|
||||
|
||||
@@ -25,3 +25,7 @@ onSessionLogin:
|
||||
welcome:
|
||||
command: 'msg %p Session login!'
|
||||
executor: CONSOLE
|
||||
onLogout:
|
||||
announce:
|
||||
command: 'broadcast %p (%ip) logged out'
|
||||
executor: CONSOLE
|
||||
|
||||
Reference in New Issue
Block a user