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);
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;

View file

@ -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);
}

View file

@ -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);

View file

@ -25,9 +25,7 @@ public class TBMCChatAPI {
* commands.
*/
public void AddCommands(JavaPlugin plugin, Class<? extends TBMCCommandBase> 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
}
/**

View file

@ -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<? extends TBMCCommandBase> acmdclass) {
plugin.getLogger().info("Registering commands for " + plugin.getName());
if (instance == null)

View file

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

View file

@ -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() {

View file

@ -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");

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.");
return true;
}
} // TODO: Split config to per-player
}
boolean cheater = false;
if (args[2].equalsIgnoreCase("true"))
cheater = true;

View file

@ -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 <mode>