Class PersistentDataEvent
java.lang.Object
org.bukkit.event.Event
me.thehandsomeyoni.persistentdataapi.events.manager.PersistentDataEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
- Direct Known Subclasses:
BlockPersistentDataDeleteEvent,BlockPersistentDataWriteEvent,ItemPersistentDataDeleteEvent,ItemPersistentDataWriteEvent,PlayerPersistentDataDeleteEvent,PlayerPersistentDataWriteEvent
public abstract class PersistentDataEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
A class that represents a persistent data event.
- Since:
- 1.6.0
- Author:
- TheHandsomeYoni
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPersistentDataEvent(String dataName, Serializable dataValue) Initializes the PersistentDataEvent with given data values.PersistentDataEvent(AbstractPersistentData persistentData) Initializes the PersistentDataEvent with persistentData. -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGets the name of the data.abstract SerializableGets the value of the data.abstract AbstractPersistentDataGets the persistent data.Methods inherited from class org.bukkit.event.Event
getEventName, getHandlers, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
PersistentDataEvent
Initializes the PersistentDataEvent with persistentData.- Parameters:
persistentData- The persistent data that is being manipulated.
-
PersistentDataEvent
Initializes the PersistentDataEvent with given data values.- Parameters:
dataName- The name of the data.dataValue- The value of the data.
-
-
Method Details
-
getPersistentData
Gets the persistent data.- Returns:
- The persistent data.
-
getDataName
Gets the name of the data.- Returns:
- The name of the data.
-
getDataValue
Gets the value of the data.- Returns:
- The value of the data.
-