From 685e561bdcf31ce7e66809badff551cc7ba32e92 Mon Sep 17 00:00:00 2001 From: Cerus Date: Mon, 18 Nov 2024 04:23:32 +0100 Subject: [PATCH] 1.21.3 --- api/pom.xml | 2 +- bukkit-16R3/pom.xml | 2 +- bukkit-17R1/pom.xml | 2 +- bukkit-18R1/pom.xml | 2 +- bukkit-18R2/pom.xml | 2 +- bukkit-19R1/pom.xml | 2 +- bukkit-19R2/pom.xml | 2 +- bukkit-19R3/pom.xml | 2 +- bukkit-20R1/pom.xml | 2 +- bukkit-20R2/pom.xml | 2 +- bukkit-20R3/pom.xml | 2 +- bukkit-20R4/pom.xml | 2 +- bukkit-21R1/pom.xml | 2 +- bukkit-21R2/pom.xml | 36 +++ .../v21r2/VersionAdapter21R2.java | 232 ++++++++++++++++++ install_craftbukkit.sh | 193 +++++++++++++++ plugin/pom.xml | 8 +- .../plugin/VisualCraftingPlugin.java | 1 + pom.xml | 3 +- 19 files changed, 484 insertions(+), 15 deletions(-) create mode 100644 bukkit-21R2/pom.xml create mode 100644 bukkit-21R2/src/main/java/dev/cerus/visualcrafting/v21r2/VersionAdapter21R2.java create mode 100644 install_craftbukkit.sh diff --git a/api/pom.xml b/api/pom.xml index fe9924b..5de712e 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-16R3/pom.xml b/bukkit-16R3/pom.xml index cc0dd1b..3a722a8 100644 --- a/bukkit-16R3/pom.xml +++ b/bukkit-16R3/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-17R1/pom.xml b/bukkit-17R1/pom.xml index 4ae74ec..7c6d981 100644 --- a/bukkit-17R1/pom.xml +++ b/bukkit-17R1/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-18R1/pom.xml b/bukkit-18R1/pom.xml index 8d3dcea..689a138 100644 --- a/bukkit-18R1/pom.xml +++ b/bukkit-18R1/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-18R2/pom.xml b/bukkit-18R2/pom.xml index 0a98d30..c3eb88c 100644 --- a/bukkit-18R2/pom.xml +++ b/bukkit-18R2/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-19R1/pom.xml b/bukkit-19R1/pom.xml index 0b68bb1..fd5a456 100644 --- a/bukkit-19R1/pom.xml +++ b/bukkit-19R1/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-19R2/pom.xml b/bukkit-19R2/pom.xml index cdb787f..819fdc2 100644 --- a/bukkit-19R2/pom.xml +++ b/bukkit-19R2/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 diff --git a/bukkit-19R3/pom.xml b/bukkit-19R3/pom.xml index b541821..6d4f4d6 100644 --- a/bukkit-19R3/pom.xml +++ b/bukkit-19R3/pom.xml @@ -6,7 +6,7 @@ dev.cerus.visualcrafting parent - 1.3.4 + 1.3.5 bukkit-19R3 diff --git a/bukkit-20R1/pom.xml b/bukkit-20R1/pom.xml index a311cfb..64084bc 100644 --- a/bukkit-20R1/pom.xml +++ b/bukkit-20R1/pom.xml @@ -6,7 +6,7 @@ dev.cerus.visualcrafting parent - 1.3.4 + 1.3.5 bukkit-20R1 diff --git a/bukkit-20R2/pom.xml b/bukkit-20R2/pom.xml index 7bc3396..76b7411 100644 --- a/bukkit-20R2/pom.xml +++ b/bukkit-20R2/pom.xml @@ -6,7 +6,7 @@ dev.cerus.visualcrafting parent - 1.3.4 + 1.3.5 bukkit-20R2 diff --git a/bukkit-20R3/pom.xml b/bukkit-20R3/pom.xml index fd042e2..7e2aeea 100644 --- a/bukkit-20R3/pom.xml +++ b/bukkit-20R3/pom.xml @@ -6,7 +6,7 @@ dev.cerus.visualcrafting parent - 1.3.4 + 1.3.5 bukkit-20R3 diff --git a/bukkit-20R4/pom.xml b/bukkit-20R4/pom.xml index 00e139a..52c8e6f 100644 --- a/bukkit-20R4/pom.xml +++ b/bukkit-20R4/pom.xml @@ -6,7 +6,7 @@ dev.cerus.visualcrafting parent - 1.3.4 + 1.3.5 bukkit-20R4 diff --git a/bukkit-21R1/pom.xml b/bukkit-21R1/pom.xml index a82c73e..a5764b4 100644 --- a/bukkit-21R1/pom.xml +++ b/bukkit-21R1/pom.xml @@ -6,7 +6,7 @@ dev.cerus.visualcrafting parent - 1.3.4 + 1.3.5 bukkit-21R1 diff --git a/bukkit-21R2/pom.xml b/bukkit-21R2/pom.xml new file mode 100644 index 0000000..fefe6c4 --- /dev/null +++ b/bukkit-21R2/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + dev.cerus.visualcrafting + parent + 1.3.5 + + + bukkit-21R2 + + + 21 + 21 + UTF-8 + + + + + dev.cerus.visualcrafting + api + ${project.parent.version} + provided + + + + org.bukkit + craftbukkit + 1.21.3-R0.1-SNAPSHOT + provided + + + + \ No newline at end of file diff --git a/bukkit-21R2/src/main/java/dev/cerus/visualcrafting/v21r2/VersionAdapter21R2.java b/bukkit-21R2/src/main/java/dev/cerus/visualcrafting/v21r2/VersionAdapter21R2.java new file mode 100644 index 0000000..7c754d9 --- /dev/null +++ b/bukkit-21R2/src/main/java/dev/cerus/visualcrafting/v21r2/VersionAdapter21R2.java @@ -0,0 +1,232 @@ +package dev.cerus.visualcrafting.v21r2; + +import com.mojang.math.Transformation; +import dev.cerus.visualcrafting.api.config.Config; +import dev.cerus.visualcrafting.api.version.FakeItemDisplay; +import dev.cerus.visualcrafting.api.version.FakeMap; +import dev.cerus.visualcrafting.api.version.Feature; +import dev.cerus.visualcrafting.api.version.VersionAdapter; +import io.netty.channel.ChannelDuplexHandler; +import io.netty.channel.ChannelHandlerContext; +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumSet; +import java.util.UUID; +import java.util.function.BiConsumer; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.PacketPlayInUseEntity; +import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy; +import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata; +import net.minecraft.network.protocol.game.PacketPlayOutMap; +import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity; +import net.minecraft.network.syncher.DataWatcher; +import net.minecraft.network.syncher.DataWatcherRegistry; +import net.minecraft.server.network.PlayerConnection; +import net.minecraft.server.network.ServerCommonPacketListenerImpl; +import net.minecraft.world.entity.EntityTypes; +import net.minecraft.world.level.saveddata.maps.MapId; +import net.minecraft.world.level.saveddata.maps.WorldMap; +import net.minecraft.world.phys.Vec3D; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Rotation; +import org.bukkit.block.BlockFace; +import org.bukkit.craftbukkit.v1_21_R2.entity.CraftPlayer; +import org.bukkit.craftbukkit.v1_21_R2.inventory.CraftItemStack; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +public class VersionAdapter21R2 extends VersionAdapter { + + private Config config; + private BiConsumer entityClickCallback; + private int nextEntityId; + private int nextMapId; + private Field netManField; + + private NetworkManager getNetworkManager(final PlayerConnection b) { + try { + if (this.netManField == null) { + this.netManField = ServerCommonPacketListenerImpl.class.getDeclaredField("e"); + this.netManField.setAccessible(true); + } + return (NetworkManager) this.netManField.get(b); + } catch (final NoSuchFieldException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + @Override + public void init(final Config config, final BiConsumer entityClickCallback) { + this.config = config; + this.entityClickCallback = entityClickCallback; + this.nextEntityId = config.entityIdRangeMin(); + this.nextMapId = config.mapIdRangeMin(); + } + + @Override + public void inject(final Player player) { + if (this.config.enablePacketListening()) { + final NetworkManager netMan = this.getNetworkManager(((CraftPlayer) player).getHandle().f); + netMan.n.pipeline() + .addBefore("packet_handler", "visual_crafting", new ChannelDuplexHandler() { + @Override + public void channelRead(final ChannelHandlerContext ctx, final Object msg) throws Exception { + if (msg instanceof final PacketPlayInUseEntity useEntity) { + VersionAdapter21R2.this.handlePacketIn(player, useEntity); + } + super.channelRead(ctx, msg); + } + }); + } + } + + private void handlePacketIn(final Player player, final PacketPlayInUseEntity packet) { + try { + final Field a = packet.getClass().getDeclaredField("b"); + a.setAccessible(true); + this.entityClickCallback.accept(player, (Integer) a.get(packet)); + } catch (final NoSuchFieldException | IllegalAccessException e) { + e.printStackTrace(); + } + } + + @Override + public int spawnItemFrame(final Location location, final BlockFace direction) { + final int eid = this.getNewEntityId(); + final PacketPlayOutSpawnEntity packet = new PacketPlayOutSpawnEntity( + eid, + UUID.randomUUID(), + location.getBlockX(), + location.getBlockY(), + location.getBlockZ(), + direction == BlockFace.DOWN ? 90 : direction == BlockFace.UP ? -90 : 0, + switch (direction) { + case NORTH -> -180; + case EAST -> -90; + case WEST -> 90; + default -> 0; + }, + EntityTypes.at, + switch (direction) { + case UP -> 1; + case NORTH -> 2; + case SOUTH -> 3; + case WEST -> 4; + case EAST -> 5; + default -> 0; + }, + new Vec3D(0, 0, 0), + switch (direction) { + case NORTH -> -180; + case EAST -> -90; + case WEST -> 90; + default -> 0; + } + ); + Bukkit.getOnlinePlayers().forEach(player -> this.sendPacket(player, packet)); + return eid; + } + + @Override + public int spawnItemDisplay(final FakeItemDisplay itemDisplay) { + final int eid = this.getNewEntityId(); + final PacketPlayOutSpawnEntity packet = new PacketPlayOutSpawnEntity( + eid, + UUID.randomUUID(), + itemDisplay.getLocation().getBlockX(), + itemDisplay.getLocation().getBlockY(), + itemDisplay.getLocation().getBlockZ(), + 0, + 0, + EntityTypes.as, + 0, + new Vec3D(0, 0, 0), + 0 + ); + Bukkit.getOnlinePlayers().forEach(player -> this.sendPacket(player, packet)); + return eid; + } + + @Override + public void updateItemFrame(final int frameId, final ItemStack itemStack, final Rotation rotation, final boolean invisible) { + final PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(frameId, Arrays.asList( + new DataWatcher.c<>(8, DataWatcherRegistry.h, CraftItemStack.asNMSCopy(itemStack)), + new DataWatcher.c<>(9, DataWatcherRegistry.b, rotation.ordinal()), + new DataWatcher.c<>(0, DataWatcherRegistry.a, (byte) (invisible ? 0x20 : 0)) + )); + Bukkit.getOnlinePlayers().forEach(player -> this.sendPacket(player, packet)); + } + + @Override + public void updateItemDisplay(final int displayId, final FakeItemDisplay itemDisplay) { + final Transformation nmsTransf = new Transformation(itemDisplay.getTransformationMatrix()); + final PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(displayId, Arrays.asList( + new DataWatcher.c<>(11, DataWatcherRegistry.D, nmsTransf.d()), + new DataWatcher.c<>(12, DataWatcherRegistry.D, nmsTransf.f()), + new DataWatcher.c<>(13, DataWatcherRegistry.E, nmsTransf.e()), + new DataWatcher.c<>(14, DataWatcherRegistry.E, nmsTransf.g()), + new DataWatcher.c<>(23, DataWatcherRegistry.h, CraftItemStack.asNMSCopy(itemDisplay.getItemStack())), + new DataWatcher.c<>(24, DataWatcherRegistry.a, (byte) itemDisplay.getTransform().ordinal()) + )); + Bukkit.getOnlinePlayers().forEach(player -> this.sendPacket(player, packet)); + } + + @Override + public void destroyEntity(final int entityId) { + final PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(entityId); + Bukkit.getOnlinePlayers().forEach(player -> this.sendPacket(player, packet)); + } + + @Override + public FakeMap createMap() { + int mapId = getNewMapId(); + return this.createMap(mapId, new MapId(mapId)); + } + + @Override + public void sendMap(final FakeMap map) { + final PacketPlayOutMap packet = new PacketPlayOutMap( + (MapId) getMapHandle(map), + (byte) 0, + true, + Collections.emptyList(), + new WorldMap.c(0, + 0, + 128, + 128, + this.getMapData(map)) + ); + Bukkit.getOnlinePlayers().forEach(player -> this.sendPacket(player, packet)); + } + + @Override + public EnumSet getImplementedFeatures() { + return FEATURES_DISPLAY; + } + + private void sendPacket(final Player player, final Packet packet) { + ((CraftPlayer) player).getHandle().f.b(packet); + } + + private int getNewEntityId() { + if (this.nextEntityId >= this.config.entityIdRangeMax()) { + this.nextEntityId = this.config.entityIdRangeMin(); + return this.nextEntityId; + } else { + return this.nextEntityId++; + } + } + + private int getNewMapId() { + if (this.nextMapId >= this.config.mapIdRangeMax()) { + this.nextMapId = this.config.mapIdRangeMin(); + return this.nextMapId; + } else { + return this.nextMapId++; + } + } + +} diff --git a/install_craftbukkit.sh b/install_craftbukkit.sh new file mode 100644 index 0000000..1a4b00e --- /dev/null +++ b/install_craftbukkit.sh @@ -0,0 +1,193 @@ +#!/bin/bash + +# Author: Maximilian Dorn +# Version: 1.0.0 +# Repository: https://github.com/cerus/craftbukkit-install + +FLAG_FORCE_INSTALL="false" +FLAG_REMOVE_DIR="false" +FLAG_DEBUG="false" + +BUILDTOOLS_DOWNLOAD_URL="https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar" +WORK_DIR="./.buildtools_cache" +REQUIRED_PROGRAMS=("awk" "mvn" "grep" "wget" "xmllint") # libxml2-utils + +# Adding a new Java version: +# 1) Go to https://adoptium.net/temurin/releases/?package=jdk&arch=x64&os=linux +# 2) Select the version +# 3) Download and also copy the download url to paste into JAVA_DOWNLOAD_LINKS +# 4) Get the path the archive will extract to and append it to JAVA_DIRS +# 5) Append the version to JAVA_VERS +JAVA_DOWNLOAD_LINKS=("https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05/OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz" + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.tar.gz" + "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.4%2B7/OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz") +JAVA_DIRS=("./jdk8u422-b05" "./jdk-17.0.12+7" "./jdk-21.0.4+7") +JAVA_VERS=("8" "17" "21") + +# STATE +CRAFTBUKKIT_VERSIONS=() +CURRENT_CRAFTBUKKIT="" +INSTALLED="0" +SKIPPED="0" +FAILED="0" +CURRENT_JAVA_IDX="0" + +function error() { + echo "/!\\ $1" +} + +function info() { + echo "[i] $1" +} + +function debug() { + if [ "$FLAG_DEBUG" == "0" ]; then + echo "DEBUG: $1" + fi +} + +function next_java() { + CURRENT_JAVA_IDX="$((CURRENT_JAVA_IDX+1))" + if [ $CURRENT_JAVA_IDX -ge ${#JAVA_DIRS[@]} ]; then + error "Exhausted all Java versions. Can not continue." + exit 255 + fi +} + +function install_java() { + info "Installing the following Java versions: ${JAVA_VERS[*]}" + for i in $(seq 0 $((${#JAVA_DIRS[@]}-1))); do + link="${JAVA_DOWNLOAD_LINKS[$i]}" + path="${JAVA_DIRS[$i]}/bin/java" + if [ -e "$path" ]; then + info "Java ${JAVA_VERS[$i]} is already installed" + else + info "Downloading $link..." + wget "$link" --quiet + filename="$(ls ./*.tar.gz)" + tar -xf "$filename" > /dev/null 2>&1 + rm "$filename" + fi + done +} + +function collect_craftbukkit_versions() { + while IFS=$'\n' read -r line + do + CRAFTBUKKIT_VERSIONS+=("$line") + done <<< "$(xmllint --xpath "//*[local-name()='dependency'][*[local-name()='artifactId' and text()='craftbukkit']][*[local-name()='groupId' and text()='org.bukkit']]/*[local-name()='version']/text()" ./**/pom.xml 2>/dev/null)" +} + +function install_craftbukkit() { + # Check if already installed + if mvn dependency:get -Dartifact=org.bukkit:craftbukkit:"$CURRENT_CRAFTBUKKIT" > /dev/null 2>&1; then + if [ "$FLAG_FORCE_INSTALL" != "true" ]; then + info "CraftBukkit $CURRENT_CRAFTBUKKIT already is installed, skipping" + SKIPPED="$((SKIPPED+1))" + return 0 + fi + fi + + IFS='-' read -ra parts <<< "$CURRENT_CRAFTBUKKIT" + mcver="${parts[0]}" + + info "Compiling $CURRENT_CRAFTBUKKIT (MC $mcver) with Java ${JAVA_VERS[$CURRENT_JAVA_IDX]}" + mkdir -p "$CURRENT_CRAFTBUKKIT" + cd "$CURRENT_CRAFTBUKKIT" || exit + + curjava="${JAVA_DIRS[$CURRENT_JAVA_IDX]}/bin/java" + "../$curjava" -jar ../BuildTools.jar --rev "$mcver" > /dev/null 2>&1 + btres="$?" + + logdir="../logs/$mcver" + rm -rf "$logdir"; mkdir -p "$logdir" + cp BuildTools.log.txt "$logdir/buildtools.log" + touch "$logdir/maven.log" + + if [ "$btres" != "0" ]; then + cd .. + if grep "java.io.FileNotFoundException" "$CURRENT_CRAFTBUKKIT/BuildTools.log.txt" > /dev/null 2>&1; then + error "CraftBukkit $CURRENT_CRAFTBUKKIT not found on SpigotMC servers" + return 1 + elif grep "requires Java versions" "$CURRENT_CRAFTBUKKIT/BuildTools.log.txt" > /dev/null 2>&1; then + info "CraftBukkit $CURRENT_CRAFTBUKKIT requires another Java version. Switching and trying again." + next_java + install_craftbukkit + return 0 + else + FAILED="$((FAILED+1))" + error "Failed to install $CURRENT_CRAFTBUKKIT. Check the log file." + return 1 + fi + fi + + curjava="${JAVA_DIRS[$CURRENT_JAVA_IDX]}" + info "Installing $CURRENT_CRAFTBUKKIT" + info " Bukkit" + cd Bukkit || echo; JAVA_HOME="../../$curjava" mvn install >> "$logdir/maven.log" 2>&1 + info " Spigot / API" + cd ../Spigot/Spigot-API || echo; JAVA_HOME="../../../$curjava" mvn install >> "$logdir/maven.log" 2>&1 + info " CraftBukkit" + cd ../../CraftBukkit || echo; JAVA_HOME="../../$curjava" mvn install >> "$logdir/maven.log" 2>&1 + info " Spigot / Server" + cd ../Spigot/Spigot-Server || echo; JAVA_HOME="../../../$curjava" mvn install >> "$logdir/maven.log" 2>&1 + cd ../../../ + INSTALLED="$((INSTALLED+1))" +} + +# Params +[[ "$1" == *"f"* ]] && FLAG_FORCE_INSTALL="true" +[[ "$1" == *"r"* ]] && FLAG_REMOVE_DIR="true" +[[ "$1" == *"d"* ]] && FLAG_DEBUG="true" + +# Check if all required programs are installed +for app in "${REQUIRED_PROGRAMS[@]}"; do + if ! which "$app" > /dev/null 2>&1; then + error "$app is not installed. This script requires $app." + exit + fi +done + +# Collect CB versions +collect_craftbukkit_versions +if [ "${#CRAFTBUKKIT_VERSIONS[@]}" == "0" ]; then + error "No CraftBukkit versions found in project. Exiting now." + exit +fi + +# Enter work dir +mkdir -p "$WORK_DIR" +cd $WORK_DIR || exit + +# Install Java +install_java + +# Download BuildTools +if [ ! -e "./BuildTools.jar" ]; then + info "Downloading BuildTools from $BUILDTOOLS_DOWNLOAD_URL..." + wget "$BUILDTOOLS_DOWNLOAD_URL" --quiet +fi +if [ ! -e "./BuildTools.jar" ]; then + error "Failed to download BuildTools. Exiting now." + exit +fi + +# Install CB +for ver in "${CRAFTBUKKIT_VERSIONS[@]}"; do + CURRENT_CRAFTBUKKIT="$ver" + install_craftbukkit +done + +info "Done." +info "Installed: $INSTALLED Skipped: $SKIPPED Failed: $FAILED" + +# Cleanup +if [ "$FLAG_REMOVE_DIR" == "true" ]; then + cd .. + rm -rf "$WORK_DIR" +else + for dir in $(ls | grep R0.1-SNAPSHOT); do + rm -rf "$dir" + done + rm -rf BuildTools.jar +fi \ No newline at end of file diff --git a/plugin/pom.xml b/plugin/pom.xml index 5337b09..9213485 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -5,7 +5,7 @@ parent dev.cerus.visualcrafting - 1.3.4 + 1.3.5 4.0.0 @@ -101,6 +101,12 @@ ${project.parent.version} compile + + dev.cerus.visualcrafting + bukkit-21R2 + ${project.parent.version} + compile + dev.cerus.maps diff --git a/plugin/src/main/java/dev/cerus/visualcrafting/plugin/VisualCraftingPlugin.java b/plugin/src/main/java/dev/cerus/visualcrafting/plugin/VisualCraftingPlugin.java index d6f6b2a..f376fc5 100644 --- a/plugin/src/main/java/dev/cerus/visualcrafting/plugin/VisualCraftingPlugin.java +++ b/plugin/src/main/java/dev/cerus/visualcrafting/plugin/VisualCraftingPlugin.java @@ -49,6 +49,7 @@ public void onEnable() { case "1.20.3", "1.20.4" -> createVersionAdapter("20R3"); case "1.20.5", "1.20.6" -> createVersionAdapter("20R4"); case "1.21", "1.21.1" -> createVersionAdapter("21R1"); + case "1.21.2", "1.21.3" -> createVersionAdapter("21R2"); default -> null; }; if (versionAdapter == null) { diff --git a/pom.xml b/pom.xml index 24ac8b7..49f32f0 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ dev.cerus.visualcrafting parent pom - 1.3.4 + 1.3.5 plugin api @@ -23,6 +23,7 @@ bukkit-20R3 bukkit-20R4 bukkit-21R1 + bukkit-21R2