Package dev.itsharshxd.zentrix.api.phase
Class PhaseBuilder.PhaseActionsBuilder
java.lang.Object
dev.itsharshxd.zentrix.api.phase.PhaseBuilder.PhaseActionsBuilder
- Enclosing class:
PhaseBuilder
Builder for configuring on-start actions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PhaseBuilder.PhaseActionsBuilderAdds an announcement message action.@NotNull PhaseBuilder.PhaseActionsBuilderAdds a command action.@NotNull PhaseBuilder.PhaseActionsBuildergiveEffect(@NotNull org.bukkit.potion.PotionEffectType type, int duration, int amplifier) Adds a potion effect action.@NotNull PhaseBuilder.PhaseActionsBuilderAdds an item give action.@NotNull PhaseBuilder.PhaseActionsBuildersound(@NotNull org.bukkit.Sound sound, float volume, float pitch) Adds a sound action.@NotNull PhaseBuilder.PhaseActionsBuilderAdds a deathmatch start action.@NotNull PhaseBuilder.PhaseActionsBuilderAdds a title action with default timing.@NotNull PhaseBuilder.PhaseActionsBuilderAdds a title action with custom timing.@NotNull PhaseBuilder.PhaseActionsBuildertogglePvP(boolean enable) Adds a PvP toggle action.
-
Constructor Details
-
PhaseActionsBuilder
public PhaseActionsBuilder()
-
-
Method Details
-
announce
@NotNull public @NotNull PhaseBuilder.PhaseActionsBuilder announce(@NotNull @NotNull String message) Adds an announcement message action.- Parameters:
message- The message to announce- Returns:
- This builder for chaining
-
title
@NotNull public @NotNull PhaseBuilder.PhaseActionsBuilder title(@NotNull @NotNull String main, @Nullable @Nullable String subtitle) Adds a title action with default timing.- Parameters:
main- The main title textsubtitle- The subtitle text- Returns:
- This builder for chaining
-
title
@NotNull public @NotNull PhaseBuilder.PhaseActionsBuilder title(@NotNull @NotNull String main, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut) Adds a title action with custom timing.- Parameters:
main- The main title textsubtitle- The subtitle textfadeIn- Fade in time in ticksstay- Stay time in ticksfadeOut- Fade out time in ticks- Returns:
- This builder for chaining
-
sound
@NotNull public @NotNull PhaseBuilder.PhaseActionsBuilder sound(@NotNull @NotNull org.bukkit.Sound sound, float volume, float pitch) Adds a sound action.- Parameters:
sound- The sound to playvolume- The volume (0.0-1.0)pitch- The pitch (0.5-2.0)- Returns:
- This builder for chaining
-
togglePvP
Adds a PvP toggle action.- Parameters:
enable-trueto enable PvP- Returns:
- This builder for chaining
-
giveEffect
@NotNull public @NotNull PhaseBuilder.PhaseActionsBuilder giveEffect(@NotNull @NotNull org.bukkit.potion.PotionEffectType type, int duration, int amplifier) Adds a potion effect action.- Parameters:
type- The potion effect typeduration- Duration in ticksamplifier- The amplifier (0 = level 1)- Returns:
- This builder for chaining
-
giveItem
Adds an item give action.- Parameters:
itemId- The item identifier- Returns:
- This builder for chaining
-
command
Adds a command action.- Parameters:
command- The command to execute- Returns:
- This builder for chaining
-
startDeathmatch
Adds a deathmatch start action.- Returns:
- This builder for chaining
-