Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v3' into v3
Browse files Browse the repository at this point in the history
# Conflicts:
#	bukkit/src/main/java/revxrsal/commands/bukkit/brigadier/MinecraftArgumentType.java
  • Loading branch information
Revxrsal committed Dec 24, 2024
2 parents e7df2f2 + a14d364 commit 86c00fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ subprojects {
apply plugin: "maven-publish"

group = "io.github.revxrsal"
version = "3.3.2"
version = "3.3.3"

if (name != "velocity") {
sourceCompatibility = 1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,12 @@ public static int patchNumber() {
@SneakyThrows
public static @NotNull Class<?> findNmsClass(@NotNull String name) {
if (supports(1, UNVERSION_NMS)) {
return Class.forName("net.minecraft.server." + name);
return Class.forName("net.minecraft." + name);
}
return Class.forName("net.minecraft.server." + VERSION + "." + name);
int dotIndex = name.lastIndexOf('.');
if (dotIndex == -1)
return Class.forName("net.minecraft.server." + VERSION + "." + name);
return Class.forName("net.minecraft.server." + VERSION + "." + name.substring(dotIndex + 1));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,8 @@ final class ReflectionCommodore extends Commodore {
final Class<?> minecraftServer;
final Class<?> commandDispatcher;

if (BukkitVersion.supports(1, 16)) {
minecraftServer = BukkitVersion.findNmsClass("server.MinecraftServer");
commandDispatcher = BukkitVersion.findNmsClass("commands.CommandDispatcher");
} else {
minecraftServer = BukkitVersion.findNmsClass("MinecraftServer");
commandDispatcher = BukkitVersion.findNmsClass("CommandDispatcher");
}

minecraftServer = BukkitVersion.findNmsClass("server.MinecraftServer");
commandDispatcher = BukkitVersion.findNmsClass("commands.CommandDispatcher");
Class<?> craftServer = BukkitVersion.findOcbClass("CraftServer");
CONSOLE_FIELD = craftServer.getDeclaredField("console");
CONSOLE_FIELD.setAccessible(true);
Expand Down

0 comments on commit 86c00fc

Please sign in to comment.