public class WauzRuneInserter
extends java.lang.Object
WauzRune
Modifier and Type | Field and Description |
---|---|
private org.bukkit.inventory.ItemStack |
equipmentItemStack
The equipment item stack that the rune is inserted into.
|
private EquipmentType |
equipmentType
The type of the equipment.
|
private org.bukkit.entity.Player |
player
The player that is inserting the rune.
|
private org.bukkit.inventory.ItemStack |
runeItemStack
The rune item stack that is getting inserted.
|
private static java.util.Map<java.lang.String,WauzRune> |
runeMap
A map of all runes, indexed by rune id.
|
private double |
runeMightDecimal
The might of the rune, determinig its power.
|
private java.lang.String |
runeType
The type of the rune.
|
Constructor and Description |
---|
WauzRuneInserter() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
getAllRuneIds() |
static java.util.List<WauzRune> |
getAllRunes() |
static WauzRune |
getRune(java.lang.String runeId)
Gets a rune for given id from the map.
|
boolean |
insertRune(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack equipmentItemStack,
org.bukkit.inventory.ItemStack runeItemStack)
Tries to insert a rune into the given equipment item stack.
|
static void |
registerRune(WauzRune rune)
Registers a rune.
|
private boolean |
TryToDetermineEquipmentType()
Sets the equipment type for the rune inserter.
|
private boolean |
TryToDetermineRuneType()
Sets the rune type and might for the rune inserter.
|
private static java.util.Map<java.lang.String,WauzRune> runeMap
private org.bukkit.entity.Player player
private org.bukkit.inventory.ItemStack equipmentItemStack
private EquipmentType equipmentType
private org.bukkit.inventory.ItemStack runeItemStack
private java.lang.String runeType
private double runeMightDecimal
public static WauzRune getRune(java.lang.String runeId)
runeId
- The id of the rune.public static java.util.List<WauzRune> getAllRunes()
public static java.util.List<java.lang.String> getAllRuneIds()
public static void registerRune(WauzRune rune)
rune
- The rune to register.public boolean insertRune(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack equipmentItemStack, org.bukkit.inventory.ItemStack runeItemStack)
player
- The player that is inserting the rune.equipmentItemStack
- The equipment item stack that the rune is inserted into.runeItemStack
- The rune item stack that is getting inserted.EquipmentUtils.getRuneSuccessChance(ItemStack)
private boolean TryToDetermineEquipmentType()
private boolean TryToDetermineRuneType()