Update Discord.java

correct updated file
This commit is contained in:
SupItsDillon 2020-12-09 15:37:31 +00:00 committed by GitHub
parent 6441deceab
commit 777a66f8da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
@ -62,7 +62,6 @@ public class Discord extends FreedomService
public Boolean enableBot = false;
public void startBot()
{
enableBot = (ConfigEntry.DISCORD_VERIFICATION.getBoolean());
if (!enableBot)
@ -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))
{