1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Welp

Discussion in 'Java' started by novastosha, May 3, 2020.

  1. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Code (Java):
    1.  
    2. public Arena getArenaFromWorld(World world){
    3.     List<String> arenas = config.getStringList("KitPVP.arenas.*");
    4.     if(arenas == null){
    5.         Bukkit.broadcastMessage("null");
    6.     }else{
    7.         Bukkit.broadcastMessage("not null");
    8.         Bukkit.broadcastMessage(String.valueOf(arenas));
    9.     }
    10.  
    11.     if(arenas != null && !arenas.isEmpty()) for(String arenaFor : arenas) {
    12.         Bukkit.broadcastMessage(arenaFor);
    13. //        if (((String) config.get("KitPVP.arenas." + arenaFor + ".world")).equalsIgnoreCase(world.getName())){
    14.   //          return getArena(arenaFor);
    15.     //    }
    16.     }
    17.     return null;
    18. }
    it does not return the list of arenas and its not null and it is empty
     
  2. Purple Pixel

    Purple Pixel Member

    Joined:
    Sep 23, 2020
    Messages:
    40
    Likes Received:
    3
    o-o I think I am in the wrong place for skript.
     

Share This Page

Loading...