Package org.bukkit.block

Examples of org.bukkit.block.Sign.update()


                              sign.setLine(2, lines[2]);
                            }
                            if (lines.length > 3) {
                              sign.setLine(3, lines[3]);
                            }
                            sign.update(true);
                          }
                        }
                      }
                    } else if (diskBlockType == Material.CHEST.getId()) {
                      // Chests read
View Full Code Here


                                    sign.setLine(2, lines[2]);
                                  }
                                  if (lines.length > 3) {
                                    sign.setLine(3, lines[3]);
                                  }
                                  sign.update(true);
                                }
                              }
                            }
                          }
                        } else if (diskBlockType == Material.CHEST.getId()) {
View Full Code Here

            // Call the template method.
            String value = getLine(stats.get(i));
           
            // And set the line
            s.setLine(i % 4, value);
            s.update();
        }
    }
   
    public abstract String getLine(ArenaPlayerStatistics stats);
   
View Full Code Here

        for (int i = lx1+2; i <= lx2-2; i++) // Signs
        {
            world.getBlockAt(i,ly1+1,lz2-1).setTypeIdAndData(63, (byte)0x8, false);
            Sign sign = (Sign) world.getBlockAt(i,ly1+1,lz2-1).getState();
            sign.setLine(0, TextUtils.camelCase((String)iterator.next()));
            sign.update();
        }
        world.getBlockAt(lx2-2,ly1+1,lz1+2).setType(Material.IRON_BLOCK);
       
        // Set up the monster points.
        ArenaRegion region = arena.getRegion();
View Full Code Here

      long duration = System.currentTimeMillis() - startTime;
      if (MaterialUtil.ISSIGN.get(this.signblock)) {
        Sign sign = BlockUtil.getSign(this.signblock);
        String dur = Util.getTimeString(duration);
        sign.setLine(3, dur);
        sign.update(true);
        //Message
        for (Player player : sign.getWorld().getPlayers()) {
          if (player.hasPermission("train.build.trigger")) {
            player.sendMessage(ChatColor.YELLOW + "[Train Carts] Trigger time of '" + sign.getLine(2) + "' set to " + dur);
          }
View Full Code Here

            else {
                for (int i = 0; i < list.size(); i++) {
                    state.setLine(i, EscapeTags.unEscape(list.get(i)));
                }
            }
            state.update();
        }

        // <--[mechanism]
        // @object dLocation
        // @name skull_skin
View Full Code Here

        // -->
        if (mechanism.matches("skull_skin") && getBlock().getState() instanceof Skull) {
            Skull state = ((Skull)getBlock().getState());
            if (!state.setOwner(value.asString()))
                dB.echoError("Failed to set skull_skin!");
            state.update(true);
        }

        if (!mechanism.fulfilled())
            mechanism.reportInvalid();
    }
View Full Code Here

                Bukkit.getPluginManager().callEvent(sev);

                if(!sev.isCancelled()) {
                    for(int i = 0; i < lines.length; i++)
                        s.setLine(i, lines[i]);
                    s.update();
                }

                player.print("mech.signcopy.paste");
                event.setCancelled(true);
            }
View Full Code Here

                    for (int x = 0; x != signs[0].length; x++) {

                        Sign sig = signs[y][x];
                        sig.setLine(a, "");
                        sig.update();

                    }

                }
            }
View Full Code Here

    if (BlackMagic.setBlockType(block, Material.WALL_SIGN, direction.getData())) {
      if (block.getType() == Material.WALL_SIGN) {
        Sign sign = (Sign) block.getState();
        for (int i = 0; i < text.length && i < 4; i++)
          sign.setLine(i, text[i]);
        sign.update(true);
      }
    }
  }

  public final void setSignPost(int x, int y, int z, BlockFace direction, String[] text) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.