0

Code cleanup

This commit is contained in:
Pepich 2017-02-01 20:21:59 +01:00
parent 44ee404970
commit c6a22e27c0

View File

@ -13,7 +13,7 @@ import net.md_5.bungee.api.ChatColor;
/** The utils class containing utility functions. Those include but are not limited to sending formatted messages, broadcasts and more. /** The utils class containing utility functions. Those include but are not limited to sending formatted messages, broadcasts and more.
* *
* @author Pepich */ * @author Pepich */
@Version(major = 1, minor = 1, revision = 3, compatible = 1) @Version(major = 1, minor = 1, revision = 4, compatible = 1)
public final class Utils public final class Utils
{ {
/** Hidden constructor. Do not instantiate UTILS classes! :) */ /** Hidden constructor. Do not instantiate UTILS classes! :) */
@ -30,10 +30,7 @@ public final class Utils
{ {
Debugger.notifyMethod(recipient, message, prefix); Debugger.notifyMethod(recipient, message, prefix);
if (prefix == null) if (prefix == null)
{ prefix = "§8[§2" + getCaller() + "§8]: ";
String classname = getCaller();
prefix = "§8[§2" + classname + "§8]: ";
}
recipient.sendMessage(prefix + "§7" + message); recipient.sendMessage(prefix + "§7" + message);
} }
@ -47,10 +44,7 @@ public final class Utils
{ {
Debugger.notifyMethod(recipient, prefix, message); Debugger.notifyMethod(recipient, prefix, message);
if (prefix == null) if (prefix == null)
{ prefix = "§8[§c" + getCaller() + "§8]: ";
String classname = getCaller();
prefix = "§8[§c" + classname + "§8]: ";
}
recipient.sendMessage(prefix + "§7" + message); recipient.sendMessage(prefix + "§7" + message);
if (!recipient.equals(Bukkit.getConsoleSender())) if (!recipient.equals(Bukkit.getConsoleSender()))
Bukkit.getConsoleSender().sendMessage("§c[WARN]: " + prefix + "§7" + message); Bukkit.getConsoleSender().sendMessage("§c[WARN]: " + prefix + "§7" + message);