Class WorldAction
java.lang.Object
ua.mcchickenstudio.opencreative.coding.blocks.actions.Action
ua.mcchickenstudio.opencreative.coding.blocks.actions.worldactions.WorldAction
- All Implemented Interfaces:
CodingBlock
- Direct Known Subclasses:
AddBlastingFurnaceRecipeAction, AddCampfireRecipeAction, AddCraftingRecipeAction, AddFurnaceRecipeAction, AddPhysObjectAction, AddSmokerRecipeAction, ApplyBoneMealAction, BossBarColorAction, BossBarDisplayNameAction, BossBarOverlayAction, BossBarProgressAction, ClearContainerAction, ClearScoreboardScoresAction, CopyBlocksAction, CreateBossBarAction, CreateExplosionAction, CreateFireworkExplosionAction, CreateScoreboardAction, CreateTeamAction, DeleteBossBarAction, DeleteScoreboardAction, DeleteTeamAction, DestroyBlockAction, DropItemAction, GetContainerItemsAction, GetSignLineAction, GiveItemsToContainerAction, MotionParamPhysObjectAction, RemoveRecipeAction, ScoreboardResetScoreAction, ScoreboardSetDisplayNameAction, ScoreboardSetScoreAction, SendWebRequestAction, SetBlockBiomeAction, SetBlockPoweredAction, SetBlocksAreaTypeAction, SetBlockTypeAction, SetDifficultyAction, SetItemBySlotInContainerAction, SetScoreNumberStyleAction, SetSignGlowingTextAction, SetSignLineAction, SetSignWaxedAction, SetTimeAction, SettingsParamPhysObjectAction, SetWaterLoggedAction, SetWeatherAction, SetWorldBorderAction, SpawnArrowAction, SpawnBlockDisplayAction, SpawnEndCrystalAction, SpawnEnderEyeAction, SpawnEntityAction, SpawnExperienceOrbAction, SpawnFallingBlockAction, SpawnFireworkAction, SpawnItemDisplayAction, SpawnParticleAction, SpawnParticlesLineAction, SpawnTextDisplayAction, StrikeLightningAction, SwitchToBuildModeAction, TeamSetCanSeeInvisibleAction, TeamSetCollisionRuleAction, TeamSetColorAction, TeamSetVisibleTagAction, TransferVariableAction, VisualParamPhysObjectAction
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidexecute()Executes world action: modifies a world.protected final voidexecute(org.bukkit.entity.Entity entity) Executes action with specified entity.@NotNull ActionCategoryReturns category of action, that contains information about action: glass pane materials, block materials.protected voidsetLastSpawnedEntity(@NotNull org.bukkit.entity.Entity entity) Methods inherited from class Action
getActionType, getArguments, getArgumentsList, getEntitiesByNameOrUUID, getEntity, getEntityByNameOrUUID, getEvent, getExecutor, getHandler, getPlanet, getPlayersByNameOrUUID, getTarget, getTargets, getWorld, getX, getY, getZ, prepareAndExecute, setEntity, setEvent, setHandler, setVarValueModifier and TypeMethodDescriptionabstract @NotNull ActionTypeReturns type of action, that contains information about action: icon material, arguments list.protected final @NotNull ArgumentsReturns arguments of action.Returns a list of all arguments in this action.protected Set<org.bukkit.entity.Entity> Returns a set of entities whose name or UUID is equal to specified text.org.bukkit.entity.EntityReturns involved entity in action from ActionsHandler.protected @Nullable org.bukkit.entity.EntitygetEntityByNameOrUUID(String text) Returns an entity whose name or UUID is equal to specified text.getEvent()Returns last stored event in action.final ExecutorReturns executor, that stores this action.Returns current ActionsHandler in action.protected Planetprotected Set<org.bukkit.entity.Player> getPlayersByNameOrUUID(String text) Returns enum of target.protected List<org.bukkit.entity.Entity> Returns list of entities that will execute this action.protected org.bukkit.WorldgetWorld()Returns planet's world, where action will be executed.intgetX()Returns X coordinate of coding block's location.intgetY()Returns Y coordinate of coding block's location.intgetZ()Returns Z coordinate of coding block's location.voidprepareAndExecute(@NotNull ActionsHandler handler) Prepares action for executing, sets handler and event, and executes action with target.voidsetEntity(org.bukkit.entity.Entity entity) Sets entity involved in executor's event.voidsetEvent(WorldEvent event) Sets new event.voidsetHandler(ActionsHandler handler) Sets new ActionsHandler.protected voidsetVarValue(@Nullable VariableLink link, Object value) Sets value in local, global or saved variable in world.
-
Constructor Details
-
WorldAction
-
-
Method Details
-
execute
-
execute
protected abstract void execute()Executes world action: modifies a world. -
setLastSpawnedEntity
protected void setLastSpawnedEntity(@NotNull @NotNull org.bukkit.entity.Entity entity) -
getActionCategory
Description copied from class:ActionReturns category of action, that contains information about action: glass pane materials, block materials.- Specified by:
getActionCategoryin classAction- Returns:
- Category of action.
-