From 407b63e48beb2173bdede626dfcc7732f39b3a55 Mon Sep 17 00:00:00 2001 From: Video Date: Mon, 26 Apr 2021 01:23:24 -0600 Subject: [PATCH] Fixes FS-137 --- .../me/totalfreedom/totalfreedommod/config/ConfigEntry.java | 1 + .../totalfreedommod/discord/DiscordToAdminChatListener.java | 5 +++++ .../totalfreedommod/discord/DiscordToMinecraftListener.java | 5 +++++ src/main/resources/config.yml | 2 ++ 4 files changed, 13 insertions(+) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java index c6974ba8..eb557b1f 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java @@ -83,6 +83,7 @@ public enum ConfigEntry DISCORD_NEW_ADMIN_ROLE_ID(String.class, "discord.admin_role_id"), DISCORD_SENIOR_ADMIN_ROLE_ID(String.class, "discord.senior_admin_role_id"), DISCORD_DEVELOPER_ROLE_ID(String.class, "discord.developer_role_id"), + DISCORD_ASSISTANT_EXECUTIVE_ROLE_ID(String.class, "discord.assistant_executive_role_id"), DISCORD_EXECUTIVE_ROLE_ID(String.class, "discord.executive_role_id"), DISCORD_SERVER_OWNER_ROLE_ID(String.class, "discord.server_owner_role_id"), // diff --git a/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToAdminChatListener.java b/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToAdminChatListener.java index 633b0e8f..4e0ff6fb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToAdminChatListener.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToAdminChatListener.java @@ -119,6 +119,11 @@ public class DiscordToAdminChatListener extends ListenerAdapter { return Title.EXECUTIVE; } + // Assistant Executives + else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_ASSISTANT_EXECUTIVE_ROLE_ID.getString()))) + { + return Title.ASSTEXEC; + } // Senior Admins else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_SENIOR_ADMIN_ROLE_ID.getString()))) { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToMinecraftListener.java b/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToMinecraftListener.java index 85a58d64..e0f26bff 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToMinecraftListener.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/discord/DiscordToMinecraftListener.java @@ -84,6 +84,11 @@ public class DiscordToMinecraftListener extends ListenerAdapter { return Title.EXECUTIVE.getColoredTag(); } + // Assistant Executives + else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_ASSISTANT_EXECUTIVE_ROLE_ID.getString()))) + { + return Title.ASSTEXEC.getColoredTag(); + } // Senior Admins else if (member.getRoles().contains(server.getRoleById(ConfigEntry.DISCORD_SENIOR_ADMIN_ROLE_ID.getString()))) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 027578fa..d157570f 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -78,6 +78,8 @@ discord: senior_admin_role_id: '' # Developer role ID developer_role_id: '' + # Assistant Executive role ID + assistant_executive_role_id: '' # Executive Admin role ID executive_role_id: '' # Owner role ID