Torch Help

Discussion in 'Plugin Development' started by Cryices, Oct 12, 2013.

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

    Cryices

    I need events/ and ways that torches can be broken. This is for a future plugin of mine. Torch break events, or natural item drop events, if you were to say break the block below it. The point is, if a torch gets broken, or falls, i need an event, but i don't need it for players dropping torches. I'm sorry if this is different but it'd help!
     
  2. Offline

    adam753

    Well let's see:
    -BlockBreakEvent - when a player breaks the torch normally
    -BlockPhysicsEvent - this will be called if the torch gets broken by a physics check, i.e. the block under it being broken
    -BlockFromToEvent - called when water or lava flows to a new block - check if the ToBlock is a torch
    I think that's all.
     
  3. Offline

    Cryices

    oh thank you so much! If anybody wants to help me out further on the code, that would be great but that's pretty much all i'm asking. like if block getting broken is a torch..etc.
     
  4. Offline

    calebbfmv

    Code:
    (BlockBreakEvent e){
    Block b = e.getBlock();
    if(b instanceof Torch // or something ){
    //whatever
    
     
  5. Offline

    Cryices

    BlockBreakEvent is rather easy i was looking more for BlockPhysicsEvent or BlockFromtoEvent because i don't really know alot about those.But thanks.
     
  6. Offline

    calebbfmv

    Haven't messed with those recently.
     
Thread Status:
Not open for further replies.

Share This Page