Solved PLAYERBlockplaceevent

Discussion in 'Spigot Plugin Development' started by Syanko, Jun 9, 2018.

Thread Status:
Not open for further replies.
  1. i wanna make when place lava or water it will remove in 10 seconds why it is not working i dont know [​IMG]
     
  2. A few problems here. What IDE are you using?

    1. `run` needs to override the method from the BukkitRunnable class:

    Code (Text):
    @Override
    public void run()
    {
    2. To check if a bucket contains lava you need to:

    Code (Text):
    e.getBucket().toString().contains("LAVA")
    In your code getItemStack().getType() returns BUCKET, not LAVA_BUCKET.

    3. Lastly, the clicked block may NOT be the block where the lava lands. For example, you can right click on the side of a block and the lava will be placed one block to the right. Then the task will remove the wrong block. Use the block face variable in the event to figure out which block to use:

    Code (Text):
    e.getBlockClicked().getRelative(e.getBlockFace()).setType(Material.AIR);
     
    Tip: You can print messages to the console to figure out why your code isn't working:

    Code (Text):
    this.getLogger.info("block=" + e.getBlockClicked().getType().toString());
     
  3. still not working my code is:[​IMG]
     
  4. What isn't working. And 20L is 1 second, change it to 200L.

    seconds * 20
     
  5. i did it for try it works or not and not working
     
  6. Learn f***** java first. Man we told you yesterday. Stop this.
     
  7. You are not telling me what doesn't work. Try printing debug messages, too..

    Also your class name should be UpperCamelCase.

    EDIT: This is also in the wrong section. It should be in spigot plugin development.
     
  8. Dont even try man.
    We told him yesterday. And he keeps doing this.
    In fact. Disrespectfully removed all the posts: https://www.spigotmc.org/threads/playerbucketemptyevent-help.323081/page-2#post-3029816
     
  9. nothing happening in game i tried debug
    Error: Could not find or load main class org.bukkit.craftbukkit.libs.org.ibex.nestedvm.ClassFileCompiler
     
    #10 Syanko, Jun 10, 2018
    Last edited: Jun 10, 2018
  10. How can you say no one helped you?
    You might be sight, because we referenced you on how to start a plugin.

    We told you to follow at least the java conventions.
    You didnt even bother to change the class name to start with UpperCase

    You are not registering the Listener + You dont have onEnable there.

    I referenced you to the spigotMC wiki's to know how to do at least the most basic things to start a plugin.
    You seem to not be willing to learn. Thats why you poor, will need always to be spoon feed by someone that hadn't met you before.
     
    • Agree Agree x 1
  11. i
    i dont need register listener i just want to make plugin
     
    • Funny Funny x 2
  12. JanTuck

    Supporter

    This is a repeat of the question you asked yesterday, there is no reason to repeat it. We told you how to fix it yesterday, but you apparently took all we said and just ignored it, and then asked again today.



    Quoted due to him probably removing it:


     
  13. i did what you said yesterday and dont worked come teamviewer and show me pls ?
     
  14. JanTuck

    Supporter

    Sure, I'll come TeamViewer reply with your id & code.
     
  15. thanks a lot for did it for me JanTuck showed me on teamviewer solved
     
  16. So funny that you reported me man. Get a life.
    Keep being an ingnorant thats all you will be.

    NOob
     
  17. sorry but you said fk you ?
     
Thread Status:
Not open for further replies.