#1046 Add onFirstLogin to commands.yml
- Allow to configure commands run on player's first login (login of player with a previously null lastlogin date)
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
|
||||
|
||||
Reference in New Issue
Block a user