Package org.mcmonkey.sentinel
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
Represents an integration of an external plugin or system into Sentinel.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the 'target help' data for this integration (empty string if not relevant).String[]
Gets the list of target prefixes that this integration handles.boolean
Deprecated.boolean
Returns whether an entity is a target of the integration label.boolean
itemIsRanged
(SentinelTrait sentinel, org.bukkit.inventory.ItemStack item) For autoswitch logic, return 'true' if the item should be considered a valid ranged weapon to swap to.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).
-
Constructor Details
-
SentinelIntegration
public SentinelIntegration()
-
-
Method Details
-
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
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
Returns whether an entity is a target of the integration label. -
isTarget
Deprecated.Returns whether an entity is a target of the integration label. -
tryAttack
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). -
itemIsRanged
For autoswitch logic, return 'true' if the item should be considered a valid ranged weapon to swap to. If Sentinel's core and all integrations return 'false', the item will be considered a melee weapon.
-