Interface NMS


public interface NMS
A vanilla code handler of Minecraft (NMS)
  • Method Details

    • create

      @NotNull default @NotNull ModelDisplay create(@NotNull @NotNull org.bukkit.Location location)
      Creates model display
      Parameters:
      location - start location
      Returns:
      model display
    • create

      @NotNull @NotNull ModelDisplay create(@NotNull @NotNull org.bukkit.Location location, double yOffset, @NotNull @NotNull Consumer<ModelDisplay> initialConsumer)
      Creates model display
      Parameters:
      location - start location
      yOffset - y offset
      initialConsumer - initial consumer
      Returns:
      model display
    • createNametag

      @NotNull @NotNull ModelNametag createNametag(@NotNull @NotNull RenderedBone bone)
      Creates model nametag
      Returns:
      nametag
    • createNametag

      @NotNull default @NotNull ModelNametag createNametag(@NotNull @NotNull RenderedBone bone, @NotNull @NotNull Consumer<ModelNametag> consumer)
      Creates model nametag
      Parameters:
      consumer - consumer
      Returns:
      nametag
    • inject

      @NotNull @NotNull PlayerChannelHandler inject(@NotNull @NotNull org.bukkit.entity.Player player)
      Injects netty channel handler to player
      Parameters:
      player - player
      Returns:
      channel handler
    • createBundler

      @NotNull @NotNull PacketBundler createBundler(int initialCapacity)
      Creates packet bundler
      Parameters:
      initialCapacity - initial capacity
      Returns:
      packet bundler
    • createLazyBundler

      @NotNull @NotNull PacketBundler createLazyBundler()
      Creates lazy packet bundler
      Returns:
      packet bundler
    • createParallelBundler

      @NotNull @NotNull PacketBundler createParallelBundler(int threshold)
      Creates parallel packet bundler
      Parameters:
      threshold - size threshold
      Returns:
      parallel packet bundler
    • tint

      @NotNull @NotNull org.bukkit.inventory.ItemStack tint(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack, int rgb)
      Applies tint to some item
      Parameters:
      itemStack - item
      rgb - hex rgb value
      Returns:
      new item
    • mount

      void mount(@NotNull @NotNull EntityTrackerRegistry registry, @NotNull @NotNull PacketBundler bundler)
      Adds a mount packet for this tracker to bundler
      Parameters:
      registry - registry
      bundler - bundler
    • hide

      void hide(@NotNull @NotNull PlayerChannelHandler channel, @NotNull @NotNull EntityTrackerRegistry registry)
      Sends a hide packet for some entity to some player
      Parameters:
      channel - channel handler
      registry - registry
    • hide

      default void hide(@NotNull @NotNull PlayerChannelHandler channel, @NotNull @NotNull EntityTrackerRegistry registry, @NotNull @NotNull BooleanSupplier condition)
      Sends a hide packet for some entity to some player
      Parameters:
      channel - channel handler
      registry - registry
      condition - condition
    • createHitBox

      @Nullable @Nullable HitBox createHitBox(@NotNull @NotNull EntityAdapter entity, @NotNull @NotNull RenderedBone bone, @NotNull @NotNull NamedBoundingBox namedBoundingBox, @NotNull @NotNull MountController controller, @NotNull @NotNull HitBoxListener listener)
      Creates delegator hit-box of target entity
      Parameters:
      entity - target entity
      bone - following bone
      namedBoundingBox - bounding box
      controller - mount controller
      listener - hitbox listener
      Returns:
      hit-box
    • version

      @NotNull @NotNull NMSVersion version()
      Gets Spigot-mapped version of Minecraft vanilla code.
      Returns:
      version
    • adapt

      @NotNull @NotNull EntityAdapter adapt(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Gets adapted entity value getter of target entity for Folia
      Parameters:
      entity - entity
      Returns:
      adapter
    • profile

      @NotNull @NotNull com.mojang.authlib.GameProfile profile(@NotNull @NotNull org.bukkit.entity.Player player)
      Gets game profile from player
      Parameters:
      player - player
      Returns:
      game profile
    • createPlayerHead

      @NotNull @NotNull org.bukkit.inventory.ItemStack createPlayerHead(@NotNull @NotNull com.mojang.authlib.GameProfile profile)
      Creates player head from game profile
      Parameters:
      profile - profile
      Returns:
      player head item
    • createSkinItem

      @NotNull default @NotNull TransformedItemStack createSkinItem(@NotNull @NotNull String model, @NotNull @NotNull List<Boolean> flags, @NotNull @NotNull List<Integer> colors)
      Creates skin item
      Returns:
      item
    • isProxyOnlineMode

      boolean isProxyOnlineMode()
      Gets this server is serviced as online-mode by proxy or native
      Returns:
      is online-mode