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

Thunder [0.13.1]

Comments in 'Plugin Development' started by Adversarius, Dec 22, 2015.

  1. Adversarius
    Offline

    Adversarius New Member

    Joined:
    Oct 4, 2015
    Posts:
    16
    Minecraft User:
    Adversarius
    Hey,
    I want use Thunder on my Server but i didn't work.
    Can somewhere send me a full code of that in private message?

    Thanks for helping :)

    Ad
  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Why not post the full code on here? If you made this thread public, don't you think the code should be public too? Unless you don't want the code to be public, then you should use private messaging instead.
  3. Adversarius
    Offline

    Adversarius New Member

    Joined:
    Oct 4, 2015
    Posts:
    16
    Minecraft User:
    Adversarius
    i make it so, but i didn't work:

    <php?
    namespace UltimateThunder;
    use pocketmine\network\protocol\LevelEventPacket;
    use pocketmine\plugins\PluginBase
    class UltimateThunder extends PluginBase {

    public function Move(PlayerMoveEvent $event){
    $p = $event->getPlayer();
    $x = $p->getX(); $z = $p->getZ(); $y = $p->getY();
    $pk = new LevelEventPacket();
    $pk->x = $x;
    $pk->y = $y;
    $pk->z = $z;
    $pk->evid = LevelEventPacket::EVENT_START_THUNDER;
    $p->dataPacket($pk);
    }
    }
    php>
  4. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    php> isn't needed. Use an IDE to check your code before asking a question. Learn the PHP basics here: https://secure.php.net/manual/en/language.variables.basics.php
  5. Adversarius
    Offline

    Adversarius New Member

    Joined:
    Oct 4, 2015
    Posts:
    16
    Minecraft User:
    Adversarius
  6. Adversarius
    Offline

    Adversarius New Member

    Joined:
    Oct 4, 2015
    Posts:
    16
    Minecraft User:
    Adversarius
    plugin.yml:
    name: UltimateThunder
    version: 1.0.0
    main: UltimateThunder\main
    api: [1.13.0]
    load: POSTWORLD
    author: Adversarius
    authors: [Adversarius]
    description: UltimatePE Coreplugin

    main.php:
    <php?
    namespace UltimateThunder;
    use pocketmine\network\protocol\LevelEventPacket;
    use pocketmine\plugins\PluginBase
    class UltimateThunder extends PluginBase {

    public function Move(PlayerMoveEvent $event){
    $p = $event->getPlayer();
    $x = $p->getX(); $z = $p->getZ(); $y = $p->getY();
    $pk = new LevelEventPacket();
    $pk->x = $x;
    $pk->y = $y;
    $pk->z = $z;
    $pk->evid = LevelEventPacket::EVENT_START_THUNDER;
    $p->dataPacket($pk);
    }
    }
  7. Bluplayz
    Offline

    Bluplayz Active Member

    Joined:
    Aug 20, 2015
    Posts:
    74
    Minecraft User:
    Bluplayz
    It didnt work , if he do it so he need to change the Name Form "main.php" to "UltimateThunder" :D vor he didnt found the Main ;)
  8. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    and it's <?php not <php?..
    Vaivez66 likes this.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    On a server with 50 players, you may be spawning 1000 thunders per second.
    Legoboy0215 likes this.
  10. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Sometimes, we tend to ignore the obvious.
    PEMapModder likes this.
  11. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    Here is my "Thunder" Plugin, it does do it only on join and death

    Attached Files:

    iDirtPlayzMC likes this.

Share This Page

Advertisement