Class VectorEventValue
java.lang.Object
ua.mcchickenstudio.opencreative.coding.values.EventValue
ua.mcchickenstudio.opencreative.coding.values.VectorEventValue
- All Implemented Interfaces:
ExtensionContent
- Direct Known Subclasses:
EntityLocationDirectionValue, EntityVelocityValue
VectorEventValue
This class represents an event value, that returns vector, or null.-
Constructor Summary
ConstructorsConstructorDescriptionVectorEventValue(@NotNull String id, @NotNull org.bukkit.inventory.ItemStack displayIcon, @NotNull MenusCategory category) -
Method Summary
Modifier and TypeMethodDescriptionfinal @Nullable ObjectgetValue(@NotNull ActionsHandler handler, @NotNull Action action, @Nullable org.bukkit.entity.Entity entity) Returns a value that will be set instead of event value name tag item.abstract @Nullable org.bukkit.util.VectorgetVector(@NotNull ActionsHandler handler, @NotNull Action action, @Nullable org.bukkit.entity.Entity entity) Returns a vector that can be got from player, event, action, or null.Methods inherited from class EventValue
equals, getCategory, getDisplayIcon, getID, getLocaleName, getName, hashCodeModifier and TypeMethodDescriptionboolean@NotNull MenusCategoryReturns a category, that event value belongs to.@NotNull org.bukkit.inventory.ItemStackReturns an icon that will be used in event values menus.final @NotNull StringgetID()Returns id of event value, that will be used to find it in registry.@NotNull StringReturns localized name of event value, that will be used in menus.@NotNull StringgetName()Returns name of event value for displaying in registry by converting id.inthashCode()Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExtensionContent
getDescription, getExtensionId
-
Constructor Details
-
Method Details
-
getVector
@Nullable public abstract @Nullable org.bukkit.util.Vector getVector(@NotNull @NotNull ActionsHandler handler, @NotNull @NotNull Action action, @Nullable @Nullable org.bukkit.entity.Entity entity) Returns a vector that can be got from player, event, action, or null.- Returns:
- vector, or null.
-
getValue
@Nullable public final @Nullable Object getValue(@NotNull @NotNull ActionsHandler handler, @NotNull @NotNull Action action, @Nullable @Nullable org.bukkit.entity.Entity entity) Description copied from class:EventValueReturns a value that will be set instead of event value name tag item.- Specified by:
getValuein classEventValue- Parameters:
handler- handler of action to get value.action- action to get value.entity- entity to get value, can be null.- Returns:
- string, number, boolean, item, location, vector, or null.
-