Removed some things

This commit is contained in:
ZeroEpoch1969 2018-04-29 13:06:56 -07:00
parent 34a8e7f912
commit 83017e518d
No known key found for this signature in database
GPG Key ID: E0AAB104FB9F8FDF
5 changed files with 2 additions and 38 deletions

View File

@ -90,9 +90,6 @@ public class ChatManager extends FreedomService
return; return;
} }
// Check for mentions
checkMentions(message);
// Finally, set message // Finally, set message
event.setMessage(message); event.setMessage(message);
@ -109,28 +106,6 @@ public class ChatManager extends FreedomService
event.setFormat(format); event.setFormat(format);
} }
public void checkMentions(String message)
{
checkMentions(message, false);
}
public void checkMentions(String message, boolean adminOnly)
{
for (Player player : server.getOnlinePlayers())
{
// This is so if admins for some reason mention non-admins in admin chat, they won't be notified
if (adminOnly && !plugin.al.isAdmin(player))
{
return;
}
if (ChatColor.stripColor(message).toLowerCase().contains("@" + player.getName().toLowerCase()))
{
player.playSound(player.getLocation(), Sound.BLOCK_NOTE_PLING, SoundCategory.PLAYERS, 100F, 0.9F);
}
}
}
public String getOldPrefix(Displayable display) public String getOldPrefix(Displayable display)
{ {
ChatColor color = display.getColor(); ChatColor color = display.getColor();
@ -153,7 +128,6 @@ public class ChatManager extends FreedomService
{ {
Displayable display = plugin.rm.getDisplay(sender); Displayable display = plugin.rm.getDisplay(sender);
FLog.info("[ADMIN] " + sender.getName() + " " + display.getTag() + ": " + message); FLog.info("[ADMIN] " + sender.getName() + " " + display.getTag() + ": " + message);
checkMentions(message, true);
for (Player player : server.getOnlinePlayers()) for (Player player : server.getOnlinePlayers())
{ {

View File

@ -88,14 +88,7 @@ public class Updater extends FreedomService
player.kickPlayer("The server is restarting for a TFM update."); player.kickPlayer("The server is restarting for a TFM update.");
} }
if (!plugin.amp.enabled) server.shutdown();
{
server.shutdown();
}
else
{
plugin.amp.restartServer();
}
} }
public String getFilePath() public String getFilePath()
{ {

View File

@ -21,7 +21,6 @@ public class Command_consolesay extends FreedomCommand
} }
String message = StringUtils.join(args, " "); String message = StringUtils.join(args, " ");
plugin.cm.checkMentions(message);
FUtil.bcastMsg(String.format("§7[CONSOLE] §f<§c%s§f> %s", sender.getName(), StringUtils.join(args, " "))); FUtil.bcastMsg(String.format("§7[CONSOLE] §f<§c%s§f> %s", sender.getName(), StringUtils.join(args, " ")));
return true; return true;
} }

View File

@ -11,7 +11,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME) @CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Push people away from you.", usage = "/<command> [radius] [strength]") @CommandParameters(description = "Push people away from you.", usage = "/<command> [radius] [strength]")
public class Command_expel extends FreedomCommand public class Command_expel extends FreedomCommand
{ {

View File

@ -40,8 +40,6 @@ public class Command_say extends FreedomCommand
} }
} }
plugin.cm.checkMentions(message);
FUtil.bcastMsg(String.format("[Server:%s] %s", sender.getName(), message), ChatColor.LIGHT_PURPLE); FUtil.bcastMsg(String.format("[Server:%s] %s", sender.getName(), message), ChatColor.LIGHT_PURPLE);
return true; return true;