Class HoneypotBlockObject
java.lang.Object
org.reprogle.honeypot.common.storagemanager.HoneypotBlockObject
- All Implemented Interfaces:
org.bukkit.persistence.PersistentDataType<String,HoneypotBlockObject>
public class HoneypotBlockObject
extends Object
implements org.bukkit.persistence.PersistentDataType<String,HoneypotBlockObject>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType
org.bukkit.persistence.PersistentDataType.BooleanPersistentDataType, org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType<P extends Object> -
Field Summary
Fields inherited from interface org.bukkit.persistence.PersistentDataType
BOOLEAN, BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LIST, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER, TAG_CONTAINER_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionHoneypotBlockObject(String worldName, String coordinates, String action) Used for GUI, create a Honeypot based off of strings and not Block objectsHoneypotBlockObject(org.bukkit.block.Block block, String action) Create a HoneypotBlockObject -
Method Summary
Modifier and TypeMethodDescriptionbooleanfromPrimitive(String primitive, org.bukkit.persistence.PersistentDataAdapterContext context) Get the action of the Honeypotorg.bukkit.block.BlockgetBlock()Get the Block object of the HoneypotGet the String formatted coordinates of the Honeypotorg.bukkit.LocationGet the Location object of the HoneypotgetWorld()Get the world of the HoneypotinthashCode()toPrimitive(HoneypotBlockObject complex, org.bukkit.persistence.PersistentDataAdapterContext context) toString()
-
Constructor Details
-
HoneypotBlockObject
Create a HoneypotBlockObject- Parameters:
block- The Block object of the Honeypotaction- The action of the Honeypot
-
HoneypotBlockObject
Used for GUI, create a Honeypot based off of strings and not Block objects- Parameters:
worldName- The world the block is incoordinates- The coordinates of the blockaction- The action of the Honeypot
-
-
Method Details
-
getCoordinates
Get the String formatted coordinates of the Honeypot- Returns:
- Coordinates
-
getLocation
public org.bukkit.Location getLocation()Get the Location object of the Honeypot- Returns:
- Location
-
getAction
Get the action of the Honeypot- Returns:
- action
-
getWorld
Get the world of the Honeypot- Returns:
- world
-
getBlock
public org.bukkit.block.Block getBlock()Get the Block object of the Honeypot- Returns:
- Honeypot Block object
-
equals
-
hashCode
public int hashCode() -
getPrimitiveType
- Specified by:
getPrimitiveTypein interfaceorg.bukkit.persistence.PersistentDataType<String,HoneypotBlockObject>
-
getComplexType
- Specified by:
getComplexTypein interfaceorg.bukkit.persistence.PersistentDataType<String,HoneypotBlockObject>
-
toPrimitive
public String toPrimitive(@NotNull HoneypotBlockObject complex, @NotNull org.bukkit.persistence.PersistentDataAdapterContext context) - Specified by:
toPrimitivein interfaceorg.bukkit.persistence.PersistentDataType<String,HoneypotBlockObject>
-
fromPrimitive
@NotNull public HoneypotBlockObject fromPrimitive(String primitive, @NotNull org.bukkit.persistence.PersistentDataAdapterContext context) - Specified by:
fromPrimitivein interfaceorg.bukkit.persistence.PersistentDataType<String,HoneypotBlockObject>
-
toString
-