1.18.2 support

This commit is contained in:
JaTiTV 2022-03-08 21:02:57 +01:00
parent f3f1769d41
commit a702b8b791
2 changed files with 11 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>Alias</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<packaging>jar</packaging>
<name>T2C-Alias</name>
@ -81,6 +81,11 @@
<artifactId>PlugmanGUI</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>net.t2code.minecraft.1_18.r2</groupId>
<artifactId>spigot</artifactId>
<version>1.18r2</version>
</dependency>
<dependency>
<groupId>net.t2code.minecraft.1_18.r1</groupId>
<artifactId>spigot</artifactId>

View File

@ -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);
}