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

Throwable TNT

Discussion in 'Development' started by neb16, Apr 25, 2019.

  1. neb16

    neb16 Witch

    Messages:
    71
    GitHub:
    developerneb101
    Hello I am currently working on a plugin that makes TNT throwable, hereis the code:

    When I right click I get this error:
    Sorry if this is overwhelming but Im still trying to learn the ropes of basic plugin development.
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Replace $player->chunk with $player->getLevel()
    Also $tnt->spawnToAll() is recommended instead of $tnt->spawnTo($player)
     
  3. neb16

    neb16 Witch

    Messages:
    71
    GitHub:
    developerneb101
    Thanks! I'll give it a shot
     
  4. neb16

    neb16 Witch

    Messages:
    71
    GitHub:
    developerneb101
  5. Mr174

    Mr174 Baby Zombie

    Messages:
    187
    GitHub:
    mr174
    Also its recommended to get rid of number ids (46) replace it with ItemIds::TNT
    Just to help you in the future!
     
    Muqsit likes this.
  6. ZenixPlayzMC

    ZenixPlayzMC Silverfish

    Messages:
    23
    Also you may wan to remove 1 tnt from the current number if ita for survival server or factions so players will not have infinite tnt
     
  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.