Examples of Actor


Examples of com.sk89q.worldedit.extension.platform.Actor

                }
            }
        }

        // Check if the item is allowed
        Actor actor = context.requireActor();
        if (context.isRestricted() && actor != null && !actor.hasPermission("worldedit.anyblock")
                && worldEdit.getConfiguration().disallowedBlocks.contains(blockId)) {
            throw new DisallowedUsageException("You are not allowed to use '" + input + "'");
        }

        if (blockType == null) {
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

     * @throws ParameterException on error
     */
    @BindingMatch(type = Actor.class,
            behavior = BindingBehavior.PROVIDES)
    public Actor getActor(ArgumentStack context) throws ParameterException {
        Actor sender = context.getContext().getLocals().get(Actor.class);
        if (sender == null) {
            throw new ParameterException("Missing 'Actor'");
        } else {
            return sender;
        }
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

     * @throws ParameterException on error
     */
    @BindingMatch(type = Player.class,
                  behavior = BindingBehavior.PROVIDES)
    public Player getPlayer(ArgumentStack context) throws ParameterException {
        Actor sender = context.getContext().getLocals().get(Actor.class);
        if (sender == null) {
            throw new ParameterException("No player to get a session for");
        } else if (sender instanceof Player) {
            return (Player) sender;
        } else {
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

     */
    @BindingMatch(type = BaseBlock.class,
                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
        Actor actor = context.getContext().getLocals().get(Actor.class);
        ParserContext parserContext = new ParserContext();
        parserContext.setActor(context.getContext().getLocals().get(Actor.class));
        if (actor instanceof Entity) {
            Extent extent = ((Entity) actor).getExtent();
            if (extent instanceof World) {
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

     */
    @BindingMatch(type = Pattern.class,
                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public Pattern getPattern(ArgumentStack context) throws ParameterException, WorldEditException {
        Actor actor = context.getContext().getLocals().get(Actor.class);
        ParserContext parserContext = new ParserContext();
        parserContext.setActor(context.getContext().getLocals().get(Actor.class));
        if (actor instanceof Entity) {
            Extent extent = ((Entity) actor).getExtent();
            if (extent instanceof World) {
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

     */
    @BindingMatch(type = Mask.class,
                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public Mask getMask(ArgumentStack context) throws ParameterException, WorldEditException {
        Actor actor = context.getContext().getLocals().get(Actor.class);
        ParserContext parserContext = new ParserContext();
        parserContext.setActor(context.getContext().getLocals().get(Actor.class));
        if (actor instanceof Entity) {
            Extent extent = ((Entity) actor).getExtent();
            if (extent instanceof World) {
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public BaseBiome getBiomeType(ArgumentStack context) throws ParameterException, WorldEditException {
        String input = context.next();
        if (input != null) {
            Actor actor = context.getContext().getLocals().get(Actor.class);
            World world;
            if (actor instanceof Entity) {
                Extent extent = ((Entity) actor).getExtent();
                if (extent instanceof World) {
                    world = (World) extent;
View Full Code Here

Examples of com.sk89q.worldedit.extension.platform.Actor

*/
public class ActorAuthorizer implements Authorizer {

    @Override
    public boolean testPermission(CommandLocals locals, String permission) {
        Actor sender = locals.get(Actor.class);
        if (sender == null) {
            throw new RuntimeException("Uh oh! No 'Actor' specified so that we can check permissions");
        } else {
            return sender.hasPermission(permission);
        }
    }
View Full Code Here

Examples of cz.matfyz.aai.fantom.game.Actor

    for(MessageMove.ActorMove m : detectiveMoves.getMoves()) {
      TransportType transport = m.getTransportType();

      if(transport.isUsedByPhantom()) {
        int lucky = rnd.nextInt(phantoms.size()); //TODO: With multiple phantoms, how should the tickets be distributed?
        Actor luckyActor = phantoms.get(lucky);
        logger.info(String.format("Phantom %s gets one ticket for transport %s", luckyActor.getId(), transport.getName()));
        phantoms.get(lucky).addTicket(transport);
      }
    }

    // Inform the phantom.
View Full Code Here

Examples of groovyx.gpars.actor.Actor

     *
     * @param code The code to invoke for each received message
     * @return A new instance of ReactiveEventBasedThread
     */
    public final Actor reactor(@DelegatesTo(Actor.class) final Closure code) {
        final Actor actor = new ReactiveActor(code);
        actor.setParallelGroup(this);
        actor.start();
        return actor;
    }
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.