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

Assistance Requested with NetherQuick Plugin

Comments in 'Plugin Development' started by Darunia18, Oct 16, 2013.

  1. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    I am not sure how many people would remember 500ISE, but he made a few cool PocketMine plugins awhile back, but hasn't updated past API 8 or 9. All of his plugins have been resurrected except one. It was called NetherQuick, which let a player teleport to a world called "Nether" whenever they punched obsidian. This plugin was cool, but required his own MultiWorld plugin to use it. That plugin has also been abandoned.

    Long story short, I want to resurrect the NetherQuick plugin, but have it able to be used with SimpleWorlds instead. I manually updated NetherQuick myself and changed it to use the Nether Reactor to go to the Nether. I am not too familiar with php, but I bet I could learn pretty easily, as I have knowledge with other programming languages. If anyone would like to work on me with this, it would be greatly appreciated. Ever since I learned that the Nether was possible with PocketMine, I have been obsessed with it and I want to make it available to more people by releasing a new version of this plugin (with 500ISE's permission, of course) and a few Nether maps as well.

    To summarize, here is my plan:
    1. Find someone with a bit more php knowledge to help me with this.
    2. Ask 500ISE for permission to use his code and update his plugin.
    3. Work on and eventually release a new NetherQuick plugin, along with some Nether maps for server owners to use.
    4. Either I or my partner could update the new NetherQuick after its release.

    Thank you for anyone who would like to help. If you would like to just have a Nether map, you can find a basic one at http://forums.pocketmine.net/index.php?threads/nether-map-request.541/ or you can PM me to request a custom map.
  2. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    How could I not remember 500ise, sadly he's now only working on his blocklauncher and modPe script.
    Anyways, netherquick should still work and doesn't require multiworld. It only requires a plugin to load the level (world).
    or you could easily add $this->api->level->loadLevel('nether'); to the init and it will work without any additional plugin
  3. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    He gave me permission to update and work on it
  4. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    Really? I tried it before and it didn't work right. Maybe I did something wrong...I'm not sure.



    Yay! :D I like Netherquick mostly because it can be used as a way to "earn" the Nether rather than admins creating a portal there with the portal plugin and then everyone has access from the start. :D
  5. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    I am trying to add support so that it loads your nether world when the server starts and that is the nether world you teleport to :)
  6. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    :) Also, I know that in the original Netherquick, the block was automatically set as Obsidian. Is there any way you can make a config and change that block to anything you want (using an item ID or block name)? Because that would be really cool! :D
  7. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Sure, that would be easy!
    Darunia18 likes this.
  8. KABOOOMsnakefang
    Offline

    KABOOOMsnakefang New Member

    Joined:
    Aug 31, 2013
    Posts:
    43
    Minecraft User:
    KABOOOMY
    Sounds cool :D
    I would help, but I can't seem to find a lot of time to learn how to make plugins :-/
    Anyone know a good tutorial for making plugins?
    After one has mastered @Glitchmaster_PE 's excellent tutorial, of course ;)
  9. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    I keep wanting to learn php but sadly, my free time has been very limited lately. If you wish to learn php itself, you can learn at codecademy.com and then you can just learn the different aspects of the PocketMine API. I think the different API stuff can be found on GitHub.
  10. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    i didnt use any tutorials and stuff like that just viewing the plugins and stuff like that and html that how i learned about php!
  11. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    I don't know much php but that's how I learned the little bit I know currently.
  12. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
  13. KABOOOMsnakefang
    Offline

    KABOOOMsnakefang New Member

    Joined:
    Aug 31, 2013
    Posts:
    43
    Minecraft User:
    KABOOOMY
    I learned it at codecademy, I just need to learn how plugins are put together.
  14. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    here the code:
    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=NetherQuick
    description=Tap on obsidian to go to the second world loaded or to the default world if already in second world
    version=1.0
    author=zhuowei
    class=NetherQuick
    apiversion=7
    */

    /*
    Small Changelog
    ===============

    1.0: Initial release

    */



    class NetherQuick implements Plugin{

        private 
    $api;
        public function 
    __construct(ServerAPI $api$server false){
            
    $this->api $api;
        }
       
        public function 
    init(){
            
    $this->api->addHandler("player.block.touch", array($this"touchHandler"), 15);

        }

        public function 
    touchHandler($data$event) {
            
    $dataTarget $data["target"];
            if (
    $dataTarget->getID() === OBSIDIAN) {
                if (
    $data["player"]->level !== $this->api->level->getDefault()) {
                    
    $data["player"]->teleport($this->api->level->getDefault()->getSpawn());
                } else {
                    
    $data["player"]->teleport($this->api->level->get("nether")->getSpawn());
                }
                return 
    false;
            }
            return 
    true;
           
        }
       
        public function 
    __destruct(){

        }

       
    }
    and here the file:

    Attached Files:

  15. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    I plan on improving it, like auto loading the world made by @Darunia18 and other stuff
  16. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    ah the plugin do that it loads the world. maybe?
    or i am going to modify it!
  17. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    i still getting errors by adding
    PHP:
    $this->api->level->loadLevel('nether')    
    is in this part that it crash the plugin
    PHP:
        public function init(){
            
    $this->api->addHandler("player.block.touch", array($this"touchHandler"), 15);
            
    $this->api->level->loadLevel('nether')   

           
        }
  18. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    you need a ; at the end
  19. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    Oh let me check
  20. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    here the plugin netherquick that loads the nether too!
    PHP:
    <?php

    /*
    __PocketMine Plugin__
    name=NetherQuick
    description=
    version=1.1
    author=zhuowei & TrilogiForce
    class=NetherQuick
    apiversion=10
    */

    /*
    Small Changelog
    ===============
    1.1: Now loads a Nether world!

    1.0: Initial release

    */



    class NetherQuick implements Plugin{

        private 
    $api;
        public function 
    __construct(ServerAPI $api$server false){
            
    $this->api $api;
        }

        public function 
    init(){
            
    $this->api->addHandler("player.block.touch", array($this"touchHandler"), 15);
            
    $this->api->level->loadLevel('nether');
             
    $this->api->level->loadLevel('Nether');

       
        }

        public function 
    touchHandler($data$event) {
            
    $dataTarget $data["target"];
            if (
    $dataTarget->getID() === OBSIDIAN) {
                if (
    $data["player"]->level !== $this->api->level->getDefault()) {
                    
    $data["player"]->teleport($this->api->level->getDefault()->getSpawn());
                } else {
                    
    $data["player"]->teleport($this->api->level->get("nether")->getSpawn());
                }
                return 
    false;
            }
            return 
    true;
       
        }

        public function 
    __destruct(){

        }


    }

Share This Page

Advertisement