Class UpdateSignMessage

java.lang.Object
net.glowstone.net.message.play.game.UpdateSignMessage
All Implemented Interfaces:
com.flowpowered.network.Message

public final class UpdateSignMessage extends Object implements com.flowpowered.network.Message
  • Constructor Details

    • UpdateSignMessage

      public UpdateSignMessage(int x, int y, int z, TextMessage[] message)
      Creates a message.
      Parameters:
      x - the sign X coordinate
      y - the sign Y coordinate
      z - the sign Z coordinate
      message - 4 messages, each containing a line of the sign's new contents
      Throws:
      IllegalArgumentException - if message.length != 4
  • Method Details

    • fromPlainText

      public static UpdateSignMessage fromPlainText(int x, int y, int z, String... message)
      Builds an UpdateSignMessage from 4 strings.
      Parameters:
      x - the sign X coordinate
      y - the sign Y coordinate
      z - the sign Z coordinate
      message - 4 strings, each containing a line of the sign's new contents
      Returns:
      an UpdateSignMessage for the parameters
      Throws:
      IllegalArgumentException - if message isn't exactly 4 strings
    • getX

      public int getX()
    • getY

      public int getY()
    • getZ

      public int getZ()
    • getMessage

      public TextMessage[] getMessage()
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface com.flowpowered.network.Message
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.flowpowered.network.Message
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Specified by:
      toString in interface com.flowpowered.network.Message
      Overrides:
      toString in class Object