Skip to content

Commit f25dba2

Browse files
committed
Tweak Bukkit mojmap detection logic to be more reliable in non-mojmapped envs
1 parent 8bc9021 commit f25dba2

File tree

1 file changed

+4
-1
lines changed
  • worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter

1 file changed

+4
-1
lines changed

worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/Refraction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
* Reflection helper to deal with obfuscation.
2424
*/
2525
public class Refraction {
26-
private static final String MOJANG_MAPPED_CLASS_NAME = "net.minecraft.nbt.ListTag";
26+
// Spigot remaps to a v1_21_R7 style, whereas Paper mojmap environments lack this.
27+
// This is a safer method to determine whether a class is mojmapped, given Spigot now uses
28+
// mojmapping purely for class names.
29+
private static final String MOJANG_MAPPED_CLASS_NAME = "org.bukkit.craftbukkit.CraftServer";
2730
private static final boolean IS_MOJANG_MAPPED;
2831

2932
static {

0 commit comments

Comments
 (0)