Class PylonUtils
java.lang.Object
io.github.pylonmc.pylon.util.PylonUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidanimate(@Nullable org.bukkit.entity.ItemDisplay display, int delay, int duration, org.joml.Matrix4f matrix) static voidanimate(@Nullable org.bukkit.entity.ItemDisplay display, int duration, org.joml.Matrix4f matrix) static @NotNull org.bukkit.ColorcolorFromTemperature(double celsius) static @NotNull net.kyori.adventure.text.format.TextColorcolorToTextColor(@NonNull org.bukkit.Color color) static @NotNull net.kyori.adventure.text.ComponentcreateBar(double proportion, int bars, net.kyori.adventure.text.format.TextColor color) static @NotNull net.kyori.adventure.text.ComponentcreateDiscreteProgressBar(int stage, int maxStage, net.kyori.adventure.text.format.TextColor color) static @NotNull net.kyori.adventure.text.ComponentcreateFluidAmountBar(double amount, double capacity, int bars, net.kyori.adventure.text.format.TextColor fluidColor) static @NotNull net.kyori.adventure.text.ComponentcreateProgressBar(double amount, double max, int bars, net.kyori.adventure.text.format.TextColor color) static @NotNull net.kyori.adventure.text.ComponentcreateProgressBar(double progress, int bars, net.kyori.adventure.text.format.TextColor color) static voiddrawParticleLine(org.bukkit.Location start, @NotNull org.bukkit.Location end, double spacing, Consumer<org.bukkit.Location> spawnParticle) static @NotNull org.joml.Vector3dgetDirection(@NotNull org.bukkit.Location source, @NotNull org.bukkit.Location target) static @NotNull org.joml.Vector3dgetDisplacement(@NotNull org.bukkit.Location source, @NotNull org.bukkit.Location target) static booleanhandleFluidTankRightClick(@NotNull io.github.pylonmc.rebar.block.base.RebarFluidTank tank, @NotNull org.bukkit.event.player.PlayerInteractEvent event, @NotNull org.bukkit.event.EventPriority priority) Handles players right clicking with bottles, water buckets, etc Returns true if the function attempted to process the item used (i.e.static booleanisPotion(org.bukkit.Material material) static org.bukkit.inventory.ItemStackitemFromKey(org.bukkit.NamespacedKey key) Returns an item representing the key.static @NotNull org.bukkit.NamespacedKeystatic booleanshouldBreakBlockUsingTool(@NotNull org.bukkit.block.Block block, @NotNull org.bukkit.inventory.ItemStack tool) static @NotNull org.bukkit.entity.TextDisplayspawnUnitSquareTextDisplay(@NotNull org.bukkit.Location location, @NotNull org.bukkit.Color color) static @NotNull org.bukkit.entity.TextDisplayspawnUnitSquareTextDisplay(@NotNull org.bukkit.Location location, @NotNull org.bukkit.Color color, Consumer<org.bukkit.entity.TextDisplay> initializer)
-
Field Details
-
METAL_GRAY
public static final org.bukkit.Color METAL_GRAY
-
-
Method Details
-
pylonKey
-
drawParticleLine
public static void drawParticleLine(org.bukkit.Location start, @NotNull @NotNull org.bukkit.Location end, double spacing, Consumer<org.bukkit.Location> spawnParticle) -
colorFromTemperature
@NotNull public static @NotNull org.bukkit.Color colorFromTemperature(double celsius) -
colorToTextColor
@NotNull public static @NotNull net.kyori.adventure.text.format.TextColor colorToTextColor(@NonNull org.bukkit.Color color) -
spawnUnitSquareTextDisplay
@NotNull public static @NotNull org.bukkit.entity.TextDisplay spawnUnitSquareTextDisplay(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.Color color) -
spawnUnitSquareTextDisplay
@NotNull public static @NotNull org.bukkit.entity.TextDisplay spawnUnitSquareTextDisplay(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.Color color, Consumer<org.bukkit.entity.TextDisplay> initializer) -
getDisplacement
@NotNull public static @NotNull org.joml.Vector3d getDisplacement(@NotNull @NotNull org.bukkit.Location source, @NotNull @NotNull org.bukkit.Location target) -
getDirection
@NotNull public static @NotNull org.joml.Vector3d getDirection(@NotNull @NotNull org.bukkit.Location source, @NotNull @NotNull org.bukkit.Location target) -
createBar
@NotNull public static @NotNull net.kyori.adventure.text.Component createBar(double proportion, int bars, net.kyori.adventure.text.format.TextColor color) -
createProgressBar
@NotNull public static @NotNull net.kyori.adventure.text.Component createProgressBar(double progress, int bars, net.kyori.adventure.text.format.TextColor color) -
createDiscreteProgressBar
@NotNull public static @NotNull net.kyori.adventure.text.Component createDiscreteProgressBar(int stage, int maxStage, net.kyori.adventure.text.format.TextColor color) -
createProgressBar
@NotNull public static @NotNull net.kyori.adventure.text.Component createProgressBar(double amount, double max, int bars, net.kyori.adventure.text.format.TextColor color) -
createFluidAmountBar
@NotNull public static @NotNull net.kyori.adventure.text.Component createFluidAmountBar(double amount, double capacity, int bars, net.kyori.adventure.text.format.TextColor fluidColor) -
animate
public static void animate(@Nullable @Nullable org.bukkit.entity.ItemDisplay display, int delay, int duration, org.joml.Matrix4f matrix) - Parameters:
display- if null nothing gets done
-
animate
public static void animate(@Nullable @Nullable org.bukkit.entity.ItemDisplay display, int duration, org.joml.Matrix4f matrix) - Parameters:
display- if null nothing gets done
-
shouldBreakBlockUsingTool
public static boolean shouldBreakBlockUsingTool(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull org.bukkit.inventory.ItemStack tool) -
itemFromKey
public static org.bukkit.inventory.ItemStack itemFromKey(org.bukkit.NamespacedKey key) Returns an item representing the key. If no representative item exists (e.g. fire) a fallback for that item will be used (if one exists) -
isPotion
public static boolean isPotion(org.bukkit.Material material) -
handleFluidTankRightClick
public static boolean handleFluidTankRightClick(@NotNull @NotNull io.github.pylonmc.rebar.block.base.RebarFluidTank tank, @NotNull @NotNull org.bukkit.event.player.PlayerInteractEvent event, @NotNull @NotNull org.bukkit.event.EventPriority priority) Handles players right clicking with bottles, water buckets, etc Returns true if the function attempted to process the item used (i.e. if it's a water bucket, bottle, etc)
-