Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Counter for each?

Comments in 'Plugin Development' started by MyNameIsTriXz, Dec 3, 2015.

  1. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    How am I doing a counter for each player (I use $this->getServer()->getLevelByName("level")->getPlayers(), than i do foreach(){) but how I get everyone by himself, because i want tp do a kill counter but foreach is giving everyone a point and not a specified one so how do I specify a player?
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    What exactly do you want to do? Please be more specific.
  3. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    I want to do a minigame, which counts the killamount for each player
  4. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Save the kills in a config and +1 them when the player kills someone, you don't need anything like foreach..
    MyNameIsTriXz likes this.

Share This Page

Advertisement