Interface ISecurityVillagersProtectionChangeEvent

All Superinterfaces:
Cancellable, SecurityVillagersEvent
All Known Implementing Classes:
SecurityVillagersProtectionChangeEvent

public interface ISecurityVillagersProtectionChangeEvent extends SecurityVillagersEvent, Cancellable
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.entity.Entity
    Get the selected entity
    @NotNull org.bukkit.entity.Player
    Get the player who is changing the protection
    boolean
    Get the new protection value for the entity
    void
    setProtection​(boolean protection)
    Set a new protection value for the entity

    Methods inherited from interface com.alessiodp.securityvillagers.api.events.Cancellable

    isCancelled, setCancelled

    Methods inherited from interface com.alessiodp.securityvillagers.api.events.SecurityVillagersEvent

    getApi, setApi
  • Method Details

    • getPlayer

      @NotNull @NotNull org.bukkit.entity.Player getPlayer()
      Get the player who is changing the protection
      Returns:
      the Player
    • getEntity

      @NotNull @NotNull org.bukkit.entity.Entity getEntity()
      Get the selected entity
      Returns:
      the Entity
    • getProtection

      boolean getProtection()
      Get the new protection value for the entity
      Returns:
      true if protected
    • setProtection

      void setProtection(boolean protection)
      Set a new protection value for the entity
      Parameters:
      protection - the protection value