Java 类org.bukkit.craftbukkit.block.CraftSign 实例源码

项目:Uranium    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:ThermosRebased    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:Thermos    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:KCauldron    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:CauldronGit    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:Cauldron-Old    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:Cauldron-Reloaded    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:FFoKC    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:CraftBukkit    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerConnection == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:Craftbukkit    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerConnection == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);

    getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateSign(getHandle().world, new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), components));
}
项目:Tweakkit-Server    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerConnection == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:Cauldron    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerNetServerHandler == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    // Limit to 15 chars per line and set null lines to blank
    String[] astring = CraftSign.sanitizeLines(lines);

    getHandle().playerNetServerHandler.sendPacket(new S33PacketUpdateSign(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), astring));
}
项目:SpigotSource    文件:CraftPlayer.java   
@Override
public void sendSignChange(Location loc, String[] lines) {
    if (getHandle().playerConnection == null) {
        return;
    }

    if (lines == null) {
        lines = new String[4];
    }

    Validate.notNull(loc, "Location can not be null");
    if (lines.length < 4) {
        throw new IllegalArgumentException("Must have at least 4 lines");
    }

    IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
    TileEntitySign sign = new TileEntitySign();
    sign.a(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); // PAIL: rename
    System.arraycopy(components, 0, sign.lines, 0, sign.lines.length);

    getHandle().playerConnection.sendPacket(sign.getUpdatePacket());
}