feat: Add support for Minecraft 1.21.8
- Upgrade PacketEvents from 2.9.1 to 2.9.3 for 1.21.8 compatibility - Add V1_21_8PacketFactory with full protocol support - Update version support range in README.md to include 1.21.8 - Update test configuration to use Minecraft 1.21.8 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a9d9cb3907
commit
fbadeac502
4 changed files with 29 additions and 4 deletions
|
@ -12,14 +12,14 @@ Looking for up-to-date builds of the plugin? Check out our [Jenkins](https://ci.
|
||||||
## Why is it so good?
|
## Why is it so good?
|
||||||
- 100% Packet Based - Nothing is ran on the main thread
|
- 100% Packet Based - Nothing is ran on the main thread
|
||||||
- Performance & stability oriented code
|
- Performance & stability oriented code
|
||||||
- Support for all versions from 1.8 to 1.20.4
|
- Support for all versions from 1.8 to 1.21.8
|
||||||
- Support for multiple different storage options
|
- Support for multiple different storage options
|
||||||
- Intuitive command system
|
- Intuitive command system
|
||||||
|
|
||||||
### Requirements, Extensions & Supported Software
|
### Requirements, Extensions & Supported Software
|
||||||
Requirements:
|
Requirements:
|
||||||
- Java 8+
|
- Java 8+
|
||||||
- Minecraft 1.8 - 1.21
|
- Minecraft 1.8 - 1.21.8
|
||||||
|
|
||||||
Supported Softwares:
|
Supported Softwares:
|
||||||
- Spigot ([Website](https://www.spigotmc.org/))
|
- Spigot ([Website](https://www.spigotmc.org/))
|
||||||
|
|
|
@ -8,7 +8,7 @@ runServer {
|
||||||
javaLauncher = javaToolchains.launcherFor {
|
javaLauncher = javaToolchains.launcherFor {
|
||||||
languageVersion = JavaLanguageVersion.of(21)
|
languageVersion = JavaLanguageVersion.of(21)
|
||||||
}
|
}
|
||||||
minecraftVersion "1.21.4"
|
minecraftVersion "1.21.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
@ -19,7 +19,7 @@ dependencies {
|
||||||
compileOnly "me.clip:placeholderapi:2.11.6" // Placeholder support
|
compileOnly "me.clip:placeholderapi:2.11.6" // Placeholder support
|
||||||
implementation "com.google.code.gson:gson:2.10.1" // JSON parsing
|
implementation "com.google.code.gson:gson:2.10.1" // JSON parsing
|
||||||
implementation "org.bstats:bstats-bukkit:3.0.2" // Plugin stats
|
implementation "org.bstats:bstats-bukkit:3.0.2" // Plugin stats
|
||||||
implementation "com.github.retrooper:packetevents-spigot:2.9.1" // Packets
|
implementation "com.github.retrooper:packetevents-spigot:2.9.3" // Packets
|
||||||
implementation "space.arim.dazzleconf:dazzleconf-ext-snakeyaml:1.2.1" // Configs
|
implementation "space.arim.dazzleconf:dazzleconf-ext-snakeyaml:1.2.1" // Configs
|
||||||
implementation "lol.pyr:director-adventure:2.1.2" // Commands
|
implementation "lol.pyr:director-adventure:2.1.2" // Commands
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,7 @@ public class ZNpcsPlus {
|
||||||
versions.put(ServerVersion.V_1_19_3, LazyLoader.of(() -> new V1_19_3PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
versions.put(ServerVersion.V_1_19_3, LazyLoader.of(() -> new V1_19_3PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
||||||
versions.put(ServerVersion.V_1_20_2, LazyLoader.of(() -> new V1_20_2PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
versions.put(ServerVersion.V_1_20_2, LazyLoader.of(() -> new V1_20_2PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
||||||
versions.put(ServerVersion.V_1_21_3, LazyLoader.of(() -> new V1_21_3PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
versions.put(ServerVersion.V_1_21_3, LazyLoader.of(() -> new V1_21_3PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
||||||
|
versions.put(ServerVersion.V_1_21_8, LazyLoader.of(() -> new V1_21_8PacketFactory(scheduler, packetEvents, propertyRegistry, textSerializer, configManager)));
|
||||||
|
|
||||||
ServerVersion version = packetEvents.getServerManager().getVersion();
|
ServerVersion version = packetEvents.getServerManager().getVersion();
|
||||||
if (versions.containsKey(version)) return versions.get(version).get();
|
if (versions.containsKey(version)) return versions.get(version).get();
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package lol.pyr.znpcsplus.packets;
|
||||||
|
|
||||||
|
import com.github.retrooper.packetevents.PacketEventsAPI;
|
||||||
|
import lol.pyr.znpcsplus.config.ConfigManager;
|
||||||
|
import lol.pyr.znpcsplus.entity.EntityPropertyRegistryImpl;
|
||||||
|
import lol.pyr.znpcsplus.scheduling.TaskScheduler;
|
||||||
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PacketFactory implementation for Minecraft 1.21.8.
|
||||||
|
*
|
||||||
|
* Since 1.21.8 is a hotfix release focusing on graphical and stability improvements
|
||||||
|
* without major protocol changes, this factory inherits all functionality from
|
||||||
|
* V1_21_3PacketFactory. Future version-specific optimizations can be added here
|
||||||
|
* if needed.
|
||||||
|
*/
|
||||||
|
public class V1_21_8PacketFactory extends V1_21_3PacketFactory {
|
||||||
|
public V1_21_8PacketFactory(TaskScheduler scheduler, PacketEventsAPI<Plugin> packetEvents,
|
||||||
|
EntityPropertyRegistryImpl propertyRegistry, LegacyComponentSerializer textSerializer,
|
||||||
|
ConfigManager configManager) {
|
||||||
|
super(scheduler, packetEvents, propertyRegistry, textSerializer, configManager);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue