diff --git a/bukkit-post-1.13/pom.xml b/bukkit-post-1.13/pom.xml index 9f9a99ef..92ee8f65 100644 --- a/bukkit-post-1.13/pom.xml +++ b/bukkit-post-1.13/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -20,7 +20,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.4 + 3.2.4 diff --git a/bukkit-pre-1.13/pom.xml b/bukkit-pre-1.13/pom.xml index 77da3e9d..2c7bc4c5 100644 --- a/bukkit-pre-1.13/pom.xml +++ b/bukkit-pre-1.13/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -20,7 +20,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.4 + 3.2.4 diff --git a/bukkit-shared/pom.xml b/bukkit-shared/pom.xml index 262408cc..2df99ffb 100644 --- a/bukkit-shared/pom.xml +++ b/bukkit-shared/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -26,7 +26,7 @@ io.netty netty-all - 4.1.19.Final + 4.1.63.Final provided diff --git a/bungeecord/pom.xml b/bungeecord/pom.xml index cd2463f4..6c4d6ebc 100644 --- a/bungeecord/pom.xml +++ b/bungeecord/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -28,7 +28,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.4 + 3.2.4 @@ -77,19 +77,19 @@ org.slf4j slf4j-jdk14 - 1.7.21 + 1.7.30 compile net.md-5 bungeecord-api - 1.12-SNAPSHOT + 1.16-R0.5-SNAPSHOT provided io.netty netty-all - 4.1.19.Final + 4.1.63.Final provided diff --git a/common/pom.xml b/common/pom.xml index a6672128..bc9ac82c 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -14,13 +14,13 @@ com.squareup.retrofit2 retrofit - 2.5.0 + 2.9.0 compile com.squareup.retrofit2 converter-gson - 2.5.0 + 2.9.0 compile @@ -32,7 +32,7 @@ junit junit - 4.12 + 4.13.2 test diff --git a/nukkit/pom.xml b/nukkit/pom.xml index 8cf9eec4..ef33bbcd 100644 --- a/nukkit/pom.xml +++ b/nukkit/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -21,7 +21,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.4 + 3.2.4 diff --git a/plugin-shared/pom.xml b/plugin-shared/pom.xml index 5b7e0526..9c07ba61 100644 --- a/plugin-shared/pom.xml +++ b/plugin-shared/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -20,7 +20,7 @@ junit junit - 4.12 + 4.13.2 test diff --git a/pom.xml b/pom.xml index 42df04dd..ae819e2e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.buycraft BuycraftX pom - 12.0.7 + 12.1.0 common bukkit-shared @@ -42,7 +42,7 @@ org.jetbrains annotations - 16.0.2 + 20.1.0 @@ -51,7 +51,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.2 + 3.8.1 8 8 diff --git a/sponge/pom.xml b/sponge/pom.xml index c378e720..88da8c67 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -4,7 +4,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -15,7 +15,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.4 + 3.2.4 @@ -119,7 +119,7 @@ org.spongepowered spongeapi - 7.0.0 + 7.3.0 provided diff --git a/velocity/pom.xml b/velocity/pom.xml index fc3ee991..273804fb 100644 --- a/velocity/pom.xml +++ b/velocity/pom.xml @@ -5,7 +5,7 @@ BuycraftX net.buycraft - 12.0.7 + 12.1.0 4.0.0 @@ -15,7 +15,7 @@ velocity - https://repo.velocitypowered.com/snapshots/ + https://nexus.velocitypowered.com/repository/maven-public/ @@ -30,7 +30,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.4 + 3.2.4 @@ -127,7 +127,7 @@ com.velocitypowered velocity-api - 1.0.0-SNAPSHOT + 1.1.5 provided diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftCommand.java b/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftCommand.java index cfb3e749..cde73e2a 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftCommand.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftCommand.java @@ -1,17 +1,17 @@ package net.buycraft.plugin.velocity; -import com.velocitypowered.api.command.Command; import com.velocitypowered.api.command.CommandSource; +import com.velocitypowered.api.command.SimpleCommand; import net.buycraft.plugin.velocity.command.Subcommand; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; -import net.kyori.text.format.TextDecoration; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.format.TextDecoration; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.Map; -public class BuycraftCommand implements Command { +public class BuycraftCommand implements SimpleCommand { private final Map subcommandMap = new LinkedHashMap<>(); private final BuycraftPlugin plugin; @@ -20,9 +20,11 @@ public BuycraftCommand(BuycraftPlugin plugin) { } @Override - public void execute(CommandSource sender, String[] args) { + public void execute(Invocation invocation) { + CommandSource sender = invocation.source(); + String[] args = invocation.arguments(); if (!sender.hasPermission("buycraft.admin")) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("no_permission")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("no_permission"), NamedTextColor.RED)); return; } @@ -43,9 +45,9 @@ public void execute(CommandSource sender, String[] args) { } private void showHelp(CommandSource sender) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("usage")).color(TextColor.DARK_AQUA).decoration(TextDecoration.BOLD, true)); + sender.sendMessage(Component.text(plugin.getI18n().get("usage"), NamedTextColor.DARK_AQUA, TextDecoration.BOLD)); for (Map.Entry entry : subcommandMap.entrySet()) { - sender.sendMessage(TextComponent.of("/tebex " + entry.getKey()).color(TextColor.GREEN).append(TextComponent.of(": " + entry.getValue().getDescription()))); + sender.sendMessage(Component.text("/tebex " + entry.getKey(), NamedTextColor.GREEN).append(Component.text(": " + entry.getValue().getDescription(), NamedTextColor.GRAY))); } } diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftPlugin.java b/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftPlugin.java index 56c1d943..350a05d5 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftPlugin.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/BuycraftPlugin.java @@ -187,7 +187,7 @@ public void onEnable(ProxyInitializeEvent event) { command.getSubcommandMap().put("info", new InformationSubcommand(this)); command.getSubcommandMap().put("report", new ReportCommand(this)); command.getSubcommandMap().put("coupon", new CouponSubcommand(this)); - getServer().getCommandManager().register(command, "tebex", "buycraft"); + server.getCommandManager().register(server.getCommandManager().metaBuilder("buycraft").aliases("tebex").build(), command); // Send data to Keen IO if (serverInformation != null) { diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/VelocityBuycraftPlatform.java b/velocity/src/main/java/net/buycraft/plugin/velocity/VelocityBuycraftPlatform.java index 9a9a1096..7c0048b5 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/VelocityBuycraftPlatform.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/VelocityBuycraftPlatform.java @@ -21,7 +21,7 @@ public class VelocityBuycraftPlatform implements IBuycraftPlatform { - private Map>> LOG_LEVEL_MAP = new HashMap>>() {{ + private final Map>> LOG_LEVEL_MAP = new HashMap>>() {{ put(Level.INFO, l -> l::info); put(Level.WARNING, l -> l::warn); put(Level.SEVERE, l -> l::error); diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/command/CouponSubcommand.java b/velocity/src/main/java/net/buycraft/plugin/velocity/command/CouponSubcommand.java index 578c6fba..1e43bb05 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/command/CouponSubcommand.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/command/CouponSubcommand.java @@ -4,8 +4,8 @@ import net.buycraft.plugin.data.Coupon; import net.buycraft.plugin.shared.util.CouponUtil; import net.buycraft.plugin.velocity.BuycraftPlugin; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import java.io.IOException; import java.util.Arrays; @@ -22,7 +22,7 @@ public CouponSubcommand(final BuycraftPlugin plugin) { @Override public void execute(CommandSource sender, String[] args) { if (args.length == 0) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("usage_coupon_subcommands")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("usage_coupon_subcommands"), NamedTextColor.RED)); return; } @@ -34,7 +34,7 @@ public void execute(CommandSource sender, String[] args) { deleteCoupon(sender, args); break; default: - sender.sendMessage(TextComponent.of(plugin.getI18n().get("usage_coupon_subcommands")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("usage_coupon_subcommands"), NamedTextColor.RED)); break; } } @@ -45,23 +45,23 @@ private void createCoupon(final CommandSource sender, String[] args) { try { coupon = CouponUtil.parseArguments(stripped); } catch (Exception e) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("coupon_creation_arg_parse_failure", e.getMessage())).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("coupon_creation_arg_parse_failure", e.getMessage()), NamedTextColor.RED)); return; } plugin.getPlatform().executeAsync(() -> { try { plugin.getApiClient().createCoupon(coupon).execute().body(); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("coupon_creation_success", coupon.getCode())).color(TextColor.GREEN)); + sender.sendMessage(Component.text(plugin.getI18n().get("coupon_creation_success", coupon.getCode()), NamedTextColor.GREEN)); } catch (IOException e) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("generic_api_operation_error")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("generic_api_operation_error"), NamedTextColor.RED)); } }); } private void deleteCoupon(final CommandSource sender, String[] args) { if (args.length != 2) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("no_coupon_specified")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("no_coupon_specified"), NamedTextColor.RED)); return; } @@ -69,9 +69,9 @@ private void deleteCoupon(final CommandSource sender, String[] args) { plugin.getPlatform().executeAsync(() -> { try { plugin.getApiClient().deleteCoupon(code).execute().body(); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("coupon_deleted")).color(TextColor.GREEN)); + sender.sendMessage(Component.text(plugin.getI18n().get("coupon_deleted"), NamedTextColor.GREEN)); } catch (IOException e) { - sender.sendMessage(TextComponent.of(e.getMessage()).color(TextColor.RED)); + sender.sendMessage(Component.text(e.getMessage(), NamedTextColor.RED)); } }); } diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/command/ForceCheckSubcommand.java b/velocity/src/main/java/net/buycraft/plugin/velocity/command/ForceCheckSubcommand.java index c3117c32..14a1d649 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/command/ForceCheckSubcommand.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/command/ForceCheckSubcommand.java @@ -2,8 +2,8 @@ import com.velocitypowered.api.command.CommandSource; import net.buycraft.plugin.velocity.BuycraftPlugin; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; public class ForceCheckSubcommand implements Subcommand { private final BuycraftPlugin plugin; @@ -15,22 +15,22 @@ public ForceCheckSubcommand(final BuycraftPlugin plugin) { @Override public void execute(CommandSource sender, String[] args) { if (args.length != 0) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("no_params")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("no_params"), NamedTextColor.RED)); return; } if (plugin.getApiClient() == null) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("need_secret_key")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("need_secret_key"), NamedTextColor.RED)); return; } if (plugin.getDuePlayerFetcher().inProgress()) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("already_checking_for_purchases")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("already_checking_for_purchases"), NamedTextColor.RED)); return; } plugin.getPlatform().executeAsync(() -> plugin.getDuePlayerFetcher().run(false)); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("forcecheck_queued")).color(TextColor.GREEN)); + sender.sendMessage(Component.text(plugin.getI18n().get("forcecheck_queued"), NamedTextColor.GREEN)); } @Override diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/command/InformationSubcommand.java b/velocity/src/main/java/net/buycraft/plugin/velocity/command/InformationSubcommand.java index 955f3f85..3053303d 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/command/InformationSubcommand.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/command/InformationSubcommand.java @@ -2,8 +2,8 @@ import com.velocitypowered.api.command.CommandSource; import net.buycraft.plugin.velocity.BuycraftPlugin; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; public class InformationSubcommand implements Subcommand { private final BuycraftPlugin plugin; @@ -15,28 +15,28 @@ public InformationSubcommand(final BuycraftPlugin plugin) { @Override public void execute(CommandSource sender, String[] args) { if (args.length != 0) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("no_params")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("no_params"), NamedTextColor.RED)); return; } if (plugin.getApiClient() == null) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("need_secret_key")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("need_secret_key"), NamedTextColor.RED)); return; } if (plugin.getServerInformation() == null) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("information_no_server")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("information_no_server"), NamedTextColor.RED)); return; } - sender.sendMessage(TextComponent.of(plugin.getI18n().get("information_title")).color(TextColor.GRAY)); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("information_server", + sender.sendMessage(Component.text(plugin.getI18n().get("information_title"), NamedTextColor.GRAY)); + sender.sendMessage(Component.text(plugin.getI18n().get("information_server", plugin.getServerInformation().getServer().getName(), - plugin.getServerInformation().getAccount().getName())).color(TextColor.GRAY)); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("information_currency", - plugin.getServerInformation().getAccount().getCurrency().getIso4217())).color(TextColor.GRAY)); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("information_domain", - plugin.getServerInformation().getAccount().getDomain())).color(TextColor.GRAY)); + plugin.getServerInformation().getAccount().getName()), NamedTextColor.GRAY)); + sender.sendMessage(Component.text(plugin.getI18n().get("information_currency", + plugin.getServerInformation().getAccount().getCurrency().getIso4217()), NamedTextColor.GRAY)); + sender.sendMessage(Component.text(plugin.getI18n().get("information_domain", + plugin.getServerInformation().getAccount().getDomain()), NamedTextColor.GRAY)); } @Override diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/command/ReportCommand.java b/velocity/src/main/java/net/buycraft/plugin/velocity/command/ReportCommand.java index 852a7d51..8e9a3960 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/command/ReportCommand.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/command/ReportCommand.java @@ -3,8 +3,8 @@ import com.velocitypowered.api.command.CommandSource; import net.buycraft.plugin.shared.util.ReportBuilder; import net.buycraft.plugin.velocity.BuycraftPlugin; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import java.io.BufferedWriter; import java.io.IOException; @@ -25,7 +25,7 @@ public ReportCommand(BuycraftPlugin plugin) { @Override public void execute(final CommandSource sender, String[] args) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("report_wait")).color(TextColor.YELLOW)); + sender.sendMessage(Component.text(plugin.getI18n().get("report_wait"), NamedTextColor.YELLOW)); plugin.getPlatform().executeAsync(() -> { InetSocketAddress listener = plugin.getServer().getBoundAddress(); @@ -45,9 +45,9 @@ public void execute(final CommandSource sender, String[] args) { String generated = builder.generate(); try (BufferedWriter w = Files.newBufferedWriter(p, StandardCharsets.UTF_8, StandardOpenOption.CREATE_NEW)) { w.write(generated); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("report_saved", p.toAbsolutePath().toString())).color(TextColor.YELLOW)); + sender.sendMessage(Component.text(plugin.getI18n().get("report_saved", p.toAbsolutePath().toString()), NamedTextColor.YELLOW)); } catch (IOException e) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("report_cant_save")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("report_cant_save"), NamedTextColor.RED)); plugin.getLogger().info(generated); } }); diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/command/SecretSubcommand.java b/velocity/src/main/java/net/buycraft/plugin/velocity/command/SecretSubcommand.java index f27c8572..3b94e3d8 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/command/SecretSubcommand.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/command/SecretSubcommand.java @@ -4,11 +4,10 @@ import net.buycraft.plugin.BuyCraftAPI; import net.buycraft.plugin.data.responses.ServerInformation; import net.buycraft.plugin.velocity.BuycraftPlugin; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import java.io.IOException; -import java.util.logging.Level; public class SecretSubcommand implements Subcommand { private final BuycraftPlugin plugin; @@ -20,12 +19,12 @@ public SecretSubcommand(final BuycraftPlugin plugin) { @Override public void execute(final CommandSource sender, final String[] args) { if (!sender.equals(plugin.getServer().getConsoleCommandSource())) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("secret_console_only")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("secret_console_only"), NamedTextColor.RED)); return; } if (args.length != 1) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("secret_need_key")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("secret_need_key"), NamedTextColor.RED)); return; } @@ -35,7 +34,7 @@ public void execute(final CommandSource sender, final String[] args) { plugin.updateInformation(client); } catch (IOException e) { plugin.getLogger().error("Unable to verify secret", e); - sender.sendMessage(TextComponent.of(plugin.getI18n().get("secret_does_not_work")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("secret_does_not_work"), NamedTextColor.RED)); return; } @@ -45,11 +44,11 @@ public void execute(final CommandSource sender, final String[] args) { try { plugin.saveConfiguration(); } catch (IOException e) { - sender.sendMessage(TextComponent.of(plugin.getI18n().get("secret_cant_be_saved")).color(TextColor.RED)); + sender.sendMessage(Component.text(plugin.getI18n().get("secret_cant_be_saved"), NamedTextColor.RED)); } - sender.sendMessage(TextComponent.of(plugin.getI18n().get("secret_success", - information.getServer().getName(), information.getAccount().getName())).color(TextColor.GREEN)); + sender.sendMessage(Component.text(plugin.getI18n().get("secret_success", + information.getServer().getName(), information.getAccount().getName()), NamedTextColor.GREEN)); plugin.getPlatform().executeAsync(plugin.getDuePlayerFetcher()); }); } diff --git a/velocity/src/main/java/net/buycraft/plugin/velocity/util/VersionCheck.java b/velocity/src/main/java/net/buycraft/plugin/velocity/util/VersionCheck.java index 6a98ed6d..aec6d4aa 100644 --- a/velocity/src/main/java/net/buycraft/plugin/velocity/util/VersionCheck.java +++ b/velocity/src/main/java/net/buycraft/plugin/velocity/util/VersionCheck.java @@ -5,8 +5,8 @@ import net.buycraft.plugin.data.responses.Version; import net.buycraft.plugin.shared.util.VersionUtil; import net.buycraft.plugin.velocity.BuycraftPlugin; -import net.kyori.text.TextComponent; -import net.kyori.text.format.TextColor; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import java.io.IOException; import java.util.concurrent.TimeUnit; @@ -50,7 +50,7 @@ public void verify() throws IOException { public void onPlayerJoin(final PostLoginEvent event) { if (event.getPlayer().hasPermission("buycraft.admin") && !upToDate) { plugin.getPlatform().executeAsyncLater(() -> - event.getPlayer().sendMessage(TextComponent.of(plugin.getI18n().get("update_available", lastKnownVersion.getVersion())).color(TextColor.YELLOW)), 3, TimeUnit.SECONDS); + event.getPlayer().sendMessage(Component.text(plugin.getI18n().get("update_available", lastKnownVersion.getVersion()), NamedTextColor.YELLOW)), 3, TimeUnit.SECONDS); } }