Esempio n. 1
0
 public static void loadPorts() {
   File[] files = new File("plugins/JumpPorts/ports").listFiles();
   for (File file : files) {
     String name = file.getName();
     int pos = name.lastIndexOf('.');
     String ext = name.substring(pos + 1);
     if (ext.equalsIgnoreCase("yml")) {
       name = name.replaceAll(".yml", "");
       JumpPort port = new JumpPort(name);
       port.load();
       ports.put(name, port);
       JumpPortsPlugin.log(Lang.get("plugin.loaded") + ": " + name);
     }
   }
 }