Added better success message to island team commands

#630
This commit is contained in:
Florian CUNY 2019-06-29 17:34:55 +02:00
parent a0785a79ec
commit 9fe43fe75c
7 changed files with 20 additions and 9 deletions

View File

@ -81,7 +81,7 @@ public class IslandTeamCoopCommand extends CompositeCommand {
Island island = getIslands().getIsland(getWorld(), user.getUniqueId()); Island island = getIslands().getIsland(getWorld(), user.getUniqueId());
if (island != null) { if (island != null) {
island.setRank(target, RanksManager.COOP_RANK); island.setRank(target, RanksManager.COOP_RANK);
user.sendMessage("general.success"); user.sendMessage("commands.island.team.coop.success", TextVariables.NAME, target.getName());
target.sendMessage("commands.island.team.coop.you-are-a-coop-member", TextVariables.NAME, user.getName()); target.sendMessage("commands.island.team.coop.you-are-a-coop-member", TextVariables.NAME, user.getName());
return true; return true;
} else { } else {

View File

@ -94,7 +94,7 @@ public class IslandTeamLeaveCommand extends ConfirmableCommand {
// Notify how many resets are left // Notify how many resets are left
showResets(user); showResets(user);
} }
user.sendMessage("general.success"); user.sendMessage("commands.island.team.leave.success");
// Fire event // Fire event
IslandBaseEvent e = TeamEvent.builder() IslandBaseEvent e = TeamEvent.builder()
.island(island) .island(island)
@ -103,5 +103,4 @@ public class IslandTeamLeaveCommand extends ConfirmableCommand {
.build(); .build();
Bukkit.getServer().getPluginManager().callEvent(e); Bukkit.getServer().getPluginManager().callEvent(e);
} }
} }

View File

@ -77,7 +77,7 @@ public class IslandTeamTrustCommand extends CompositeCommand {
Island island = getIslands().getIsland(getWorld(), user.getUniqueId()); Island island = getIslands().getIsland(getWorld(), user.getUniqueId());
if (island != null) { if (island != null) {
island.setRank(target, RanksManager.TRUSTED_RANK); island.setRank(target, RanksManager.TRUSTED_RANK);
user.sendMessage("general.success"); user.sendMessage("commands.island.team.trust.success", TextVariables.NAME, target.getName());
target.sendMessage("commands.island.team.trust.you-are-trusted", TextVariables.NAME, user.getName()); target.sendMessage("commands.island.team.trust.you-are-trusted", TextVariables.NAME, user.getName());
return true; return true;
} else { } else {

View File

@ -81,7 +81,7 @@ public class IslandTeamUncoopCommand extends CompositeCommand {
Island island = getIslands().getIsland(getWorld(), user.getUniqueId()); Island island = getIslands().getIsland(getWorld(), user.getUniqueId());
if (island != null) { if (island != null) {
island.removeMember(targetUUID); island.removeMember(targetUUID);
user.sendMessage("general.success"); user.sendMessage("commands.island.team.uncoop.success", TextVariables.NAME, target.getName());
target.sendMessage("commands.island.team.uncoop.you-are-no-longer-a-coop-member", TextVariables.NAME, user.getName()); target.sendMessage("commands.island.team.uncoop.you-are-no-longer-a-coop-member", TextVariables.NAME, user.getName());
// Set cooldown // Set cooldown
if (getSettings().getCoopCooldown() > 0 && getParent() != null) { if (getSettings().getCoopCooldown() > 0 && getParent() != null) {

View File

@ -81,7 +81,7 @@ public class IslandTeamUntrustCommand extends CompositeCommand {
Island island = getIslands().getIsland(getWorld(), user.getUniqueId()); Island island = getIslands().getIsland(getWorld(), user.getUniqueId());
if (island != null) { if (island != null) {
island.removeMember(targetUUID); island.removeMember(targetUUID);
user.sendMessage("general.success"); user.sendMessage("commands.island.team.untrust.success", TextVariables.NAME, target.getName());
target.sendMessage("commands.island.team.untrust.you-are-no-longer-trusted", TextVariables.NAME, user.getName()); target.sendMessage("commands.island.team.untrust.you-are-no-longer-trusted", TextVariables.NAME, user.getName());
// Set cooldown // Set cooldown
if (getSettings().getTrustCooldown() > 0 && getParent() != null) { if (getSettings().getTrustCooldown() > 0 && getParent() != null) {

View File

@ -415,6 +415,7 @@ commands:
cannot-coop-yourself: "&cYou cannot coop yourself!" cannot-coop-yourself: "&cYou cannot coop yourself!"
already-has-rank: "&cPlayer already has a rank!" already-has-rank: "&cPlayer already has a rank!"
you-are-a-coop-member: "&2You were cooped by [name]" you-are-a-coop-member: "&2You were cooped by [name]"
success: "&aYou cooped &b[name]."
uncoop: uncoop:
description: "remove a coop rank from player" description: "remove a coop rank from player"
parameters: "<player>" parameters: "<player>"
@ -423,20 +424,23 @@ commands:
player-not-cooped: "&cPlayer is not cooped!" player-not-cooped: "&cPlayer is not cooped!"
you-are-no-longer-a-coop-member: "&cYou are no longer a coop member of [name]'s island" you-are-no-longer-a-coop-member: "&cYou are no longer a coop member of [name]'s island"
all-members-logged-off: "&cAll island members logged off so you are no longer a coop member of [name]'s island" all-members-logged-off: "&cAll island members logged off so you are no longer a coop member of [name]'s island"
success: "&b[name] &ais no longer a coop member of your island."
trust: trust:
description: "give a player trusted rank on your island" description: "give a player trusted rank on your island"
parameters: "<player>" parameters: "<player>"
trust-in-yourself: "&cTrust in yourself!" trust-in-yourself: "&cTrust in yourself!"
members-trusted: "&cMembers are already trusted" members-trusted: "&cMembers are already trusted"
player-already-trusted: "&cPlayer is already trusted!" player-already-trusted: "&cPlayer is already trusted!"
you-are-trusted: "&2You are trusted by [name]!" you-are-trusted: "&2You are trusted by &b[name]&a!"
success: "&aYou trusted &b[name]&a."
untrust: untrust:
description: "remove trusted player rank from player" description: "remove trusted player rank from player"
parameters: "<player>" parameters: "<player>"
cannot-untrust-yourself: "&cYou cannot untrust yourself!" cannot-untrust-yourself: "&cYou cannot untrust yourself!"
cannot-untrust-member: "&cYou cannot untrust a team member!" cannot-untrust-member: "&cYou cannot untrust a team member!"
player-not-trusted: "&cPlayer is not trusted!" player-not-trusted: "&cPlayer is not trusted!"
you-are-no-longer-trusted: "&cYou are no longer trusted by [name]!" you-are-no-longer-trusted: "&cYou are no longer trusted by &b[name]&a!"
success: "&b[name] &ais no longer trusted on your island."
invite: invite:
description: "invite a player to join your island" description: "invite a player to join your island"
invitation-sent: "&aInvitation sent to [name]" invitation-sent: "&aInvitation sent to [name]"
@ -471,6 +475,7 @@ commands:
cannot-leave: "&cOwners cannot leave! Become a member first, or kick all members." cannot-leave: "&cOwners cannot leave! Become a member first, or kick all members."
description: "leave your island" description: "leave your island"
left-your-island: "&c[name] &cleft your island" left-your-island: "&c[name] &cleft your island"
success: "&aYou left this island."
kick: kick:
description: "remove a member from your island" description: "remove a member from your island"
parameters: "<player>" parameters: "<player>"

View File

@ -180,6 +180,13 @@ commands:
parameters: "<joueur>" parameters: "<joueur>"
setowner: setowner:
parameters: "<joueur>" parameters: "<joueur>"
leave:
cannot-leave: |
&cEn tant que propriétaire, vous ne pouvez pas quittez l'île.
&cVous devez d'abord devenir membre sur l'île ou en expulser les membres actuels.
description: "quittez votre île"
left-your-island: "&c[name] &ca quitté votre île."
success: "&aVous avez quitté l'île."
ban: ban:
parameters: "<joueur>" parameters: "<joueur>"
unban: unban: