diff --git a/bin/me/Travja/HungerArena/DeathListener$1.class b/bin/me/Travja/HungerArena/DeathListener$1.class index 32fa380..6419260 100644 Binary files a/bin/me/Travja/HungerArena/DeathListener$1.class and b/bin/me/Travja/HungerArena/DeathListener$1.class differ diff --git a/bin/me/Travja/HungerArena/DeathListener$2.class b/bin/me/Travja/HungerArena/DeathListener$2.class index e1cafc2..373306a 100644 Binary files a/bin/me/Travja/HungerArena/DeathListener$2.class and b/bin/me/Travja/HungerArena/DeathListener$2.class differ diff --git a/bin/me/Travja/HungerArena/DeathListener$3.class b/bin/me/Travja/HungerArena/DeathListener$3.class index 74ea289..8242d07 100644 Binary files a/bin/me/Travja/HungerArena/DeathListener$3.class and b/bin/me/Travja/HungerArena/DeathListener$3.class differ diff --git a/bin/me/Travja/HungerArena/DeathListener.class b/bin/me/Travja/HungerArena/DeathListener.class index 04b0a65..144706e 100644 Binary files a/bin/me/Travja/HungerArena/DeathListener.class and b/bin/me/Travja/HungerArena/DeathListener.class differ diff --git a/bin/me/Travja/HungerArena/Main$1.class b/bin/me/Travja/HungerArena/Main$1.class index fdcaac7..2604776 100644 Binary files a/bin/me/Travja/HungerArena/Main$1.class and b/bin/me/Travja/HungerArena/Main$1.class differ diff --git a/bin/me/Travja/HungerArena/Main$10.class b/bin/me/Travja/HungerArena/Main$10.class index 07d78a6..30046b2 100644 Binary files a/bin/me/Travja/HungerArena/Main$10.class and b/bin/me/Travja/HungerArena/Main$10.class differ diff --git a/bin/me/Travja/HungerArena/Main$11.class b/bin/me/Travja/HungerArena/Main$11.class index 6b66835..fced75b 100644 Binary files a/bin/me/Travja/HungerArena/Main$11.class and b/bin/me/Travja/HungerArena/Main$11.class differ diff --git a/bin/me/Travja/HungerArena/Main$2.class b/bin/me/Travja/HungerArena/Main$2.class index 6d1072d..ba0633f 100644 Binary files a/bin/me/Travja/HungerArena/Main$2.class and b/bin/me/Travja/HungerArena/Main$2.class differ diff --git a/bin/me/Travja/HungerArena/Main$3.class b/bin/me/Travja/HungerArena/Main$3.class index b41a001..7542475 100644 Binary files a/bin/me/Travja/HungerArena/Main$3.class and b/bin/me/Travja/HungerArena/Main$3.class differ diff --git a/bin/me/Travja/HungerArena/Main$4.class b/bin/me/Travja/HungerArena/Main$4.class index e91ba3c..92c0a03 100644 Binary files a/bin/me/Travja/HungerArena/Main$4.class and b/bin/me/Travja/HungerArena/Main$4.class differ diff --git a/bin/me/Travja/HungerArena/Main$5.class b/bin/me/Travja/HungerArena/Main$5.class index a680997..f3dd415 100644 Binary files a/bin/me/Travja/HungerArena/Main$5.class and b/bin/me/Travja/HungerArena/Main$5.class differ diff --git a/bin/me/Travja/HungerArena/Main$6.class b/bin/me/Travja/HungerArena/Main$6.class index eea5df1..d966cbd 100644 Binary files a/bin/me/Travja/HungerArena/Main$6.class and b/bin/me/Travja/HungerArena/Main$6.class differ diff --git a/bin/me/Travja/HungerArena/Main$7.class b/bin/me/Travja/HungerArena/Main$7.class index d399213..5218dfb 100644 Binary files a/bin/me/Travja/HungerArena/Main$7.class and b/bin/me/Travja/HungerArena/Main$7.class differ diff --git a/bin/me/Travja/HungerArena/Main$8.class b/bin/me/Travja/HungerArena/Main$8.class index cf2e598..1b9e071 100644 Binary files a/bin/me/Travja/HungerArena/Main$8.class and b/bin/me/Travja/HungerArena/Main$8.class differ diff --git a/bin/me/Travja/HungerArena/Main$9.class b/bin/me/Travja/HungerArena/Main$9.class index 52b4254..4e1978f 100644 Binary files a/bin/me/Travja/HungerArena/Main$9.class and b/bin/me/Travja/HungerArena/Main$9.class differ diff --git a/bin/me/Travja/HungerArena/Main.class b/bin/me/Travja/HungerArena/Main.class index 766baaf..28151b1 100644 Binary files a/bin/me/Travja/HungerArena/Main.class and b/bin/me/Travja/HungerArena/Main.class differ diff --git a/config.yml b/config.yml index e0858f2..4a53b0e 100644 --- a/config.yml +++ b/config.yml @@ -44,4 +44,5 @@ Tribute_twenty_spawn: 100,100,100 Tribute_twentyone_spawn: 100,100,100 Tribute_twentytwo_spawn: 100,100,100 Tribute_twentythree_spawn: 100,100,100 -Tribute_twentyfour_spawn: 100,100,100 \ No newline at end of file +Tribute_twentyfour_spawn: 100,100,100 +Spawn_set: false \ No newline at end of file diff --git a/src/me/Travja/HungerArena/Main.java b/src/me/Travja/HungerArena/Main.java index 4aa07fb..6f18a71 100644 --- a/src/me/Travja/HungerArena/Main.java +++ b/src/me/Travja/HungerArena/Main.java @@ -61,15 +61,6 @@ public class Main extends JavaPlugin{ getServer().getPluginManager().registerEvents(new DeathListener(this), this); Reward = new ItemStack(config.getInt("Reward.ID"), config.getInt("Reward.Amount")); Cost = new ItemStack(config.getInt("Sponsor_Cost.ID"), config.getInt("Sponsor_Cost.Amount")); - if(!config.contains("Auto_Restart")){ - config.addDefault("Auto_Restart", "false"); - this.saveConfig(); - } - if(!config.contains("Start_Message")){ - config.addDefault("Start_Message", "&bLet The Games Begin!"); - this.saveConfig(); - System.out.println("Saved Start_Message"); - } } public void onDisable(){ log = this.getLogger(); @@ -123,6 +114,9 @@ public class Main extends JavaPlugin{ } } if(cmd.getName().equalsIgnoreCase("Ha")){ + if(config.getString("Spawns_set").equalsIgnoreCase("false")){ + p.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!"); + } if(args.length== 0){ p.sendMessage(ChatColor.GREEN + "[HungerArena] by " + ChatColor.AQUA + "travja!"); return false; @@ -149,6 +143,7 @@ public class Main extends JavaPlugin{ String w = p.getWorld().getName(); config.set("Spawn_coords", x + "," + y + "," + z + "," + w); saveConfig(); + config.set("Spawns_set", "true"); p.sendMessage(ChatColor.AQUA + "You have set the spawn for dead tributes!"); }else{ p.sendMessage(ChatColor.RED + "You don't have permission!"); @@ -1135,6 +1130,13 @@ class DeathListener implements Listener{ public void onPlayerJoin(PlayerJoinEvent event){ Player p = event.getPlayer(); final Player player = event.getPlayer(); + if(plugin.Watching.contains(p)){ + p.setAllowFlight(true); + p.setFlying(true); + for(Player everyone:plugin.getServer().getOnlinePlayers()){ + everyone.hidePlayer(p); + } + } if(plugin.Out.contains(p)){ plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ public void run(){ @@ -1142,7 +1144,6 @@ class DeathListener implements Listener{ } }, 40L); plugin.Out.remove(p); - plugin.Playing.add(p); } if(plugin.Quit.contains(p) || plugin.Dead.contains(p)){ String[] Spawncoords = plugin.config.getString("Spawn_coords").split(","); @@ -1170,12 +1171,19 @@ class DeathListener implements Listener{ double spawny = Double.parseDouble(Spawncoords[1]); double spawnz = Double.parseDouble(Spawncoords[2]); final Location Spawn = new Location(spawnw, spawnx, spawny, spawnz); + if(plugin.Playing.contains(p)){ + if(plugin.Playing.size()== 1){ + + } + plugin.Out.add(p); + } if(plugin.Watching.contains(p)){ System.out.println(p.getName() + " testing"); } plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){ public void run(){ - if(plugin.Playing.contains(p) && plugin.Out.contains(p) && plugin.canjoin== false){ + if(plugin.Playing.contains(p) && plugin.Out.contains(p)){ + if(plugin.canjoin== true){ plugin.Playing.remove(p); plugin.Quit.add(p); plugin.Out.remove(p); @@ -1203,6 +1211,11 @@ class DeathListener implements Listener{ plugin.canjoin = false; } } + }else if(plugin.canjoin== false){ + plugin.Playing.remove(p); + plugin.Quit.add(p); + plugin.Out.remove(p); + } } } }, 1200L);