Package net.aufdemrand.denizen.tags

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


        Attribute attribute = event.getAttributes();

        if (npc.hasTrait(ConstantsTrait.class)
                && npc.getTrait(ConstantsTrait.class).getConstant(event.getValue()) != null) {
            event.setReplaced(new Element(npc.getTrait(ConstantsTrait.class)
                    .getConstant(event.getValue())).getAttribute(attribute.fulfill(1)));
        }

    }
}
View Full Code Here


        }

        dLocation location = (dLocation) NotableManager.getSavedObject(id);

        Attribute attribute = new Attribute(event.raw_tag, event.getScriptEntry());
        attribute.fulfill(1);
        tag = location.getAttribute(attribute);

        event.setReplaced(tag);

    }
View Full Code Here

            return;
        }

        // Build and fill attributes
        Attribute attribute = event.getAttributes();
        event.setReplaced(loc.getAttribute(attribute.fulfill(1)));

    }
}
View Full Code Here

            return;
        }

        // Build and fill attributes
        Attribute attribute = event.getAttributes();
        event.setReplaced(list.getAttribute(attribute.fulfill(1)));

    }
}
View Full Code Here

        if (attribute.startsWith("list_permission_groups")) {
            if (Depends.permissions == null) {
                dB.echoError("No permission system loaded! Have you installed Vault and a compatible permissions plugin?");
                return;
            }
            event.setReplaced(new dList(Arrays.asList(Depends.permissions.getGroups())).getAttribute(attribute.fulfill(1)));
            return;
        }

        // <--[tag]
        // @attribute <server.list_plugin_names>
View Full Code Here

        // -->
        if (attribute.startsWith("list_plugin_names")) {
            dList plugins = new dList();
            for (Plugin plugin : Bukkit.getServer().getPluginManager().getPlugins())
                plugins.add(plugin.getName());
            event.setReplaced(plugins.getAttribute(attribute.fulfill(1)));
            return;
        }

        // <--[tag]
        // @attribute <server.list_scripts>
View Full Code Here

        // -->
        if (attribute.startsWith("list_scripts")) {
            dList scripts = new dList();
            for (String str : ScriptRegistry._getScriptNames())
                scripts.add("s@" + str);
            event.setReplaced(scripts.getAttribute(attribute.fulfill(1)));
            return;
        }

        // <--[tag]
        // @attribute <server.match_player[<name>]>
View Full Code Here

            }

            if (matchPlayer == null) {
                event.setReplaced("null");
            } else {
                event.setReplaced(new dPlayer(matchPlayer).getAttribute(attribute.fulfill(1)));
            }

            return;
        }
View Full Code Here

                for (NPC npc : CitizensAPI.getNPCRegistry()) {
                    if (npc.hasTrait(AssignmentTrait.class) && npc.getTrait(AssignmentTrait.class).hasAssignment()
                            && npc.getTrait(AssignmentTrait.class).getAssignment().getName().equalsIgnoreCase(script.getName()))
                        npcs.add(dNPC.mirrorCitizensNPC(npc));
                }
                event.setReplaced(new dList(npcs).getAttribute(attribute.fulfill(1)));
                return;
            }
        }

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

            ArrayList<dPlayer> players = new ArrayList<dPlayer>();
            for (Player player: Bukkit.getOnlinePlayers()) {
                if (DenizenAPI.getCurrentInstance().flagManager().getPlayerFlag(new dPlayer(player), flag).size() > 0)
                    players.add(new dPlayer(player));
            }
            event.setReplaced(new dList(players).getAttribute(attribute.fulfill(1)));
            return;
        }

        // <--[tag]
        // @attribute <server.get_players_flagged[<flag_name>]>
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.