Package io.github.djtpj.trait.traits
Class ArmorSetRestriction
java.lang.Object
io.github.djtpj.trait.Trait
io.github.djtpj.trait.SimpleTrait
io.github.djtpj.trait.traits.RunnableSimpleTrait
io.github.djtpj.trait.traits.ArmorSetRestriction
- All Implemented Interfaces:
org.bukkit.event.Listener
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.djtpj.trait.Trait
Trait.Type
-
Field Summary
FieldsFields inherited from class io.github.djtpj.trait.Trait
icon, playerTraitMap, type
-
Constructor Summary
ConstructorsConstructorDescriptionArmorSetRestriction
(io.github.djtpj.trait.traits.ArmorSetRestriction.ArmorSet... allowedSets) ArmorSetRestriction
(org.json.simple.JSONArray allowedSets) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
onTick
(org.bukkit.entity.Player player) The method to run on each player every x ticksvoid
preventEquip
(org.bukkit.event.inventory.InventoryClickEvent event) void
preventEquip
(org.bukkit.event.player.PlayerInteractEvent event) Methods inherited from class io.github.djtpj.trait.traits.RunnableSimpleTrait
getApplicablePlayers
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
ArmorSetRestriction
public ArmorSetRestriction(io.github.djtpj.trait.traits.ArmorSetRestriction.ArmorSet... allowedSets) -
ArmorSetRestriction
public ArmorSetRestriction(org.json.simple.JSONArray allowedSets)
-
-
Method Details
-
preventEquip
public void preventEquip(org.bukkit.event.inventory.InventoryClickEvent event) -
preventEquip
public void preventEquip(org.bukkit.event.player.PlayerInteractEvent event) -
onTick
protected void onTick(org.bukkit.entity.Player player) The method to run on each player every x ticks- Specified by:
onTick
in classRunnableSimpleTrait
- Parameters:
player
- The player to run the method on
-