Package com.sk89q.craftbook.util

Examples of com.sk89q.craftbook.util.TernaryState


                if(delay > 0)
                    delayedCommands = (List<String>) context.getSessionData("delayed-commands");
                int cooldown = (Integer) context.getSessionData("cooldown");
                boolean cancelAction = (Boolean) context.getSessionData("cancel-action");
                boolean consumeSelf = (Boolean) context.getSessionData("consume-self");
                TernaryState requireSneaking = (TernaryState) context.getSessionData("require-sneaking");
                boolean keepOnDeath = (Boolean) context.getSessionData("keep-on-death");
                List<CommandItemAction> actions = new ArrayList<CommandItemAction>();
                String missingConsumableMessage = "mech.command-items.need";
                String cooldownMessage = "mech.command-items.wait";
                CommandItemDefinition def = new CommandItemDefinition(name, stack, type, clickType, permNode, commands.toArray(new String[commands.size()]), delay, delayedCommands.toArray(new String[delayedCommands.size()]), cooldown, cancelAction, consumables.toArray(new ItemStack[consumables.size()]), consumeSelf, requireSneaking, keepOnDeath, actions.toArray(new CommandItemAction[actions.size()]), missingConsumableMessage, cooldownMessage);
View Full Code Here


            for(String s : config.getStringList(path + ".consumed-items", new ArrayList<String>()))
                consumables.add(ItemUtil.makeItemValid(ItemSyntax.getItem(s)));
        } catch(Exception ignored){}

        boolean consumeSelf = config.getBoolean(path + ".consume-self", false);
        TernaryState requireSneaking = TernaryState.getFromString(config.getString(path + ".require-sneaking-state", "either"));

        boolean keepOnDeath = config.getBoolean(path + ".keep-on-death", false);

        List<CommandItemAction> actionList = new ArrayList<CommandItemAction>();
View Full Code Here

TOP

Related Classes of com.sk89q.craftbook.util.TernaryState

Copyright © 2018 www.massapicom. 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.