Klasse HomeTeleportGuard
java.lang.Object
de.delinkedde.areashopreborn.integration.HomeTeleportGuard
- Alle implementierten Schnittstellen:
org.bukkit.event.Listener
Restricts only teleports preceded by configured CMI/Essentials-style home commands.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungHomeTeleportGuard(HomeProtectionCache cache, MessageService messages, List<String> commands, Duration intentTimeout, boolean enabled) Creates the optional home teleport guard. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidonCommand(org.bukkit.event.player.PlayerCommandPreprocessEvent event) Records a successful command preprocess event without attempting to resolve its destination.voidonQuit(org.bukkit.event.player.PlayerQuitEvent event) Removes an abandoned home intent when a player disconnects.voidonTeleport(org.bukkit.event.player.PlayerTeleportEvent event) Applies the cached policy to the next command/plugin teleport belonging to a home intent.
-
Konstruktordetails
-
HomeTeleportGuard
public HomeTeleportGuard(HomeProtectionCache cache, MessageService messages, List<String> commands, Duration intentTimeout, boolean enabled) Creates the optional home teleport guard.- Parameter:
cache- non-blocking authorization cachemessages- configurable message renderercommands- normalized command prefixes identifying home requestsintentTimeout- maximum delay between command and teleportenabled- whether a supported provider and feature configuration are active
-
-
Methodendetails
-
onCommand
public void onCommand(org.bukkit.event.player.PlayerCommandPreprocessEvent event) Records a successful command preprocess event without attempting to resolve its destination.- Parameter:
event- player command event
-
onTeleport
public void onTeleport(org.bukkit.event.player.PlayerTeleportEvent event) Applies the cached policy to the next command/plugin teleport belonging to a home intent.- Parameter:
event- player teleport event
-
onQuit
public void onQuit(org.bukkit.event.player.PlayerQuitEvent event) Removes an abandoned home intent when a player disconnects.- Parameter:
event- player disconnect event
-