Update to Minecraft 1.19

Dieser Commit ist enthalten in:
Jason Penilla 2022-06-12 18:49:43 -07:00
Ursprung 60429d65fa
Commit d1535da39d
2 geänderte Dateien mit 8 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -17,12 +17,12 @@ java {
} }
dependencies { dependencies {
paperDevBundle("1.18.2-R0.1-SNAPSHOT") paperDevBundle("1.19-R0.1-SNAPSHOT")
// paperweightDevBundle("com.example.paperfork", "1.18.2-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 // You will need to manually specify the full dependency if using the groovy gradle dsl
// (paperDevBundle and paperweightDevBundle functions do not work in groovy) // (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 { tasks {

Datei anzeigen

@ -5,9 +5,9 @@ import net.minecraft.ChatFormatting;
import net.minecraft.Util; import net.minecraft.Util;
import net.minecraft.commands.arguments.EntityArgument; import net.minecraft.commands.arguments.EntityArgument;
import net.minecraft.network.chat.ClickEvent; 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 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.event.Listener;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -26,11 +26,10 @@ public final class TestPlugin extends JavaPlugin implements Listener {
.executes(ctx -> { .executes(ctx -> {
final Collection<ServerPlayer> players = EntityArgument.getPlayers(ctx, "players"); final Collection<ServerPlayer> players = EntityArgument.getPlayers(ctx, "players");
for (final ServerPlayer player : players) { for (final ServerPlayer player : players) {
player.sendMessage( player.sendSystemMessage(
new TextComponent("Hello from Paperweight test plugin!") Component.literal("Hello from Paperweight test plugin!")
.withStyle(ChatFormatting.ITALIC, ChatFormatting.GREEN) .withStyle(ChatFormatting.ITALIC, ChatFormatting.GREEN)
.withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/paperweight @a"))), .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/paperweight @a")))
Util.NIL_UUID
); );
} }
return players.size(); return players.size();