From a702b8b79127306f02353309b5747fbfd3a2ae93 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Tue, 8 Mar 2022 21:02:57 +0100 Subject: [PATCH] 1.18.2 support --- pom.xml | 7 ++++++- .../java/net/t2code/alias/Spigot/system/AliasRegister.java | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83fab12..b6fed5a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.t2code Alias - 1.0.6 + 1.0.7 jar T2C-Alias @@ -81,6 +81,11 @@ PlugmanGUI 3.0 + + net.t2code.minecraft.1_18.r2 + spigot + 1.18r2 + net.t2code.minecraft.1_18.r1 spigot diff --git a/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java b/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java index 35785af..3843d35 100644 --- a/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java +++ b/src/main/java/net/t2code/alias/Spigot/system/AliasRegister.java @@ -97,6 +97,11 @@ public class AliasRegister { org.bukkit.craftbukkit.v1_18_R1.CraftServer craftServer = (org.bukkit.craftbukkit.v1_18_R1.CraftServer) plugin.getServer(); craftServer.getCommandMap().register(alias, new RegisterCommands(alias)); } + if (NMSVersion.v1_18_R2) { + send.debug(plugin, "Alias register 1.18_R2"); + org.bukkit.craftbukkit.v1_18_R2.CraftServer craftServer = (org.bukkit.craftbukkit.v1_18_R2.CraftServer) plugin.getServer(); + craftServer.getCommandMap().register(alias, new RegisterCommands(alias)); + } } } else send.warning(plugin, " ยง4AliasHashmap is null! - " + alias); }