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

[NEW API] Block Touch event?

Comments in 'Plugin Development' started by Killman2, Jun 21, 2014.

  1. Killman2
    Offline

    Killman2 Active Member Plugin Developer

    Joined:
    May 5, 2014
    Posts:
    81
    Plugins:
    1
    Minecraft User:
    Killman2
    Hi! I just started developing a plugin for the new API, and got stuck with player block touch. I wanted to see how it works, went to docs.pocketmine.net, opened pocketmine/event/block and what I found :

    BlockBreakEvent;
    BlockEvent;
    BlockPlaceEvent;

    So, there was no BlockTouchEvent. And my question is - is block touch implemented to the new API yet?
  2. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    755
    Plugins:
    2
    Minecraft User:
    Darunia18
    I think that would be BlockEvent. I don't see what else BlockEvent would be.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PlayerInteractEvent
    BlovkEvent is an abstract superclass and should not be an event.
    Darunia18 likes this.
  4. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,132
    Plugins:
    4
    Minecraft User:
    iksaku
    it's under pocketmine/event/player/PlayerInteractEvent.php
    I don't know why it's named like that...
    Darunia18 likes this.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    To confuse noobs maybe :p no offense to anyone.
    Killman2 and Darunia18 like this.
  6. Killman2
    Offline

    Killman2 Active Member Plugin Developer

    Joined:
    May 5, 2014
    Posts:
    81
    Plugins:
    1
    Minecraft User:
    Killman2
    Thanks :)
  7. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
    if playerintract event is for touching a block then what is a player hits a player ?
  8. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Player interact is for any thing a player interacts with, levers buttons doors blocks.
    Killman2 likes this.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    levers(,) buttons? Do those things even exist?
  10. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    No, but they will.
  11. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,132
    Plugins:
    4
    Minecraft User:
    iksaku
    it's just for blocks (even air?), player <-> player interact will be done later...
  12. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Wait, what?
  13. swagboy47
    Offline

    swagboy47 Active Member

    Joined:
    Jun 10, 2014
    Posts:
    445
    Minecraft User:
    swagking
    thanks
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    How do you interact with air? Maybe yes if you make a vacuum cleaner client mod (like buckets).
  15. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,132
    Plugins:
    4
    Minecraft User:
    iksaku
    Read the file's comment xD it says that it MAYBE work with air :p
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Example?

    I do NOT believe the document :p I believe my own theories and observations :D A traditional (rotten) Chinese's thinking ;) that is how the Europeans succeeded invading China 180 years before
    Killman2 and swagboy47 like this.

Share This Page

Advertisement