Added a better "not-in-team" message for AdminTeamKickCommand

#577
This commit is contained in:
Florian CUNY 2019-02-24 11:22:33 +01:00
parent 73417fd990
commit 7da7dd4884
3 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ public class AdminTeamKickCommand extends CompositeCommand {
return false; return false;
} }
if (!getIslands().inTeam(getWorld(), targetUUID)) { if (!getIslands().inTeam(getWorld(), targetUUID)) {
user.sendMessage("general.errors.not-in-team"); user.sendMessage("commands.admin.team.kick.not-in-team");
return false; return false;
} }

View File

@ -74,6 +74,7 @@ commands:
parameters: "<team player>" parameters: "<team player>"
description: "kick a player from a team" description: "kick a player from a team"
cannot-kick-owner: "&cYou cannot kick the owner. Kick members first." cannot-kick-owner: "&cYou cannot kick the owner. Kick members first."
not-in-team: "&cThis player is not in a team."
admin-kicked: "&cThe admin kicked you from the team." admin-kicked: "&cThe admin kicked you from the team."
setowner: setowner:
parameters: "<player>" parameters: "<player>"

View File

@ -157,7 +157,7 @@ public class AdminTeamKickCommandTest {
when(pm.getUUID(Mockito.any())).thenReturn(notUUID); when(pm.getUUID(Mockito.any())).thenReturn(notUUID);
when(im.getMembers(Mockito.any(), Mockito.any())).thenReturn(new HashSet<>()); when(im.getMembers(Mockito.any(), Mockito.any())).thenReturn(new HashSet<>());
assertFalse(itl.canExecute(user, itl.getLabel(), Arrays.asList(name))); assertFalse(itl.canExecute(user, itl.getLabel(), Arrays.asList(name)));
Mockito.verify(user).sendMessage(Mockito.eq("general.errors.not-in-team")); Mockito.verify(user).sendMessage(Mockito.eq("commands.admin.team.kick.not-in-team"));
} }
/** /**