-
-
Notifications
You must be signed in to change notification settings - Fork 13
[Feature] Discord Integration (f/ ASEAN) v1.2.3 #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Feature] Discord Integration (f/ ASEAN) v1.2.3 #200
Conversation
* Proper integrations for discord-plotsystem plugin * Wrote a wrapper class `at com.alpsbte.plotsystem.utils.DiscordUtil` as a singleton to manage all discord event system * DiscordUtil is designed to ever be initialized if the discord-plotsystem exist in the class path, so Plot-System plugin can stay running even if the discord feature isn't installed * Cherry picked from 33c69e7
Some method path might still be wrong # Conflicts: # src/main/java/com/alpsbte/plotsystem/PlotSystem.java # src/main/java/com/alpsbte/plotsystem/commands/plot/CMD_Plot_Abandon.java # src/main/java/com/alpsbte/plotsystem/core/system/plot/generator/AbstractPlotGenerator.java # src/main/java/com/alpsbte/plotsystem/core/system/plot/utils/PlotUtils.java # src/main/java/com/alpsbte/plotsystem/core/system/review/PlotReview.java # src/main/resources/plugin.yml
* Using minutesDiff <= 75 may run 3 times a day * Edited minute-window to 60 which the actual windows will be minutesDiff < (60 / 2) (cherry picked from commit 31c6900)
* make inactivity notification for discord configurable in config.yml * make notification window calculation clearer (cherry picked from commit 0fda613)
|
3rd time the charm |
Zoriot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone can dedicate time to it we should instead of implementing a addon api write our own proper api which ensure the same functionality. Which then addons like DiscordPlotSystem can implement.
This approach is very bad to maintain long term - short term I'm open in merging it. Also i don't like that DPS have completly own data at least some parts are duplicated.
| } | ||
|
|
||
| // Register discord Integration | ||
| org.bukkit.plugin.Plugin discordPlugin = DependencyManager.getDiscordIntegration(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no import?
| # How many days of inactivity it will take before a claimed plot is automatically abandoned, -2 disables it | ||
| inactivity-interval: 14 | ||
|
|
||
| # How long left (Days) until the plot gets abandon due to inactivity and the system will start pinging owner on discord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not add options only for (optional) integrations. Either also use it in the plugin or find a way to have a generalized approach and configure it in DiscordPlotSystem
| * @see asia.buildtheearth.asean.discord.plotsystem.api.events.AbandonType | ||
| */ | ||
| public enum AbandonType { | ||
| /** @see asia.buildtheearth.asean.discord.plotsystem.api.events.AbandonType#INACTIVE */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports?
| @@ -0,0 +1,215 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the License - we now only specify it in the root of the project for clearity
| return PlotSystem.getPlugin().getServer().getPluginManager().isPluginEnabled("WorldGuardExtraFlags"); | ||
| } | ||
|
|
||
| public static @Nullable org.bukkit.plugin.Plugin getDiscordIntegration() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import
FROM #175 W/ ISSUE #176
Important
Proper integrations for discord-plotsystem plugin
Wrote a wrapper class
at com.alpsbte.plotsystem.utils.DiscordUtilas a singleton to manage all discord event systemP.S. DiscordUtil is designed to ever be initialized if the
discord-plotsystemexist in the class path, so Plot-System plugin can stay running even if the discord feature isn't installed