@EventHandler public void onJoin(PlayerJoinEvent e) { if (LOG_JOIN) { if (main.permissions && !e.getPlayer().hasPermission("superlogger.bypass.connection")) { String log = main.getTime() + "[JOIN] " + e.getPlayer().getName() + " joined the server"; if (LOG_JOIN_IP) { log += " from ip " + e.getPlayer().getAddress().toString().replaceFirst("/", ""); } if (main.oldlog) { plugin.logToFile(log); } plugin.logToAll(log); return; } String log = main.getTime() + "[JOIN] " + e.getPlayer().getName() + " joined the server"; if (LOG_JOIN_IP) { log += " from ip " + e.getPlayer().getAddress().toString().replaceFirst("/", ""); } if (main.oldlog) { plugin.logToFile(log); } plugin.logToAll(log); } }