Search in sources :

Example 1 with SignEditorMessage

use of net.glowstone.net.message.play.game.SignEditorMessage in project Glowstone by GlowstoneMC.

the class GlowPlayer method openSignEditor.

/**
 * Open the sign editor interface at the specified location.
 *
 * @param loc The location to open the editor at
 */
public void openSignEditor(Location loc) {
    signLocation = loc.clone();
    signLocation.setX(loc.getBlockX());
    signLocation.setY(loc.getBlockY());
    signLocation.setZ(loc.getBlockZ());
    signLocation.setYaw(0);
    signLocation.setPitch(0);
    // Client closes inventory when sign editor is opened
    if (!GlowInventoryView.isDefault(getOpenInventory())) {
        closeInventory();
    }
    session.send(new SignEditorMessage(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
Also used : SignEditorMessage(net.glowstone.net.message.play.game.SignEditorMessage)

Aggregations

SignEditorMessage (net.glowstone.net.message.play.game.SignEditorMessage)1