From 10bc057187222983dc255f86b994d75c0797acef Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 8 Sep 2016 21:00:50 +0200 Subject: [PATCH] Removed some (reeally) old TODOs and such --- src/buttondevteam/chat/ChatProcessing.java | 10 ++++------ src/buttondevteam/chat/PlayerListener.java | 5 ++--- src/buttondevteam/chat/PluginMain.java | 4 ++-- src/buttondevteam/chat/TBMCChatAPI.java | 4 +--- src/buttondevteam/chat/commands/CommandCaller.java | 1 - .../chat/commands/appendtext/ShrugCommand.java | 2 +- .../chat/commands/ucmds/admin/AdminCommandBase.java | 3 +-- .../chat/commands/ucmds/admin/ConfirmCommand.java | 8 +++----- .../chat/commands/ucmds/admin/SetFlairCommand.java | 2 +- src/buttondevteam/chat/formatting/ChatFormatter.java | 2 +- 10 files changed, 16 insertions(+), 25 deletions(-) diff --git a/src/buttondevteam/chat/ChatProcessing.java b/src/buttondevteam/chat/ChatProcessing.java index c8c9e5d..2561282 100644 --- a/src/buttondevteam/chat/ChatProcessing.java +++ b/src/buttondevteam/chat/ChatProcessing.java @@ -144,8 +144,7 @@ public class ChatProcessing { } ChatPlayer mpp = ChatPlayer.GetFromPlayer(p); if (PlayerListener.NotificationSound == null) - p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: - // Airhorn + p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: Airhorn else p.playSound(p.getLocation(), PlayerListener.NotificationSound, 1.0f, (float) PlayerListener.NotificationPitch); @@ -163,8 +162,7 @@ public class ChatProcessing { return "§c" + match + "§r"; } if (PlayerListener.NotificationSound == null) - p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: - // Airhorn + p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); else p.playSound(p.getLocation(), PlayerListener.NotificationSound, 1.0f, (float) PlayerListener.NotificationPitch); @@ -195,7 +193,7 @@ public class ChatProcessing { * "\",\"color\":\"%s\"},{\"text\":\"§b@console§r\",\"color\":\"blue\"},{\"text\":\"" , colormode)); System.out.println("\007"); } } */ - TellrawPart json = new TellrawPart(""); // TODO: Put flair into hovertext + TellrawPart json = new TellrawPart(""); if (mp != null && mp.ChatOnly) { json.addExtra(new TellrawPart("[C]").setHoverEvent( TellrawEvent.create(TellrawEvent.HoverAC, TellrawEvent.HoverAction.SHOW_TEXT, "Chat only"))); @@ -352,7 +350,7 @@ public class ChatProcessing { return true; } } else if (currentchannel.equals(Channel.AdminChat)) { - try { // TODO: Put message JSON into it's structure + try { if (player != null && !player.isOp()) { player.sendMessage("§cYou need to be an OP to use this channel."); return true; diff --git a/src/buttondevteam/chat/PlayerListener.java b/src/buttondevteam/chat/PlayerListener.java index 218e586..8231886 100644 --- a/src/buttondevteam/chat/PlayerListener.java +++ b/src/buttondevteam/chat/PlayerListener.java @@ -170,9 +170,8 @@ public class PlayerListener implements Listener { ChatPlayer cp = new ChatPlayer(); cp.UUID = tp.UUID; cp.SetFlair(ChatPlayer.FlairTimeNone); - cp.FlairState = FlairStates.NoComment; // TODO: NullPointerException - cp.UserNames = new ArrayList<>(); // TODO: Move some code here from - // join? + cp.FlairState = FlairStates.NoComment; + cp.UserNames = new ArrayList<>(); ChatPlayer.OnlinePlayers.put(cp.UUID, cp); } diff --git a/src/buttondevteam/chat/PluginMain.java b/src/buttondevteam/chat/PluginMain.java index 4e2c443..e22e2b4 100644 --- a/src/buttondevteam/chat/PluginMain.java +++ b/src/buttondevteam/chat/PluginMain.java @@ -303,7 +303,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15. } PluginMain.Instance.getLogger().info("Loading files..."); try { - File file = new File("TBMC/chatsettings.yml"); // TODO + File file = new File("TBMC/chatsettings.yml"); if (file.exists()) { YamlConfiguration yc = new YamlConfiguration(); yc.load(file); @@ -330,7 +330,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15. YamlConfiguration yc = new YamlConfiguration(); yc.set("notificationsound", PlayerListener.NotificationSound); yc.set("notificationpitch", PlayerListener.NotificationPitch); - yc.set("announcetime", AnnounceTime); // TODO: Move out to the core + yc.set("announcetime", AnnounceTime); yc.set("announcements", AnnounceMessages); yc.set("alphadeaths", PlayerListener.AlphaDeaths); yc.save(file); diff --git a/src/buttondevteam/chat/TBMCChatAPI.java b/src/buttondevteam/chat/TBMCChatAPI.java index baa7c3d..bbb1e2b 100644 --- a/src/buttondevteam/chat/TBMCChatAPI.java +++ b/src/buttondevteam/chat/TBMCChatAPI.java @@ -25,9 +25,7 @@ public class TBMCChatAPI { * commands. */ public void AddCommands(JavaPlugin plugin, Class acmdclass) { - CommandCaller.AddCommands(plugin, acmdclass); // TODO: Make it scan for - // all "buttondevteam" - // packages + CommandCaller.AddCommands(plugin, acmdclass); // TODO: Make it scan for all "buttondevteam" packages } /** diff --git a/src/buttondevteam/chat/commands/CommandCaller.java b/src/buttondevteam/chat/commands/CommandCaller.java index dba38bf..d4d2dc8 100644 --- a/src/buttondevteam/chat/commands/CommandCaller.java +++ b/src/buttondevteam/chat/commands/CommandCaller.java @@ -37,7 +37,6 @@ public class CommandCaller implements CommandExecutor { AddCommands(plugin, TBMCCommandBase.class); } - // TODO: Move plugin updater to the core public static void AddCommands(JavaPlugin plugin, Class acmdclass) { plugin.getLogger().info("Registering commands for " + plugin.getName()); if (instance == null) diff --git a/src/buttondevteam/chat/commands/appendtext/ShrugCommand.java b/src/buttondevteam/chat/commands/appendtext/ShrugCommand.java index ad8cad8..e2fc0f0 100644 --- a/src/buttondevteam/chat/commands/appendtext/ShrugCommand.java +++ b/src/buttondevteam/chat/commands/appendtext/ShrugCommand.java @@ -12,7 +12,7 @@ public final class ShrugCommand extends AppendTextCommandBase { @Override public String GetAppendedText() { - return "¯\\\\\\_(ツ)\\_/¯"; //TODO: Escape format codes + return "¯\\\\\\_(ツ)\\_/¯"; } @Override diff --git a/src/buttondevteam/chat/commands/ucmds/admin/AdminCommandBase.java b/src/buttondevteam/chat/commands/ucmds/admin/AdminCommandBase.java index 21363de..87a1a2d 100644 --- a/src/buttondevteam/chat/commands/ucmds/admin/AdminCommandBase.java +++ b/src/buttondevteam/chat/commands/ucmds/admin/AdminCommandBase.java @@ -4,8 +4,7 @@ import buttondevteam.chat.commands.ucmds.UCommandBase; public abstract class AdminCommandBase extends UCommandBase { - public abstract String[] GetHelpText(String alias); // TODO: Require - // permission + public abstract String[] GetHelpText(String alias); @Override public String GetUCommandPath() { diff --git a/src/buttondevteam/chat/commands/ucmds/admin/ConfirmCommand.java b/src/buttondevteam/chat/commands/ucmds/admin/ConfirmCommand.java index ed68850..2a667db 100644 --- a/src/buttondevteam/chat/commands/ucmds/admin/ConfirmCommand.java +++ b/src/buttondevteam/chat/commands/ucmds/admin/ConfirmCommand.java @@ -10,8 +10,7 @@ public class ConfirmCommand extends AdminCommandBase { @Override public String[] GetHelpText(String alias) { - return new String[] { "§6--- Confirm reload ----", - "Use this after using /u admin reload and /u admin save" }; + return new String[] { "§6--- Confirm reload ----", "Use this after using /u admin reload and /u admin save" }; } @Override @@ -19,13 +18,12 @@ public class ConfirmCommand extends AdminCommandBase { if (ReloadCommand.Reloader == sender) { try { if (sender != PluginMain.Console) - PluginMain.Console - .sendMessage("§6-- Reloading The Button Minecraft plugin...§r"); + PluginMain.Console.sendMessage("§6-- Reloading The Button Minecraft plugin...§r"); sender.sendMessage("§6-- Reloading The Button Minecraft plugin...§r"); PluginMain.LoadFiles(true); // TODO: Add players online for (Player p : PluginMain.GetPlayers()) - ChatPlayer.GetFromPlayer(p); + ChatPlayer.GetFromPlayer(p); // TODO: Reload other TBMC plugin data? if (sender != PluginMain.Console) PluginMain.Console.sendMessage("§6-- Reloading done!§r"); sender.sendMessage("§6-- Reloading done!§r"); diff --git a/src/buttondevteam/chat/commands/ucmds/admin/SetFlairCommand.java b/src/buttondevteam/chat/commands/ucmds/admin/SetFlairCommand.java index dbacef6..dc90362 100644 --- a/src/buttondevteam/chat/commands/ucmds/admin/SetFlairCommand.java +++ b/src/buttondevteam/chat/commands/ucmds/admin/SetFlairCommand.java @@ -42,7 +42,7 @@ public class SetFlairCommand extends AdminCommandBase { "§cFlairtime must be a number, \"non-presser\", \"cant-press\" or \"none\". Run without args to see usage."); return true; } - } // TODO: Split config to per-player + } boolean cheater = false; if (args[2].equalsIgnoreCase("true")) cheater = true; diff --git a/src/buttondevteam/chat/formatting/ChatFormatter.java b/src/buttondevteam/chat/formatting/ChatFormatter.java index 492e40e..1f1d5b8 100644 --- a/src/buttondevteam/chat/formatting/ChatFormatter.java +++ b/src/buttondevteam/chat/formatting/ChatFormatter.java @@ -170,7 +170,7 @@ public final class ChatFormatter { .append(", ").append(priority).append(")").toString(); } - public enum Format implements TellrawSerializableEnum { // TODO: Flag? + public enum Format implements TellrawSerializableEnum { // TODO: Flag! Bold("bold"), Underlined("underlined"), Italic("italic"), Strikethrough("strikethrough"), Obfuscated( "obfuscated"); // TODO: Add format codes to /u c