diff --git a/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java b/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java index 27097996..e0cbbe85 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/discord/Discord.java @@ -17,7 +17,7 @@ import me.totalfreedom.totalfreedommod.FreedomService; import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.player.PlayerData; import me.totalfreedom.totalfreedommod.rank.Rank; -import me.totalfreedom.totalfreedommod.staff.StaffMember; +import me.totalfreedom.totalfreedommod.admin.Admin; import me.totalfreedom.totalfreedommod.util.FLog; import me.totalfreedom.totalfreedommod.util.FUtil; import net.dv8tion.jda.api.EmbedBuilder; @@ -59,12 +59,11 @@ public class Discord extends FreedomService public static JDA bot = null; public Boolean enabled = false; - public Boolean enableBot = false; + public Boolean enableBot = false; public void startBot() - { - enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean()); + enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean()); if (!enableBot) { FLog.info("Discord Verification has been manually disabled."); @@ -306,7 +305,7 @@ public class Discord extends FreedomService @EventHandler(priority = EventPriority.MONITOR) public void onPlayerJoin(PlayerJoinEvent event) { - if (!plugin.sl.isVanished(event.getPlayer().getName())) + if (!plugin.al.isVanished(event.getPlayer().getName())) { messageChatChannel("**" + deformat(event.getPlayer().getName()) + " joined the server" + "**"); } @@ -315,7 +314,7 @@ public class Discord extends FreedomService @EventHandler(priority = EventPriority.MONITOR) public void onPlayerLeave(PlayerQuitEvent event) { - if (!plugin.sl.isVanished(event.getPlayer().getName())) + if (!plugin.al.isVanished(event.getPlayer().getName())) { messageChatChannel("**" + deformat(event.getPlayer().getName()) + " left the server" + "**"); } @@ -436,7 +435,7 @@ public class Discord extends FreedomService return true; } - public static boolean syncRoles(StaffMember staffMember, String discordID) + public static boolean syncRoles(Admin admin, String discordID) { if (discordID == null) { @@ -470,7 +469,7 @@ public class Discord extends FreedomService return false; } - if (!staffMember.isActive()) + if (!admin.isActive()) { if (member.getRoles().contains(adminRole)) { @@ -483,7 +482,7 @@ public class Discord extends FreedomService return true; } - if (staffMember.getRank().equals(Rank.ADMIN)) + if (admin.getRank().equals(Rank.ADMIN)) { if (!member.getRoles().contains(adminRole)) { @@ -495,7 +494,7 @@ public class Discord extends FreedomService } return true; } - else if (staffMember.getRank().equals(Rank.SENIOR_ADMIN)) + else if (admin.getRank().equals(Rank.SENIOR_ADMIN)) { if (!member.getRoles().contains(senioradminRole)) {