Package org.bukkit

Interface MultiPaperNotificationManager


public interface MultiPaperNotificationManager
  • Method Details

    • on

      void on(Plugin plugin, String channel, Consumer<byte[]> callback)
      Listen to notifications sent by other servers.
      Parameters:
      plugin - The plugin listening to these notifications
      channel - The notification channel to listen to
      callback - A handler for any data received
    • onString

      default void onString(Plugin plugin, String channel, Consumer<String> callback)
      Listen to notifications sent by other servers.
      Parameters:
      plugin - The plugin listening to these notifications
      channel - The notification channel to listen to
      callback - A handler for any data received
    • on

      void on(Plugin plugin, String channel, BiConsumer<byte[],BiConsumer<String,byte[]>> callbackWithReply)
      Listen to notifications sent by other servers.
      Parameters:
      plugin - The plugin listening to these notifications
      channel - The notification channel to listen to
      callbackWithReply - A handler for any data received, and a method to reply to the server on a specified channel
    • onString

      default void onString(Plugin plugin, String channel, BiConsumer<String,BiConsumer<String,String>> callbackWithReply)
      Listen to notifications sent by other servers.
      Parameters:
      plugin - The plugin listening to these notifications
      channel - The notification channel to listen to
      callbackWithReply - A handler for any data received, and a method to reply to the server on a specified channel
    • notify

      void notify(String channel, byte[] data)
      Notify all other servers.
      Parameters:
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notify

      default void notify(String channel, String data)
      Notify all other servers.
      Parameters:
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notify

      void notify(Chunk chunk, String channel, byte[] data)
      Notify other servers with the specified chunk loaded
      Parameters:
      chunk - The chunk that's loaded
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notify

      default void notify(Chunk chunk, String channel, String data)
      Notify other servers with the specified chunk loaded
      Parameters:
      chunk - The chunk that's loaded
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notifyOwningServer

      void notifyOwningServer(Chunk chunk, String channel, byte[] data)
      Notify the owning server of the specified chunk. This chunk must be loaded on this server. This will notify this server if this server is the owning server.
      Parameters:
      chunk - The loaded chunk with an owning server
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notifyOwningServer

      default void notifyOwningServer(Chunk chunk, String channel, String data)
      Notify the owning server of the specified chunk. This chunk must be loaded on this server. This will notify this server if this server is the owning server.
      Parameters:
      chunk - The loaded chunk with an owning server
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notifyOwningServer

      void notifyOwningServer(Player player, String channel, byte[] data)
      Notify the owning server of the specified player. This will notify this server if this server is the owning server.
      Parameters:
      player - The player with an owning server
      channel - The notification channel to notify on
      data - The data to notify other servers with
    • notifyOwningServer

      default void notifyOwningServer(Player player, String channel, String data)
      Notify the owning server of the specified player. This will notify this server if this server is the owning server.
      Parameters:
      player - The player with an owning server
      channel - The notification channel to notify on
      data - The data to notify other servers with