MassiveCore - Merged Message Methods

This commit is contained in:
Olof Larsson
2015-09-03 09:33:01 +02:00
parent 47d852ed3d
commit 841a2da73d
17 changed files with 20 additions and 20 deletions

View File

@@ -53,7 +53,7 @@ public abstract class CmdFactionsAccessAbstract extends FactionsCommand
public void sendAccessInfo()
{
sendMessage(Txt.titleize("Access at " + chunk.toString(PSFormatHumanSpace.get())));
message(Txt.titleize("Access at " + chunk.toString(PSFormatHumanSpace.get())));
msg("<k>Host Faction: %s", hostFaction.describeTo(msender, true));
msg("<k>Host Faction Allowed: %s", ta.isHostFactionAllowed() ? Txt.parse("<lime>TRUE") : Txt.parse("<rose>FALSE"));
msg("<k>Granted Players: %s", describeRelationParticipators(ta.getGrantedMPlayers(), msender));

View File

@@ -45,7 +45,7 @@ public class CmdFactionsAdmin extends FactionsCommand
String messageYou = Txt.parse("<i>%s %s <i>admin bypass mode.", msender.getDisplayName(msender), desc);
String messageLog = Txt.parse("<i>%s %s <i>admin bypass mode.", msender.getDisplayName(IdUtil.getConsole()), desc);
msender.sendMessage(messageYou);
msender.message(messageYou);
Factions.get().log(messageLog);
}

View File

@@ -56,7 +56,7 @@ public class CmdFactionsCreate extends FactionsCommand
ArrayList<String> nameValidationErrors = FactionColl.get().validateName(newName);
if (nameValidationErrors.size() > 0)
{
sendMessage(nameValidationErrors);
message(nameValidationErrors);
return;
}

View File

@@ -48,7 +48,7 @@ public class CmdFactionsFlagList extends FactionsCommand
}
//Send messages
sendMessage(Txt.getPage(messages, page, "Available Faction Flags", sender));
message(Txt.getPage(messages, page, "Available Faction Flags", sender));
}
}

View File

@@ -75,7 +75,7 @@ public class CmdFactionsFlagSet extends FactionsCommand
{
// Send message to sender
msg("<h>%s <i>set a flag for <h>%s<i>.", msender.describeTo(msender, true), faction.describeTo(msender, true));
sendMessage(stateInfo);
message(stateInfo);
}
faction.msg("<h>%s <i>set a flag for <h>%s<i>.", msender.describeTo(faction, true), faction.describeTo(faction, true));
faction.sendMessage(stateInfo);

View File

@@ -54,7 +54,7 @@ public class CmdFactionsFlagShow extends FactionsCommand
}
// Send messages
sendMessage(messages);
message(messages);
}
}

View File

@@ -73,7 +73,7 @@ public class CmdFactionsHome extends FactionsCommandHome
if (MPerm.getPermSethome().has(msender, faction, false))
{
msender.msg("<i>You should:");
msender.sendMessage(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getUseageTemplate());
msender.message(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getUseageTemplate());
}
return;

View File

@@ -78,7 +78,7 @@ public class CmdFactionsInviteList extends FactionsCommand
});
// Send message
sendMessage(messages);
message(messages);
}
}

View File

@@ -66,7 +66,7 @@ public class CmdFactionsMap extends FactionsCommand
{
Location location = me.getLocation();
List<String> message = BoardColl.get().getMap(msenderFaction, PS.valueOf(location), location.getYaw(), width, height);
sendMessage(message);
message(message);
}
}

View File

@@ -40,7 +40,7 @@ public class CmdFactionsMotd extends FactionsCommand
// Read
if ( ! this.argIsSet(0))
{
sendMessage(msenderFaction.getMotdMessages());
message(msenderFaction.getMotdMessages());
return;
}

View File

@@ -57,7 +57,7 @@ public class CmdFactionsName extends FactionsCommand
errors.addAll(FactionColl.get().validateName(newName));
if (errors.size() > 0)
{
sendMessage(errors);
message(errors);
return;
}

View File

@@ -48,7 +48,7 @@ public class CmdFactionsPermList extends FactionsCommand
}
// Send messages
sendMessage(Txt.getPage(messages, page, "Available Faction Perms", sender));
message(Txt.getPage(messages, page, "Available Faction Perms", sender));
}
}

View File

@@ -83,7 +83,7 @@ public class CmdFactionsPermSet extends FactionsCommand
messages.add(Txt.titleize("Perm for " + faction.describeTo(msender, true)));
messages.add(MPerm.getStateHeaders());
messages.add(Txt.parse(perm.getStateInfo(faction.getPermitted(perm), true)));
sendMessage(messages);
message(messages);
// Inform faction (their message is slighly different)
List<MPlayer> recipients = faction.getMPlayers();
@@ -92,7 +92,7 @@ public class CmdFactionsPermSet extends FactionsCommand
for (MPlayer recipient : recipients)
{
messages.add(0, Txt.parse("<h>%s <i>set a perm for <h>%s<i>.", msender.describeTo(recipient, true), faction.describeTo(recipient, true)));
recipient.sendMessage(messages);
recipient.message(messages);
}
}

View File

@@ -56,7 +56,7 @@ public class CmdFactionsPermShow extends FactionsCommand
}
// Send messages
sendMessage(messages);
message(messages);
}
}

View File

@@ -113,7 +113,7 @@ public class CmdFactionsStatus extends FactionsCommand
});
// Send message
sendMessage(messages);
message(messages);
}
}