On Block Place

Discussion in 'Plugin Development' started by Pivotbanq, Apr 9, 2014.

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

    Pivotbanq

    Basically in my code I want to enable pvp when a certain block is placed. I have the code set up with the listener and what not. Here is my code as is right now for the class I am trying to do this in: http://pastebin.com/GjwUyjSZ any help would be very much appreciated! Thanks in advance :)

    Update on code. Specified diamond block as type and what happens when the player places it. I just want the code that will enable pvp for that world. http://pastebin.com/CfHxsvvw

    New update, trying to require you to be in the world "TheSearch" for it to work. I also want it to broadcast the message in the code to the players in that world. Again Thanks in advance :)!
    http://pastebin.com/fb6PjiB1

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    LarsNitro

    You have to do &&, not +.
    Then you do:
    p.getWorld().setPVP(true);
     
Thread Status:
Not open for further replies.

Share This Page