Using playerMsg(final String message) instead of playerMsg(final CommandSender sender, final String message) when possible.

This commit is contained in:
StevenLawson 2014-08-14 15:49:48 -04:00
parent 48fd4c590d
commit a1c11f4e0f
6 changed files with 32 additions and 32 deletions

View File

@ -58,7 +58,7 @@ public class Command_glist extends TFM_Command
if (entry == null)
{
playerMsg(sender, "Can't find that user. If target is not logged in, make sure that you spelled the name exactly.");
playerMsg("Can't find that user. If target is not logged in, make sure that you spelled the name exactly.");
return true;
}

View File

@ -64,7 +64,7 @@ public class Command_halt extends TFM_Command
{
if (count == 0)
{
playerMsg(sender, "Halted players:");
playerMsg("Halted players:");
}
playerMsg("- " + hp.getName());
count++;

View File

@ -49,17 +49,17 @@ public class Command_invis extends TFM_Command
if (players.isEmpty())
{
playerMsg(sender, "There are no invisible players");
playerMsg("There are no invisible players");
return true;
}
if (smite)
{
playerMsg(sender, "Smitten " + smites + " players");
playerMsg("Smitten " + smites + " players");
}
else
{
playerMsg(sender, "Invisble players (" + players.size() + "): " + StringUtils.join(players, ", "));
playerMsg("Invisble players (" + players.size() + "): " + StringUtils.join(players, ", "));
}
return true;

View File

@ -47,22 +47,22 @@ public class Command_permban extends TFM_Command
{
if (TFM_PermbanList.getPermbannedPlayers().isEmpty())
{
playerMsg(sender, "No permanently banned player names.");
playerMsg("No permanently banned player names.");
}
else
{
playerMsg(sender, TFM_PermbanList.getPermbannedPlayers().size() + " permanently banned players:");
playerMsg(sender, StringUtils.join(TFM_PermbanList.getPermbannedPlayers(), ", "));
playerMsg(TFM_PermbanList.getPermbannedPlayers().size() + " permanently banned players:");
playerMsg(StringUtils.join(TFM_PermbanList.getPermbannedPlayers(), ", "));
}
if (TFM_PermbanList.getPermbannedIps().isEmpty())
{
playerMsg(sender, "No permanently banned IPs.");
playerMsg("No permanently banned IPs.");
}
else
{
playerMsg(sender, TFM_PermbanList.getPermbannedIps().size() + " permanently banned IPs:");
playerMsg(sender, StringUtils.join(TFM_PermbanList.getPermbannedIps(), ", "));
playerMsg(TFM_PermbanList.getPermbannedIps().size() + " permanently banned IPs:");
playerMsg(StringUtils.join(TFM_PermbanList.getPermbannedIps(), ", "));
}
}
}

View File

@ -141,7 +141,7 @@ public class Command_toggle extends TFM_Command
}
catch (NumberFormatException ex)
{
playerMsg(sender, ex.getMessage());
playerMsg(ex.getMessage());
return true;
}
}

View File

@ -18,7 +18,7 @@ public class Command_twitter extends TFM_Command
{
if (!TFM_ConfigEntry.TWITTERBOT_ENABLED.getBoolean())
{
playerMsg(sender, "TwitterBot has been disabled in config.", ChatColor.RED);
playerMsg("TwitterBot has been disabled in config.", ChatColor.RED);
return true;
}
@ -36,7 +36,7 @@ public class Command_twitter extends TFM_Command
if (args[1].startsWith("@"))
{
playerMsg(sender, "Please do not prefix your twitter username with '@'");
playerMsg("Please do not prefix your twitter username with '@'");
return true;
}
@ -44,28 +44,28 @@ public class Command_twitter extends TFM_Command
if ("ok".equals(reply))
{
playerMsg(sender, "Your twitter handle has been set to: " + ChatColor.AQUA + "@" + args[1] + ChatColor.GRAY + ".");
playerMsg("Your twitter handle has been set to: " + ChatColor.AQUA + "@" + args[1] + ChatColor.GRAY + ".");
}
else if ("disabled".equals(reply))
{
playerMsg(sender, "TwitterBot has been temporarily disabled,, please wait until it get re-enabled", ChatColor.RED);
playerMsg("TwitterBot has been temporarily disabled,, please wait until it get re-enabled", ChatColor.RED);
}
else if ("failed".equals(reply))
{
playerMsg(sender, "There was a problem querying the database, please let a developer know.", ChatColor.RED);
playerMsg("There was a problem querying the database, please let a developer know.", ChatColor.RED);
}
else if ("false".equals(reply))
{
playerMsg(sender, "There was a problem with the database, please let a developer know.", ChatColor.RED);
playerMsg("There was a problem with the database, please let a developer know.", ChatColor.RED);
}
else if ("cannotauth".equals(reply))
{
playerMsg(sender, "The database password is incorrect, please let a developer know.", ChatColor.RED);
playerMsg("The database password is incorrect, please let a developer know.", ChatColor.RED);
}
else
{
playerMsg(sender, "An unknown error occurred, please contact a developer", ChatColor.RED);
playerMsg(sender, "Response code: " + reply);
playerMsg("An unknown error occurred, please contact a developer", ChatColor.RED);
playerMsg("Response code: " + reply);
}
return true;
}
@ -78,33 +78,33 @@ public class Command_twitter extends TFM_Command
if ("info".equals(args[0]))
{
String reply = TFM_TwitterHandler.getTwitter(sender.getName());
playerMsg(sender, "-- Twitter Information --", ChatColor.BLUE);
playerMsg(sender, "Using this feature, you can re-super yourself using twitter.");
playerMsg(sender, "You can set your twitter handle using " + ChatColor.AQUA + "/twitter set [twittername]");
playerMsg(sender, "Then, you can verify yourself by tweeting " + ChatColor.AQUA + "@TFUpdates #superme");
playerMsg("-- Twitter Information --", ChatColor.BLUE);
playerMsg("Using this feature, you can re-super yourself using twitter.");
playerMsg("You can set your twitter handle using " + ChatColor.AQUA + "/twitter set [twittername]");
playerMsg("Then, you can verify yourself by tweeting " + ChatColor.AQUA + "@TFUpdates #superme");
if ("notfound".equals(reply))
{
playerMsg(sender, "You currently have " + ChatColor.RED + "no" + ChatColor.BLUE + " Twitter handle set.", ChatColor.BLUE);
playerMsg("You currently have " + ChatColor.RED + "no" + ChatColor.BLUE + " Twitter handle set.", ChatColor.BLUE);
}
else if ("disabled".equals(reply))
{
playerMsg(sender, "TwitterBot has been temporarily disabled, please wait until re-enabled", ChatColor.RED);
playerMsg("TwitterBot has been temporarily disabled, please wait until re-enabled", ChatColor.RED);
}
else if ("failed".equals(reply))
{
playerMsg(sender, "There was a problem querying the database, please let a developer know.", ChatColor.RED);
playerMsg("There was a problem querying the database, please let a developer know.", ChatColor.RED);
}
else if ("false".equals(reply))
{
playerMsg(sender, "There was a problem with the database, please let a developer know.", ChatColor.RED);
playerMsg("There was a problem with the database, please let a developer know.", ChatColor.RED);
}
else if ("cannotauth".equals(reply))
{
playerMsg(sender, "The database password is incorrect, please let a developer know.", ChatColor.RED);
playerMsg("The database password is incorrect, please let a developer know.", ChatColor.RED);
}
else
{
playerMsg(sender, "Your current twitter handle: " + ChatColor.AQUA + "@" + reply + ChatColor.BLUE + ".", ChatColor.BLUE);
playerMsg("Your current twitter handle: " + ChatColor.AQUA + "@" + reply + ChatColor.BLUE + ".", ChatColor.BLUE);
}
return true;
}
@ -119,7 +119,7 @@ public class Command_twitter extends TFM_Command
TFM_Util.adminAction(sender.getName(), ("enable".equals(args[0]) ? "Ena" : "Disa") + "bling Twitterbot", true);
String reply = TFM_TwitterHandler.setEnabled(args[0] + "d");
playerMsg(sender, "Reply: " + reply);
playerMsg("Reply: " + reply);
return true;
}