Examples of Sign


Examples of org.bukkit.block.Sign

        }

        if(checkChunks) {
            for(BlockState state : event.getBlock().getChunk().getTileEntities()) {
                if(state instanceof Sign) {
                    Sign s = (Sign) state;
                    if(s.getLine(1).equalsIgnoreCase("[Chunk]")) {
                        lplayer.printError("mech.anchor.already-anchored");
                        SignUtil.cancelSign(event);
                        return;
                    }
                }
View Full Code Here

Examples of org.bukkit.block.Sign

            player.print("mech.signcopy.copy");
            event.setCancelled(true);
        } else if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
            if(signs.containsKey(player.getName())) {

                Sign s = (Sign) event.getClickedBlock().getState();
                String[] lines = signs.get(player.getName());

                SignChangeEvent sev = new SignChangeEvent(event.getClickedBlock(), event.getPlayer(), lines);
                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

Examples of org.bukkit.block.Sign

        return code.toString();
    }

    private String getCode() throws CodeNotFoundException {

        Sign sign = BukkitUtil.toSign(this.sign);

        Block above = sign.getLocation().add(new Vector(0, 1, 0)).getBlock();
        if (above.getType() == Material.CHEST) return getBookCode(above);
        Block below = sign.getLocation().add(new Vector(0, -1, 0)).getBlock();
        if (below.getType() == Material.CHEST) return getBookCode(below);

        org.bukkit.Location l = sign.getLocation();
        World w = l.getWorld();

        int x = l.getBlockX();
        int z = l.getBlockZ();
View Full Code Here

Examples of org.bukkit.block.Sign

            }, 20L);
            return;
        }
        clear();
        Game game = GameManager.getInstance().getGame(gameid);
        Sign s0 = signs.get(0);
        Sign s1 = signs.get(1);

        //sign 0
        s0.setLine(0, "[SurvivalGames]");
        s0.setLine(1, "Click to join");
        s0.setLine(2, "Arena " + gameid);

        //sign 1
        s1.setLine(0, game.getName());
        s1.setLine(1, game.getMode() + "");
        s1.setLine(2, game.getActivePlayers() + "/" + ChatColor.GRAY + game.getInactivePlayers() + ChatColor.BLACK + "/" + SettingsManager.getInstance().getSpawnCount(game.getID()));

        //live update line s1
        if (game.getMode() == Game.GameMode.STARTING) {
            s1.setLine(3, game.getCountdownTime() + "");
        } else if (game.getMode() == Game.GameMode.RESETING || game.getMode() == Game.GameMode.FINISHING) {
            s1.setLine(3, game.getRBStatus());
            if (game.getRBPercent() > 100) {
                s1.setLine(1, "Saving Queue");
                s1.setLine(3, (int) game.getRBPercent() + " left");
            } else s1.setLine(3, (int) game.getRBPercent() + "%");
        } else {
            s1.setLine(3, "");
        }

        //live player data
        ArrayList < String > display = new ArrayList < String > ();
        for (Player p: game.getAllPlayers()) {
View Full Code Here

Examples of org.bukkit.block.Sign

                // System.out.println(msg[a]);
                char[] line = msg[a].toCharArray();
                for (int b = 0; b < line.length; b++) {

                    //System.out.println(y/16+"    "+x/4+"     "+(3-x)%4+"     "+x);
                    Sign sig = signs[x][((y) / 16)];
                    sig.setLine(lineno, sig.getLine(lineno) + line[b]);
                    //System.out.println(sig.getLine(x%4));
                    signs[x][((y) / 16)].update();

                    y++;
                }
View Full Code Here

Examples of org.bukkit.block.Sign

            for (int y = signs.length - 1; y != -1; y--) {
                for (int a = 0; a < 4; a++) {

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

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

                    }

                }
            }
View Full Code Here

Examples of org.bukkit.block.Sign

        if(!(e.getAction()==Action.RIGHT_CLICK_BLOCK || e.getAction()==Action.LEFT_CLICK_BLOCK)) return;
       

        Block clickedBlock = e.getClickedBlock();
        if(!(clickedBlock.getType()==Material.SIGN || clickedBlock.getType()==Material.SIGN_POST || clickedBlock.getType()==Material.WALL_SIGN)) return;
        Sign thisSign = (Sign) clickedBlock.getState();
        //System.out.println("Clicked sign");
        String[] lines = thisSign.getLines();
        if(lines.length<3) return;
        if(lines[0].equalsIgnoreCase("[SurvivalGames]")) {
            e.setCancelled(true);
            try{
                if(lines[2].equalsIgnoreCase("Auto Assign")){
View Full Code Here

Examples of org.bukkit.material.Sign

        state.setType(getMaterial());
        if (!(state.getData() instanceof Sign)) {
            warnMaterialData(Sign.class, state.getData());
            return;
        }
        Sign sign = (Sign) state.getData();
        sign.setFacingDirection(sign.isWallSign() ? face : player.getFacing().getOppositeFace());
    }
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Sign

         NonceFactory factory = Util.loadFactory(NonceFactory.class, config.getNonceFactory(), DefaultNonceFactory.class);
         nonceGenerator = factory.getGenerator();
      }

      Sign sign = opConfig.getSign();
      if (sign != null)
      {
         List<Target> targets = convertTargets(sign.getTargets());
         if (sign.isIncludeTimestamp())
         {
            if (timestamp == null)
               operations.add(new OperationDescription<EncodingOperation>(TimestampOperation.class, null, null, null, null));

            if (targets != null && targets.size() > 0)
               targets.add(new WsuIdTarget("timestamp"));
         }

         operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
      }

      Encrypt encrypt = opConfig.getEncrypt();
      if (encrypt != null)
      {
View Full Code Here

Examples of org.jboss.ws.metadata.wsse.Sign

            operations.add(new OperationDescription<EncodingOperation>(SendUsernameOperation.class, null, user.toString(), pass.toString(), null));
            ctx.put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
         }
      }

      Sign sign = operationConfig.getSign();
      if (sign != null)
      {
         List<Target> targets = convertTargets(sign.getTargets());
         if (sign.isIncludeTimestamp())
         {
            if (timestamp == null)
               operations.add(new OperationDescription<EncodingOperation>(TimestampOperation.class, null, null, null, null));

            if (targets != null && targets.size() > 0)
               targets.add(new WsuIdTarget("timestamp"));
         }

         operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
      }

      Encrypt encrypt = operationConfig.getEncrypt();
      if (encrypt != null)
      {
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.