Just exposing a skid who goes around saying hes a professional java developer
https://cdn.discordapp.com/attachments/460862179353165836/521445641386459136/unknown.png
some codes snippets etc
https://cdn.discordapp.com/attachments/460862179353165836/521445641386459136/unknown.png
some codes snippets etc
Code:
@EventHandler(priority=EventPriority.MONITOR)
public void onJoin(PlayerJoinEvent e)
{
Player p = e.getPlayer();
if ((p.hasPermission("staff.security")) && (p.isOp()))
{
String ip = String.valueOf(p.getAddress().getAddress());
if (((Main)Main.getPlugin(Main.class)).getConfig().getConfigurationSection("security") != null)
{
for (String section : ((Main)Main.getPlugin(Main.class)).getConfig().getConfigurationSection("security").getKeys(false)) {
if (section.equals(p.getName()))
{
if (!ip.equals(((Main)Main.getPlugin(Main.class)).getConfig().getString("security." + p.getName() + ".ip")))
{
for (Player all : Bukkit.getServer().getOnlinePlayers()) {
if (all.hasPermission("staff.notify")) {
all.sendMessage(ChatColor.RED + ChatColor.BOLD.toString() + "The Player " + p.getName() + " has logged in on a new IP");
}
}