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

Help

Comments in 'Plugin Development' started by PocketMinecrafter95, Sep 12, 2013.

  1. PocketMinecrafter95
    Offline

    PocketMinecrafter95 New Member

    Joined:
    Aug 29, 2013
    Posts:
    27
    Minecraft User:
    Wenyi9080
    1)How to make a door does not respond when you tap it? (In php):confused:
    2)How to search numbers of players in an area setted? (In php too)
    Sorry that I'm not good at php, So help me !
  2. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    1. add a Handler to the event "player.block.activation"
    2. what????
    PocketMinecrafter95 likes this.
  3. ZacHack
    Offline

    ZacHack Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    325
    Plugins:
    6
    Minecraft User:
    _ZacHack_
  4. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    2. I will release my region plugin soon where you can do that,
    You need to do a foreach loop for every player on the server and check if there x, y, z is located in the area and store their name in an array or something
    here's an exemple to check if a player is inside an area:
    PHP:
    if(($region['pos1'][0] <= $pos[0] and $pos[0] <= $region['pos2'][0]) and ($region['pos1'][1] <= $pos[1] and $pos[1] <= $region['pos2'][1]) and ($region['pos1'][2] <= $pos[2] and $pos[2] <= $region['pos2'][2])){
    with $pos[0] = x location of the player and so on
  5. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    @wies You can use distance(); check it on the function.php file
  6. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    I know that, I used it in the peacefulspawn plugin.
    It's easy for a circle, but I prefer the other methode for cuboids
  7. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    Oh Ok, I just try to help.
  8. PocketMinecrafter95
    Offline

    PocketMinecrafter95 New Member

    Joined:
    Aug 29, 2013
    Posts:
    27
    Minecraft User:
    Wenyi9080
    But How to get the numbers of player in an area?
  9. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    I just explained how :D
  10. PocketMinecrafter95
    Offline

    PocketMinecrafter95 New Member

    Joined:
    Aug 29, 2013
    Posts:
    27
    Minecraft User:
    Wenyi9080
    Ok thanks, when will your plugin will be released ?

Share This Page

Advertisement