Removed some (reeally) old TODOs and such

This commit is contained in:
Norbi Peti 2016-09-08 21:00:50 +02:00
parent dc7913ca14
commit 10bc057187
10 changed files with 16 additions and 25 deletions

View file

@ -144,8 +144,7 @@ public class ChatProcessing {
} }
ChatPlayer mpp = ChatPlayer.GetFromPlayer(p); ChatPlayer mpp = ChatPlayer.GetFromPlayer(p);
if (PlayerListener.NotificationSound == null) if (PlayerListener.NotificationSound == null)
p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: Airhorn
// Airhorn
else else
p.playSound(p.getLocation(), PlayerListener.NotificationSound, 1.0f, p.playSound(p.getLocation(), PlayerListener.NotificationSound, 1.0f,
(float) PlayerListener.NotificationPitch); (float) PlayerListener.NotificationPitch);
@ -163,8 +162,7 @@ public class ChatProcessing {
return "§c" + match + "§r"; return "§c" + match + "§r";
} }
if (PlayerListener.NotificationSound == null) if (PlayerListener.NotificationSound == null)
p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f);
// Airhorn
else else
p.playSound(p.getLocation(), PlayerListener.NotificationSound, 1.0f, p.playSound(p.getLocation(), PlayerListener.NotificationSound, 1.0f,
(float) PlayerListener.NotificationPitch); (float) PlayerListener.NotificationPitch);
@ -195,7 +193,7 @@ public class ChatProcessing {
* "\",\"color\":\"%s\"},{\"text\":\"§b@console§r\",\"color\":\"blue\"},{\"text\":\"" , colormode)); System.out.println("\007"); } } * "\",\"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) { if (mp != null && mp.ChatOnly) {
json.addExtra(new TellrawPart("[C]").setHoverEvent( json.addExtra(new TellrawPart("[C]").setHoverEvent(
TellrawEvent.create(TellrawEvent.HoverAC, TellrawEvent.HoverAction.SHOW_TEXT, "Chat only"))); TellrawEvent.create(TellrawEvent.HoverAC, TellrawEvent.HoverAction.SHOW_TEXT, "Chat only")));
@ -352,7 +350,7 @@ public class ChatProcessing {
return true; return true;
} }
} else if (currentchannel.equals(Channel.AdminChat)) { } else if (currentchannel.equals(Channel.AdminChat)) {
try { // TODO: Put message JSON into it's structure try {
if (player != null && !player.isOp()) { if (player != null && !player.isOp()) {
player.sendMessage("§cYou need to be an OP to use this channel."); player.sendMessage("§cYou need to be an OP to use this channel.");
return true; return true;

View file

@ -170,9 +170,8 @@ public class PlayerListener implements Listener {
ChatPlayer cp = new ChatPlayer(); ChatPlayer cp = new ChatPlayer();
cp.UUID = tp.UUID; cp.UUID = tp.UUID;
cp.SetFlair(ChatPlayer.FlairTimeNone); cp.SetFlair(ChatPlayer.FlairTimeNone);
cp.FlairState = FlairStates.NoComment; // TODO: NullPointerException cp.FlairState = FlairStates.NoComment;
cp.UserNames = new ArrayList<>(); // TODO: Move some code here from cp.UserNames = new ArrayList<>();
// join?
ChatPlayer.OnlinePlayers.put(cp.UUID, cp); ChatPlayer.OnlinePlayers.put(cp.UUID, cp);
} }

View file

@ -303,7 +303,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
} }
PluginMain.Instance.getLogger().info("Loading files..."); PluginMain.Instance.getLogger().info("Loading files...");
try { try {
File file = new File("TBMC/chatsettings.yml"); // TODO File file = new File("TBMC/chatsettings.yml");
if (file.exists()) { if (file.exists()) {
YamlConfiguration yc = new YamlConfiguration(); YamlConfiguration yc = new YamlConfiguration();
yc.load(file); yc.load(file);
@ -330,7 +330,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
YamlConfiguration yc = new YamlConfiguration(); YamlConfiguration yc = new YamlConfiguration();
yc.set("notificationsound", PlayerListener.NotificationSound); yc.set("notificationsound", PlayerListener.NotificationSound);
yc.set("notificationpitch", PlayerListener.NotificationPitch); 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("announcements", AnnounceMessages);
yc.set("alphadeaths", PlayerListener.AlphaDeaths); yc.set("alphadeaths", PlayerListener.AlphaDeaths);
yc.save(file); yc.save(file);

View file

@ -25,9 +25,7 @@ public class TBMCChatAPI {
* commands. * commands.
*/ */
public void AddCommands(JavaPlugin plugin, Class<? extends TBMCCommandBase> acmdclass) { public void AddCommands(JavaPlugin plugin, Class<? extends TBMCCommandBase> acmdclass) {
CommandCaller.AddCommands(plugin, acmdclass); // TODO: Make it scan for CommandCaller.AddCommands(plugin, acmdclass); // TODO: Make it scan for all "buttondevteam" packages
// all "buttondevteam"
// packages
} }
/** /**

View file

@ -37,7 +37,6 @@ public class CommandCaller implements CommandExecutor {
AddCommands(plugin, TBMCCommandBase.class); AddCommands(plugin, TBMCCommandBase.class);
} }
// TODO: Move plugin updater to the core
public static void AddCommands(JavaPlugin plugin, Class<? extends TBMCCommandBase> acmdclass) { public static void AddCommands(JavaPlugin plugin, Class<? extends TBMCCommandBase> acmdclass) {
plugin.getLogger().info("Registering commands for " + plugin.getName()); plugin.getLogger().info("Registering commands for " + plugin.getName());
if (instance == null) if (instance == null)

View file

@ -12,7 +12,7 @@ public final class ShrugCommand extends AppendTextCommandBase {
@Override @Override
public String GetAppendedText() { public String GetAppendedText() {
return "¯\\\\\\_(ツ)\\_/¯"; //TODO: Escape format codes return "¯\\\\\\_(ツ)\\_/¯";
} }
@Override @Override

View file

@ -4,8 +4,7 @@ import buttondevteam.chat.commands.ucmds.UCommandBase;
public abstract class AdminCommandBase extends UCommandBase { public abstract class AdminCommandBase extends UCommandBase {
public abstract String[] GetHelpText(String alias); // TODO: Require public abstract String[] GetHelpText(String alias);
// permission
@Override @Override
public String GetUCommandPath() { public String GetUCommandPath() {

View file

@ -10,8 +10,7 @@ public class ConfirmCommand extends AdminCommandBase {
@Override @Override
public String[] GetHelpText(String alias) { public String[] GetHelpText(String alias) {
return new String[] { "§6--- Confirm reload ----", return new String[] { "§6--- Confirm reload ----", "Use this after using /u admin reload and /u admin save" };
"Use this after using /u admin reload and /u admin save" };
} }
@Override @Override
@ -19,13 +18,12 @@ public class ConfirmCommand extends AdminCommandBase {
if (ReloadCommand.Reloader == sender) { if (ReloadCommand.Reloader == sender) {
try { try {
if (sender != PluginMain.Console) if (sender != PluginMain.Console)
PluginMain.Console PluginMain.Console.sendMessage("§6-- Reloading The Button Minecraft plugin...§r");
.sendMessage("§6-- Reloading The Button Minecraft plugin...§r");
sender.sendMessage("§6-- Reloading The Button Minecraft plugin...§r"); sender.sendMessage("§6-- Reloading The Button Minecraft plugin...§r");
PluginMain.LoadFiles(true); PluginMain.LoadFiles(true);
// TODO: Add players online // TODO: Add players online
for (Player p : PluginMain.GetPlayers()) for (Player p : PluginMain.GetPlayers())
ChatPlayer.GetFromPlayer(p); ChatPlayer.GetFromPlayer(p); // TODO: Reload other TBMC plugin data?
if (sender != PluginMain.Console) if (sender != PluginMain.Console)
PluginMain.Console.sendMessage("§6-- Reloading done!§r"); PluginMain.Console.sendMessage("§6-- Reloading done!§r");
sender.sendMessage("§6-- Reloading done!§r"); sender.sendMessage("§6-- Reloading done!§r");

View file

@ -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."); "§cFlairtime must be a number, \"non-presser\", \"cant-press\" or \"none\". Run without args to see usage.");
return true; return true;
} }
} // TODO: Split config to per-player }
boolean cheater = false; boolean cheater = false;
if (args[2].equalsIgnoreCase("true")) if (args[2].equalsIgnoreCase("true"))
cheater = true; cheater = true;

View file

@ -170,7 +170,7 @@ public final class ChatFormatter {
.append(", ").append(priority).append(")").toString(); .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( Bold("bold"), Underlined("underlined"), Italic("italic"), Strikethrough("strikethrough"), Obfuscated(
"obfuscated"); "obfuscated");
// TODO: Add format codes to /u c <mode> // TODO: Add format codes to /u c <mode>