diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index f4aa08e..0000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml deleted file mode 100644 index 240558e..0000000 --- a/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_guava_guava_17_0.xml b/.idea/libraries/Maven__com_google_guava_guava_17_0.xml deleted file mode 100644 index b80bbe3..0000000 --- a/.idea/libraries/Maven__com_google_guava_guava_17_0.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_googlecode_json_simple_json_simple_1_1_1.xml b/.idea/libraries/Maven__com_googlecode_json_simple_json_simple_1_1_1.xml deleted file mode 100644 index 94d0566..0000000 --- a/.idea/libraries/Maven__com_googlecode_json_simple_json_simple_1_1_1.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml b/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml deleted file mode 100644 index 3865b2c..0000000 --- a/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml b/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml deleted file mode 100644 index 6b70394..0000000 --- a/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_10.xml b/.idea/libraries/Maven__junit_junit_4_10.xml deleted file mode 100644 index 4d2401f..0000000 --- a/.idea/libraries/Maven__junit_junit_4_10.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_avaje_ebean_2_8_1.xml b/.idea/libraries/Maven__org_avaje_ebean_2_8_1.xml deleted file mode 100644 index 91cdb60..0000000 --- a/.idea/libraries/Maven__org_avaje_ebean_2_8_1.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bukkit_bukkit_1_8_3_R0_1_SNAPSHOT.xml b/.idea/libraries/Maven__org_bukkit_bukkit_1_8_3_R0_1_SNAPSHOT.xml deleted file mode 100644 index a7622ba..0000000 --- a/.idea/libraries/Maven__org_bukkit_bukkit_1_8_3_R0_1_SNAPSHOT.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml deleted file mode 100644 index 6ddd077..0000000 --- a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_14.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_14.xml deleted file mode 100644 index 0a97f1d..0000000 --- a/.idea/libraries/Maven__org_yaml_snakeyaml_1_14.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 8283224..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 683b6c6..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,1395 +0,0 @@ - - - - -<<<<<<< HEAD - - - -======= - - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - - - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD - - -======= - - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD - - - - - - - - - - - -======= - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - -<<<<<<< HEAD - - - - - -======= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - localhost - 5050 - - - - - - - - - - - - - 1446256258983 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - - - - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD - - -======= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->>>>>>> 9e4210eab2c9c939ef21841c67f857f42c65f112 - - - - - - \ No newline at end of file diff --git a/BowSpleef.iml b/BowSpleef.iml deleted file mode 100644 index 3f9f790..0000000 --- a/BowSpleef.iml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/me/elliottolson/bowspleef/commands/DeleteCommand.java b/src/main/java/me/elliottolson/bowspleef/commands/DeleteCommand.java index 7b51ee7..ca6975d 100644 --- a/src/main/java/me/elliottolson/bowspleef/commands/DeleteCommand.java +++ b/src/main/java/me/elliottolson/bowspleef/commands/DeleteCommand.java @@ -1,6 +1,5 @@ package me.elliottolson.bowspleef.commands; -import me.elliottolson.bowspleef.game.Game; import me.elliottolson.bowspleef.game.GameManager; /** diff --git a/src/main/java/me/elliottolson/bowspleef/commands/SetCommand.java b/src/main/java/me/elliottolson/bowspleef/commands/SetCommand.java index 54e40db..b9ca745 100644 --- a/src/main/java/me/elliottolson/bowspleef/commands/SetCommand.java +++ b/src/main/java/me/elliottolson/bowspleef/commands/SetCommand.java @@ -57,9 +57,7 @@ public CommandResult execute() { return CommandResult.SUCCESS; } - } - - else { + } else { if (getArgs().get(2).equalsIgnoreCase("minplayers")){ game.setMinimumPlayers(Integer.valueOf(getArgs().get(3))); diff --git a/src/main/java/me/elliottolson/bowspleef/game/Game.java b/src/main/java/me/elliottolson/bowspleef/game/Game.java index 1fafcec..28bc6e9 100644 --- a/src/main/java/me/elliottolson/bowspleef/game/Game.java +++ b/src/main/java/me/elliottolson/bowspleef/game/Game.java @@ -105,8 +105,6 @@ public void addPlayer(Player player){ players.add(player); - //TODO: Achievements - //Kits KitManager.setKit(player, KitManager.getKit("classic")); @@ -118,7 +116,6 @@ public void addPlayer(Player player){ player.getInventory().setItem(4, item); player.updateInventory(); - //Economy and Points if (!ConfigurationManager.getStatisticsConfig().contains(player.getUniqueId().toString())){ StatManager.setGames(player.getUniqueId(), 0); @@ -414,13 +411,11 @@ public void updateSign(){ } public void updateScoreboard(){ - for (Player player : players){ + for (Player player : players) scoreboardManager.applyScoreboard(player); - } - for (Player player : spectators){ + for (Player player : spectators) scoreboardManager.applyScoreboard(player); - } } public void enable(){ @@ -452,8 +447,8 @@ public void setup() { //Load all arena values FileConfiguration arenaConfig = ConfigurationManager.getArenaConfig(); - for (GameState state : GameState.values()){ - if (state.equals(arenaConfig.getString("arenas." + name + ".game-state"))){ + for (GameState state : GameState.values()) { + if (state.equals(arenaConfig.getString("arenas." + name + ".game-state"))) { setState(state); } } @@ -461,19 +456,19 @@ public void setup() { setMinimumPlayers(arenaConfig.getInt("arenas." + name + ".minimum-players")); setMaximumPlayers(arenaConfig.getInt("arenas." + name + ".maximum-players")); - for (String name : arenaConfig.getStringList("arenas." + getName() + ".players")){ + for (String name : arenaConfig.getStringList("arenas." + getName() + ".players")) { players.add(Bukkit.getPlayer(name)); } - for (String name : arenaConfig.getStringList("arenas." + getName() + ".spectators")){ + for (String name : arenaConfig.getStringList("arenas." + getName() + ".spectators")) { spectators.add(Bukkit.getPlayer(name)); } - for (String name : arenaConfig.getStringList("arenas." + getName() + ".voters")){ + for (String name : arenaConfig.getStringList("arenas." + getName() + ".voters")) { voters.add(Bukkit.getPlayer(name)); } - if (arenaConfig.contains("arenas." + name + ".lobby.x")){ + if (arenaConfig.contains("arenas." + name + ".lobby.x")) { int x = arenaConfig.getInt("arenas." + name + ".lobby.x"); int y = arenaConfig.getInt("arenas." + name + ".lobby.y"); int z = arenaConfig.getInt("arenas." + name + ".lobby.z"); @@ -704,38 +699,71 @@ public void setState(GameState state) { updateScoreboard(); } + /** + * Returns a list of the current players within this instance of a game. + * @return A list of current players. + */ public List getPlayers() { return players; } + /** + * Returns a list of the current spectators within this instance of a game. + * @return A list of current spectators. + */ public List getSpectators() { return spectators; } + /** + * Returns a list of the current players who have voted to start this instance of a game. + * @return A list of the players who have voted. + */ public List getVoters() { return voters; } + /** + * Sets this Game to use the specified list to handle current players. + * @param players The new List to be used to handle current players. + */ public void setPlayers(List players) { this.players = players; } + /** + * Sets this Game to use the specified list to handle current spectators. + * @param spectators The new List to be used to handle current spectators. + */ public void setSpectators(List spectators) { this.spectators = spectators; } + /** + * Sets this Game to use the specified list to handle voters. + * @param voters The new List to be used to handle votes. + */ public void setVoters(List voters) { this.voters = voters; } + /** + * Returns the maximum amount of players who can be in a game as it starts. + * @return The maximum amount of players who can join a game. + */ public int getMaximumPlayers() { return maximumPlayers; } + public void setMaximumPlayers(int maximumPlayers) { this.maximumPlayers = maximumPlayers; } + /** + * Returns the minimum amount of players who can be in a game as it starts. + * @return The minimum amount of players who can join a game. + */ public int getMinimumPlayers() { return minimumPlayers; } @@ -744,6 +772,10 @@ public void setMinimumPlayers(int minimumPlayers) { this.minimumPlayers = minimumPlayers; } + /** + * Returns the location of the game's lobby. + * @return The location of the game's lobby. + */ public Location getLobby() { return lobby; } diff --git a/src/main/java/me/elliottolson/bowspleef/kit/ShotgunKit.java b/src/main/java/me/elliottolson/bowspleef/kit/ShotgunKit.java index b3edffb..61ad0e0 100644 --- a/src/main/java/me/elliottolson/bowspleef/kit/ShotgunKit.java +++ b/src/main/java/me/elliottolson/bowspleef/kit/ShotgunKit.java @@ -4,10 +4,15 @@ import me.elliottolson.bowspleef.kit.common.Kit; import org.bukkit.ChatColor; import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Arrow; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.util.Vector; import java.util.List; +import java.util.Random; /** * Copyright Elliott Olson (c) 2014. All Rights Reserved. @@ -46,14 +51,26 @@ public ArmourSet getArmour() { @Override public ItemStack getBow() { - //TODO: Compete Bow - return null; + ItemStack item = new ItemStack(Material.BOW); + ItemMeta meta = item.getItemMeta(); + meta.setDisplayName(ChatColor.DARK_AQUA.toString() + ChatColor.BOLD + "BOW" + + ChatColor.GRAY.toString() + ChatColor.ITALIC + " - Shotgun"); + item.setItemMeta(meta); + item.addEnchantment(Enchantment.ARROW_FIRE, 1); + item.addEnchantment(Enchantment.ARROW_INFINITE, 1); + + return item; } @Override public ItemStack getSpecialItem() { - //TODO: Revamp this - return null; + ItemStack item = new ItemStack(Material.IRON_BARDING); + ItemMeta meta = item.getItemMeta(); + meta.setDisplayName(ChatColor.GREEN + "SHOTGUN BURST " + ChatColor.DARK_GRAY + "-" + ChatColor.GRAY.toString() + + ChatColor.ITALIC + " (RIGHT CLICK)"); + item.setItemMeta(meta); + + return item; } @Override @@ -63,7 +80,14 @@ public List getItems() { @Override public void execute(Player player) { + Random rand = new Random(); + + for (int i = 0; i < 5; i++){ + Vector v = player.getLocation().getDirection().multiply(1); //Multiply the player's direction by the power + v.add(new Vector(rand.nextDouble() - 0.5, rand.nextDouble() - 0.5, rand.nextDouble() - 0.5)); //Add the velocity by a random number + player.getLocation().getWorld().spawnArrow(player.getLocation(), v, 2, 2); + } } @Override diff --git a/src/main/java/me/elliottolson/bowspleef/kit/common/KitCooldown.java b/src/main/java/me/elliottolson/bowspleef/kit/common/KitCooldown.java index bae1a54..ad0637c 100644 --- a/src/main/java/me/elliottolson/bowspleef/kit/common/KitCooldown.java +++ b/src/main/java/me/elliottolson/bowspleef/kit/common/KitCooldown.java @@ -22,9 +22,6 @@ public KitCooldown(Player player){ } public void run() { - if (cooldown > 0){ - cooldown--; - } if (cooldown == 0){ Kit kit = KitManager.getKit(player); @@ -32,5 +29,10 @@ public void run() { + kit.getColor() + kit.getName()); cancel(); } + + if (cooldown > 0){ + cooldown--; + } + } } diff --git a/target/BowSpleef.jar b/target/BowSpleef.jar deleted file mode 100644 index a734512..0000000 Binary files a/target/BowSpleef.jar and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/commands/DeleteCommand.class b/target/classes/me/elliottolson/bowspleef/commands/DeleteCommand.class deleted file mode 100644 index 1df7646..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/commands/DeleteCommand.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/commands/SetCommand.class b/target/classes/me/elliottolson/bowspleef/commands/SetCommand.class deleted file mode 100644 index 4fd4ac5..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/commands/SetCommand.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/game/Game$GameState.class b/target/classes/me/elliottolson/bowspleef/game/Game$GameState.class deleted file mode 100644 index d7ef096..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/game/Game$GameState.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/game/Game.class b/target/classes/me/elliottolson/bowspleef/game/Game.class deleted file mode 100644 index 2f152ae..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/game/Game.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/kit/GhostKit$1.class b/target/classes/me/elliottolson/bowspleef/kit/GhostKit$1.class deleted file mode 100644 index f60fab8..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/kit/GhostKit$1.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/kit/GhostKit.class b/target/classes/me/elliottolson/bowspleef/kit/GhostKit.class deleted file mode 100644 index 46e190c..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/kit/GhostKit.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/kit/ShotgunKit.class b/target/classes/me/elliottolson/bowspleef/kit/ShotgunKit.class deleted file mode 100644 index a0550a5..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/kit/ShotgunKit.class and /dev/null differ diff --git a/target/classes/me/elliottolson/bowspleef/kit/common/KitCooldown.class b/target/classes/me/elliottolson/bowspleef/kit/common/KitCooldown.class deleted file mode 100644 index f14d88a..0000000 Binary files a/target/classes/me/elliottolson/bowspleef/kit/common/KitCooldown.class and /dev/null differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties deleted file mode 100644 index 059fba7..0000000 --- a/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Fri Nov 27 16:12:20 CST 2015 -version=1.3-SNAPSHOT -groupId=me.elliottolson -artifactId=BowSpleef