Class IntelligentTitleAnimator.Builder
java.lang.Object
io.github.rysefoxx.inventory.plugin.animator.IntelligentTitleAnimator.Builder
- Enclosing class:
IntelligentTitleAnimator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(@NotNull InventoryContents contents) This creates the animation class but does not start it yet!@NotNull IntelligentTitleAnimator.Buildercolor(char frame, @NotNull IntelligentItemColor color) Assigns a color to a frame.@NotNull IntelligentTitleAnimator.Buildercolors(@NotNull List<Character> frames, IntelligentItemColor @NotNull ... color) Several frames are assigned individual colors.@NotNull IntelligentTitleAnimator.Buildercolors(Character @NotNull [] frames, @NotNull List<IntelligentItemColor> color) Several frames are assigned individual colors.@NotNull IntelligentTitleAnimator.Buildercolors(Character @NotNull [] frames, IntelligentItemColor @NotNull ... color) Several frames are assigned individual colors.@NotNull IntelligentTitleAnimator.Buildercopy(@NotNull IntelligentTitleAnimator preset) Takes over all properties of the passed animator.@NotNull IntelligentTitleAnimator.Builderdelay(int time, @NotNull TimeSetting setting) Specifies the delay before the animation starts.@NotNull IntelligentTitleAnimator.BuilderAdds another frame.@NotNull IntelligentTitleAnimator.BuilderAdds several frames.@NotNull IntelligentTitleAnimator.BuilderAdds several frames.@NotNull IntelligentTitleAnimator.Builderidentifier(@NotNull Object identifier) Gives the Animation an identification@NotNull IntelligentTitleAnimator.Builderloop()Keeps the animation running until the player closes the inventory.@NotNull IntelligentTitleAnimator.Builderperiod(int time, @NotNull TimeSetting setting) Sets the speed of the animation in the scheduler.@NotNull IntelligentTitleAnimator.Buildertype(@NotNull IntelligentItemAnimatorType type) Decides how the name of the item should be animated.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
@NotNull public @NotNull IntelligentTitleAnimator.Builder copy(@NotNull @NotNull IntelligentTitleAnimator preset) Takes over all properties of the passed animator.- Parameters:
preset- The animator to be copied.- Returns:
- The Builder to perform further editing.
When copying the animator, the identification is not copied if present!
-
loop
Keeps the animation running until the player closes the inventory.- Returns:
- The Builder to perform further editing.
-
type
@NotNull public @NotNull IntelligentTitleAnimator.Builder type(@NotNull @NotNull IntelligentItemAnimatorType type) Decides how the name of the item should be animated.- Parameters:
type- The animation type- Returns:
- The Builder to perform further editing.
-
color
@NotNull public @NotNull IntelligentTitleAnimator.Builder color(char frame, @NotNull @NotNull IntelligentItemColor color) Assigns a color to a frame.- Parameters:
frame- The frame that should receive the color.color- The color you want the frame to have.- Returns:
- The Builder to perform further editing.
-
colors
@NotNull public @NotNull IntelligentTitleAnimator.Builder colors(@NotNull @NotNull List<Character> frames, IntelligentItemColor @NotNull ... color) Several frames are assigned individual colors.- Parameters:
frames- The frames that should receive the color.color- The color you want the frames to have.- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If the parameters are not equal.
-
colors
@NotNull public @NotNull IntelligentTitleAnimator.Builder colors(Character @NotNull [] frames, IntelligentItemColor @NotNull ... color) Several frames are assigned individual colors.- Parameters:
frames- The frames that should receive the color.color- The color you want the frames to have.- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If the parameters are not equal.
-
colors
@NotNull public @NotNull IntelligentTitleAnimator.Builder colors(Character @NotNull [] frames, @NotNull @NotNull List<IntelligentItemColor> color) Several frames are assigned individual colors.- Parameters:
frames- The frames that should receive the color.color- The color you want the frames to have.- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If the parameters are not equal.
-
frame
@NotNull public @NotNull IntelligentTitleAnimator.Builder frame(@NotNull @NotNull String frame) throws IllegalArgumentException Adds another frame.- Parameters:
frame- The frame to be added.- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If no color has been assigned to the frame yet. e.gIntelligentItemNameAnimator.Builder.colors(List, IntelligentItemColor...)
-
frames
Adds several frames.- Parameters:
frames- The frames to be added.- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If no color has been assigned to the frame yet. e.gIntelligentItemNameAnimator.Builder.colors(List, IntelligentItemColor...)
-
frames
@NotNull public @NotNull IntelligentTitleAnimator.Builder frames(@NotNull @NotNull List<String> frames) Adds several frames.- Parameters:
frames- The frames to be added.- Returns:
- The Builder to perform further editing.
- Throws:
IllegalArgumentException- If no color has been assigned to the frame yet. e.gIntelligentItemNameAnimator.Builder.colors(List, IntelligentItemColor...)
-
period
@NotNull public @NotNull IntelligentTitleAnimator.Builder period(@Nonnegative int time, @NotNull @NotNull TimeSetting setting) Sets the speed of the animation in the scheduler.- Parameters:
time- The time.setting- The time setting- Returns:
- The Builder to perform further editing.
-
delay
@NotNull public @NotNull IntelligentTitleAnimator.Builder delay(@Nonnegative int time, @NotNull @NotNull TimeSetting setting) Specifies the delay before the animation starts.- Parameters:
time- The delay.setting- The time setting- Returns:
- The Builder to perform further editing.
-
identifier
@NotNull public @NotNull IntelligentTitleAnimator.Builder identifier(@NotNull @NotNull Object identifier) Gives the Animation an identification- Parameters:
identifier- The ID through which you can get the animation- Returns:
- The Builder to perform further editing
-
build
public IntelligentTitleAnimator build(@NotNull @NotNull InventoryContents contents) throws IllegalArgumentException This creates the animation class but does not start it yet!IntelligentTitleAnimator.animate(Player)- Parameters:
contents- The contents of the inventory.- Returns:
- The animation class
- Throws:
IllegalArgumentException- if frameColor is empty, if frames is empty or if no color has been assigned to a frame.
-