1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Is this possible

Discussion in 'Development' started by DerCooleVonDem, Jan 11, 2021.

  1. DerCooleVonDem

    DerCooleVonDem Spider Jockey

    Messages:
    37
    GitHub:
    Soon
    I want to make an Plugin for feed which only allowed the Command in given worlds

    Code:
    PHP:
    if($sender->getLevel()->getName() == $this->data->get("allowed-worlds-heal")){
    Config:
    Code:
    allowed-worlds-heal:
    - Plotwelt
    - Farmwelt
    - Nether
    Is this possible when not how it is possible
     
  2. DerCooleVonDem

    DerCooleVonDem Spider Jockey

    Messages:
    37
    GitHub:
    Soon
    Thx for your answers you will write
     
  3. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    you can use in_array() to check if the world name is in the list of allowed worlds
    PHP:
    if(in_array($sender->getLevel()->getName(), $this->data->get("allowed-worlds-heal"))){
        
    //your code...
    }
     
    minijaham and Diduhless like this.
  4. DerCooleVonDem

    DerCooleVonDem Spider Jockey

    Messages:
    37
    GitHub:
    Soon
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.