Beispiel #1
0
 public static void loadAll() throws Exception {
   if (Vars.ess != null) {
     for (String iwarp : Vars.ess.getWarps().getList()) {
       new Warp(iwarp, Vars.ess.getWarps().getWarp(iwarp));
       TString.Print(TString.Prefix("PigRPG", 3) + "Ess warp " + iwarp + "	已加载");
     }
   }
   for (String name : TConfig.getConfigPath("PigRPG", "warp.yml", "warp")) {
     load(name);
   }
 }
Beispiel #2
0
 public void save() {
   TConfig.saveConfig(
       "PigRPG", "warp.yml", "warp." + this.getName() + ".world", loc.getWorld().getName());
   int[] xyz = {loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()};
   List<Integer> xyz2 = new ArrayList<Integer>();
   for (int i : xyz) {
     xyz2.add(i);
   }
   TConfig.saveConfig("PigRPG", "warp.yml", "warp." + this.getName() + ".xyz", xyz2);
   TString.Print(TString.Prefix("PigRPG", 3) + "warp " + name + "	已保存");
 }
Beispiel #3
0
 public static void load(String name) {
   String world = TConfig.getConfigFile("PigRPG", "warp.yml").getString("warp." + name + ".world");
   List<Integer> xzy =
       TConfig.getConfigFile("PigRPG", "warp.yml").getIntegerList("warp." + name + ".xyz");
   new Warp(name, new Location(Bukkit.getWorld(world), xzy.get(0), xzy.get(1), xzy.get(2)));
   TString.Print(
       TString.Prefix("PigRPG", 3)
           + "warp "
           + name
           + "("
           + world
           + ","
           + xzy.get(0)
           + ","
           + xzy.get(1)
           + ","
           + xzy.get(2)
           + ")	已加载");
 }