From 841a2da73dc76c3481af6772b4f946081addd87b Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 3 Sep 2015 09:33:01 +0200 Subject: [PATCH] MassiveCore - Merged Message Methods --- .../massivecraft/factions/cmd/CmdFactionsAccessAbstract.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsCreate.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsHome.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsMap.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsMotd.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsName.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsPermList.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsStatus.java | 2 +- src/com/massivecraft/factions/engine/EngineMain.java | 4 ++-- src/com/massivecraft/factions/entity/MPerm.java | 4 ++-- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java index 6ddfa411..93f80cc8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java @@ -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("Host Faction: %s", hostFaction.describeTo(msender, true)); msg("Host Faction Allowed: %s", ta.isHostFactionAllowed() ? Txt.parse("TRUE") : Txt.parse("FALSE")); msg("Granted Players: %s", describeRelationParticipators(ta.getGrantedMPlayers(), msender)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java b/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java index c4a22bbf..6fa0b44f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java @@ -45,7 +45,7 @@ public class CmdFactionsAdmin extends FactionsCommand String messageYou = Txt.parse("%s %s admin bypass mode.", msender.getDisplayName(msender), desc); String messageLog = Txt.parse("%s %s admin bypass mode.", msender.getDisplayName(IdUtil.getConsole()), desc); - msender.sendMessage(messageYou); + msender.message(messageYou); Factions.get().log(messageLog); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java index 8fdc4e8b..9d7a02b9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java @@ -56,7 +56,7 @@ public class CmdFactionsCreate extends FactionsCommand ArrayList nameValidationErrors = FactionColl.get().validateName(newName); if (nameValidationErrors.size() > 0) { - sendMessage(nameValidationErrors); + message(nameValidationErrors); return; } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java index 497c5a74..b2cb019b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java @@ -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)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java index 21f606f9..ac74f914 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java @@ -75,7 +75,7 @@ public class CmdFactionsFlagSet extends FactionsCommand { // Send message to sender msg("%s set a flag for %s.", msender.describeTo(msender, true), faction.describeTo(msender, true)); - sendMessage(stateInfo); + message(stateInfo); } faction.msg("%s set a flag for %s.", msender.describeTo(faction, true), faction.describeTo(faction, true)); faction.sendMessage(stateInfo); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java index 2c15ac58..fb4e2616 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java @@ -54,7 +54,7 @@ public class CmdFactionsFlagShow extends FactionsCommand } // Send messages - sendMessage(messages); + message(messages); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java index 4e4fb16a..d59d8e4f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java @@ -73,7 +73,7 @@ public class CmdFactionsHome extends FactionsCommandHome if (MPerm.getPermSethome().has(msender, faction, false)) { msender.msg("You should:"); - msender.sendMessage(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getUseageTemplate()); + msender.message(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getUseageTemplate()); } return; diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java index f31bf833..723c73ba 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java @@ -78,7 +78,7 @@ public class CmdFactionsInviteList extends FactionsCommand }); // Send message - sendMessage(messages); + message(messages); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java index 780f887f..0f060e7d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java @@ -66,7 +66,7 @@ public class CmdFactionsMap extends FactionsCommand { Location location = me.getLocation(); List message = BoardColl.get().getMap(msenderFaction, PS.valueOf(location), location.getYaw(), width, height); - sendMessage(message); + message(message); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java index 2d525813..1a27fc42 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java @@ -40,7 +40,7 @@ public class CmdFactionsMotd extends FactionsCommand // Read if ( ! this.argIsSet(0)) { - sendMessage(msenderFaction.getMotdMessages()); + message(msenderFaction.getMotdMessages()); return; } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsName.java b/src/com/massivecraft/factions/cmd/CmdFactionsName.java index 23f03e11..ffef356f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsName.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsName.java @@ -57,7 +57,7 @@ public class CmdFactionsName extends FactionsCommand errors.addAll(FactionColl.get().validateName(newName)); if (errors.size() > 0) { - sendMessage(errors); + message(errors); return; } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java index e36a19ef..511eacb1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java @@ -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)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java index 7cb05b9a..567ab07b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java @@ -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 recipients = faction.getMPlayers(); @@ -92,7 +92,7 @@ public class CmdFactionsPermSet extends FactionsCommand for (MPlayer recipient : recipients) { messages.add(0, Txt.parse("%s set a perm for %s.", msender.describeTo(recipient, true), faction.describeTo(recipient, true))); - recipient.sendMessage(messages); + recipient.message(messages); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java index 8356c578..baf5ac17 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java @@ -56,7 +56,7 @@ public class CmdFactionsPermShow extends FactionsCommand } // Send messages - sendMessage(messages); + message(messages); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java index 2fc5e1d3..9e208c3f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java @@ -113,7 +113,7 @@ public class CmdFactionsStatus extends FactionsCommand }); // Send message - sendMessage(messages); + message(messages); } } diff --git a/src/com/massivecraft/factions/engine/EngineMain.java b/src/com/massivecraft/factions/engine/EngineMain.java index 7059ef0a..aab040cd 100644 --- a/src/com/massivecraft/factions/engine/EngineMain.java +++ b/src/com/massivecraft/factions/engine/EngineMain.java @@ -571,7 +571,7 @@ public class EngineMain extends EngineAbstract for (Faction nearbyFaction : nearbyFactions) { if (claimnear.has(newFaction, nearbyFaction)) continue; - msender.sendMessage(claimnear.createDeniedMessage(msender, nearbyFaction)); + msender.message(claimnear.createDeniedMessage(msender, nearbyFaction)); event.setCancelled(true); return; } @@ -691,7 +691,7 @@ public class EngineMain extends EngineAbstract if (mplayer.isMapAutoUpdating()) { List message = BoardColl.get().getMap(mplayer, chunkTo, player.getLocation().getYaw(), Const.MAP_WIDTH, Const.MAP_HEIGHT); - mplayer.sendMessage(message); + mplayer.message(message); } else if (factionFrom != factionTo) { diff --git a/src/com/massivecraft/factions/entity/MPerm.java b/src/com/massivecraft/factions/entity/MPerm.java index ec6e3681..362f912e 100644 --- a/src/com/massivecraft/factions/entity/MPerm.java +++ b/src/com/massivecraft/factions/entity/MPerm.java @@ -359,7 +359,7 @@ public class MPerm extends Entity implements Prioritized, Registerable Rel rel = mplayer.getRelationTo(hostFaction); if (hostFaction.isPermitted(this, rel)) return true; - if (verboose) mplayer.sendMessage(this.createDeniedMessage(mplayer, hostFaction)); + if (verboose) mplayer.message(this.createDeniedMessage(mplayer, hostFaction)); return false; } @@ -382,7 +382,7 @@ public class MPerm extends Entity implements Prioritized, Registerable { if (verboose && !hasTerritoryAccess) { - mplayer.sendMessage(this.createDeniedMessage(mplayer, hostFaction)); + mplayer.message(this.createDeniedMessage(mplayer, hostFaction)); } return hasTerritoryAccess; }