Merge pull request #1430 from AuthMe/1046-onFirstLogin-in-commandsYml
#1046 Add onFirstLogin to commands.yml
This commit is contained in:
@@ -107,6 +107,21 @@ public class CommandManagerTest {
|
||||
verifyZeroInteractions(geoIpService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExecuteCommandsOnFirstLogin() {
|
||||
// given
|
||||
copyJarFileAsCommandsYml(TEST_FILES_FOLDER + "commands.complete.yml");
|
||||
initManager();
|
||||
|
||||
// when
|
||||
manager.runCommandsOnFirstLogin(player);
|
||||
|
||||
// then
|
||||
verify(bukkitService).dispatchConsoleCommand("pay Bobby 30");
|
||||
verifyNoMoreInteractions(bukkitService);
|
||||
verifyZeroInteractions(geoIpService);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExecuteCommandsOnJoin() {
|
||||
// given
|
||||
|
||||
@@ -25,6 +25,10 @@ onSessionLogin:
|
||||
welcome:
|
||||
command: 'msg %p Session login!'
|
||||
executor: CONSOLE
|
||||
onFirstLogin:
|
||||
give_money:
|
||||
command: 'pay %p 30'
|
||||
executor: CONSOLE
|
||||
onUnregister: {}
|
||||
onLogout:
|
||||
announce:
|
||||
|
||||
Reference in New Issue
Block a user