|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amoebaman.kitmaster.objects.Kit
public class Kit
| Field Summary | |
|---|---|
java.util.HashMap<Attribute,java.lang.Object> |
attributes
The set of attributes that have been defined for the kit. |
java.util.ArrayList<org.bukkit.potion.PotionEffect> |
effects
The set of potion effects that the kit will apply. |
java.util.ArrayList<org.bukkit.inventory.ItemStack> |
items
The set of items that the kit will give. |
java.lang.String |
name
The name of the kit. |
java.util.ArrayList<java.lang.String> |
permissions
The set of (temporary) permissions that the kit will grant. |
| Constructor Summary | |
|---|---|
Kit(java.lang.String name,
java.util.List<org.bukkit.inventory.ItemStack> items,
java.util.List<org.bukkit.potion.PotionEffect> effects,
java.util.List<java.lang.String> permissions,
java.util.HashMap<Attribute,java.lang.Object> attributes)
Constructs a kit from the given specifications. |
|
| Method Summary | |
|---|---|
Kit |
applyParentAttributes()
Gets a new copy of this kit that replaces all undefined attributes of this kit with those defined by its parent. |
boolean |
booleanAttribute(Attribute type)
Retrives the value of an attribute as a boolean. |
Kit |
clone()
Clones the kit for safe modification. |
boolean |
containsEffect(org.bukkit.potion.PotionEffect potion)
Tests whether the kit's items contain an effect. |
boolean |
containsItem(org.bukkit.inventory.ItemStack stack)
Tests whether the kit's items contain an item. |
double |
doubleAttribute(Attribute type)
Retrives the value of an attribute as a double. |
boolean |
equals(java.lang.Object other)
Two kits are considered equal so long as their names match. |
java.lang.Object |
getAttribute(Attribute type)
Retrives the value of an attribute as it has been defined for this kit. |
Kit |
getParent()
Gets the kit that this kit regards as its parent. |
int |
integerAttribute(Attribute type)
Retrives the value of an attribute as an int. |
boolean |
setAttribute(Attribute type,
java.lang.Object newValue)
Defines/redefines the value of an attribute for this kit. |
java.lang.String |
stringAttribute(Attribute type)
Retrives the value of an attribute as a String. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String name
public final java.util.ArrayList<org.bukkit.inventory.ItemStack> items
public final java.util.ArrayList<org.bukkit.potion.PotionEffect> effects
public final java.util.ArrayList<java.lang.String> permissions
public final java.util.HashMap<Attribute,java.lang.Object> attributes
| Constructor Detail |
|---|
public Kit(java.lang.String name,
java.util.List<org.bukkit.inventory.ItemStack> items,
java.util.List<org.bukkit.potion.PotionEffect> effects,
java.util.List<java.lang.String> permissions,
java.util.HashMap<Attribute,java.lang.Object> attributes)
name - The name of the kit.items - The items of the kit.effects - The applied potion effects of the kit.permissions - The granted permissions of the kit.attributes - The defined attributes of the kit.| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic boolean containsItem(org.bukkit.inventory.ItemStack stack)
stack - The ItemStack to test for.
ItemStackpublic boolean containsEffect(org.bukkit.potion.PotionEffect potion)
potion - The PotionEffect to test for.
PotionEffectpublic java.lang.Object getAttribute(Attribute type)
type - The Attribute to retrieve.
public boolean booleanAttribute(Attribute type)
getAttribute(Attribute)
public int integerAttribute(Attribute type)
getAttribute(Attribute)
public double doubleAttribute(Attribute type)
getAttribute(Attribute)
public java.lang.String stringAttribute(Attribute type)
getAttribute(Attribute)
public boolean setAttribute(Attribute type,
java.lang.Object newValue)
newValue does not match type's enumerated class type, the operation will fail.
type - The attribute type to set.newValue - The new value for the attribute.
newValue did not match the designated class of type, true otherwise.public Kit getParent()
public Kit applyParentAttributes()
public Kit clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||