Class LandProtectionManager.FixBedPhysics

java.lang.Object
org.kingdoms.managers.land.LandProtectionManager.FixBedPhysics
All Implemented Interfaces:
org.bukkit.event.Listener
Enclosing class:
LandProtectionManager

public static final class LandProtectionManager.FixBedPhysics extends Object implements org.bukkit.event.Listener
A server bug in 1.18: Placing a bed next to a crop (carrots or potatoes) that are planted in a completely dark place, causes the crop to be broken and drop items, but the crop block itself will stay there when the bed placing is cancelled from BlockPlaceEvent. Issue: https://discord.com/channels/429132410748141579/1149401765456924752

This was tested with the TestPlugin and confirmed an issue that only happens to bed.

BlockPhysicsEvent is called bofore BlockPlaceEvent, so detecting which event should be cancelled is impossible.

  • Field Details

    • PREVENT

      protected static final Set<SimpleLocation> PREVENT
    • USED

      public static boolean USED
    • BED_CRITICAL_FACES

      protected static final org.bukkit.block.BlockFace[] BED_CRITICAL_FACES
  • Constructor Details

    • FixBedPhysics

      public FixBedPhysics()
  • Method Details

    • onSignPhysicsBreak

      public void onSignPhysicsBreak(org.bukkit.event.block.BlockPhysicsEvent event)