Added better success message to island expel command

#630
This commit is contained in:
Florian CUNY 2019-06-29 18:07:47 +02:00
parent 9fe43fe75c
commit c09ff50604
3 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,7 @@ import java.util.UUID;
public class IslandExpelCommand extends CompositeCommand {
private static final String CANNOT_EXPEL = "commands.island.expel.cannot-expel";
private static final String SUCCESS = "general.success";
private static final String SUCCESS = "commands.island.expel.success";
private @Nullable User target;
@ -110,13 +110,13 @@ public class IslandExpelCommand extends CompositeCommand {
island.getWorld().playSound(target.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 1F, 1F);
if (getIslands().hasIsland(getWorld(), target)) {
// Success
user.sendMessage(SUCCESS);
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName());
// Teleport home
getIslands().homeTeleport(getWorld(), target.getPlayer());
return true;
} else if (getIslands().getSpawn(getWorld()).isPresent()){
// Success
user.sendMessage(SUCCESS);
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName());
getIslands().spawnTeleport(getWorld(), target.getPlayer());
return true;
} else if (getIWM().getAddon(getWorld())
@ -126,7 +126,7 @@ public class IslandExpelCommand extends CompositeCommand {
.orElse(false)
&& target.performCommand(this.getTopLabel() + " create")) {
getAddon().logWarning("Expel: " + target.getName() + " had no island, so one was created");
user.sendMessage(SUCCESS);
user.sendMessage(SUCCESS, TextVariables.NAME, target.getName());
return true;
}

View File

@ -536,6 +536,7 @@ commands:
cannot-ban-member: "&cYou cannot expel a team member!"
not-on-island: "&cThat player is not on your island!"
player-expelled-you: "&b[name]&c expelled you from the island!"
success: "&aYou expelled &b[name] &afrom the island."
ranks:
owner: "Owner"

View File

@ -197,6 +197,7 @@ commands:
description: "sélectionne la langue"
expel:
parameters: "<joueur>"
success: "&aVous avez expulsé &b[name] &ade votre île."
ranks:
owner: "Propriétaire"