Interface ICompatibility


public interface ICompatibility
This interface outlines a version dependant api, where there is an implementing class for each minecraft protocol version.
  • Method Details

    • getEntityPlayer

      @NotNull @NotNull Object getEntityPlayer(@NotNull @NotNull org.bukkit.entity.Player player)
      Returns the nms EntityPlayer wrapped by the given bukkit Player.
      Parameters:
      player - The non-null bukkit player.
      Returns:
      The non-null nms player.
    • sendPackets

      void sendPackets(org.bukkit.entity.Player player, Object packet)
      Overloaded version of sendPackets(Player, Object...) which does not need to instantiate a new array of packets every time 1 packet needs to be sent.
      Parameters:
      player - The non-null player to send the packet to.
      packet - The non-null packet to send to the player.
    • sendPackets

      void sendPackets(org.bukkit.entity.Player player, Object... packets)
      Sends the given packets to the given player. This can be run asynchronously
      Parameters:
      player - The non-null player to send the packet to.
      packets - The non-null array of non-null packets to send to the player.
    • getNBTCompatibility

      @NotNull @NotNull NBTCompatibility getNBTCompatibility()
      Returns this version's loaded NBTCompatibility. The classes for each version can be found in the nbt package.
      Returns:
      This version's non-null nbt compatibility.
      Throws:
      UnsupportedOperationException - In minecraft protocol versions 1_13_R2 and higher.
    • getEntityCompatibility

      @NotNull @NotNull EntityCompatibility getEntityCompatibility()
      Returns this version's loaded EntityCompatibility. The classes for each version can be found in the entity package.
      Returns:
      This version's non-null entity compatibility.
    • getBlockCompatibility

      @NotNull @NotNull BlockCompatibility getBlockCompatibility()
      Returns this version's loaded BlockCompatibility. The classes for each version can be found in the block package.
      Returns:
      This version's non-null block compatibility.