Skip to content

Commit

Permalink
Update to Spicord 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Siebrenvde authored and Siebrenvde committed Jun 15, 2021
1 parent 545f988 commit e2db057
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 39 deletions.
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.siebrenvde</groupId>
<artifactId>StaffChat</artifactId>
<version>1.4.4</version>
<version>1.4.5</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand All @@ -29,7 +29,7 @@
</repository>
<repository>
<id>spicord-repo</id>
<url>https://repo.mcdb.eu/</url>
<url>https://repo.spicord.org/</url>
</repository>
</repositories>
<dependencies>
Expand All @@ -40,15 +40,15 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.8.3_464</version>
<groupId>org.spicord</groupId>
<artifactId>spicord-common</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>eu.mcdb</groupId>
<artifactId>spicord</artifactId>
<version>2.5.0-SNAPSHOT</version>
<groupId>org.spicord</groupId>
<artifactId>JDA</artifactId>
<version>4.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/io/github/siebrenvde/staffchat/Bungee.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package io.github.siebrenvde.staffchat;

import eu.mcdb.spicord.Spicord;
import io.github.siebrenvde.staffchat.commands.bungee.HelpOp;
import io.github.siebrenvde.staffchat.commands.bungee.Report;
import io.github.siebrenvde.staffchat.commands.bungee.StaffChat;
import io.github.siebrenvde.staffchat.discord.BungeeAddon;
import io.github.siebrenvde.staffchat.events.BungeeMessageEvent;
import io.github.siebrenvde.staffchat.util.BungeeUtils;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.api.entities.User;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
import org.spicord.SpicordLoader;

import java.io.File;
import java.io.IOException;
Expand All @@ -34,7 +34,9 @@ public void onEnable() {
registerCommands();
registerConfig();
getProxy().getPluginManager().registerListener(this, new BungeeMessageEvent(this));
Spicord.getInstance().getAddonManager().registerAddon(addon);
SpicordLoader.addStartupListener(spicord -> {
spicord.getAddonManager().registerAddon(addon);
});
}

private void registerCommands(){
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/io/github/siebrenvde/staffchat/Spigot.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package io.github.siebrenvde.staffchat;

import eu.mcdb.spicord.Spicord;
import io.github.siebrenvde.staffchat.commands.spigot.HelpOp;
import io.github.siebrenvde.staffchat.commands.spigot.Report;
import io.github.siebrenvde.staffchat.commands.spigot.StaffChat;
import io.github.siebrenvde.staffchat.discord.SpigotAddon;
import io.github.siebrenvde.staffchat.events.SpigotMessageEvent;
import io.github.siebrenvde.staffchat.util.SpigotUtils;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.api.entities.User;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.spicord.SpicordLoader;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -27,7 +27,9 @@ public void onEnable() {
saveDefaultConfig();
registerCommands();
getServer().getPluginManager().registerEvents(new SpigotMessageEvent(this), this);
Spicord.getInstance().getAddonManager().registerAddon(addon);
SpicordLoader.addStartupListener(spicord -> {
spicord.getAddonManager().registerAddon(addon);
});
}

private void registerCommands() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.github.siebrenvde.staffchat.discord;

import eu.mcdb.spicord.api.addon.SimpleAddon;
import eu.mcdb.spicord.bot.DiscordBot;
import eu.mcdb.spicord.bot.command.DiscordBotCommand;
import org.spicord.api.addon.SimpleAddon;
import org.spicord.bot.DiscordBot;
import org.spicord.bot.command.DiscordBotCommand;
import io.github.siebrenvde.staffchat.Bungee;
import io.github.siebrenvde.staffchat.util.BungeeUtils;
import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.User;

public class BungeeAddon extends SimpleAddon {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import io.github.siebrenvde.staffchat.Bungee;
import io.github.siebrenvde.staffchat.util.BungeeUtils;
import net.dv8tion.jda.core.entities.ChannelType;
import net.dv8tion.jda.core.entities.Message;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
import net.dv8tion.jda.core.hooks.ListenerAdapter;
import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;

public class MessageListenerBungee extends ListenerAdapter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

import io.github.siebrenvde.staffchat.Spigot;
import io.github.siebrenvde.staffchat.util.SpigotUtils;
import net.dv8tion.jda.core.entities.*;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
import net.dv8tion.jda.core.hooks.ListenerAdapter;
import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;

public class MessageListenerSpigot extends ListenerAdapter {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.github.siebrenvde.staffchat.discord;

import eu.mcdb.spicord.api.addon.SimpleAddon;
import eu.mcdb.spicord.bot.DiscordBot;
import eu.mcdb.spicord.bot.command.DiscordBotCommand;
import org.spicord.api.addon.SimpleAddon;
import org.spicord.bot.DiscordBot;
import org.spicord.bot.command.DiscordBotCommand;
import io.github.siebrenvde.staffchat.Spigot;
import io.github.siebrenvde.staffchat.util.SpigotUtils;
import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.User;

public class SpigotAddon extends SimpleAddon {

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/bungee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ main: io.github.siebrenvde.staffchat.Bungee
name: StaffChat
description: Simple Spicord staffchat plugin
author: Siebrenvde
version: 1.4.4
version: 1.4.5
depend: [Spicord]
2 changes: 1 addition & 1 deletion src/main/resources/bungeeconfig.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Spicord StaffChat by Siebrenvde
# Version 1.4.4
# Version 1.4.5

staff-channel: "123456789012345678"

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Spicord StaffChat by Siebrenvde
# Version 1.4.4
# Version 1.4.5

staff-channel: "123456789012345678"

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ main: io.github.siebrenvde.staffchat.Spigot
name: StaffChat
description: Simple Spicord staffchat plugin
author: Siebrenvde
version: 1.4.4
version: 1.4.5
depend: [Spicord]

commands:
Expand Down

0 comments on commit e2db057

Please sign in to comment.