Examples of PlayerInterface


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

Examples of com.sk89q.craftbook.access.PlayerInterface

    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

Examples of com.sk89q.craftbook.access.PlayerInterface

        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

Examples of com.sk89q.craftbook.access.PlayerInterface

                }

                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

Examples of com.sk89q.craftbook.access.PlayerInterface

        }
    }

    public void onDisconnect(Player p) {

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

Examples of com.sk89q.craftbook.access.PlayerInterface

        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

Examples of com.sk89q.craftbook.access.PlayerInterface

        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

Examples of com.sk89q.craftbook.access.PlayerInterface

        }
    }

    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

Examples of vrampal.connectfour.cmdline.PlayerInterface

public class ConnectFourRobot {

  public static void main(String[] args) {
    ConsoleDiplay consoleDisplay = new ConsoleDiplay();
    PlayerInterface playerItf = new DummyBotPlayerInterface();
    GameRunner consoleGame = new GameRunner(playerItf, playerItf);
    consoleGame.addMonitor(consoleDisplay);
    consoleGame.run();
  }
View Full Code Here

Examples of vrampal.connectfour.cmdline.PlayerInterface

  public void run() {
    if (log.isInfoEnabled()) {
      log.info("Running for " + NB_TOTAL_GAME + " games");
    }

    PlayerInterface playerItf = new DummyBotPlayerInterface();

    long beginTime = System.currentTimeMillis();
    for (int i = 0; i < NB_TOTAL_GAME; i++) {
      GameRunner gameRunner = new GameRunner(playerItf, playerItf);
      gameRunner.run();
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.