Package com.sk89q.craftbook.access

Examples of com.sk89q.craftbook.access.PlayerInterface


    public boolean equals(Object other) {

        if (!(other instanceof PlayerInterface)) {
            return false;
        }
        PlayerInterface other2 = (PlayerInterface) other;
        return other2.getName().equals(getName());
    }
View Full Code Here


    public void think(ChipState chip) {

        if (chip.getIn(1).is()) {
            String thePlayerString = chip.getText().getLine3();
            String theMessage = chip.getText().getLine4();
            PlayerInterface thePlayer = chip.getServer().matchPlayer(thePlayerString);
            if (thePlayer == null) {
                chip.getOut(1).set(false);
                return;
            }
            chip.getOut(1).set(true);
            thePlayer.sendMessage(theMessage);
        }
    }
View Full Code Here

        for (CraftBookDelegateListener l : main.signCreateListeners) { l.onSignCreate(w, x, y, z); }
    }

    public boolean onSignChange(Player p, Sign sp) {

        PlayerInterface player = new HmodPlayerImpl(p, w);
        BlockVector signPosition = new BlockVector(sp.getX(), sp.getY(), sp.getZ());
        SignInterface s = new HmodSignImpl(w, signPosition, sp);
        for (CraftBookDelegateListener l : main.signChangeListeners) {
            if (l.onSignChange(player, w, signPosition, s)) return true;
        }
View Full Code Here

                }

                return !split[1].equals("*");
            }

            PlayerInterface myPlayer = new HmodPlayerImpl(player, w);

            for (CraftBookDelegateListener listener : main.commandListeners) {
                if (listener.onCommand(myPlayer, split)) return true;
            }

View Full Code Here

        }
    }

    public void onDisconnect(Player p) {

        PlayerInterface player = new HmodPlayerImpl(p, w);
        for (CraftBookDelegateListener listener : main.disconnectListeners) { listener.onDisconnect(player); }
    }
View Full Code Here

        for (CraftBookDelegateListener listener : main.disconnectListeners) { listener.onDisconnect(player); }
    }

    public boolean onBlockPlace(Player p, Block pp, Block cp, Item itemInHand) {

        PlayerInterface player = new HmodPlayerImpl(p, w);
        BlockVector pv = new BlockVector(pp.getX(), pp.getY(), pp.getZ());
        BlockVector cv = new BlockVector(cp.getX(), cp.getY(), cp.getZ());
        for (CraftBookDelegateListener listener : main.blockPlaceListeners) {
            if (listener.onBlockPlace(w, player, pv, cv, itemInHand.getItemId()))
                return true;
View Full Code Here

        return false;
    }

    public void onBlockRightClicked(Player p, Block cp, Item itemInHand) {

        PlayerInterface player = new HmodPlayerImpl(p, w);
        BlockVector cv = new BlockVector(cp.getX(), cp.getY(), cp.getZ());
        for (CraftBookDelegateListener listener : main.blockRightClickListeners) {
            listener.onBlockRightClicked(w, player, cv, itemInHand.getItemId());
        }
    }
View Full Code Here

        }
    }

    public boolean onBlockDestroy(Player p, Block dp) {

        PlayerInterface player = new HmodPlayerImpl(p, w);
        BlockVector dv = new BlockVector(dp.getX(), dp.getY(), dp.getZ());
        for (CraftBookDelegateListener listener : main.blockDestroyedListeners) {
            if (listener.onBlockDestroy(w, player, dv, dp.getStatus()))
                return true;
        }
View Full Code Here

TOP

Related Classes of com.sk89q.craftbook.access.PlayerInterface

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.