Solved Reading plugin messages

Discussion in 'Spigot Plugin Development' started by DJCowGaming, Jun 14, 2021.

  1. I'm working with sending plugin messages, and in the PluginMessageListener interface, there is the
    Code (Java):
    onPluginMessageReceived(String channel, Player player, byte[] data)
    method. All the examples I've seen use input streams to read the bytes. If I am sending a message with only one line, do I need to use the input streams, or can I just use UTF-8 to turn it into a string? The IOExceptions that the input streams throw make the code look messy, and I'm only ever going to be sending single line messages.

    Edit: Solved! I realized I didn't need to use plugin messages at all.
    #1 DJCowGaming, Jun 14, 2021
    Last edited: Jun 14, 2021