1.15.2 Two if cases

Discussion in 'Spigot Plugin Development' started by iTaeyeon, Apr 2, 2020.

  1. Hello. I am making my own anti-curse plugin, but I don't have a luck with 2x if and I can't find fix to it. This is the way I want to work.

    Can anyone suggest me what to do?

    upload_2020-4-2_20-42-32.png
     
  2. Choco

    Moderator

    What issue are you having exactly? What do you need help with? You haven't described anything. You just threw some code our way.
     
  3. You want to event.setCancelled(true), so that the player message is never sent.
     
    • Agree Agree x 1
  4. Well, I want if player doesn't have permission "dwarf.nochat" to block messages that player sent.
     
  5. Yes, I forgot to put that there, because I edited it and forgot to put back when plugin wasn't working.
    But, it's not that the thing that's not working here
     
  6. Did you register the event in the main class? Because it seems like it should work.
     
  7. Thanks. I fixed it. Yeah, Panda was right, I forgot to add event.setCancelled(true); because I was testing why it's not working with 2 values message.contains() || message.contains()

    Thanks again for help, I feel so dumb right now :oops:
     
    • Like Like x 1
  8. Haha dont worry, it happens to the best of us.
     
    • Like Like x 1