Fix up admin message typos

This commit is contained in:
libraryaddict 2015-02-27 21:12:31 +13:00
parent 9802c00ec5
commit d23d146f35
2 changed files with 20 additions and 30 deletions

View File

@ -320,8 +320,15 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
to.playSound(to.getLocation(), Sound.NOTE_PIANO, 2f, 2f);
String senderRank = F.rank(_clientManager.Get(to).GetRank());
String toRank = F.rank(_clientManager.Get(to).GetRank());
// Message the sender
RedisMessageCallback message = new RedisMessageCallback(globalMessage, true, to.getName(),
C.cPurple + "-> " + toRank + " " + to.getName() + " " + C.cPurple
+ globalMessage.getMessage());
// Inform Admins
for (Player staff : UtilServer.getPlayers())
{
@ -331,19 +338,11 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
UtilPlayer.message(staff,
globalMessage.getRank() + " " + globalMessage.getSender() + C.cPurple + " -> "
+ senderRank + " " + to.getName() + " "
+ C.cPurple + globalMessage.getMessage());
globalMessage.getRank() + " " + globalMessage.getSender() + C.cPurple + " " + message.getMessage());
}
}
}
// Message the sender
RedisMessageCallback message = new RedisMessageCallback(globalMessage, senderRank, to.getName(), C.cPurple + "-> "
+ senderRank + " " + to.getName() + " " + C.cPurple + globalMessage.getMessage());
message.publish();
}
else
@ -353,24 +352,24 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
if (canMessage != null)
{
RedisMessageCallback message = new RedisMessageCallback(globalMessage, null, null, canMessage);
RedisMessageCallback message = new RedisMessageCallback(globalMessage, false, null, canMessage);
message.publish();
return;
}
String message = C.cGold + "§l" + globalMessage.getSender() + " > " + to.getName() + C.cYellow + " §l" + globalMessage.getMessage();
// Message the receiver
UtilPlayer.message(to, C.cGold + "§l" + globalMessage.getSender() + " > " + to.getName() + C.cYellow + " §l"
+ globalMessage.getMessage());
UtilPlayer.message(to, message);
to.playSound(to.getLocation(), Sound.NOTE_PIANO, 2f, 2f);
// Message the sender
RedisMessageCallback message = new RedisMessageCallback(globalMessage, null, to.getName(), C.cGold + "§l"
+ globalMessage.getSender() + " > " + to.getName() + C.cYellow + " §l" + globalMessage.getMessage());
RedisMessageCallback redisMessage = new RedisMessageCallback(globalMessage, false, to.getName(), message);
message.publish();
redisMessage.publish();
}
}
@ -416,11 +415,7 @@ public class MessageManager extends MiniClientPlugin<ClientMessage>
{
UtilPlayer.message(staff,
recevierRank + " " + message.getLastReplied() + C.cPurple + " -> "
+ message.getRank() + " " + message.getLastReplied() + " "
+ C.cPurple + message.getMessage());
recevierRank + " " + target.getName() + " " + C.cPurple + message.getMessage());
}
}
}

View File

@ -12,16 +12,16 @@ public class RedisMessageCallback extends ServerCommand
private String _message;
private String _setLastMessage;
private String _target;
private String _rank;
private boolean _staffMessage;
private UUID _uuid;
public RedisMessageCallback(RedisMessage globalMessage, String rank, String receivedPlayer, String message)
public RedisMessageCallback(RedisMessage globalMessage, boolean staffMessage, String receivedPlayer, String message)
{
_target = globalMessage.getSender();
_message = message;
_setLastMessage = receivedPlayer;
_uuid = globalMessage.getUUID();
_rank = rank;
_staffMessage = staffMessage;
if (globalMessage.getSendingServer() != null)
{
@ -29,14 +29,9 @@ public class RedisMessageCallback extends ServerCommand
}
}
public String getRank()
{
return _rank;
}
public boolean isStaffMessage()
{
return getRank() != null;
return _staffMessage;
}
public String getLastReplied()