1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

help me. I can't code.

Discussion in 'Development' started by rektpixel, Jul 12, 2017.

  1. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    So I got this SkyBlock plugin, it's pretty good but instead of using the plugin generator to generate an island on command /skyblock create (like this):
    PHP:
                        case "create":
                            
    $config $this->plugin->getSkyBlockManager()->getPlayerConfig($sender);
                            if(empty(
    $config->get("island"))) {
                                
    $reset $this->plugin->getResetHandler()->getResetTimer($sender);
                                if(
    $reset instanceof Reset) {
                                    
    $minutes Utils::printSeconds($reset->getTime());
                                    
    $sender->sendMessage(TextFormat::GOLD."You'll be able to create a new island in {$minutes} minutes");
                                }
                                else {
                                    
    $skyBlockManager $this->plugin->getSkyBlockGeneratorManager();
                                    if(isset(
    $args[1])) {
                                        if(
    $skyBlockManager->isGenerator($args[1])) {
                                            
    $this->plugin->getSkyBlockManager()->generateIsland($sender$args[1]);
                                        }
                                        else {
                                            
    $sender->sendMessage(TextFormat::RED."That isn't a valid SkyBlock generator");
                                        }
                                    }
                                    else {
                                        
    $this->plugin->getSkyBlockManager()->generateIsland($sender"basic");
                                    }
                                }
                            }
    I want to change it to use an already made world from the server 'worlds' folder like 'skyblockisland'

    I'd imagine everything would stay the same up until the line: $this->plugin->getSkyBlockManager()->generateIsland($sender, Only one problem I have very, very, very LITTLE knowledge in php code. so could someone pls let me know how I could do this.
    Hope that was undstanerble.
    thanks
     
    Last edited: Jul 12, 2017
  2. MC ATECH

    MC ATECH Baby Zombie

    Messages:
    117
    GitHub:
    mcpeatech
    I believe you could call a folder in the skyblock src with a world inside and load it on the command. Not sure how it would generate a new world for each player though.
     
    rektpixel likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.