From d1535da39dd97df61cdb13955463c778abb83b66 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sun, 12 Jun 2022 18:49:43 -0700 Subject: [PATCH] Update to Minecraft 1.19 --- build.gradle.kts | 6 +++--- .../io/papermc/paperweight/testplugin/TestPlugin.java | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 874e5fa..86e854a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,12 +17,12 @@ java { } dependencies { - paperDevBundle("1.18.2-R0.1-SNAPSHOT") - // paperweightDevBundle("com.example.paperfork", "1.18.2-R0.1-SNAPSHOT") + paperDevBundle("1.19-R0.1-SNAPSHOT") + // paperweightDevBundle("com.example.paperfork", "1.19-R0.1-SNAPSHOT") // You will need to manually specify the full dependency if using the groovy gradle dsl // (paperDevBundle and paperweightDevBundle functions do not work in groovy) - // paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.18.2-R0.1-SNAPSHOT") + // paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.19-R0.1-SNAPSHOT") } tasks { diff --git a/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java b/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java index 0966cd0..676461a 100644 --- a/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java +++ b/src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java @@ -5,9 +5,9 @@ import net.minecraft.ChatFormatting; import net.minecraft.Util; import net.minecraft.commands.arguments.EntityArgument; import net.minecraft.network.chat.ClickEvent; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerPlayer; -import org.bukkit.craftbukkit.v1_18_R2.CraftServer; +import org.bukkit.craftbukkit.v1_19_R1.CraftServer; import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; @@ -26,11 +26,10 @@ public final class TestPlugin extends JavaPlugin implements Listener { .executes(ctx -> { final Collection players = EntityArgument.getPlayers(ctx, "players"); for (final ServerPlayer player : players) { - player.sendMessage( - new TextComponent("Hello from Paperweight test plugin!") + player.sendSystemMessage( + Component.literal("Hello from Paperweight test plugin!") .withStyle(ChatFormatting.ITALIC, ChatFormatting.GREEN) - .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/paperweight @a"))), - Util.NIL_UUID + .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/paperweight @a"))) ); } return players.size();