Package com.sk89q.craftbook

Examples of com.sk89q.craftbook.LocalPlayer.translate()


                player.printError("area.use-permissions");
            return;
        }

        Block block = event.getClickedBlock().getRelative(event.getBlockFace());
        player.printRaw(ChatColor.YELLOW + player.translate("mech.lightstone.lightstone") + " [" + getLightLine(block.getLightLevel()) + ChatColor.YELLOW + "] " + block.getLightLevel() + " L");
    }

    private String getLightLine(int data) {

        StringBuilder line = new StringBuilder(25);
View Full Code Here


        if (CraftBookPlugin.plugins.getEconomy().withdrawPlayer(event.getPlayer().getName(), money).transactionSuccess()) {
            if (CraftBookPlugin.plugins.getEconomy().depositPlayer(reciever, money).transactionSuccess()) {
                Block back = SignUtil.getBackBlock(event.getClickedBlock());
                BlockFace bface = SignUtil.getBack(event.getClickedBlock());
                Block redstoneItem = back.getRelative(bface);
                player.print(player.translate("mech.pay.success") + money + " " + CraftBookPlugin.plugins.getEconomy().getName());
                if (ICUtil.setState(redstoneItem, true, back))
                    CraftBookPlugin.inst().getServer().getScheduler().runTaskLater(CraftBookPlugin.inst(), new TurnOff(redstoneItem, back), 20L);
            } else {
                CraftBookPlugin.plugins.getEconomy().depositPlayer(event.getPlayer().getName(), money);
                player.printError("mech.pay.failed-to-pay");
View Full Code Here

            } else {
                CraftBookPlugin.plugins.getEconomy().depositPlayer(event.getPlayer().getName(), money);
                player.printError("mech.pay.failed-to-pay");
            }
        } else {
            player.printError(player.translate("mech.pay.not-enough-money"));
        }

        event.setCancelled(true);
    }
View Full Code Here

                return;

            LocalPlayer player = CraftBookPlugin.inst().wrapPlayer(event.getPlayer());

            if(showNameClick && MobSkullType.getEntityType(skull.getOwner()) == null) {
                player.printRaw(ChatColor.YELLOW + player.translate("mech.headdrops.click-message") + " " + skull.getOwner());
            } else if (MobSkullType.getEntityType(skull.getOwner()) != null) {
                skull.setOwner(MobSkullType.getFromEntityType(MobSkullType.getEntityType(skull.getOwner())).getPlayerName());
                skull.update();
            }
        }
View Full Code Here

                            }
                        }
                    }

                    if(!found && !def.missingConsumableMessage.isEmpty()) {
                        lplayer.printError(lplayer.translate(def.missingConsumableMessage).replace("%item%", stack.getAmount() + " " + stack.getType().name()));
                        break current;
                    }
                }

                for(ItemStack stack : def.consumables) {
View Full Code Here

                    break current;
                }

                if(cooldownPeriods.containsKey(new Tuple2<String, String>(lplayer.getName(), comdef.name))) {
                    if(def.clickType != ClickType.PASSIVE && !def.cooldownMessage.isEmpty())
                        lplayer.printError(lplayer.translate(def.cooldownMessage).replace("%time%", String.valueOf(cooldownPeriods.get(new Tuple2<String, String>(lplayer.getName(), comdef.name)))));
                    break current;
                }

                for(ItemStack stack : def.consumables) {
View Full Code Here

            } else if (paintings.get(paint).equals(player.getUniqueId())) {
                paintings.remove(paint);
                players.remove(player.getUniqueId());
                player.print("mech.painting.stop");
            } else if (isBeingEdited(paint)) {
                player.print(player.translate("mech.painting.used") + " " + paintings.get(paint));
            } else {
                return;
            }
            event.setCancelled(true);
        }
View Full Code Here

        }

        Block block = event.getClickedBlock();
        int data = getSpecialData(block);
        String line = getCurrentLine(data);
        player.print(player.translate("mech.ammeter.ammeter") + ": " + line + ChatColor.WHITE + " " + data + " A");
        event.setCancelled(true);
    }

    private int getSpecialData(Block block) {
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.