Examples of PlayerData

  • org.cspoker.ai.opponentmodels.weka.PlayerData
    Class that tracks player statistics when playing games. @author guy

  • Examples of com.flansmod.common.PlayerData

        return MinecraftServer.getServer().getConfigurationManager().playerEntityList;
      }
               
      public static void givePoints(EntityPlayerMP player, int points)
      {
        PlayerData data = getPlayerData(player);
        data.score += points;
        if(data.team != null)
          data.team.score += points;
      }
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

          }
          //Get players
          else if(obj instanceof EntityPlayer)
          {
            EntityPlayer player = (EntityPlayer)obj;
            PlayerData data = PlayerHandler.getPlayerData(player);
            boolean shouldDoNormalHitDetect = false;
            if(data != null)
            {
              if(player.isDead || data.team == Team.spectators)
              {
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

      }
     
      @Override
        public boolean interactFirst(EntityPlayer player) //interact
        {
        PlayerData data = PlayerHandler.getPlayerData(player);
        if(!worldObj.isRemote && data.team == null && TeamsManager.getInstance().playerIsOp(player) && (player.getCurrentEquippedItem() == null || !(player.getCurrentEquippedItem().getItem() instanceof ItemOpStick)))
          ItemOpStick.openBaseEditGUI(this, (EntityPlayerMP)player);
       
          /* TODO : Check the generalised code in TeamsManager works
          if(player instanceof EntityPlayerMP && TeamsManager.getInstance().currentGametype != null)
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

          return itemstack;
        }
       
        else if(type.remote)
        {
          PlayerData data = PlayerHandler.getPlayerData(entityplayer, world.isRemote ? Side.CLIENT : Side.SERVER);
          //If we have some remote explosives out there
          if(data.remoteExplosives.size() > 0)
          {
            //Detonate it
            data.remoteExplosives.get(0).detonate();
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

      public void handleClientSide(EntityPlayer clientPlayer)
      {
        Entity entity = clientPlayer.worldObj.getEntityByID(entityID);
        if(entity instanceof EntityPlayer && entity != clientPlayer)
        {
          PlayerData data = PlayerHandler.getPlayerData((EntityPlayer) entity, Side.CLIENT);
          data.offHandGunStack = gunStack;
        }
      }
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

      }

      @Override
      public void handleServerSide(EntityPlayerMP playerEntity)
      {
          PlayerData data = PlayerHandler.getPlayerData(playerEntity);
          ItemStack stack = playerEntity.getCurrentEquippedItem();
          if(left && data.offHandGunSlot != 0)
          {
            stack = playerEntity.inventory.getStackInSlot(data.offHandGunSlot - 1);
          }
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

      @Override
      @SideOnly(Side.CLIENT)
      public void handleClientSide(EntityPlayer clientPlayer)
      {
          ItemStack stack = clientPlayer.getCurrentEquippedItem();
          PlayerData data = PlayerHandler.getPlayerData(clientPlayer, Side.CLIENT);
          if(left)
            stack = clientPlayer.inventory.getStackInSlot(data.offHandGunSlot - 1);
          if(stack != null && stack.getItem() instanceof ItemGun)
          {
            GunType type = ((ItemGun)stack.getItem()).type;
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

      public static class ComparatorScore implements Comparator<String>
      {
        @Override
        public int compare(String a, String b)
        {
          PlayerData dataA = PlayerHandler.getPlayerData(a);
          PlayerData dataB = PlayerHandler.getPlayerData(b);
          if(dataA == null || dataB == null)
            return 0;     
          return dataB.score - dataA.score;
        }
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

      }
     
      @Override
      public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
      {
        PlayerData data = PlayerHandler.getPlayerData(player, world.isRemote ? Side.CLIENT : Side.SERVER);
        //If can throw grenade
        if(type.canThrow && data != null && data.shootTimeRight <= 0 && data.shootTimeLeft <= 0)
        {
          //Delay the next throw / weapon fire / whatnot
          data.shootTimeRight = type.throwDelay;
    View Full Code Here

    Examples of com.flansmod.common.PlayerData

              {
                if(candidateEntity == placer || candidateEntity.getCommandSenderName().equals(placerName))
                  continue;
                if(TeamsManager.enabled && TeamsManager.getInstance().currentRound != null && placer != null)
                {
                  PlayerData placerData = PlayerHandler.getPlayerData(placer, worldObj.isRemote ? Side.CLIENT : Side.SERVER);
                  PlayerData candidateData = PlayerHandler.getPlayerData((EntityPlayer)candidateEntity, worldObj.isRemote ? Side.CLIENT : Side.SERVER);
                  if(candidateData.team == Team.spectators || candidateData.team == null)
                    continue;
                  if(!TeamsManager.getInstance().currentRound.gametype.playerCanAttack((EntityPlayerMP)placer, placerData.team, (EntityPlayerMP)candidateEntity, candidateData.team))
                    continue;
                }
    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.