Added deprecated dummy methods to support current version of DiscordSRV

This commit is contained in:
Aust1n46 2020-03-20 06:40:10 -04:00
parent 97f49ba1df
commit 48571bb5ef
2 changed files with 24 additions and 1 deletions

View File

@ -43,6 +43,7 @@ import mineverse.Aust1n46.chat.api.MineverseChatAPI;
import mineverse.Aust1n46.chat.api.MineverseChatPlayer;
import mineverse.Aust1n46.chat.api.events.VentureChatEvent;
import mineverse.Aust1n46.chat.channel.ChatChannel;
import mineverse.Aust1n46.chat.channel.ChatChannelInfo;
//import mineverse.Aust1n46.chat.command.CCommand;
import mineverse.Aust1n46.chat.command.MineverseCommand;
import mineverse.Aust1n46.chat.command.MineverseCommandExecutor;
@ -172,9 +173,14 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
private LogLevels curLogLevel;
public long LINELENGTH = 40;
// DiscordSRV backwards compatibility
@Deprecated
public static ChatChannelInfo ccInfo;
@Override
public void onEnable() {
ccInfo = new ChatChannelInfo();
try {
Bukkit.getConsoleSender().sendMessage(Format.FormatStringAll("&8[&eVentureChat&8]&e - Initializing..."));
if(!getDataFolder().exists()) {

View File

@ -0,0 +1,17 @@
package mineverse.Aust1n46.chat.channel;
import mineverse.Aust1n46.chat.utilities.Format;
public class ChatChannelInfo {
// DiscordSRV backwards compatibility
@Deprecated
public String FilterChat(String msg) {
return Format.FilterChat(msg);
}
// DiscordSRV backwards compatibility
@Deprecated
public ChatChannel getChannelInfo(String channel) {
return ChatChannel.getChannel(channel);
}
}