diff --git a/bin/me/Travja/HungerArena/HaCommands$1.class b/bin/me/Travja/HungerArena/HaCommands$1.class index b4b7cc5..748bda3 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$1.class and b/bin/me/Travja/HungerArena/HaCommands$1.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$10.class b/bin/me/Travja/HungerArena/HaCommands$10.class index c1a7fd9..60673fb 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$10.class and b/bin/me/Travja/HungerArena/HaCommands$10.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$11.class b/bin/me/Travja/HungerArena/HaCommands$11.class index e19af64..b8a3a31 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$11.class and b/bin/me/Travja/HungerArena/HaCommands$11.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$12.class b/bin/me/Travja/HungerArena/HaCommands$12.class index a89c865..5ce6ff3 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$12.class and b/bin/me/Travja/HungerArena/HaCommands$12.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$13.class b/bin/me/Travja/HungerArena/HaCommands$13.class index 2aad396..57919b0 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$13.class and b/bin/me/Travja/HungerArena/HaCommands$13.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$14.class b/bin/me/Travja/HungerArena/HaCommands$14.class index 164024c..f4227e7 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$14.class and b/bin/me/Travja/HungerArena/HaCommands$14.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$15.class b/bin/me/Travja/HungerArena/HaCommands$15.class index 46991fd..0b05dcf 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$15.class and b/bin/me/Travja/HungerArena/HaCommands$15.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$16.class b/bin/me/Travja/HungerArena/HaCommands$16.class index 8399c1f..e0688a3 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$16.class and b/bin/me/Travja/HungerArena/HaCommands$16.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$17.class b/bin/me/Travja/HungerArena/HaCommands$17.class index 4f0051e..1652a0c 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$17.class and b/bin/me/Travja/HungerArena/HaCommands$17.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$18.class b/bin/me/Travja/HungerArena/HaCommands$18.class index ee09b8d..c9b3ea8 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$18.class and b/bin/me/Travja/HungerArena/HaCommands$18.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$19.class b/bin/me/Travja/HungerArena/HaCommands$19.class index 892f1a3..5ff135b 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$19.class and b/bin/me/Travja/HungerArena/HaCommands$19.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$2.class b/bin/me/Travja/HungerArena/HaCommands$2.class index 783972d..b9a8caa 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$2.class and b/bin/me/Travja/HungerArena/HaCommands$2.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$20.class b/bin/me/Travja/HungerArena/HaCommands$20.class index 9575afc..e3c8998 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$20.class and b/bin/me/Travja/HungerArena/HaCommands$20.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$21.class b/bin/me/Travja/HungerArena/HaCommands$21.class index 291d5b8..4403693 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$21.class and b/bin/me/Travja/HungerArena/HaCommands$21.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$22.class b/bin/me/Travja/HungerArena/HaCommands$22.class index 49691aa..c5bb79c 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$22.class and b/bin/me/Travja/HungerArena/HaCommands$22.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$23.class b/bin/me/Travja/HungerArena/HaCommands$23.class index 649dac5..e76dfdd 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$23.class and b/bin/me/Travja/HungerArena/HaCommands$23.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$24.class b/bin/me/Travja/HungerArena/HaCommands$24.class index 86548ca..0564f6e 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$24.class and b/bin/me/Travja/HungerArena/HaCommands$24.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$25.class b/bin/me/Travja/HungerArena/HaCommands$25.class index 6025043..b5b36fd 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$25.class and b/bin/me/Travja/HungerArena/HaCommands$25.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$26.class b/bin/me/Travja/HungerArena/HaCommands$26.class index 8e18dfb..90e60b0 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$26.class and b/bin/me/Travja/HungerArena/HaCommands$26.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$3.class b/bin/me/Travja/HungerArena/HaCommands$3.class index 033227e..51b8e71 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$3.class and b/bin/me/Travja/HungerArena/HaCommands$3.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$4.class b/bin/me/Travja/HungerArena/HaCommands$4.class index f01b788..c20a9b1 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$4.class and b/bin/me/Travja/HungerArena/HaCommands$4.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$5.class b/bin/me/Travja/HungerArena/HaCommands$5.class index f183287..8b146ff 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$5.class and b/bin/me/Travja/HungerArena/HaCommands$5.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$6.class b/bin/me/Travja/HungerArena/HaCommands$6.class index 554867e..1664ccd 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$6.class and b/bin/me/Travja/HungerArena/HaCommands$6.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$7.class b/bin/me/Travja/HungerArena/HaCommands$7.class index 014001d..031eccc 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$7.class and b/bin/me/Travja/HungerArena/HaCommands$7.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$8.class b/bin/me/Travja/HungerArena/HaCommands$8.class index 95aa341..308a8f5 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$8.class and b/bin/me/Travja/HungerArena/HaCommands$8.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands$9.class b/bin/me/Travja/HungerArena/HaCommands$9.class index 9da47c7..a4a9d9c 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands$9.class and b/bin/me/Travja/HungerArena/HaCommands$9.class differ diff --git a/bin/me/Travja/HungerArena/HaCommands.class b/bin/me/Travja/HungerArena/HaCommands.class index 8a54522..8054848 100644 Binary files a/bin/me/Travja/HungerArena/HaCommands.class and b/bin/me/Travja/HungerArena/HaCommands.class differ diff --git a/bin/me/Travja/HungerArena/Main.class b/bin/me/Travja/HungerArena/Main.class index 1db8479..40dc405 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 4530482..40c73bf 100644 --- a/config.yml +++ b/config.yml @@ -1,10 +1,7 @@ # default config.yml -<<<<<<< HEAD -======= #config version for us devs. DONT CHANGE THIS, or it will screw up some things PRETTY badly. config: version: 1.3 ->>>>>>> de44f825be59d96da77136bf1dd2b26fc23d09b7 # Message to display when the games start Start_Message: '&bLet The Games Begin!' # If the games should automatically restart at the end @@ -13,11 +10,8 @@ Auto_Restart: 'false' Auto_Start: 'false' # If tributes need to type /ha confirm to join Need_Confirm: 'true' -<<<<<<< HEAD # Not yet implemented iConomy_Support: 'false' -======= ->>>>>>> de44f825be59d96da77136bf1dd2b26fc23d09b7 # What the reward for winning is Reward: ID: 264 @@ -30,11 +24,8 @@ Sponsor_Cost: Countdown: 'true' Spawn_coords: 100,100,100,world # If players will only talk to close players of the whole server -<<<<<<< HEAD ChatClose: 'true' -======= ChatClose: 'false' ->>>>>>> de44f825be59d96da77136bf1dd2b26fc23d09b7 # How close the players have to be to talk to them ChatClose_Radius: 10 # Whether or not players can break blocks while playing @@ -69,13 +60,10 @@ Tribute_twentythree_spawn: 100,100,100 Tribute_twentyfour_spawn: 100,100,100 # If /ha setspawn has been run Spawn_set: 'false' -<<<<<<< HEAD -======= # True means give money to winner, false means don't. eco: enabled: false reward: 100 # How much money to give the winner. # Leave this. :) ->>>>>>> de44f825be59d96da77136bf1dd2b26fc23d09b7 Blocks_Destroyed: \ No newline at end of file diff --git a/plugin.yml b/plugin.yml index b1a8e88..4469946 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,25 +1,12 @@ name: HungerArena -<<<<<<< HEAD main: me.Travja.HungerArena.Main version: 1.3alpha -description: A plugin to help with playing The Hunger Games! +description: A lightweight and powerful plugin to help with playing The Hunger Games! +softdepend: [Vault] commands: Ha: description: Makes you join a game or start the game! StartPoint: description: Sets the starting point of a tribute. Sponsor: - description: Sponsors a Tribute -======= -main: me.travja.hungerarena.Main -version: 1.3alpha -description: A lightweight and powerful plugin to help with playing The Hunger Games! -softdepend: [Vault] -commands: - Ha: - description: Base command for HungerArena! - StartPoint: - description: Set the starting points for tributes. - Sponsor: - description: Sponsor a tribute. ->>>>>>> de44f825be59d96da77136bf1dd2b26fc23d09b7 + description: Sponsors a Tribute \ No newline at end of file diff --git a/src/me/travja/hungerarena/HaCommands.java b/src/me/travja/hungerarena/HaCommands.java index 5dc2f68..a79f07a 100644 --- a/src/me/travja/hungerarena/HaCommands.java +++ b/src/me/travja/hungerarena/HaCommands.java @@ -4,6 +4,7 @@ import java.util.List; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.Chest; @@ -59,24 +60,20 @@ public class HaCommands implements CommandExecutor { sender.sendMessage(c + "/ha rlist - See who's ready!"); sender.sendMessage(c + "/startpoint [1,2,3,4,etc] - Sets the starting points of tributes!"); sender.sendMessage(ChatColor.GREEN + "----------------------"); - return true; }else if(args[0].equalsIgnoreCase("List")){ if(p.hasPermission("HungerArena.GameMaker")){ sender.sendMessage(ChatColor.AQUA + "-----People Playing-----"); if(!plugin.Playing.isEmpty()){ for(String playernames: plugin.Playing){ Player players = plugin.getServer().getPlayerExact(playernames); - p.sendMessage(ChatColor.GREEN + playernames + " Life: " + players.getHealth() + "/20"); - return true; + sender.sendMessage(ChatColor.GREEN + playernames + " Life: " + players.getHealth() + "/20"); } }else if(plugin.Playing.isEmpty()){ p.sendMessage(ChatColor.GRAY + "No one is playing!"); } p.sendMessage(ChatColor.AQUA + "----------------------"); - return true; }else{ p.sendMessage(ChatColor.RED + "You don't have permission!"); - return true; } }else if(args[0].equalsIgnoreCase("rList")){ if(p.hasPermission("HungerArena.GameMaker")){ @@ -90,10 +87,8 @@ public class HaCommands implements CommandExecutor { p.sendMessage(ChatColor.GRAY + "No one is ready!"); } p.sendMessage(ChatColor.AQUA + "---------------------"); - return true; }else{ p.sendMessage(ChatColor.RED + "You don't have permission!"); - return true; } }else if(args[0].equalsIgnoreCase("SetSpawn")){ if(p.hasPermission("HungerArena.SetSpawn")){ @@ -105,35 +100,26 @@ public class HaCommands implements CommandExecutor { plugin.config.set("Spawns_set", "true"); plugin.saveConfig(); p.sendMessage(ChatColor.AQUA + "You have set the spawn for dead tributes!"); - return true; }else{ p.sendMessage(ChatColor.RED + "You don't have permission!"); - return true; } }else if(args[0].equalsIgnoreCase("Join")){ if(p.hasPermission("HungerArena.Join")){ if(plugin.Playing.contains(pname)){ p.sendMessage(ChatColor.RED + "You are already playing!"); - return true; }else if(plugin.Dead.contains(pname) || plugin.Quit.contains(pname)){ p.sendMessage(ChatColor.RED + "You DIED/QUIT! You can't join again!"); - return true; }else if(plugin.Playing.size()== 24){ p.sendMessage(ChatColor.RED + "There are already 24 Tributes!"); - return true; }else if(plugin.canjoin== true){ p.sendMessage(ChatColor.RED + "The game is in progress!"); - return true; }else if(plugin.config.getString("Spawns_set").equalsIgnoreCase("false")){ p.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!"); - return true; }else if(plugin.NeedConfirm.contains(pname)){ p.sendMessage(ChatColor.RED + "You need to do /ha confirm"); - return true; }else if(plugin.config.getString("Need_Confirm").equalsIgnoreCase("true")){ plugin.NeedConfirm.add(pname); p.sendMessage(ChatColor.GOLD + "You're inventory will be cleared! Type /ha confirm to procede"); - return true; }else{ plugin.Playing.add(pname); p.getInventory().clear(); @@ -145,11 +131,9 @@ public class HaCommands implements CommandExecutor { if(plugin.Playing.size()== 24){ p.performCommand("ha warpall"); } - return true; } }else{ p.sendMessage(ChatColor.RED + "You don't have permission!"); - return true; } }else if(args[0].equalsIgnoreCase("Confirm")){ if(plugin.NeedConfirm.contains(pname)){ @@ -165,32 +149,26 @@ public class HaCommands implements CommandExecutor { if(plugin.Playing.size()== 24){ p.performCommand("ha warpall"); } - return true; } }else if(args[0].equalsIgnoreCase("Ready")){ if(plugin.Playing.contains(pname)){ if(plugin.Ready.contains(pname)){ p.sendMessage(ChatColor.RED + "You're already ready!"); - return true; }else if(plugin.Playing.size()== 1){ p.sendMessage(ChatColor.RED + "You can't be ready when no one else is playing!"); - return true; }else{ plugin.Ready.add(pname); p.sendMessage(ChatColor.AQUA + "You have marked yourself as READY!"); - if(plugin.Playing.size()-4== plugin.Ready.size()){ + if(plugin.Playing.size()-4== plugin.Ready.size() || plugin.Playing.size()==plugin.Ready.size()){ Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha warpall"); - return true; } } }else if(!plugin.Playing.contains(pname)){ p.sendMessage(ChatColor.RED + "You aren't playing!"); - return true; } }else if(args[0].equalsIgnoreCase("Leave")){ if(!plugin.Playing.contains(pname)){ p.sendMessage(ChatColor.RED + "You aren't playing!"); - return true; }else if(plugin.canjoin== false){ plugin.Playing.remove(pname); p.sendMessage(ChatColor.AQUA + "You have left the game!"); @@ -204,7 +182,6 @@ public class HaCommands implements CommandExecutor { if(plugin.Frozen.contains(pname)){ plugin.Frozen.remove(pname); } - return true; }else{ plugin.Playing.remove(pname); plugin.Quit.add(pname); diff --git a/src/me/travja/hungerarena/Main.java b/src/me/travja/hungerarena/Main.java index 6da745c..f8e73d8 100644 --- a/src/me/travja/hungerarena/Main.java +++ b/src/me/travja/hungerarena/Main.java @@ -41,15 +41,16 @@ public class Main extends JavaPlugin{ public CommandExecutor SpawnsCommand = new SpawnsCommand(this); public boolean canjoin; public boolean exists; - public FileConfiguration config = getConfig(); + public FileConfiguration config; public ItemStack Reward; public ItemStack Cost; public boolean vault = false; public Economy econ = null; public void onEnable(){ - log.info("[HungerArena] enabled v" + getDescription().getVersion()); + config = this.getConfig(); config.options().copyDefaults(true); this.saveDefaultConfig(); + log.info("[HungerArena] enabled v" + getDescription().getVersion()); getServer().getPluginManager().registerEvents(DeathListener, this); getServer().getPluginManager().registerEvents(SpectatorListener, this); getServer().getPluginManager().registerEvents(FreezeListener, this); diff --git a/src/me/travja/hungerarena/Signs.java b/src/me/travja/hungerarena/Signs.java index 691b593..99b89ba 100644 --- a/src/me/travja/hungerarena/Signs.java +++ b/src/me/travja/hungerarena/Signs.java @@ -19,16 +19,16 @@ public class Signs implements Listener { public void Sign(PlayerInteractEvent event){ Player p = event.getPlayer(); Block b = event.getClickedBlock(); - if (b == null) { - return; - } + if (b == null) { + return; + } if(event.getAction()== Action.RIGHT_CLICK_BLOCK){ if(b.getType()== Material.SIGN || b.getType()==Material.SIGN_POST || b.getType()==Material.WALL_SIGN){ org.bukkit.block.Sign sign = (org.bukkit.block.Sign) b.getState(); String line1 = sign.getLine(0); - String line2 = sign.getLine(1); - String line3 = sign.getLine(2); - String line4 = sign.getLine(3); + String line2 = sign.getLine(1); + String line3 = sign.getLine(2); + String line4 = sign.getLine(3); if(line1.equalsIgnoreCase(ChatColor.BLUE + "[HungerArena]") || line1.equalsIgnoreCase(ChatColor.BLUE + "[HA]")){ if(line2.equals("")){ p.performCommand("ha");