Migrate (what I could find) legacy component system uses to kyori component system

Create List command
Remove fionn command
Remove test command
Add Mojang Utils
Auto add Plex Players back to cache on start if any are online
This commit is contained in:
spacerocket62
2022-01-27 01:00:50 -08:00
parent 29b547fc8b
commit 8202021f07
28 changed files with 510 additions and 573 deletions

View File

@ -3,6 +3,8 @@ package dev.plex.util;
import dev.plex.Plex;
import dev.plex.config.Config;
import dev.plex.storage.StorageType;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bukkit.*;
import org.bukkit.command.Command;
import org.bukkit.command.PluginCommandYamlParser;
@ -177,7 +179,12 @@ public class PlexUtils
public static void broadcast(String s)
{
Bukkit.broadcastMessage(s);
Bukkit.broadcast(LegacyComponentSerializer.legacyAmpersand().deserialize(s));
}
public static void broadcast(Component component)
{
Bukkit.broadcast(component);
}
public static Object simpleGET(String url) throws IOException, ParseException