Class SentinelIntegration

java.lang.Object
org.mcmonkey.sentinel.SentinelIntegration
Direct Known Subclasses:
SentinelCrackShot, SentinelFactions, SentinelHealth, SentinelNPCOwnedBy, SentinelPermissions, SentinelPotion, SentinelSBScore, SentinelSBTeams, SentinelSimpleClans, SentinelSimplePets, SentinelSquads, SentinelTowny, SentinelUUID, SentinelWar

public class SentinelIntegration extends Object
Represents an integration of an external plugin or system into Sentinel.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the 'target help' data for this integration (empty string if not relevant).
    Gets the list of target prefixes that this integration handles.
    boolean
    isTarget(org.bukkit.entity.LivingEntity ent, String text)
    Deprecated.
    boolean
    isTarget(org.bukkit.entity.LivingEntity ent, String prefix, String value)
    Returns whether an entity is a target of the integration label.
    boolean
    Returns whether the values for a target should be automatically lowercased in advance.
    boolean
    tryAttack(SentinelTrait st, org.bukkit.entity.LivingEntity ent)
    Runs when an NPC intends to attack a target - return 'true' to indicate the integration ran its own attack methodology (and no default attack handling is needed).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SentinelIntegration

      public SentinelIntegration()
  • Method Details

    • getTargetHelp

      public String getTargetHelp()
      Gets the 'target help' data for this integration (empty string if not relevant). Example format is: "myintegration:MY_TARGET_IDENTIFIER" like "squad:SQUAD_NAME" or "healthabove:PERCENTAGE"
    • shouldLowerCaseValue

      public boolean shouldLowerCaseValue()
      Returns whether the values for a target should be automatically lowercased in advance.
    • getTargetPrefixes

      public String[] getTargetPrefixes()
      Gets the list of target prefixes that this integration handles. For a "squad:SQUAD_NAME" target, this should return: new String[] { "squad" } For integrations that don't have targets, return new String[0];
    • isTarget

      public boolean isTarget(org.bukkit.entity.LivingEntity ent, String prefix, String value)
      Returns whether an entity is a target of the integration label.
    • isTarget

      @Deprecated public boolean isTarget(org.bukkit.entity.LivingEntity ent, String text)
      Deprecated.
      Returns whether an entity is a target of the integration label.
    • tryAttack

      public boolean tryAttack(SentinelTrait st, org.bukkit.entity.LivingEntity ent)
      Runs when an NPC intends to attack a target - return 'true' to indicate the integration ran its own attack methodology (and no default attack handling is needed).