InstanceProtector

public class InstanceProtector implements Listener

World-scoped protections, applied at EventPriority.LOWEST to intercept before other plugins. Originally extracted from EliteMobs' DungeonProtector; see WorldProtectionRules for per-world toggles and ContainerAllowlist for the optional treasure-chest hook. Plugins register a world with addProtectedWorld. Worlds are automatically removed on WorldUnloadEvent.

Constructors

Link copied to clipboard
public void InstanceProtector()

Functions

Link copied to clipboard
public static void addProtectedWorld(World world)
public static void addProtectedWorld(World world, WorldProtectionRules rules)
Link copied to clipboard
public static void addPvpPreventedWorld(World world)
Link copied to clipboard
public static void addRedstonePreventedWorld(World world)
Link copied to clipboard
public void applyEnvironmentalDamageMultipliers(EntityDamageEvent event)
Link copied to clipboard
public void enforceNoElytraInProtectedWorld(PlayerMoveEvent event)
Link copied to clipboard
public static WorldProtectionRules getRules(World world)
Link copied to clipboard
public static boolean isProtectedWorld(World world)
Link copied to clipboard
public void preventArmorStandDamage(EntityDamageByEntityEvent event)
Link copied to clipboard
public void preventArmorStandManipulate(PlayerArmorStandManipulateEvent event)
Link copied to clipboard
public void preventBlockBurnDamage(BlockBurnEvent event)
Link copied to clipboard
public void preventBlockExplosionEvent(BlockExplodeEvent event)
Link copied to clipboard
public void preventBlockFadeEvent(BlockFadeEvent event)
Link copied to clipboard
public void preventBlockFire(BlockIgniteEvent event)
Link copied to clipboard
public void preventBlockPlace(BlockPlaceEvent event)
Link copied to clipboard
public void preventBonemeal(BlockFertilizeEvent event)
Link copied to clipboard
public void preventCobwebPotions(LingeringPotionSplashEvent event)
public void preventCobwebPotions(PotionSplashEvent event)
Link copied to clipboard
public void preventContainerAccess(PlayerInteractEvent event)
Link copied to clipboard
public void preventDoorOpening(PlayerInteractEvent event)
Link copied to clipboard
public void preventDragonEggInteraction(PlayerInteractEvent event)
Link copied to clipboard
public void preventElytraGlideStart(EntityToggleGlideEvent event)
Link copied to clipboard
public void preventElytraOnWorldEnter(PlayerChangedWorldEvent event)
Link copied to clipboard
public void preventEntityChangeBlockEvent(EntityChangeBlockEvent event)
Link copied to clipboard
public void preventEntityExplosionEvent(EntityExplodeEvent event)
Link copied to clipboard
public void preventFlowerpotInteraction(PlayerInteractEvent event)
Link copied to clipboard
public void preventFlyToggle(PlayerToggleFlightEvent event)
Link copied to clipboard
public void preventFriendlyFireInDungeon(EntityDamageByEntityEvent event)
Link copied to clipboard
public void preventItemFrameBreak(HangingBreakByEntityEvent event)
Link copied to clipboard
public void preventItemFrameDamage(EntityDamageByEntityEvent event)
Link copied to clipboard
public void preventItemFrameInteract(PlayerInteractEntityEvent event)
Link copied to clipboard
public void preventLeafDecay(LeavesDecayEvent event)
Link copied to clipboard
public void preventLiquidFlow(BlockFromToEvent event)
Link copied to clipboard
public void preventLiquidPlace(PlayerBucketEmptyEvent event)
Link copied to clipboard
public void preventPlayerBlockBreak(BlockBreakEvent event)
Link copied to clipboard
public void preventPlayerBlockDamage(BlockDamageEvent event)
Link copied to clipboard
public void preventPlayerBlockPlace(BlockCanBuildEvent event)
Link copied to clipboard
public void preventSignEdits(SignChangeEvent event)
Link copied to clipboard
public void preventTntPrimeEvent(TNTPrimeEvent event)
Link copied to clipboard
public void preventVanillaMobSpawning(CreatureSpawnEvent event)
Link copied to clipboard
public void removeProtectedInstance(WorldUnloadEvent event)
Link copied to clipboard
public static boolean removeProtectedWorld(World world)
Link copied to clipboard
public static void removePvpPreventedWorld(World world)
Link copied to clipboard
public static void removeRedstonePreventedWorld(World world)
Link copied to clipboard
public static void setContainerAllowlist(ContainerAllowlist allowlist)
Link copied to clipboard
public static void shutdown()
Link copied to clipboard
public static boolean toggleBypass(UUID playerUUID)
Returns the new bypass state for the given player.