Index
All Classes and Interfaces|All Packages
A
- AdvancementListener - Class in de.fairplay.listeners
-
Grants FairPlay advancements in response to various game events.
- AdvancementListener(AdvancementManager, JavaPlugin) - Constructor for class de.fairplay.listeners.AdvancementListener
-
Constructs a new AdvancementListener and starts the dawn-detection background task.
- AdvancementManager - Class in de.fairplay.advancements
-
Manages the FairPlay data pack and custom advancements.
- AdvancementManager(FairPlayPlugin) - Constructor for class de.fairplay.advancements.AdvancementManager
-
Constructs a new AdvancementManager with the given plugin instance.
B
- BlockOwnershipListener - Class in de.fairplay.listeners
-
Core listener that enforces block ownership.
- BlockOwnershipListener(OwnershipStorage, AdvancementManager, boolean, JavaPlugin) - Constructor for class de.fairplay.listeners.BlockOwnershipListener
-
Constructs a new BlockOwnershipListener with the given dependencies.
C
- CauldronListener - Class in de.fairplay.listeners
-
Handles cauldron-related ownership checks.
- CauldronListener(OwnershipStorage, FairPlayPlugin, AdvancementManager, boolean) - Constructor for class de.fairplay.listeners.CauldronListener
-
Constructs a new CauldronListener with the given dependencies.
- close() - Method in class de.fairplay.storage.OwnershipStorage
-
Closes the SQLite connection.
- CombatListener - Class in de.fairplay.listeners
-
Blocks all direct player-to-player and player-to-entity combat.
- CombatListener(OwnershipStorage, AdvancementManager) - Constructor for class de.fairplay.listeners.CombatListener
-
Constructs a new CombatListener with the given dependencies.
D
- de.fairplay - package de.fairplay
- de.fairplay.advancements - package de.fairplay.advancements
- de.fairplay.listeners - package de.fairplay.listeners
- de.fairplay.storage - package de.fairplay.storage
F
- FairPlayPlugin - Class in de.fairplay
-
Main plugin class for FairPlay.
- FairPlayPlugin() - Constructor for class de.fairplay.FairPlayPlugin
-
Constructs a new FairPlayPlugin instance.
G
- get(Player, String) - Static method in class de.fairplay.Lang
-
Returns a translated message as a red Component.
- getAdvManager() - Method in class de.fairplay.FairPlayPlugin
-
Returns the advancement manager used for granting and checking custom advancements.
- getBlockOwner(String, int, int, int) - Method in class de.fairplay.storage.OwnershipStorage
-
Returns the owner of the block at the given coordinates, or
nullif unowned. - getBlockOwner(Block) - Method in class de.fairplay.storage.OwnershipStorage
-
Returns the owner of the given block, or
nullif unowned. - getEntityOwner(UUID) - Method in class de.fairplay.storage.OwnershipStorage
-
Returns the owner of an entity, or
nullif unowned (wild / not tracked). - getSha1Hex() - Method in class de.fairplay.ResourcePackServer
-
Returns the SHA-1 hex hash of the resource pack ZIP, used for client-side validation.
- getStorage() - Method in class de.fairplay.FairPlayPlugin
-
Returns the SQLite ownership storage shared across all listeners.
- getString(Player, String) - Static method in class de.fairplay.Lang
-
Returns the raw translated string (without a Component wrapper).
- getUrl() - Method in class de.fairplay.ResourcePackServer
-
Returns the URL clients use to download the resource pack.
- grant(Player, String) - Method in class de.fairplay.advancements.AdvancementManager
-
Grants a FairPlay advancement to a player if they have not already earned it.
- GrowthListener - Class in de.fairplay.listeners
-
Propagates block ownership to newly grown or spread blocks.
- GrowthListener(JavaPlugin, OwnershipStorage, AdvancementManager, boolean) - Constructor for class de.fairplay.listeners.GrowthListener
-
Constructs a new GrowthListener with the given dependencies.
H
- has(Player, String) - Method in class de.fairplay.advancements.AdvancementManager
-
Returns whether a player has already earned a FairPlay advancement.
I
- initialize() - Method in class de.fairplay.storage.OwnershipStorage
-
Opens the SQLite connection and creates the tables if they do not exist yet.
- install() - Method in class de.fairplay.advancements.AdvancementManager
-
Installs the data pack and returns whether any files changed.
L
- Lang - Class in de.fairplay
-
Loads language files from resources/lang/ and provides translated messages based on the player's client language (player.locale()).
- LootListener - Class in de.fairplay.listeners
-
Clears all naturally generated loot (chests, barrels, end cities, …).
- LootListener(AdvancementManager) - Constructor for class de.fairplay.listeners.LootListener
-
Constructs a new LootListener with the given advancement manager.
M
- MobInteractionListener - Class in de.fairplay.listeners
-
Tracks ownership of bred and tamed animals and restricts mob interactions (shearing, brushing, milking, …) to the owner.
- MobInteractionListener(OwnershipStorage, AdvancementManager, boolean) - Constructor for class de.fairplay.listeners.MobInteractionListener
-
Constructs a new MobInteractionListener with the given dependencies.
O
- onBedEnter(PlayerBedEnterEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants "good_night" when a player successfully enters a bed.
- onBerryPick(PlayerInteractEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Sweet berry harvest: block right-clicking on another player's berry bush.
- onBlockBreak(BlockBreakEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Enforces block ownership on break.
- onBlockFertilize(BlockFertilizeEvent) - Method in class de.fairplay.listeners.GrowthListener
-
Bone meal on a block: - Not owned block → action is blocked - Owned block → all generated blocks are assigned to the player Applies to moss, pale moss, grass, crops, lily pad etc.
- onBlockForm(BlockFormEvent) - Method in class de.fairplay.listeners.GrowthListener
-
Cobblestone/obsidian/stone generator: at least one of the involved sources (lava or water) must have been placed by the player.
- onBlockGrow(BlockGrowEvent) - Method in class de.fairplay.listeners.GrowthListener
-
A block grows upward or downward: - Upward (sugar cane, cactus, twisting vines): ownership from the block below - Downward (cave vines, weeping vines): ownership from the block above Crops/potatoes grow at the same coordinate – DB entry persists automatically.
- onBlockPlace(BlockPlaceEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Registers block ownership when a player places a block.
- onBlockSpread(BlockSpreadEvent) - Method in class de.fairplay.listeners.GrowthListener
-
Spread of organisms to adjacent blocks.
- onBottleFill(PlayerInteractEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Glass bottles may only be filled from the player's own water source blocks.
- onBucketEmpty(PlayerBucketEmptyEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants "water_management" or "hot_lava" when a player places water or lava.
- onBucketEmpty(PlayerBucketEmptyEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Registers ownership of the placed water/lava source block.
- onBucketFill(PlayerBucketFillEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Water and lava buckets may only be filled from the player's own sources.
- onCauldronLevelChange(CauldronLevelChangeEvent) - Method in class de.fairplay.listeners.CauldronListener
-
Routes cauldron level changes to the appropriate ownership handler.
- onCraft(CraftItemEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants "diy" the first time a player crafts anything.
- onCreeperExplode(EntityExplodeEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants "ignition" to the nearest player (within 20 blocks) when a creeper explodes.
- onDisable() - Method in class de.fairplay.FairPlayPlugin
- onDripstonePhysics(BlockPhysicsEvent) - Method in class de.fairplay.listeners.GrowthListener
-
BlockGrowEvent and BlockFormEvent do not fire for dripstone growth in Paper 1.21.8.
- onEnable() - Method in class de.fairplay.FairPlayPlugin
- onEntityBreed(EntityBreedEvent) - Method in class de.fairplay.listeners.MobInteractionListener
-
When two animals breed, the offspring belongs to the player who initiated it.
- onEntityDamage(EntityDamageByEntityEvent) - Method in class de.fairplay.listeners.CombatListener
-
Cancels all player-initiated attacks except destroying owned vehicles.
- onEntityDeath(EntityDeathEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Handles mob deaths for advancement triggers: endless_iron — a wild iron golem dies near a player resourcefulness — a hostile mob dies without a direct player kill bodyguard — a hostile mob is killed by the player's wolf
- onEntityDeath(EntityDeathEvent) - Method in class de.fairplay.listeners.MobInteractionListener
-
Clean up the DB entry when an animal dies.
- onEntityPlace(EntityPlaceEvent) - Method in class de.fairplay.listeners.VehicleListener
-
Registers ownership when a player places a boat or minecart.
- onEntityTame(EntityTameEvent) - Method in class de.fairplay.listeners.MobInteractionListener
-
When a player tames an animal (wolf, cat, horse, …) it belongs to them.
- onFallingBlockLand(EntityChangeBlockEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Gravity block lands and becomes a solid block again.
- onFallingBlockRemove(EntityRemoveEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Falling block is removed without landing (void, lava, /kill, …).
- onFallingBlockSpawn(EntitySpawnEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Gravity block starts falling (sand, gravel, concrete powder, anvils, …).
- onFarmlandTrample(EntityChangeBlockEvent) - Method in class de.fairplay.listeners.BlockOwnershipListener
-
Farmland trampling: EntityChangeBlockEvent fires when FARMLAND → DIRT.
- onInteractEntity(PlayerInteractEntityEvent) - Method in class de.fairplay.listeners.MobInteractionListener
-
PlayerInteractEntityEvent covers: - Brushing armadillos (BRUSH in hand) - Milking cows / mooshrooms (BUCKET in hand) - Collecting mushroom stew from mooshrooms (BOWL in hand) Only the main hand is checked to avoid double-firing.
- onInventoryClick(InventoryClickEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants "fair_trade" when a player makes a villager trade.
- onJoin(PlayerJoinEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants the hidden root advancement to every player on join.
- onLootGenerate(LootGenerateEvent) - Method in class de.fairplay.listeners.LootListener
-
Replaces the generated loot list with an empty list, preventing any items from appearing.
- onPickup(EntityPickupItemEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Checks item type on pickup and grants collector / foundation / green_thumb / bed_to_go.
- onPlayerJoin(PlayerJoinEvent) - Method in class de.fairplay.listeners.ResourcePackListener
-
Sends the FairPlay resource pack to a player when they join.
- onShear(PlayerShearEntityEvent) - Method in class de.fairplay.listeners.MobInteractionListener
-
Shearing sheep, snow golems, mushroom cows: only allowed if the entity is unowned OR owned by the player.
- onStructureGrow(StructureGrowEvent) - Method in class de.fairplay.listeners.GrowthListener
-
Tree, mushroom, bamboo etc.
- onTame(EntityTameEvent) - Method in class de.fairplay.listeners.AdvancementListener
-
Grants "mans_best_friend" when a player tames a wolf.
- onVehicleDestroy(VehicleDestroyEvent) - Method in class de.fairplay.listeners.VehicleListener
-
Removes the ownership entry when a vehicle is destroyed.
- OwnershipStorage - Class in de.fairplay.storage
-
Persists block and entity ownership in a local SQLite database (
plugins/FairPlay/ownership.db). - OwnershipStorage(FairPlayPlugin) - Constructor for class de.fairplay.storage.OwnershipStorage
-
Constructs a new OwnershipStorage with the given plugin instance.
R
- removeBlockOwner(String, int, int, int) - Method in class de.fairplay.storage.OwnershipStorage
-
Removes the ownership entry for a block identified by coordinates.
- removeBlockOwner(Block) - Method in class de.fairplay.storage.OwnershipStorage
-
Removes the ownership entry for a block.
- removeEntityOwner(UUID) - Method in class de.fairplay.storage.OwnershipStorage
-
Removes the ownership entry for an entity.
- ResourcePackListener - Class in de.fairplay.listeners
-
Sends the FairPlay resource pack to each player on login.
- ResourcePackListener(ResourcePackServer, boolean) - Constructor for class de.fairplay.listeners.ResourcePackListener
-
Constructs a new ResourcePackListener with the given pack server and requirement flag.
- ResourcePackServer - Class in de.fairplay
-
Builds the FairPlay resource pack as a ZIP from embedded resources, computes the SHA-1 hash, and serves it via an embedded HTTP server.
- ResourcePackServer() - Constructor for class de.fairplay.ResourcePackServer
-
Constructs a new ResourcePackServer.
S
- setBlockOwner(String, int, int, int, UUID) - Method in class de.fairplay.storage.OwnershipStorage
-
Stores or replaces the owner of a block identified by world name and coordinates.
- setBlockOwner(Block, UUID) - Method in class de.fairplay.storage.OwnershipStorage
-
Stores or replaces the owner of a block.
- setEntityOwner(UUID, UUID) - Method in class de.fairplay.storage.OwnershipStorage
-
Stores or replaces the owner of an entity (vehicle, bred or tamed animal).
- start(JavaPlugin) - Method in class de.fairplay.ResourcePackServer
-
Builds the ZIP, saves it to the plugin data folder, then either uses the configured external URL or starts the embedded HTTP server.
- stop() - Method in class de.fairplay.ResourcePackServer
-
Stops the embedded HTTP server if one was started.
V
- VehicleListener - Class in de.fairplay.listeners
-
Tracks ownership of boats and minecarts.
- VehicleListener(OwnershipStorage, AdvancementManager) - Constructor for class de.fairplay.listeners.VehicleListener
-
Constructs a new VehicleListener with the given dependencies.
All Classes and Interfaces|All Packages