Examples of Player


Examples of com.mojang.minecraft.player.Player

  }

  @Override
  public void playerTouch(Entity entity)
  {
    Player player = (Player)entity;

    if(hasHit && owner == player && player.arrows < 99)
    {
      TakeEntityAnim takeEntityAnim = new TakeEntityAnim(level, this, player);
View Full Code Here

Examples of com.mojang.minecraft.player.Player$1

      this.heightOffset = 1.62F;
      this.health = 20;
      this.modelName = "humanoid";
      this.rotOffs = 180.0F;
      this.ai = new Player$1(this);
   }
View Full Code Here

Examples of com.poker.analyst.element.Player

        BoardGenerator.cardsList = generateCardsList();
        final Random random = new Random(new Date().getTime());
        final PlayingCards cards = fillInPlayingCards();
        final Board board = new Board();
        final List<Player> players = new ArrayList<Player>();
        Player player = null;
        final int playerCount = 2 + random.nextInt(8);
        for (int i = 0; i < playerCount; i++) {
            player = new Player();//(, , 0F, true);
            player.setReaction(UIReaction.UIR_ACTION_FOLD);
            player.setStack(10F);
            player.setBet(0F);
            player.setIsInAction(true);
            players.add(player);
        }
        board.setDealer(random.nextInt(playerCount));
        board.setHero(random.nextInt(playerCount));
        board.setPlayers(players);
View Full Code Here

Examples of com.poker.game.Player

    public void notification(@WebModel Map m, @WebParam("room") String room, RequestContext rc) {
        Table table = gameManager.getTable(room);
        List playerList = table.getPlayers();
        List playerList2 = new ArrayList();
        for (int i = 0; i < playerList.size(); i++) {
            Player player = (Player) playerList.get(i);
            Map playerMap = new HashMap();
            playerMap.put("pokerChip", player.getCash());
            playerMap.put("player", player.getName());
            Card[] handArr = player.getHand().getCards();
            List handList = new ArrayList();
            for (int j = 0; j < handArr.length; j++) {
                handList.add(handArr[j].toString());
            }
            playerMap.put("handCards", handList);
            playerMap.put("playerId", player.getId());
            playerMap.put("status", player.getAction() == null ? "" : player.getAction().getName());
            playerList2.add(playerMap);
            //
            if (player.getId().equals(rc.getReq().getSession().getAttribute("playerId"))) {
                List actionList = new ArrayList();
                actionList.add("Continue");
                actionList.add("Raise");
                actionList.add("Fold");
                playerMap.put("actions", actionList);
View Full Code Here

Examples of com.runright.Player

    }

    @Override
    public void init(GameContainer gc) throws SlickException {
        map = new TiledMap("resources/maps/test3.tmx");
        player = new Player("resources/dirt.png", 50, 50);
        System.out.println(map.getTileId(10,10,0));
        x = 100;
    }
View Full Code Here

Examples of com.sijobe.spc.hook.Player

      initPlayerHelper(par3Session);
      phexists = true;
     
      DynamicClassLoader.populateClassLoaderWithClasses();
      player = new Player();
   }
View Full Code Here

Examples of com.sijobe.spc.wrapper.Player

   /**
    * @see com.sijobe.spc.wrapper.CommandBase#execute(com.sijobe.spc.wrapper.CommandSender, java.util.List)
    */
   @Override
   public void execute(CommandSender sender, List<?> params) throws CommandException {
      Player player = super.getSenderAsPlayer(sender);
      Coordinate c = player.getPosition();
      int distance = 0;
      try {
         distance = Integer.parseInt((String)params.get(0));
      } catch (NumberFormatException e) {
         throw new CommandException("Could not parse disance specified as integer: " + params.get(0));
      }
     
      if (((String)params.get(1)).toUpperCase().startsWith("N")) {
         player.setPosition(new Coordinate(player.getPosition().getX(), player.getPosition().getY(), player.getPosition().getZ() - distance));
      } else if (((String)params.get(1)).toUpperCase().startsWith("E")) {
         player.setPosition(new Coordinate(player.getPosition().getX() + distance, player.getPosition().getY(), player.getPosition().getZ()));
      } else if (((String)params.get(1)).toUpperCase().startsWith("S")) {
         player.setPosition(new Coordinate(player.getPosition().getX(), player.getPosition().getY(), player.getPosition().getZ() + distance));
      } else if (((String)params.get(1)).toUpperCase().startsWith("W")) {
         player.setPosition(new Coordinate(player.getPosition().getX() - distance, player.getPosition().getY(), player.getPosition().getZ()));
      } else if (((String)params.get(1)).toUpperCase().startsWith("U")) {
         player.setPosition(new Coordinate(player.getPosition().getX(), player.getPosition().getY() + distance, player.getPosition().getZ()));
      } else if (((String)params.get(1)).toUpperCase().startsWith("D")) {
         player.setPosition(new Coordinate(player.getPosition().getX(), player.getPosition().getY() - distance, player.getPosition().getZ() - distance));
      } else {
         throw new CommandException("Invalid direction specified.");
      }

      sender.sendMessageToPlayer("Moved from " +
               FontColour.AQUA + c.getBlockX() + FontColour.WHITE + ", " +
               FontColour.AQUA + c.getBlockX() + FontColour.WHITE + ", " +
               FontColour.AQUA + c.getBlockX() + FontColour.WHITE + " to " +
               FontColour.AQUA + player.getPosition().getBlockX() + FontColour.WHITE + ", " +
               FontColour.AQUA + player.getPosition().getBlockY() + FontColour.WHITE + ", " +
               FontColour.AQUA + player.getPosition().getBlockZ()
      );
   }
View Full Code Here

Examples of com.sk89q.worldedit.entity.Player

    @SuppressWarnings("unchecked")
    public <T extends Actor> T createProxyActor(T base) {
        checkNotNull(base);

        if (base instanceof Player) {
            Player player = (Player) base;

            Player permActor = queryCapability(Capability.PERMISSIONS).matchPlayer(player);
            if (permActor == null) {
                permActor = player;
            }

            Player cuiActor = queryCapability(Capability.WORLDEDIT_CUI).matchPlayer(player);
            if (cuiActor == null) {
                cuiActor = player;
            }

            return (T) new PlayerProxy(player, permActor, cuiActor, getWorldForEditing(player.getWorld()));
View Full Code Here

Examples of com.someluigi.tuc.server.player.Player

            return; // Exit from HTTP Processing
      }
     
      String addr = a.toString();
      if (addr.equalsIgnoreCase("/ser")) {
        Player p = new Player("slm", "AUser", 1);
        p.save();
        body.println("Serializing player");
        stdOut.println("Stopping the server...");
      }
     
      if (addr.equalsIgnoreCase("/stop")) {
        body.println("Stopping Server");
        body.close();
        HttpServer.stop();
      }
     
      if (addr.equalsIgnoreCase("/deser")) {
        Player p = (Player) EasySerialize.loadObj("a_player.player.ser");
        body.println("Loaded player " + p.techname);
       
      }
      body.println("Accessing URL: " + req.getAddress());
      body.close();
View Full Code Here

Examples of com.sun.mpk20.voicelib.app.Player

             
  String externalCallID = getExternalCallID(listing);

  Call externalCall = vm.getCall(externalCallID);

  Player externalPlayer = null;

  if (externalCall != null) {
      externalPlayer = externalCall.getPlayer();
  }

  String softphoneCallID = listing.getSoftphoneCallID();

  Call softphoneCall = null;

  Player softphonePlayer = null;

  AudioGroup audioGroup = null;

  String audioGroupId = null;

  VoiceManagerParameters parameters = vm.getVoiceManagerParameters();

  if (softphoneCallID != null) {
      softphoneCall = vm.getCall(softphoneCallID);

      if (softphoneCall != null) {
          softphonePlayer = softphoneCall.getPlayer();
      }
       
      audioGroupId = softphoneCallID + "_" + externalCallID;

      audioGroup = vm.getAudioGroup(audioGroupId);
  }

  logger.fine("EXTERNAL CALLID IS " + externalCallID + " " + msg
      + " softphone callID " + softphoneCallID + " softphone call "
      + softphoneCall + " softphone player " + softphonePlayer);

  if (message instanceof PlayTreatmentMessage) {
      PlayTreatmentMessage m = (PlayTreatmentMessage) message;

      logger.fine("play treatment " + m.getTreatment()
    + " to " + listing.getExternalCallID() + " echo " + m.echo());

            if (listing.simulateCalls() == true) {
    return;
      }

      try {
    externalCall.playTreatment(m.getTreatment());
      } catch (IOException e) {
    logger.warning("Unable to play treatment to " + externalCall + ":  "
        + e.getMessage());
      }

      if (m.echo() == false) {
    return;
      }

      logger.fine("echoing treatment to " + softphoneCallID);

      try {
    softphoneCall.playTreatment(m.getTreatment());
      } catch (IOException e) {
    logger.warning("Unable to play treatment to " + softphoneCall + ":  "
        + e.getMessage());
    sender.send(clientID, new CallEndedResponseMessage(
                    phoneCellMO.getCellID(), listing, true, "Softphone is not connected!"));
                return;
      }

      return;
  }

  if (msg instanceof PlaceCallMessage) {
            //Our phone cell is asking us to begin a new call.

      if (listing.simulateCalls() == false) {
    relock(sender);
      }

      logger.fine("Got place call message " + externalCallID);

      PlayerSetup playerSetup = new PlayerSetup();
      //playerSetup.x =  translation.x;
      //playerSetup.y =  translation.y;
      //playerSetup.z =  translation.z;
      playerSetup.isOutworlder = true;
      playerSetup.isLivePlayer = true;

            if (listing.simulateCalls() == false) {
          PhoneStatusListener phoneStatusListener =
        new PhoneStatusListener(phoneCellMO, listing, clientID);

          if (softphoneCall == null || softphonePlayer == null) {
        logger.warning("Softphone player is not connected!");
                  sender.send(clientID, new CallEndedResponseMessage(
      phoneCellMO.getCellID(), listing, false,
      "Softphone is not connected!"));
        return;
          }

    CallSetup setup = new CallSetup();
 
    CallParticipant cp = new CallParticipant();

    setup.cp = cp;

    setup.externalOutgoingCall = true;

    try {
        setup.bridgeInfo = vm.getVoiceBridge();
     } catch (IOException e) {
        logger.warning("Unable to get voice bridge for call " + cp + ":  "
      + e.getMessage());
        return;
    }

    cp.setPhoneNumber(listing.getContactNumber());
    cp.setName(listing.getContactName());
    cp.setCallId(externalCallID);
    cp.setConferenceId(parameters.conferenceId);
    cp.setVoiceDetection(true);
    cp.setDtmfDetection(true);
    cp.setVoiceDetectionWhileMuted(true);
    cp.setHandleSessionProgress(true);

    try {
                    externalCall = vm.createCall(externalCallID, setup);
     } catch (IOException e) {
        logger.warning("Unable to create call " + cp + ":  "
      + e.getMessage());
        return;
    }

        externalPlayer = vm.createPlayer(externalCallID, playerSetup);

    externalCall.setPlayer(externalPlayer);

    externalPlayer.setCall(externalCall);

                if (listing.isPrivate()) {
        /*
         * Allow caller and callee to hear each other
         */
        AudioGroupSetup audioGroupSetup = new AudioGroupSetup();
        audioGroupSetup.spatializer = new FullVolumeSpatializer();

        audioGroup = vm.createAudioGroup(audioGroupId, audioGroupSetup);
        audioGroup.addPlayer(externalPlayer,
            new AudioGroupPlayerInfo(true,
            AudioGroupPlayerInfo.ChatType.EXCLUSIVE));
        audioGroup.addPlayer(softphonePlayer,
            new AudioGroupPlayerInfo(true,
            AudioGroupPlayerInfo.ChatType.EXCLUSIVE));
    } else {
        AudioGroup defaultLivePlayerAudioGroup =
            parameters.livePlayerAudioGroup;

        defaultLivePlayerAudioGroup.addPlayer(externalPlayer,
            new AudioGroupPlayerInfo(true,
            AudioGroupPlayerInfo.ChatType.PUBLIC));

        AudioGroup defaultStationaryPlayerAudioGroup =
            parameters.stationaryPlayerAudioGroup;

        defaultStationaryPlayerAudioGroup.addPlayer(externalPlayer,
            new AudioGroupPlayerInfo(false,
            AudioGroupPlayerInfo.ChatType.PUBLIC));
    }

    logger.fine("done with audio groups");
            }
           
      if (externalCall != null) {
          externalCallID = externalCall.getId();
      }

      logger.fine("Setting actual call id to " + externalCallID);

      listing.setExternalCallID(externalCallID)// set actual call Id

            //Check implicit privacy settings
            if (listing.isPrivate()) {
                /** HARRISNOTE: We need our client name later in order to
                 * setup private spatializers. But because we didn't know
                 * our proper client name in the PhoneCell, we update the
                 * callListing now that we do.
                 **/
    listing.setPrivateClientName(externalCallID);

                /*
     * Set the call audio to whisper mode until the caller
     * chooses to join the call.
     */
                if (listing.simulateCalls() == false) {
                    //Mute the two participants to the outside world
                    logger.fine("attenuate other groups");
        softphonePlayer.attenuateOtherGroups(audioGroup, 0, 0);
                    logger.fine("back from attenuate other groups");
                }
            } else {
    Vector3f center = new Vector3f();

    phoneCellMO.getWorldBounds().getCenter(center);

          center.setY((float).5);

                new Orb(listing.getContactName(), listing.getContactName(),
        externalCallID, center, .1, listing.simulateCalls());
      }

            if (listing.simulateCalls() == false) {
                //Place the calls audio at the phones position
             Vector3f location = new Vector3f();

                location = phoneCellMO.getWorldTransform(null).getTranslation(location);

                externalPlayer.moved(location.x, location.y, location.z, 0);
            }
         
            /*
       * Send PLACE_CALL_RESPONSE message back to all the clients
       * to signal success.
       */
            sender.send(clientID, new PlaceCallResponseMessage(
    phoneCellMO.getCellID(), listing, true));

      logger.fine("back from notifying user");
      return;
  }

  if (msg instanceof JoinCallMessage) {
            //Our phone cell wants us to join the call into the world.
           
            if (listing.simulateCalls() == false) {
                //Stop any current ringing.
          try {
                    softphoneCall.stopTreatment("ring_tone.au");
          } catch (IOException e) {
        logger.fine("Unable to stop treatment to " + softphoneCall + ":  "
            + e.getMessage());
          }

    AudioGroup defaultLivePlayerAudioGroup = parameters.livePlayerAudioGroup;

    defaultLivePlayerAudioGroup.addPlayer(externalPlayer,
        new AudioGroupPlayerInfo(true,
        AudioGroupPlayerInfo.ChatType.PUBLIC));

    AudioGroup defaultStationaryPlayerAudioGroup = parameters.stationaryPlayerAudioGroup;

    defaultStationaryPlayerAudioGroup.addPlayer(externalPlayer,
        new AudioGroupPlayerInfo(false,
        AudioGroupPlayerInfo.ChatType.PUBLIC));

          softphonePlayer.attenuateOtherGroups(audioGroup,
        AudioGroup.DEFAULT_SPEAKING_ATTENUATION,
        AudioGroup.DEFAULT_LISTEN_ATTENUATION);

    audioGroup.removePlayer(externalPlayer);
    audioGroup.removePlayer(softphonePlayer);
          vm.removeAudioGroup(audioGroup);
            }
           
            listing.setPrivateClientName("");
             
            //Inform the PhoneCells that the call has been joined successfully
            sender.send(clientID, new JoinCallResponseMessage(
    phoneCellMO.getCellID(), listing, true));
           
      Vector3f center = new Vector3f();

      phoneCellMO.getWorldBounds().getCenter(center);

            center.setY((float).5);

            new Orb(listing.getContactName(), listing.getContactName(), externalCallID,
    center, .1, false);
      return;
  }

  if (msg instanceof EndCallMessage) {
      logger.fine("simulate is " + listing.simulateCalls()
    + " external call " + externalCall);

            if (listing.simulateCalls() == false) {
    relock(sender);

    if (externalCall != null) {
        try {
                        vm.endCall(externalCall, true);
              } catch (IOException e) {
            logger.warning(
          "Unable to end call " + externalCall + ":  "
                + e.getMessage());
              }
    }

    if (audioGroup != null) {
              vm.removeAudioGroup(audioGroup);

                    if (listing.isPrivate()) {
            softphonePlayer.attenuateOtherGroups(audioGroup,
          AudioGroup.DEFAULT_SPEAKING_ATTENUATION,
              AudioGroup.DEFAULT_LISTEN_ATTENUATION);
              }
    }
            }
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.