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

Plugin making help

Comments in 'Plugin Development' started by Mclover152, May 17, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If a player connects from outside your router, his IP is the external IP.

    If you connect via internal IP of your server (this is what happens when you use the blue local server join button) the server will only have your internal IP.
    If you port forward and connect via ther external IP of your server the server will have your external IP.

    It is impossible for a server to know a player's internal IP unless you hack, if that player is connecting from another router/network.
    Martin77Epic and Mclover152 like this.
  2. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Thanks!
  3. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    How do i set positions, like the ones in EconomyLand, WorldEditor, drawStuff, beAreaGuard, etc. Is there a function for that. If not what is the code?
  4. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Also, which files do i edit if i wanna change the chat message from <player> message. For example if i typed hi, it would say: <mclover152> hi. So what files do i edit to change that. BTW: i have Droidpocketmine api 11 v1.3.11
  5. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Is anybody gonna reply?
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    ChatAPI
  7. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    What part do i edit
  8. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    OLD API:
    PHP:
    case "setpos":
              
    $data $this->api->plugin->readYAML($this->api->plugin->configPath($this). "config.yml");  
              
    $x round($issuer->entity->x);
              
    $y round($issuer->entity->y);
              
    $z round($issuer->entity->z);
              
    $level $issuer->level->getName();
              
    $data["Position"] = array($x$y$z$level);
              
    $this->api->plugin->writeYAML($this->api->plugin->configPath($this)."config.yml"$data);
              return 
    "Position set to: " $x " " $y " " $z "!";
                     break;
  9. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    So if the command would be setpos, and the function would be position, that would be it?. BTW how do i set blocks there
  10. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    No, $data["Posistion"] write the coordinates to the config under the "position" category. Setting blocks in places is more @PEMapModder thing.
  11. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Basicly what i mean is: How do i calculate and set blocks with two positions?
  12. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Ok
  13. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Do you know how to set blocks?
  14. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    Not really. There is a SetBlock function but I have a lot of trouble with it and have never been quite successful in getting it to work. Multiple other developers on here have though.

    Really, there is little point in learning how to do it in the new api because it's gonna be deprecated pretty soon anyway. And the new api is a lot more coder friendly in my opinion.
  15. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PHP:
    $this->api->level->get($levelName)->setBlock(new Vector3($x$y$z), BlockAPI::get($id$meta), falsefalsetrue);
    Mclover152 likes this.
  16. Mclover152
    Offline

    Mclover152 Active Member

    Joined:
    Apr 26, 2014
    Posts:
    64
    Minecraft User:
    mclover152
    Yes, but instead of setting a single block, how to i set many blocks, just from giving the following information: pos1 pos2
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Use a for() loop.
  18. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    ENGLISCH

    what I have to write for CodeAnyWhere (Ios)
  19. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    bruhh. thats the OLD api xD learn 1.4. I suggest looking at https://github.com/PocketMine/Documentation/wiki/Plugin-Tutorial , https://forums.pocketmine.net/threads/how-to-start-learning-writing-plugins.2072/ , http://pocketmine-mp.readthedocs.org/en/latest/plugins.html and after all that, http://docs.pocketmine.net (which is like the ModPE Functions list, but better :p)
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    bruhh. thats the 2014 thread xD read 2015. I suggest looking at https://www.google.com/calendar/ , http://www.timeanddate.com/calendar/?year=2015 , http://www.timeanddate.com/calendar/monthly.html and after all that, https://forums.pocketmine.net/forums/development (which is like 2014 threads, but newer) :p)

Share This Page

Advertisement