9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 20:39:10 +00:00
This commit is contained in:
XiaoMoMi
2025-04-23 22:10:07 +08:00
parent 4b1c322d9c
commit fd89d6d166
3 changed files with 8 additions and 9 deletions

View File

@@ -43,7 +43,6 @@ public class BlockEventListener implements Listener {
private final BukkitCraftEngine plugin;
private final boolean enableNoteBlockCheck;
private final BukkitBlockManager manager;
// private static final Set<Material> WATER_BUCKETS = Arrays.stream(ItemKeys.WATER_BUCKETS).map(it -> Registry.MATERIAL.get(new NamespacedKey(it.namespace(), it.value()))).collect(Collectors.toSet());
public BlockEventListener(BukkitCraftEngine plugin, BukkitBlockManager manager, boolean enableNoteBlockCheck) {
this.plugin = plugin;

View File

@@ -97,13 +97,13 @@ public class BukkitServerPlayer extends Player {
this.serverPlayerRef = new WeakReference<>(FastNMS.INSTANCE.method$CraftPlayer$getHandle(player));
this.uuid = player.getUniqueId();
this.name = player.getName();
if (Reflections.method$CraftPlayer$setSimplifyContainerDesyncCheck != null) {
try {
Reflections.method$CraftPlayer$setSimplifyContainerDesyncCheck.invoke(player, true);
} catch (Exception e) {
this.plugin.logger().warn("Failed to setSimplifyContainerDesyncCheck", e);
}
}
// if (Reflections.method$CraftPlayer$setSimplifyContainerDesyncCheck != null) {
// try {
// Reflections.method$CraftPlayer$setSimplifyContainerDesyncCheck.invoke(player, true);
// } catch (Exception e) {
// this.plugin.logger().warn("Failed to setSimplifyContainerDesyncCheck", e);
// }
// }
}
@Override