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

Something wrong with my 2vs2 code?

Comments in 'Plugin Development' started by AndroidHackPro, Jul 17, 2016.

  1. AndroidHackPro
    Offline

    AndroidHackPro New Member

    Joined:
    Jul 7, 2016
    Posts:
    9
    Minecraft User:
    AndroidHackPro
    Here's my PHP code. The server runs OK but I can't use the plugin because don't make the config file.

    I add the WinAPI function but I don't know it's ok:

    PHP:

    And add the custom dead respawn:

    PHP:
                        $tp $this->getServer()->getPlayer($tp);

                            if(
    $tp !== null){
                                
    $tp->teleport($this->getServer()->config->get("WorldReSpawn")->getSpawn());
                                if(
    $this->config->get("ItemEffectClear(on,off)") == "on"){
                                    
    $tp->removeAllEffects();
                                    
    $tp->getInventory()->clearAll();

    My complete github code
    https://github.com/AndroidHackPro/MiniJuego-2vs2/blob/master/en/src/GoldPotatoBlaze/XvsY.php
    Last edited: Jul 27, 2016
  2. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    Maybe because you haven't added saveDefaultConfig()...
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Maybe you should show us the error and the full code?
    AndroidHackPro and applqpak like this.
  4. Yeelze
    Offline

    Yeelze New Member

    Joined:
    Apr 2, 2016
    Posts:
    31
    Minecraft User:
    Yeelze
    You didn't write anything
  5. MCPEPIG
    Offline

    MCPEPIG Notable Member

    Joined:
    Jun 22, 2014
    Posts:
    349
    Minecraft User:
    MCPEPIG
    He wanted AndroidHackPro to use PHP instead of CODE
    Survingo likes this.
  6. AndroidHackPro
    Offline

    AndroidHackPro New Member

    Joined:
    Jul 7, 2016
    Posts:
    9
    Minecraft User:
    AndroidHackPro
    I'll remember that for next time. I am new at this.
  7. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Yeah @Survingo did you like all posts?!?!!?!?!!?

Share This Page

Advertisement