mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-24 17:47:44 +01:00
Fixed bug with silent toggle, cleaned up message informing players about /tpback
This commit is contained in:
parent
a22c04a725
commit
7a234a1be6
@ -210,9 +210,17 @@ private static HashMap<String, Player> hidden = new HashMap<String, Player>();
|
||||
}
|
||||
public static int silent(Player player, String[] args){
|
||||
if(player.canUseCommand("/silent")){
|
||||
vMinecraftUsers.getProfile(player).setSilent();
|
||||
player.sendMessage(Colors.DarkPurple + "You are now silent");
|
||||
return EXIT_SUCCESS;
|
||||
if(!vMinecraftUsers.getProfile(player).isSilent()){
|
||||
vMinecraftUsers.getProfile(player).setSilent();
|
||||
player.sendMessage(Colors.DarkPurple + "You are now silent... shh");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
if(vMinecraftUsers.getProfile(player).isSilent()){
|
||||
vMinecraftUsers.getProfile(player).disableSilent();
|
||||
player.sendMessage(Colors.DarkPurple + "You are no longer silent");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
return EXIT_FAIL;
|
||||
}
|
||||
return EXIT_FAIL;
|
||||
}
|
||||
@ -1174,7 +1182,8 @@ private static HashMap<String, Player> hidden = new HashMap<String, Player>();
|
||||
String xyz = x2+","+y2+","+z2;
|
||||
vMinecraftUsers.getProfile(player).setTpback(xyz);
|
||||
if(player.canUseCommand("/tpback")){
|
||||
player.sendMessage(Colors.DarkPurple + "Your previous location has been stored, use /tpback to return.");
|
||||
player.sendMessage(Colors.DarkPurple + "Your previous location has been stored");
|
||||
player.sendMessage(Colors.DarkPurple + "Use /tpback to return");
|
||||
}
|
||||
if(!vMinecraftUsers.getProfile(player).isSilent()){
|
||||
vMinecraftChat.gmsg( player, vMinecraftChat.getName(player)
|
||||
@ -1270,7 +1279,8 @@ private static HashMap<String, Player> hidden = new HashMap<String, Player>();
|
||||
vMinecraftUsers.getProfile(playerTarget).setTpback(xyz);
|
||||
if(playerTarget.canUseCommand("/tpback"))
|
||||
{
|
||||
playerTarget.sendMessage(Colors.DarkPurple + "Your previous location has been stored, use /tpback to return.");
|
||||
player.sendMessage(Colors.DarkPurple + "Your previous location has been stored");
|
||||
player.sendMessage(Colors.DarkPurple + "Use /tpback to return");
|
||||
}
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
|
@ -517,12 +517,7 @@ class PlayerList
|
||||
silent = false;
|
||||
}
|
||||
public boolean isSilent(){
|
||||
if(silent == true){
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
return silent;
|
||||
}
|
||||
//Store the player's party
|
||||
public void setParty(String newParty)
|
||||
|
Loading…
Reference in New Issue
Block a user