Executing commands in an if statement

Discussion in 'Plugin Development' started by vidonjac, Jul 2, 2020.

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

    vidonjac

    Can someone help me, I am trying to execute a command in an if statement in an event but i can not get it. Any help would be appreciated, thank you in advance. if i find something that works i will post it here. (1.15.2)
    P.S. I apologize if something is wrong with the post or the code I am new to this.
    Everyone that has the same problem in the future fill free to just copy paste an answer.

    Block block = event.getBlock();
    Material material = block.getType();

    if (material.equals(material.IRON_ORE)){
    boolean onCommand(CommandSender sender, Command "/spreadplayers ~ ~ 2500 3000 false @a", String label, String); }
     
    Last edited: Jul 2, 2020
  2. Online

    timtower Administrator Administrator Moderator

Thread Status:
Not open for further replies.

Share This Page