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

Someone create a BowTnt plugin!

Comments in 'Plugin Development' started by Gatucraft, Jan 15, 2016.

Thread Status:
Not open for further replies.
  1. Gatucraft
    Offline

    Gatucraft Active Member

    Joined:
    Sep 24, 2015
    Posts:
    152
    Minecraft User:
    Rokito
    I really really like the idea of Scorched plugin, but it crash and it seems that no one is taking care of it... so i propose:

    A BowTnT plugin

    • The users spawn in a map created for mayhem
    • They can use only BowTNT, a bow that launch TNT ready to explote.
    • It can be used only in selected maps.
  2. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Good idea, but please post it in Plugin Requests.

    This plugin can be laggy, so I am recommending not that much players for each match.
  3. Gatucraft
    Offline

    Gatucraft Active Member

    Joined:
    Sep 24, 2015
    Posts:
    152
    Minecraft User:
    Rokito
    oh, sorry about the missplace thread. can some moderator change it?

    Yes, maybe only 1vs1, a combination with that plugin maybe. Or limit each map to 4 players maximum,.
  4. EmeraldGem585
    Offline

    EmeraldGem585 New Member

    Joined:
    Nov 26, 2015
    Posts:
    9
    Minecraft User:
    EmeraldGem585
    Sounds like Bomb Lobber from mineplex
  5. Samueljh1H8sLag
    Offline

    Samueljh1H8sLag Active Member

    Joined:
    Jun 20, 2015
    Posts:
    168
    Minecraft User:
    Samueljh1_
    Type: spawns a *real* tnt that explodes:
    PHP:
    function onShoot(EntityShootBowEvent $event) {
      
    $player $event->getEntity();
      
      
    //Add other conditions here
      
    if($player instanceof Player) {
       
    $event->setProjectile(new PrimedTNT($player->getLevel()->getChunk($player->>> 4$player->>> 4), $event->getProjectile()->namedtag));
      }
    }
    Type: Just Visual, not actually exploding:
    PHP:
    function onPacketSend(DataPacketSendEvent $event) {
      
    $packet $event->getPacket();
      if(
    $packet instanceof AddEntityPacket) {
        if(
    $packet->type === Arrow::NETWORK_ID$packet->type PrimedTNT::NETWORK_ID;
      }
    }
    ?

    So if you don't understand it, the code basically detects when an entity is being added, checks if it is an arrow and changes the entity type to a primedtnt entity.

    :)
    Last edited: Jan 15, 2016
  6. Tim // robske Büba
    Offline

    Tim // robske Büba Notable Member

    Joined:
    Feb 26, 2014
    Posts:
    606
    Minecraft User:
    robske_110
    That would completely work?
    PHP and PocketMineAPI is so small sometimes.
    But my code always has thousend lines...
  7. Samueljh1H8sLag
    Offline

    Samueljh1H8sLag Active Member

    Joined:
    Jun 20, 2015
    Posts:
    168
    Minecraft User:
    Samueljh1_
    guys, i updated my post. its an important thing so make sure you read it!
  8. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    If your code uses lot of lines, usually this mean that you are not optimizing it as well!
  9. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Here you go!

    BTW, I haven't tested it yet, I just coded it.

    Attached Files:

    Vaivez66 likes this.
  10. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    My BowTNT.phar is only 100 and something lines. :p
  11. MichaelM04
    Offline

    MichaelM04 Active Member Plugin Developer

    Joined:
    Nov 12, 2015
    Posts:
    213
    Plugins:
    1
    Minecraft User:
    Michael
    great plugin idea
    BTW you get this error on load
    Code:
    thread/INFO]: Enabling BowTNT v1.0.0
    [Server]
    [Server] Fatal error: Call to undefined function BowTNT\saveResource() in phar:///storage/emulated/0/PocketMine/plugins/BowTNT.phar/src/BowTNT/Main.php on line 27
    [Server] [01:16:37] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed.
  12. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Okay, I'll do it later.
  13. Gatucraft
    Offline

    Gatucraft Active Member

    Joined:
    Sep 24, 2015
    Posts:
    152
    Minecraft User:
    Rokito
    oh great! i cant wait to try this!
    applqpak likes this.
Thread Status:
Not open for further replies.

Share This Page

Advertisement