mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-04 15:41:38 +00:00
@@ -257,7 +257,7 @@ public class BukkitRecipeManager implements RecipeManager<ItemStack> {
|
||||
}
|
||||
|
||||
// send to players
|
||||
|
||||
Reflections.method$DedicatedPlayerList$reloadRecipes.invoke(Reflections.field$CraftServer$playerList.get(Bukkit.getServer()));
|
||||
|
||||
// now we need to remove the fake `exact`
|
||||
if (VersionHelper.isVersionNewerThan1_21_4()) {
|
||||
|
||||
@@ -4050,4 +4050,28 @@ public class Reflections {
|
||||
}
|
||||
method$RecipeManager$byKey = requireNonNull(method$RecipeManager$byKey0);
|
||||
}
|
||||
|
||||
public static final Class<?> clazz$CraftServer = requireNonNull(
|
||||
ReflectionUtils.getClazz(
|
||||
BukkitReflectionUtils.assembleCBClass("CraftServer")
|
||||
)
|
||||
);
|
||||
|
||||
public static final Class<?> clazz$DedicatedPlayerList = requireNonNull(
|
||||
ReflectionUtils.getClazz(
|
||||
BukkitReflectionUtils.assembleMCClass("server.dedicated.DedicatedPlayerList")
|
||||
)
|
||||
);
|
||||
|
||||
public static final Field field$CraftServer$playerList = requireNonNull(
|
||||
ReflectionUtils.getDeclaredField(
|
||||
clazz$CraftServer, clazz$DedicatedPlayerList, 0
|
||||
)
|
||||
);
|
||||
|
||||
public static final Method method$DedicatedPlayerList$reloadRecipes = requireNonNull(
|
||||
ReflectionUtils.getMethod(
|
||||
clazz$DedicatedPlayerList, new String[] {"reloadRecipeData", "reloadRecipes"}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user