Class RegionEffect
java.lang.Object
net.islandearth.rpgregions.effects.RegionEffect
- All Implemented Interfaces:
IGuiEditable
-
Constructor Summary
ConstructorsConstructorDescriptionRegionEffect(IRPGRegionsAPI api, boolean wearingRequired, List<org.bukkit.inventory.ItemStack> ignoreItems) -
Method Summary
Modifier and TypeMethodDescriptionabstract voideffect(org.bukkit.entity.Player player) Effects the specified playerList<org.bukkit.inventory.ItemStack> The items that a player should have to not be effectedGets the permission for this effect to apply.Gets the required Minecraft version for this effect to function.booleanWhether the permission should be ignored or not.booleanWhether the items are required to be worn in armour slotsbooleanshouldIgnore(org.bukkit.inventory.ItemStack item) Whether the ItemStack is within #getIgnoreItems()voiduneffect(org.bukkit.entity.Player player) Called when a player exits all regions and effects should be entirely removed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.islandearth.rpgregions.gui.IGuiEditable
getName
-
Constructor Details
-
RegionEffect
-
RegionEffect
public RegionEffect(IRPGRegionsAPI api, boolean wearingRequired, List<org.bukkit.inventory.ItemStack> ignoreItems)
-
-
Method Details
-
effect
public abstract void effect(org.bukkit.entity.Player player) Effects the specified player- Parameters:
player-
-
uneffect
public void uneffect(org.bukkit.entity.Player player) Called when a player exits all regions and effects should be entirely removed.- Parameters:
player-
-
getRequiredVersion
Gets the required Minecraft version for this effect to function.- Returns:
- minecraft version
-
isWearingRequired
public boolean isWearingRequired()Whether the items are required to be worn in armour slots- Returns:
- whether items should be worn in armour slots
-
getIgnoreItems
The items that a player should have to not be effected- Returns:
- ignored items
-
shouldIgnore
public boolean shouldIgnore(org.bukkit.inventory.ItemStack item) Whether the ItemStack is within #getIgnoreItems()- Parameters:
item- theItemStack- Returns:
- true if item is ignored
-
getPermission
Gets the permission for this effect to apply.- Returns:
- permission the player requires
-
isIgnorePerm
public boolean isIgnorePerm()Whether the permission should be ignored or not.- Returns:
- true if permission is ignored
-