diff --git a/pom.xml b/pom.xml index 0e946fa..a782ff7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ src/main/resources + true Chroma-Discord @@ -39,8 +40,10 @@ - - + @@ -148,11 +151,11 @@ 3.1.1 - + com.github.TBMCPlugins.ChromaCore Chroma-Core diff --git a/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java b/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java index f6f0bbf..caa8dea 100755 --- a/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java +++ b/src/main/java/buttondevteam/discordplugin/DiscordPlugin.java @@ -218,15 +218,6 @@ public class DiscordPlugin extends ButtonPlugin { TBMCCoreAPI.SendUnsentExceptions(); TBMCCoreAPI.SendUnsentDebugMessages(); - //Bukkit.getLogger().addHandler(new BukkitLogWatcher()); - /*val lc = (LoggerContext) LogManager.getContext(false); - var blw = new BukkitLogWatcher(); - blw.start(); - lc.getConfiguration().addAppender(blw); - Logger logger = lc.getRootLogger(); - logger.addAppender(lc.getConfiguration().getAppender(blw.getName())); - logger.get().addAppender(blw, Level.INFO, blw.getFilter()); - lc.updateLoggers();*/ var blw = new BukkitLogWatcher(); blw.start(); ((Logger) LogManager.getRootLogger()).addAppender(blw); @@ -274,8 +265,6 @@ public class DiscordPlugin extends ButtonPlugin { try { SafeMode = true; // Stop interacting with Discord ChromaBot.delete(); - //timings.printElapsed("Updating presence..."); - //dc.updatePresence(Presence.idle(Activity.playing("logging out"))).block(); //No longer using the same account for testing ((Logger) LogManager.getRootLogger()).removeAppender(logWatcher); timings.printElapsed("Logging out..."); dc.logout().block(); diff --git a/src/main/java/buttondevteam/discordplugin/broadcaster/GeneralEventBroadcasterModule.java b/src/main/java/buttondevteam/discordplugin/broadcaster/GeneralEventBroadcasterModule.java index 6ddf741..a6ef5e2 100644 --- a/src/main/java/buttondevteam/discordplugin/broadcaster/GeneralEventBroadcasterModule.java +++ b/src/main/java/buttondevteam/discordplugin/broadcaster/GeneralEventBroadcasterModule.java @@ -3,12 +3,14 @@ package buttondevteam.discordplugin.broadcaster; import buttondevteam.discordplugin.DiscordPlugin; import buttondevteam.lib.TBMCCoreAPI; import buttondevteam.lib.architecture.Component; +import buttondevteam.lib.architecture.ComponentMetadata; import lombok.Getter; /** * Uses a bit of a hacky method of getting all broadcasted messages, including advancements and any other message that's for everyone. * If this component is enabled then these messages will show up on Discord. */ +@ComponentMetadata(enabledByDefault = false) public class GeneralEventBroadcasterModule extends Component { private static @Getter boolean hooked = false; diff --git a/src/main/java/buttondevteam/discordplugin/mcchat/MinecraftChatModule.java b/src/main/java/buttondevteam/discordplugin/mcchat/MinecraftChatModule.java index 00030e6..80619cc 100644 --- a/src/main/java/buttondevteam/discordplugin/mcchat/MinecraftChatModule.java +++ b/src/main/java/buttondevteam/discordplugin/mcchat/MinecraftChatModule.java @@ -107,7 +107,7 @@ public class MinecraftChatModule extends Component { * Whether players logged on from Discord (mcchat command) should be recognised by other plugins. Some plugins might break if it's turned off. * But it's really hacky. */ - private final ConfigData addFakePlayersToBukkit = getConfig().getData("addFakePlayersToBukkit", true); + private final ConfigData addFakePlayersToBukkit = getConfig().getData("addFakePlayersToBukkit", false); /** * Set by the component to report crashes. diff --git a/src/main/java/buttondevteam/discordplugin/role/GameRoleModule.java b/src/main/java/buttondevteam/discordplugin/role/GameRoleModule.java index ad5b4bb..cb2dd8b 100644 --- a/src/main/java/buttondevteam/discordplugin/role/GameRoleModule.java +++ b/src/main/java/buttondevteam/discordplugin/role/GameRoleModule.java @@ -4,6 +4,7 @@ import buttondevteam.core.ComponentManager; import buttondevteam.discordplugin.DPUtils; import buttondevteam.discordplugin.DiscordPlugin; import buttondevteam.lib.architecture.Component; +import buttondevteam.lib.architecture.ComponentMetadata; import buttondevteam.lib.architecture.ReadOnlyConfigData; import discord4j.core.event.domain.role.RoleCreateEvent; import discord4j.core.event.domain.role.RoleDeleteEvent; @@ -25,6 +26,7 @@ import java.util.stream.Collectors; * Automatically collects roles with a certain color. * Users can add these roles to themselves using the /role Discord command. */ +@ComponentMetadata(enabledByDefault = false) public class GameRoleModule extends Component { public List GameRoles; @@ -42,7 +44,7 @@ public class GameRoleModule extends Component { /** * The channel where the bot logs when it detects a role change that results in a new game role or one being removed. */ - private ReadOnlyConfigData> logChannel = DPUtils.channelData(getConfig(), "logChannel"); + private final ReadOnlyConfigData> logChannel = DPUtils.channelData(getConfig(), "logChannel"); /** * The role color that is used by game roles. diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 20f5fe4..691f3d9 100755 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,11 +1,12 @@ name: Chroma-Discord main: buttondevteam.discordplugin.DiscordPlugin -version: '1.0' +version: '${noprefix.version}' author: NorbiPeti -depend: [ChromaCore] +depend: [ Chroma-Core ] softdepend: - Essentials commands: discord: + description: 'Main command for Chroma-Discord' website: 'https://github.com/TBMCPlugins/Chroma-Discord' api-version: '1.13'