Examples of startsWith()


Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

                event.setReplaced("null");
                return;
            }
            attribute.fulfill(1);
            // NOTE: Meta is in dList.java
            if (attribute.startsWith("is_expired")
                    || attribute.startsWith("isexpired")) {
                event.setReplaced(new Element(!FlagManager.serverHasFlag(flag_name))
                        .getAttribute(attribute.fulfill(1)));
                return;
            }
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

                return;
            }
            attribute.fulfill(1);
            // NOTE: Meta is in dList.java
            if (attribute.startsWith("is_expired")
                    || attribute.startsWith("isexpired")) {
                event.setReplaced(new Element(!FlagManager.serverHasFlag(flag_name))
                        .getAttribute(attribute.fulfill(1)));
                return;
            }
            // NOTE: Meta is in dList.java
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

                event.setReplaced(new Element(!FlagManager.serverHasFlag(flag_name))
                        .getAttribute(attribute.fulfill(1)));
                return;
            }
            // NOTE: Meta is in dList.java
            if (attribute.startsWith("size") && !FlagManager.serverHasFlag(flag_name)) {
                event.setReplaced(new Element(0).getAttribute(attribute.fulfill(1)));
                return;
            }
            if (FlagManager.serverHasFlag(flag_name))
                event.setReplaced(new dList(DenizenAPI.getCurrentInstance().flagManager()
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @attribute <server.list_materials>
        // @returns dList
        // @description
        // Returns a list of all materials known to the server (only their Bukkit enum names).
        // -->
        if (attribute.startsWith("list_materials")) {
            dList allMats = new dList();
            for (Material mat: Material.values())
                allMats.add(mat.name());
            event.setReplaced(allMats.getAttribute(attribute.fulfill(1)));
        }
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @returns dList
        // @description
        // Returns a list of the server's flag names, with an optional search for
        // names containing a certain pattern.
        // -->
        if (attribute.startsWith("list_flags")) {
            dList allFlags = new dList(DenizenAPI.getCurrentInstance().flagManager().listGlobalFlags());
            dList searchFlags = null;
            if (!allFlags.isEmpty() && attribute.hasContext(1)) {
                searchFlags = new dList();
                String search = attribute.getContext(1).toLowerCase();
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @attribute <server.current_time_millis>
        // @returns Element(Number)
        // @description
        // Returns the number of milliseconds since Jan 1, 1970.
        // -->
        if (attribute.startsWith("current_time_millis")) {
            event.setReplaced(new Element(System.currentTimeMillis())
                    .getAttribute(attribute.fulfill(1)));
        }

        // <--[tag]
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @returns Element(Number)
        // @description
        // Returns whether a world event exists on the server.
        // This tag will ignore dObject identifiers (see <@link language dobject>).
        // -->
        if (attribute.startsWith("has_event")
                && attribute.hasContext(1)) {
            event.setReplaced(new Element(EventManager.eventExists(attribute.getContext(1))
                    || EventManager.eventExists(EventManager.StripIdentifiers(attribute.getContext(1))))
                    .getAttribute(attribute.fulfill(1)));
        }
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @description
        // Returns a list of all world scripts that will handle a given event name.
        // This tag will ignore dObject identifiers (see <@link language dobject>).
        // For use with <@link tag server.has_event[<event_name>]>
        // -->
        if (attribute.startsWith("get_event_handlers")
                && attribute.hasContext(1)) {
            String eventName = attribute.getContext(1).toUpperCase();
            List<WorldScriptContainer> EventsOne = EventManager.events.get("ON " + eventName);
            List<WorldScriptContainer> EventsTwo = EventManager.events.get("ON " + EventManager.StripIdentifiers(eventName));
            if (EventsOne == null && EventsTwo == null) {
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @attribute <server.selected_npc>
        // @returns dNPC
        // @description
        // Returns the server's currently selected NPC.
        // -->
        if (attribute.startsWith("selected_npc")) {
            NPC npc = ((Citizens) Bukkit.getPluginManager().getPlugin("Citizens"))
                    .getNPCSelector().getSelected(Bukkit.getConsoleSender());
            if (npc == null)
                return;
            else
View Full Code Here

Examples of net.aufdemrand.denizen.tags.Attribute.startsWith()

        // @attribute <server.get_npcs_named[<name>]>
        // @returns dList(dNPC)
        // @description
        // Returns a list of NPCs with a certain name.
        // -->
        if (attribute.startsWith("get_npcs_named") && Depends.citizens != null && attribute.hasContext(1)) {
            ArrayList<dNPC> npcs = new ArrayList<dNPC>();
            for (NPC npc : CitizensAPI.getNPCRegistry())
                if (npc.getName().equalsIgnoreCase(attribute.getContext(1)))
                    npcs.add(dNPC.mirrorCitizensNPC(npc));
            event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
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.