Tons of fixes!!
This commit is contained in:
parent
3d90d9afce
commit
641ba0b3d1
Binary file not shown.
Binary file not shown.
BIN
bin/me/Travja/HungerArena/DeathListener$1.class
Normal file
BIN
bin/me/Travja/HungerArena/DeathListener$1.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
spawns.yml
Normal file
28
spawns.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# This file stores all of the spawns!
|
||||||
|
Spawn_coords: 100,100,100,world
|
||||||
|
# If /ha setspawn has been run
|
||||||
|
Spawns_set: 'false'
|
||||||
|
Tribute_one_spawn: 100,100,100
|
||||||
|
Tribute_two_spawn: 100,100,100
|
||||||
|
Tribute_three_spawn: 100,100,100
|
||||||
|
Tribute_four_spawn: 100,100,100
|
||||||
|
Tribute_five_spawn: 100,100,100
|
||||||
|
Tribute_six_spawn: 100,100,100
|
||||||
|
Tribute_seven_spawn: 100,100,100
|
||||||
|
Tribute_eight_spawn: 100,100,100
|
||||||
|
Tribute_nine_spawn: 100,100,100
|
||||||
|
Tribute_ten_spawn: 100,100,100
|
||||||
|
Tribute_eleven_spawn: 100,100,100
|
||||||
|
Tribute_twelve_spawn: 100,100,100
|
||||||
|
Tribute_thirteen_spawn: 100,100,100
|
||||||
|
Tribute_fourteen_spawn: 100,100,100
|
||||||
|
Tribute_fifteen_spawn: 100,100,100
|
||||||
|
Tribute_sixteen_spawn: 100,100,100
|
||||||
|
Tribute_seventeen_spawn: 100,100,100
|
||||||
|
Tribute_eighteen_spawn: 100,100,100
|
||||||
|
Tribute_nineteen_spawn: 100,100,100
|
||||||
|
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
|
@ -27,7 +27,7 @@ public class BlockStorage implements Listener {
|
|||||||
public BlockStorage(Main m) {
|
public BlockStorage(Main m) {
|
||||||
this.plugin = m;
|
this.plugin = m;
|
||||||
}
|
}
|
||||||
@EventHandler
|
/*@EventHandler
|
||||||
public void creeperExplosion(EntityExplodeEvent event){
|
public void creeperExplosion(EntityExplodeEvent event){
|
||||||
if(plugin.canjoin== true){
|
if(plugin.canjoin== true){
|
||||||
for(Block b:event.blockList()){
|
for(Block b:event.blockList()){
|
||||||
@ -116,7 +116,7 @@ public class BlockStorage implements Listener {
|
|||||||
if(l.getBlock().getRelative(BlockFace.DOWN).getType()!= Material.AIR || l.getBlock().getRelative(BlockFace.DOWN).getType()!= Material.WATER || l.getBlock().getRelative(BlockFace.DOWN).getType()!= Material.LAVA){
|
if(l.getBlock().getRelative(BlockFace.DOWN).getType()!= Material.AIR || l.getBlock().getRelative(BlockFace.DOWN).getType()!= Material.WATER || l.getBlock().getRelative(BlockFace.DOWN).getType()!= Material.LAVA){
|
||||||
event.getPlayer().sendMessage(ChatColor.GREEN + "Block will land at " + x + ", " + newy + ", " + z + " and replaced " + replaced);
|
event.getPlayer().sendMessage(ChatColor.GREEN + "Block will land at " + x + ", " + newy + ", " + z + " and replaced " + replaced);
|
||||||
}
|
}
|
||||||
/*Location location = b.getLocation();
|
Location location = b.getLocation();
|
||||||
if (location.getBlock().getRelative(BlockFace.DOWN).getType() == Material.AIR) {
|
if (location.getBlock().getRelative(BlockFace.DOWN).getType() == Material.AIR) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (i = location.getBlockY(); i > -1; i --) {
|
for (i = location.getBlockY(); i > -1; i --) {
|
||||||
@ -131,7 +131,7 @@ public class BlockStorage implements Listener {
|
|||||||
plugin.config.set("Blocks_Destroyed", blocks);
|
plugin.config.set("Blocks_Destroyed", blocks);
|
||||||
plugin.saveConfig();
|
plugin.saveConfig();
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ public class BlockStorage implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*@EventHandler
|
@EventHandler
|
||||||
public void onChange(BlockPhysicsEvent event){
|
public void onChange(BlockPhysicsEvent event){
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
Material changed = event.getChangedType();
|
Material changed = event.getChangedType();
|
||||||
|
@ -18,7 +18,7 @@ public class CommandBlock implements Listener {
|
|||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
String pname = p.getName();
|
String pname = p.getName();
|
||||||
if(!cmd.contains("/ha") && plugin.Playing.contains(pname) && plugin.canjoin== true){
|
if(!cmd.contains("/ha") && plugin.Playing.contains(pname) && plugin.canjoin== true){
|
||||||
if(!p.hasPermission("HungerArena.UseCommands")){
|
if(!cmd.contains("/login") || !p.hasPermission("HungerArena.UseCommands")){
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
p.sendMessage(ChatColor.RED + "You are only allowed to use /ha commands!");
|
p.sendMessage(ChatColor.RED + "You are only allowed to use /ha commands!");
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ public class DeathListener implements Listener{
|
|||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
String pname = p.getName();
|
String pname = p.getName();
|
||||||
if(plugin.Dead.contains(pname)){
|
if(plugin.Dead.contains(pname)){
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
World spawnw = plugin.getServer().getWorld(Spawncoords[3]);
|
World spawnw = plugin.getServer().getWorld(Spawncoords[3]);
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
double spawny = Double.parseDouble(Spawncoords[1]);
|
double spawny = Double.parseDouble(Spawncoords[1]);
|
||||||
@ -36,12 +36,14 @@ public class DeathListener implements Listener{
|
|||||||
String pname = p.getName();
|
String pname = p.getName();
|
||||||
int players = plugin.Playing.size()-1;
|
int players = plugin.Playing.size()-1;
|
||||||
String leftmsg = ChatColor.BLUE + "There are now " + players + " tributes left!";
|
String leftmsg = ChatColor.BLUE + "There are now " + players + " tributes left!";
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
World spawnw = plugin.getServer().getWorld(Spawncoords[3]);
|
World spawnw = plugin.getServer().getWorld(Spawncoords[3]);
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
double spawny = Double.parseDouble(Spawncoords[1]);
|
double spawny = Double.parseDouble(Spawncoords[1]);
|
||||||
double spawnz = Double.parseDouble(Spawncoords[2]);
|
double spawnz = Double.parseDouble(Spawncoords[2]);
|
||||||
Location Spawn = new Location(spawnw, spawnx, spawny, spawnz);
|
Location Spawn = new Location(spawnw, spawnx, spawny, spawnz);
|
||||||
|
|
||||||
|
if(plugin.Frozen.contains(pname) && plugin.Playing.contains(pname)){
|
||||||
if(plugin.config.getString("Cannon_Death").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Cannon_Death").equalsIgnoreCase("True")){
|
||||||
double y = p.getLocation().getY();
|
double y = p.getLocation().getY();
|
||||||
double newy = y+200;
|
double newy = y+200;
|
||||||
@ -50,7 +52,6 @@ public class DeathListener implements Listener{
|
|||||||
Location strike = new Location(p.getWorld(), x, newy, z);
|
Location strike = new Location(p.getWorld(), x, newy, z);
|
||||||
p.getWorld().strikeLightning(strike);
|
p.getWorld().strikeLightning(strike);
|
||||||
}
|
}
|
||||||
if(plugin.Frozen.contains(pname) && plugin.Playing.contains(pname)){
|
|
||||||
event.setDeathMessage("");
|
event.setDeathMessage("");
|
||||||
p.getServer().broadcastMessage(pname + ChatColor.LIGHT_PURPLE + " Stepped off their pedestal too early!");
|
p.getServer().broadcastMessage(pname + ChatColor.LIGHT_PURPLE + " Stepped off their pedestal too early!");
|
||||||
plugin.Frozen.remove(pname);
|
plugin.Frozen.remove(pname);
|
||||||
@ -59,6 +60,7 @@ public class DeathListener implements Listener{
|
|||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== false){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== false){
|
||||||
//Announce winner
|
//Announce winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -71,22 +73,26 @@ public class DeathListener implements Listener{
|
|||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
|
}
|
||||||
//Show spectators
|
//Show spectators
|
||||||
if(!plugin.Watching.isEmpty()){
|
for(String sname: plugin.Watching){
|
||||||
String s1 = plugin.Watching.get(i++);
|
Player spectator = plugin.getServer().getPlayerExact(sname);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s1);
|
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
spectator.teleport(Spawn);
|
spectator.teleport(spectator.getWorld().getSpawnLocation());
|
||||||
for(Player online:plugin.getServer().getOnlinePlayers()){
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
|
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
||||||
|
public void run(){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
|
|
||||||
|
}
|
||||||
|
}, 220L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}else if(plugin.Playing.contains(pname)){
|
||||||
if(plugin.Playing.contains(pname)){
|
|
||||||
if(plugin.config.getString("Cannon_Death").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Cannon_Death").equalsIgnoreCase("True")){
|
||||||
double y = p.getLocation().getY();
|
double y = p.getLocation().getY();
|
||||||
double newy = y+200;
|
double newy = y+200;
|
||||||
@ -106,6 +112,7 @@ public class DeathListener implements Listener{
|
|||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
//Announce winner
|
//Announce winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -117,9 +124,11 @@ public class DeathListener implements Listener{
|
|||||||
winner.getInventory().setHelmet(null);
|
winner.getInventory().setHelmet(null);
|
||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
|
}
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
//Show spectators
|
//Show spectators
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s1 = plugin.Watching.get(i++);
|
String s1 = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s1);
|
Player spectator = plugin.getServer().getPlayerExact(s1);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -128,6 +137,7 @@ public class DeathListener implements Listener{
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
@ -142,6 +152,7 @@ public class DeathListener implements Listener{
|
|||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
//Announce winner
|
//Announce winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -153,9 +164,11 @@ public class DeathListener implements Listener{
|
|||||||
winner.getInventory().setHelmet(null);
|
winner.getInventory().setHelmet(null);
|
||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
|
}
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
//Show spectators
|
//Show spectators
|
||||||
if(plugin.Watching.size() != 0){
|
if(plugin.Watching.size() != 0){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s1 = plugin.Watching.get(i++);
|
String s1 = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s1);
|
Player spectator = plugin.getServer().getPlayerExact(s1);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -164,6 +177,7 @@ public class DeathListener implements Listener{
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
@ -175,6 +189,7 @@ public class DeathListener implements Listener{
|
|||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
//Announce winner
|
//Announce winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -186,13 +201,15 @@ public class DeathListener implements Listener{
|
|||||||
winner.getInventory().setHelmet(null);
|
winner.getInventory().setHelmet(null);
|
||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
|
}
|
||||||
// Create the event here
|
// Create the event here
|
||||||
PlayerWinGamesEvent winevent = new PlayerWinGamesEvent(winner);
|
//PlayerWinGamesEvent winevent = new PlayerWinGamesEvent(winner);
|
||||||
// Call the event
|
// Call the event
|
||||||
Bukkit.getServer().getPluginManager().callEvent(winevent);
|
//Bukkit.getServer().getPluginManager().callEvent(winevent);
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
//Show spectators
|
//Show spectators
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s1 = plugin.Watching.get(i++);
|
String s1 = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s1);
|
Player spectator = plugin.getServer().getPlayerExact(s1);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -201,6 +218,7 @@ public class DeathListener implements Listener{
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ public class FreezeListener implements Listener {
|
|||||||
String one = plugin.Playing.get(0);
|
String one = plugin.Playing.get(0);
|
||||||
if(pname==one){
|
if(pname==one){
|
||||||
Player tone = plugin.getServer().getPlayerExact(one);
|
Player tone = plugin.getServer().getPlayerExact(one);
|
||||||
String[] onecoords = plugin.config.getString("Tribute_one_spawn").split(",");
|
String[] onecoords = plugin.spawns.getString("Tribute_one_spawn").split(",");
|
||||||
double x = Double.parseDouble(onecoords[0]);
|
double x = Double.parseDouble(onecoords[0]);
|
||||||
double y = Double.parseDouble(onecoords[1]);
|
double y = Double.parseDouble(onecoords[1]);
|
||||||
double z = Double.parseDouble(onecoords[2]);
|
double z = Double.parseDouble(onecoords[2]);
|
||||||
@ -41,7 +41,7 @@ public class FreezeListener implements Listener {
|
|||||||
String two = plugin.Playing.get(1);
|
String two = plugin.Playing.get(1);
|
||||||
if(pname==two){
|
if(pname==two){
|
||||||
Player ttwo = plugin.getServer().getPlayerExact(two);
|
Player ttwo = plugin.getServer().getPlayerExact(two);
|
||||||
String[] twocoords = plugin.config.getString("Tribute_two_spawn").split(",");
|
String[] twocoords = plugin.spawns.getString("Tribute_two_spawn").split(",");
|
||||||
double twox = Double.parseDouble(twocoords[0]);
|
double twox = Double.parseDouble(twocoords[0]);
|
||||||
double twoy = Double.parseDouble(twocoords[1]);
|
double twoy = Double.parseDouble(twocoords[1]);
|
||||||
double twoz = Double.parseDouble(twocoords[2]);
|
double twoz = Double.parseDouble(twocoords[2]);
|
||||||
@ -60,7 +60,7 @@ public class FreezeListener implements Listener {
|
|||||||
String three = plugin.Playing.get(2);
|
String three = plugin.Playing.get(2);
|
||||||
if(pname==three){
|
if(pname==three){
|
||||||
Player tthree = plugin.getServer().getPlayerExact(three);
|
Player tthree = plugin.getServer().getPlayerExact(three);
|
||||||
String[] threecoords = plugin.config.getString("Tribute_three_spawn").split(",");
|
String[] threecoords = plugin.spawns.getString("Tribute_three_spawn").split(",");
|
||||||
double threex = Double.parseDouble(threecoords[0]);
|
double threex = Double.parseDouble(threecoords[0]);
|
||||||
double threey = Double.parseDouble(threecoords[1]);
|
double threey = Double.parseDouble(threecoords[1]);
|
||||||
double threez = Double.parseDouble(threecoords[2]);
|
double threez = Double.parseDouble(threecoords[2]);
|
||||||
@ -79,7 +79,7 @@ public class FreezeListener implements Listener {
|
|||||||
String four = plugin.Playing.get(3);
|
String four = plugin.Playing.get(3);
|
||||||
if(pname==four){
|
if(pname==four){
|
||||||
Player tfour = plugin.getServer().getPlayerExact(four);
|
Player tfour = plugin.getServer().getPlayerExact(four);
|
||||||
String[] fourcoords = plugin.config.getString("Tribute_four_spawn").split(",");
|
String[] fourcoords = plugin.spawns.getString("Tribute_four_spawn").split(",");
|
||||||
double fourx = Double.parseDouble(fourcoords[0]);
|
double fourx = Double.parseDouble(fourcoords[0]);
|
||||||
double foury = Double.parseDouble(fourcoords[1]);
|
double foury = Double.parseDouble(fourcoords[1]);
|
||||||
double fourz = Double.parseDouble(fourcoords[2]);
|
double fourz = Double.parseDouble(fourcoords[2]);
|
||||||
@ -98,7 +98,7 @@ public class FreezeListener implements Listener {
|
|||||||
String five = plugin.Playing.get(4);
|
String five = plugin.Playing.get(4);
|
||||||
if(pname==five){
|
if(pname==five){
|
||||||
Player tfive = plugin.getServer().getPlayerExact(five);
|
Player tfive = plugin.getServer().getPlayerExact(five);
|
||||||
String[] fivecoords = plugin.config.getString("Tribute_five_spawn").split(",");
|
String[] fivecoords = plugin.spawns.getString("Tribute_five_spawn").split(",");
|
||||||
double fivex = Double.parseDouble(fivecoords[0]);
|
double fivex = Double.parseDouble(fivecoords[0]);
|
||||||
double fivey = Double.parseDouble(fivecoords[1]);
|
double fivey = Double.parseDouble(fivecoords[1]);
|
||||||
double fivez = Double.parseDouble(fivecoords[2]);
|
double fivez = Double.parseDouble(fivecoords[2]);
|
||||||
@ -117,7 +117,7 @@ public class FreezeListener implements Listener {
|
|||||||
String six = plugin.Playing.get(5);
|
String six = plugin.Playing.get(5);
|
||||||
if(pname==six){
|
if(pname==six){
|
||||||
Player tsix = plugin.getServer().getPlayerExact(six);
|
Player tsix = plugin.getServer().getPlayerExact(six);
|
||||||
String[] sixcoords = plugin.config.getString("Tribute_six_spawn").split(",");
|
String[] sixcoords = plugin.spawns.getString("Tribute_six_spawn").split(",");
|
||||||
double sixx = Double.parseDouble(sixcoords[0]);
|
double sixx = Double.parseDouble(sixcoords[0]);
|
||||||
double sixy = Double.parseDouble(sixcoords[1]);
|
double sixy = Double.parseDouble(sixcoords[1]);
|
||||||
double sixz = Double.parseDouble(sixcoords[2]);
|
double sixz = Double.parseDouble(sixcoords[2]);
|
||||||
@ -136,7 +136,7 @@ public class FreezeListener implements Listener {
|
|||||||
String seven = plugin.Playing.get(6);
|
String seven = plugin.Playing.get(6);
|
||||||
if(pname==seven){
|
if(pname==seven){
|
||||||
Player tseven = plugin.getServer().getPlayerExact(seven);
|
Player tseven = plugin.getServer().getPlayerExact(seven);
|
||||||
String[] sevencoords = plugin.config.getString("Tribute_seven_spawn").split(",");
|
String[] sevencoords = plugin.spawns.getString("Tribute_seven_spawn").split(",");
|
||||||
double sevenx = Double.parseDouble(sevencoords[0]);
|
double sevenx = Double.parseDouble(sevencoords[0]);
|
||||||
double seveny = Double.parseDouble(sevencoords[1]);
|
double seveny = Double.parseDouble(sevencoords[1]);
|
||||||
double sevenz = Double.parseDouble(sevencoords[2]);
|
double sevenz = Double.parseDouble(sevencoords[2]);
|
||||||
@ -155,7 +155,7 @@ public class FreezeListener implements Listener {
|
|||||||
String eight = plugin.Playing.get(7);
|
String eight = plugin.Playing.get(7);
|
||||||
if(pname==eight){
|
if(pname==eight){
|
||||||
Player teight = plugin.getServer().getPlayerExact(eight);
|
Player teight = plugin.getServer().getPlayerExact(eight);
|
||||||
String[] eightcoords = plugin.config.getString("Tribute_eight_spawn").split(",");
|
String[] eightcoords = plugin.spawns.getString("Tribute_eight_spawn").split(",");
|
||||||
double eightx = Double.parseDouble(eightcoords[0]);
|
double eightx = Double.parseDouble(eightcoords[0]);
|
||||||
double eighty = Double.parseDouble(eightcoords[1]);
|
double eighty = Double.parseDouble(eightcoords[1]);
|
||||||
double eightz = Double.parseDouble(eightcoords[2]);
|
double eightz = Double.parseDouble(eightcoords[2]);
|
||||||
@ -174,7 +174,7 @@ public class FreezeListener implements Listener {
|
|||||||
String nine = plugin.Playing.get(8);
|
String nine = plugin.Playing.get(8);
|
||||||
if(pname==nine){
|
if(pname==nine){
|
||||||
Player tnine = plugin.getServer().getPlayerExact(nine);
|
Player tnine = plugin.getServer().getPlayerExact(nine);
|
||||||
String[] ninecoords = plugin.config.getString("Tribute_nine_spawn").split(",");
|
String[] ninecoords = plugin.spawns.getString("Tribute_nine_spawn").split(",");
|
||||||
double ninex = Double.parseDouble(ninecoords[0]);
|
double ninex = Double.parseDouble(ninecoords[0]);
|
||||||
double niney = Double.parseDouble(ninecoords[1]);
|
double niney = Double.parseDouble(ninecoords[1]);
|
||||||
double ninez = Double.parseDouble(ninecoords[2]);
|
double ninez = Double.parseDouble(ninecoords[2]);
|
||||||
@ -193,7 +193,7 @@ public class FreezeListener implements Listener {
|
|||||||
String ten = plugin.Playing.get(9);
|
String ten = plugin.Playing.get(9);
|
||||||
if(pname==ten){
|
if(pname==ten){
|
||||||
Player tten = plugin.getServer().getPlayerExact(ten);
|
Player tten = plugin.getServer().getPlayerExact(ten);
|
||||||
String[] tencoords = plugin.config.getString("Tribute_ten_spawn").split(",");
|
String[] tencoords = plugin.spawns.getString("Tribute_ten_spawn").split(",");
|
||||||
double tenx = Double.parseDouble(tencoords[0]);
|
double tenx = Double.parseDouble(tencoords[0]);
|
||||||
double teny = Double.parseDouble(tencoords[1]);
|
double teny = Double.parseDouble(tencoords[1]);
|
||||||
double tenz = Double.parseDouble(tencoords[2]);
|
double tenz = Double.parseDouble(tencoords[2]);
|
||||||
@ -212,7 +212,7 @@ public class FreezeListener implements Listener {
|
|||||||
String eleven = plugin.Playing.get(10);
|
String eleven = plugin.Playing.get(10);
|
||||||
if(pname==eleven){
|
if(pname==eleven){
|
||||||
Player televen = plugin.getServer().getPlayerExact(eleven);
|
Player televen = plugin.getServer().getPlayerExact(eleven);
|
||||||
String[] elevencoords = plugin.config.getString("Tribute_eleven_spawn").split(",");
|
String[] elevencoords = plugin.spawns.getString("Tribute_eleven_spawn").split(",");
|
||||||
double elevenx = Double.parseDouble(elevencoords[0]);
|
double elevenx = Double.parseDouble(elevencoords[0]);
|
||||||
double eleveny = Double.parseDouble(elevencoords[1]);
|
double eleveny = Double.parseDouble(elevencoords[1]);
|
||||||
double elevenz = Double.parseDouble(elevencoords[2]);
|
double elevenz = Double.parseDouble(elevencoords[2]);
|
||||||
@ -231,7 +231,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twelve = plugin.Playing.get(11);
|
String twelve = plugin.Playing.get(11);
|
||||||
if(pname==twelve){
|
if(pname==twelve){
|
||||||
Player ttwelve = plugin.getServer().getPlayerExact(twelve);
|
Player ttwelve = plugin.getServer().getPlayerExact(twelve);
|
||||||
String[] twelvecoords = plugin.config.getString("Tribute_twelve_spawn").split(",");
|
String[] twelvecoords = plugin.spawns.getString("Tribute_twelve_spawn").split(",");
|
||||||
double twelvex = Double.parseDouble(twelvecoords[0]);
|
double twelvex = Double.parseDouble(twelvecoords[0]);
|
||||||
double twelvey = Double.parseDouble(twelvecoords[1]);
|
double twelvey = Double.parseDouble(twelvecoords[1]);
|
||||||
double twelvez = Double.parseDouble(twelvecoords[2]);
|
double twelvez = Double.parseDouble(twelvecoords[2]);
|
||||||
@ -250,7 +250,7 @@ public class FreezeListener implements Listener {
|
|||||||
String thirteen = plugin.Playing.get(12);
|
String thirteen = plugin.Playing.get(12);
|
||||||
if(pname==thirteen){
|
if(pname==thirteen){
|
||||||
Player tthirteen = plugin.getServer().getPlayerExact(thirteen);
|
Player tthirteen = plugin.getServer().getPlayerExact(thirteen);
|
||||||
String[] thirteencoords = plugin.config.getString("Tribute_thirteen_spawn").split(",");
|
String[] thirteencoords = plugin.spawns.getString("Tribute_thirteen_spawn").split(",");
|
||||||
double thirteenx = Double.parseDouble(thirteencoords[0]);
|
double thirteenx = Double.parseDouble(thirteencoords[0]);
|
||||||
double thirteeny = Double.parseDouble(thirteencoords[1]);
|
double thirteeny = Double.parseDouble(thirteencoords[1]);
|
||||||
double thirteenz = Double.parseDouble(thirteencoords[2]);
|
double thirteenz = Double.parseDouble(thirteencoords[2]);
|
||||||
@ -269,7 +269,7 @@ public class FreezeListener implements Listener {
|
|||||||
String fourteen = plugin.Playing.get(13);
|
String fourteen = plugin.Playing.get(13);
|
||||||
if(pname==fourteen){
|
if(pname==fourteen){
|
||||||
Player tfourteen = plugin.getServer().getPlayerExact(fourteen);
|
Player tfourteen = plugin.getServer().getPlayerExact(fourteen);
|
||||||
String[] fourteencoords = plugin.config.getString("Tribute_fourteen_spawn").split(",");
|
String[] fourteencoords = plugin.spawns.getString("Tribute_fourteen_spawn").split(",");
|
||||||
double fourteenx = Double.parseDouble(fourteencoords[0]);
|
double fourteenx = Double.parseDouble(fourteencoords[0]);
|
||||||
double fourteeny = Double.parseDouble(fourteencoords[1]);
|
double fourteeny = Double.parseDouble(fourteencoords[1]);
|
||||||
double fourteenz = Double.parseDouble(fourteencoords[2]);
|
double fourteenz = Double.parseDouble(fourteencoords[2]);
|
||||||
@ -288,7 +288,7 @@ public class FreezeListener implements Listener {
|
|||||||
String fifteen = plugin.Playing.get(14);
|
String fifteen = plugin.Playing.get(14);
|
||||||
if(pname==fifteen){
|
if(pname==fifteen){
|
||||||
Player tfifteen = plugin.getServer().getPlayerExact(fifteen);
|
Player tfifteen = plugin.getServer().getPlayerExact(fifteen);
|
||||||
String[] fifteencoords = plugin.config.getString("Tribute_fifteen_spawn").split(",");
|
String[] fifteencoords = plugin.spawns.getString("Tribute_fifteen_spawn").split(",");
|
||||||
double fifteenx = Double.parseDouble(fifteencoords[0]);
|
double fifteenx = Double.parseDouble(fifteencoords[0]);
|
||||||
double fifteeny = Double.parseDouble(fifteencoords[1]);
|
double fifteeny = Double.parseDouble(fifteencoords[1]);
|
||||||
double fifteenz = Double.parseDouble(fifteencoords[2]);
|
double fifteenz = Double.parseDouble(fifteencoords[2]);
|
||||||
@ -307,7 +307,7 @@ public class FreezeListener implements Listener {
|
|||||||
String sixteen = plugin.Playing.get(15);
|
String sixteen = plugin.Playing.get(15);
|
||||||
if(pname==sixteen){
|
if(pname==sixteen){
|
||||||
Player tsixteen = plugin.getServer().getPlayerExact(sixteen);
|
Player tsixteen = plugin.getServer().getPlayerExact(sixteen);
|
||||||
String[] sixteencoords = plugin.config.getString("Tribute_sixteen_spawn").split(",");
|
String[] sixteencoords = plugin.spawns.getString("Tribute_sixteen_spawn").split(",");
|
||||||
double sixteenx = Double.parseDouble(sixteencoords[0]);
|
double sixteenx = Double.parseDouble(sixteencoords[0]);
|
||||||
double sixteeny = Double.parseDouble(sixteencoords[1]);
|
double sixteeny = Double.parseDouble(sixteencoords[1]);
|
||||||
double sixteenz = Double.parseDouble(sixteencoords[2]);
|
double sixteenz = Double.parseDouble(sixteencoords[2]);
|
||||||
@ -326,7 +326,7 @@ public class FreezeListener implements Listener {
|
|||||||
String seventeen = plugin.Playing.get(16);
|
String seventeen = plugin.Playing.get(16);
|
||||||
if(pname==seventeen){
|
if(pname==seventeen){
|
||||||
Player tseventeen = plugin.getServer().getPlayerExact(seventeen);
|
Player tseventeen = plugin.getServer().getPlayerExact(seventeen);
|
||||||
String[] seventeencoords = plugin.config.getString("Tribute_seventeen_spawn").split(",");
|
String[] seventeencoords = plugin.spawns.getString("Tribute_seventeen_spawn").split(",");
|
||||||
double seventeenx = Double.parseDouble(seventeencoords[0]);
|
double seventeenx = Double.parseDouble(seventeencoords[0]);
|
||||||
double seventeeny = Double.parseDouble(seventeencoords[1]);
|
double seventeeny = Double.parseDouble(seventeencoords[1]);
|
||||||
double seventeenz = Double.parseDouble(seventeencoords[2]);
|
double seventeenz = Double.parseDouble(seventeencoords[2]);
|
||||||
@ -345,7 +345,7 @@ public class FreezeListener implements Listener {
|
|||||||
String eighteen = plugin.Playing.get(17);
|
String eighteen = plugin.Playing.get(17);
|
||||||
if(pname==eighteen){
|
if(pname==eighteen){
|
||||||
Player teighteen = plugin.getServer().getPlayerExact(eighteen);
|
Player teighteen = plugin.getServer().getPlayerExact(eighteen);
|
||||||
String[] eighteencoords = plugin.config.getString("Tribute_eighteen_spawn").split(",");
|
String[] eighteencoords = plugin.spawns.getString("Tribute_eighteen_spawn").split(",");
|
||||||
double eighteenx = Double.parseDouble(eighteencoords[0]);
|
double eighteenx = Double.parseDouble(eighteencoords[0]);
|
||||||
double eighteeny = Double.parseDouble(eighteencoords[1]);
|
double eighteeny = Double.parseDouble(eighteencoords[1]);
|
||||||
double eighteenz = Double.parseDouble(eighteencoords[2]);
|
double eighteenz = Double.parseDouble(eighteencoords[2]);
|
||||||
@ -364,7 +364,7 @@ public class FreezeListener implements Listener {
|
|||||||
String nineteen = plugin.Playing.get(18);
|
String nineteen = plugin.Playing.get(18);
|
||||||
if(pname==nineteen){
|
if(pname==nineteen){
|
||||||
Player tnineteen = plugin.getServer().getPlayerExact(nineteen);
|
Player tnineteen = plugin.getServer().getPlayerExact(nineteen);
|
||||||
String[] nineteencoords = plugin.config.getString("Tribute_nineteen_spawn").split(",");
|
String[] nineteencoords = plugin.spawns.getString("Tribute_nineteen_spawn").split(",");
|
||||||
double nineteenx = Double.parseDouble(nineteencoords[0]);
|
double nineteenx = Double.parseDouble(nineteencoords[0]);
|
||||||
double nineteeny = Double.parseDouble(nineteencoords[1]);
|
double nineteeny = Double.parseDouble(nineteencoords[1]);
|
||||||
double nineteenz = Double.parseDouble(nineteencoords[2]);
|
double nineteenz = Double.parseDouble(nineteencoords[2]);
|
||||||
@ -383,7 +383,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twenty = plugin.Playing.get(19);
|
String twenty = plugin.Playing.get(19);
|
||||||
if(pname==twenty){
|
if(pname==twenty){
|
||||||
Player ttwenty = plugin.getServer().getPlayerExact(twenty);
|
Player ttwenty = plugin.getServer().getPlayerExact(twenty);
|
||||||
String[] twentycoords = plugin.config.getString("Tribute_twenty_spawn").split(",");
|
String[] twentycoords = plugin.spawns.getString("Tribute_twenty_spawn").split(",");
|
||||||
double twentyx = Double.parseDouble(twentycoords[0]);
|
double twentyx = Double.parseDouble(twentycoords[0]);
|
||||||
double twentyy = Double.parseDouble(twentycoords[1]);
|
double twentyy = Double.parseDouble(twentycoords[1]);
|
||||||
double twentyz = Double.parseDouble(twentycoords[2]);
|
double twentyz = Double.parseDouble(twentycoords[2]);
|
||||||
@ -402,7 +402,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentyone = plugin.Playing.get(20);
|
String twentyone = plugin.Playing.get(20);
|
||||||
if(pname==twentyone){
|
if(pname==twentyone){
|
||||||
Player ttwentyone = plugin.getServer().getPlayerExact(twentyone);
|
Player ttwentyone = plugin.getServer().getPlayerExact(twentyone);
|
||||||
String[] twentyonecoords = plugin.config.getString("Tribute_twentyone_spawn").split(",");
|
String[] twentyonecoords = plugin.spawns.getString("Tribute_twentyone_spawn").split(",");
|
||||||
double twentyonex = Double.parseDouble(twentyonecoords[0]);
|
double twentyonex = Double.parseDouble(twentyonecoords[0]);
|
||||||
double twentyoney = Double.parseDouble(twentyonecoords[1]);
|
double twentyoney = Double.parseDouble(twentyonecoords[1]);
|
||||||
double twentyonez = Double.parseDouble(twentyonecoords[2]);
|
double twentyonez = Double.parseDouble(twentyonecoords[2]);
|
||||||
@ -421,7 +421,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentytwo = plugin.Playing.get(21);
|
String twentytwo = plugin.Playing.get(21);
|
||||||
if(pname==twentytwo){
|
if(pname==twentytwo){
|
||||||
Player ttwentytwo = plugin.getServer().getPlayerExact(twentytwo);
|
Player ttwentytwo = plugin.getServer().getPlayerExact(twentytwo);
|
||||||
String[] twentytwocoords = plugin.config.getString("Tribute_twentytwo_spawn").split(",");
|
String[] twentytwocoords = plugin.spawns.getString("Tribute_twentytwo_spawn").split(",");
|
||||||
double twentytwox = Double.parseDouble(twentytwocoords[0]);
|
double twentytwox = Double.parseDouble(twentytwocoords[0]);
|
||||||
double twentytwoy = Double.parseDouble(twentytwocoords[1]);
|
double twentytwoy = Double.parseDouble(twentytwocoords[1]);
|
||||||
double twentytwoz = Double.parseDouble(twentytwocoords[2]);
|
double twentytwoz = Double.parseDouble(twentytwocoords[2]);
|
||||||
@ -440,7 +440,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentythree = plugin.Playing.get(22);
|
String twentythree = plugin.Playing.get(22);
|
||||||
if(pname==twentythree){
|
if(pname==twentythree){
|
||||||
Player ttwentythree = plugin.getServer().getPlayerExact(twentythree);
|
Player ttwentythree = plugin.getServer().getPlayerExact(twentythree);
|
||||||
String[] twentythreecoords = plugin.config.getString("Tribute_twentythree_spawn").split(",");
|
String[] twentythreecoords = plugin.spawns.getString("Tribute_twentythree_spawn").split(",");
|
||||||
double twentythreex = Double.parseDouble(twentythreecoords[0]);
|
double twentythreex = Double.parseDouble(twentythreecoords[0]);
|
||||||
double twentythreey = Double.parseDouble(twentythreecoords[1]);
|
double twentythreey = Double.parseDouble(twentythreecoords[1]);
|
||||||
double twentythreez = Double.parseDouble(twentythreecoords[2]);
|
double twentythreez = Double.parseDouble(twentythreecoords[2]);
|
||||||
@ -459,7 +459,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentyfour = plugin.Playing.get(23);
|
String twentyfour = plugin.Playing.get(23);
|
||||||
if(pname==twentyfour){
|
if(pname==twentyfour){
|
||||||
Player ttwentyfour = plugin.getServer().getPlayerExact(twentyfour);
|
Player ttwentyfour = plugin.getServer().getPlayerExact(twentyfour);
|
||||||
String[] twentyfourcoords = plugin.config.getString("Tribute_twentyfour_spawn").split(",");
|
String[] twentyfourcoords = plugin.spawns.getString("Tribute_twentyfour_spawn").split(",");
|
||||||
double twentyfourx = Double.parseDouble(twentyfourcoords[0]);
|
double twentyfourx = Double.parseDouble(twentyfourcoords[0]);
|
||||||
double twentyfoury = Double.parseDouble(twentyfourcoords[1]);
|
double twentyfoury = Double.parseDouble(twentyfourcoords[1]);
|
||||||
double twentyfourz = Double.parseDouble(twentyfourcoords[2]);
|
double twentyfourz = Double.parseDouble(twentyfourcoords[2]);
|
||||||
@ -479,7 +479,7 @@ public class FreezeListener implements Listener {
|
|||||||
String one = plugin.Playing.get(0);
|
String one = plugin.Playing.get(0);
|
||||||
if(pname==one){
|
if(pname==one){
|
||||||
Player tone = plugin.getServer().getPlayerExact(one);
|
Player tone = plugin.getServer().getPlayerExact(one);
|
||||||
String[] onecoords = plugin.config.getString("Tribute_one_spawn").split(",");
|
String[] onecoords = plugin.spawns.getString("Tribute_one_spawn").split(",");
|
||||||
double x = Double.parseDouble(onecoords[0]);
|
double x = Double.parseDouble(onecoords[0]);
|
||||||
double y = Double.parseDouble(onecoords[1]);
|
double y = Double.parseDouble(onecoords[1]);
|
||||||
double z = Double.parseDouble(onecoords[2]);
|
double z = Double.parseDouble(onecoords[2]);
|
||||||
@ -494,7 +494,7 @@ public class FreezeListener implements Listener {
|
|||||||
String two = plugin.Playing.get(1);
|
String two = plugin.Playing.get(1);
|
||||||
if(pname==two){
|
if(pname==two){
|
||||||
Player ttwo = plugin.getServer().getPlayerExact(two);
|
Player ttwo = plugin.getServer().getPlayerExact(two);
|
||||||
String[] twocoords = plugin.config.getString("Tribute_two_spawn").split(",");
|
String[] twocoords = plugin.spawns.getString("Tribute_two_spawn").split(",");
|
||||||
double twox = Double.parseDouble(twocoords[0]);
|
double twox = Double.parseDouble(twocoords[0]);
|
||||||
double twoy = Double.parseDouble(twocoords[1]);
|
double twoy = Double.parseDouble(twocoords[1]);
|
||||||
double twoz = Double.parseDouble(twocoords[2]);
|
double twoz = Double.parseDouble(twocoords[2]);
|
||||||
@ -509,7 +509,7 @@ public class FreezeListener implements Listener {
|
|||||||
String three = plugin.Playing.get(2);
|
String three = plugin.Playing.get(2);
|
||||||
if(pname==three){
|
if(pname==three){
|
||||||
Player tthree = plugin.getServer().getPlayerExact(three);
|
Player tthree = plugin.getServer().getPlayerExact(three);
|
||||||
String[] threecoords = plugin.config.getString("Tribute_three_spawn").split(",");
|
String[] threecoords = plugin.spawns.getString("Tribute_three_spawn").split(",");
|
||||||
double threex = Double.parseDouble(threecoords[0]);
|
double threex = Double.parseDouble(threecoords[0]);
|
||||||
double threey = Double.parseDouble(threecoords[1]);
|
double threey = Double.parseDouble(threecoords[1]);
|
||||||
double threez = Double.parseDouble(threecoords[2]);
|
double threez = Double.parseDouble(threecoords[2]);
|
||||||
@ -524,7 +524,7 @@ public class FreezeListener implements Listener {
|
|||||||
String four = plugin.Playing.get(3);
|
String four = plugin.Playing.get(3);
|
||||||
if(pname==four){
|
if(pname==four){
|
||||||
Player tfour = plugin.getServer().getPlayerExact(four);
|
Player tfour = plugin.getServer().getPlayerExact(four);
|
||||||
String[] fourcoords = plugin.config.getString("Tribute_four_spawn").split(",");
|
String[] fourcoords = plugin.spawns.getString("Tribute_four_spawn").split(",");
|
||||||
double fourx = Double.parseDouble(fourcoords[0]);
|
double fourx = Double.parseDouble(fourcoords[0]);
|
||||||
double foury = Double.parseDouble(fourcoords[1]);
|
double foury = Double.parseDouble(fourcoords[1]);
|
||||||
double fourz = Double.parseDouble(fourcoords[2]);
|
double fourz = Double.parseDouble(fourcoords[2]);
|
||||||
@ -539,7 +539,7 @@ public class FreezeListener implements Listener {
|
|||||||
String five = plugin.Playing.get(4);
|
String five = plugin.Playing.get(4);
|
||||||
if(pname==five){
|
if(pname==five){
|
||||||
Player tfive = plugin.getServer().getPlayerExact(five);
|
Player tfive = plugin.getServer().getPlayerExact(five);
|
||||||
String[] fivecoords = plugin.config.getString("Tribute_five_spawn").split(",");
|
String[] fivecoords = plugin.spawns.getString("Tribute_five_spawn").split(",");
|
||||||
double fivex = Double.parseDouble(fivecoords[0]);
|
double fivex = Double.parseDouble(fivecoords[0]);
|
||||||
double fivey = Double.parseDouble(fivecoords[1]);
|
double fivey = Double.parseDouble(fivecoords[1]);
|
||||||
double fivez = Double.parseDouble(fivecoords[2]);
|
double fivez = Double.parseDouble(fivecoords[2]);
|
||||||
@ -554,7 +554,7 @@ public class FreezeListener implements Listener {
|
|||||||
String six = plugin.Playing.get(5);
|
String six = plugin.Playing.get(5);
|
||||||
if(pname==six){
|
if(pname==six){
|
||||||
Player tsix = plugin.getServer().getPlayerExact(six);
|
Player tsix = plugin.getServer().getPlayerExact(six);
|
||||||
String[] sixcoords = plugin.config.getString("Tribute_six_spawn").split(",");
|
String[] sixcoords = plugin.spawns.getString("Tribute_six_spawn").split(",");
|
||||||
double sixx = Double.parseDouble(sixcoords[0]);
|
double sixx = Double.parseDouble(sixcoords[0]);
|
||||||
double sixy = Double.parseDouble(sixcoords[1]);
|
double sixy = Double.parseDouble(sixcoords[1]);
|
||||||
double sixz = Double.parseDouble(sixcoords[2]);
|
double sixz = Double.parseDouble(sixcoords[2]);
|
||||||
@ -569,7 +569,7 @@ public class FreezeListener implements Listener {
|
|||||||
String seven = plugin.Playing.get(6);
|
String seven = plugin.Playing.get(6);
|
||||||
if(pname==seven){
|
if(pname==seven){
|
||||||
Player tseven = plugin.getServer().getPlayerExact(seven);
|
Player tseven = plugin.getServer().getPlayerExact(seven);
|
||||||
String[] sevencoords = plugin.config.getString("Tribute_seven_spawn").split(",");
|
String[] sevencoords = plugin.spawns.getString("Tribute_seven_spawn").split(",");
|
||||||
double sevenx = Double.parseDouble(sevencoords[0]);
|
double sevenx = Double.parseDouble(sevencoords[0]);
|
||||||
double seveny = Double.parseDouble(sevencoords[1]);
|
double seveny = Double.parseDouble(sevencoords[1]);
|
||||||
double sevenz = Double.parseDouble(sevencoords[2]);
|
double sevenz = Double.parseDouble(sevencoords[2]);
|
||||||
@ -584,7 +584,7 @@ public class FreezeListener implements Listener {
|
|||||||
String eight = plugin.Playing.get(7);
|
String eight = plugin.Playing.get(7);
|
||||||
if(pname==eight){
|
if(pname==eight){
|
||||||
Player teight = plugin.getServer().getPlayerExact(eight);
|
Player teight = plugin.getServer().getPlayerExact(eight);
|
||||||
String[] eightcoords = plugin.config.getString("Tribute_eight_spawn").split(",");
|
String[] eightcoords = plugin.spawns.getString("Tribute_eight_spawn").split(",");
|
||||||
double eightx = Double.parseDouble(eightcoords[0]);
|
double eightx = Double.parseDouble(eightcoords[0]);
|
||||||
double eighty = Double.parseDouble(eightcoords[1]);
|
double eighty = Double.parseDouble(eightcoords[1]);
|
||||||
double eightz = Double.parseDouble(eightcoords[2]);
|
double eightz = Double.parseDouble(eightcoords[2]);
|
||||||
@ -599,7 +599,7 @@ public class FreezeListener implements Listener {
|
|||||||
String nine = plugin.Playing.get(8);
|
String nine = plugin.Playing.get(8);
|
||||||
if(pname==nine){
|
if(pname==nine){
|
||||||
Player tnine = plugin.getServer().getPlayerExact(nine);
|
Player tnine = plugin.getServer().getPlayerExact(nine);
|
||||||
String[] ninecoords = plugin.config.getString("Tribute_nine_spawn").split(",");
|
String[] ninecoords = plugin.spawns.getString("Tribute_nine_spawn").split(",");
|
||||||
double ninex = Double.parseDouble(ninecoords[0]);
|
double ninex = Double.parseDouble(ninecoords[0]);
|
||||||
double niney = Double.parseDouble(ninecoords[1]);
|
double niney = Double.parseDouble(ninecoords[1]);
|
||||||
double ninez = Double.parseDouble(ninecoords[2]);
|
double ninez = Double.parseDouble(ninecoords[2]);
|
||||||
@ -614,7 +614,7 @@ public class FreezeListener implements Listener {
|
|||||||
String ten = plugin.Playing.get(9);
|
String ten = plugin.Playing.get(9);
|
||||||
if(pname==ten){
|
if(pname==ten){
|
||||||
Player tten = plugin.getServer().getPlayerExact(ten);
|
Player tten = plugin.getServer().getPlayerExact(ten);
|
||||||
String[] tencoords = plugin.config.getString("Tribute_ten_spawn").split(",");
|
String[] tencoords = plugin.spawns.getString("Tribute_ten_spawn").split(",");
|
||||||
double tenx = Double.parseDouble(tencoords[0]);
|
double tenx = Double.parseDouble(tencoords[0]);
|
||||||
double teny = Double.parseDouble(tencoords[1]);
|
double teny = Double.parseDouble(tencoords[1]);
|
||||||
double tenz = Double.parseDouble(tencoords[2]);
|
double tenz = Double.parseDouble(tencoords[2]);
|
||||||
@ -629,7 +629,7 @@ public class FreezeListener implements Listener {
|
|||||||
String eleven = plugin.Playing.get(10);
|
String eleven = plugin.Playing.get(10);
|
||||||
if(pname==eleven){
|
if(pname==eleven){
|
||||||
Player televen = plugin.getServer().getPlayerExact(eleven);
|
Player televen = plugin.getServer().getPlayerExact(eleven);
|
||||||
String[] elevencoords = plugin.config.getString("Tribute_eleven_spawn").split(",");
|
String[] elevencoords = plugin.spawns.getString("Tribute_eleven_spawn").split(",");
|
||||||
double elevenx = Double.parseDouble(elevencoords[0]);
|
double elevenx = Double.parseDouble(elevencoords[0]);
|
||||||
double eleveny = Double.parseDouble(elevencoords[1]);
|
double eleveny = Double.parseDouble(elevencoords[1]);
|
||||||
double elevenz = Double.parseDouble(elevencoords[2]);
|
double elevenz = Double.parseDouble(elevencoords[2]);
|
||||||
@ -644,7 +644,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twelve = plugin.Playing.get(11);
|
String twelve = plugin.Playing.get(11);
|
||||||
if(pname==twelve){
|
if(pname==twelve){
|
||||||
Player ttwelve = plugin.getServer().getPlayerExact(twelve);
|
Player ttwelve = plugin.getServer().getPlayerExact(twelve);
|
||||||
String[] twelvecoords = plugin.config.getString("Tribute_twelve_spawn").split(",");
|
String[] twelvecoords = plugin.spawns.getString("Tribute_twelve_spawn").split(",");
|
||||||
double twelvex = Double.parseDouble(twelvecoords[0]);
|
double twelvex = Double.parseDouble(twelvecoords[0]);
|
||||||
double twelvey = Double.parseDouble(twelvecoords[1]);
|
double twelvey = Double.parseDouble(twelvecoords[1]);
|
||||||
double twelvez = Double.parseDouble(twelvecoords[2]);
|
double twelvez = Double.parseDouble(twelvecoords[2]);
|
||||||
@ -659,7 +659,7 @@ public class FreezeListener implements Listener {
|
|||||||
String thirteen = plugin.Playing.get(12);
|
String thirteen = plugin.Playing.get(12);
|
||||||
if(pname==thirteen){
|
if(pname==thirteen){
|
||||||
Player tthirteen = plugin.getServer().getPlayerExact(thirteen);
|
Player tthirteen = plugin.getServer().getPlayerExact(thirteen);
|
||||||
String[] thirteencoords = plugin.config.getString("Tribute_thirteen_spawn").split(",");
|
String[] thirteencoords = plugin.spawns.getString("Tribute_thirteen_spawn").split(",");
|
||||||
double thirteenx = Double.parseDouble(thirteencoords[0]);
|
double thirteenx = Double.parseDouble(thirteencoords[0]);
|
||||||
double thirteeny = Double.parseDouble(thirteencoords[1]);
|
double thirteeny = Double.parseDouble(thirteencoords[1]);
|
||||||
double thirteenz = Double.parseDouble(thirteencoords[2]);
|
double thirteenz = Double.parseDouble(thirteencoords[2]);
|
||||||
@ -674,7 +674,7 @@ public class FreezeListener implements Listener {
|
|||||||
String fourteen = plugin.Playing.get(13);
|
String fourteen = plugin.Playing.get(13);
|
||||||
if(pname==fourteen){
|
if(pname==fourteen){
|
||||||
Player tfourteen = plugin.getServer().getPlayerExact(fourteen);
|
Player tfourteen = plugin.getServer().getPlayerExact(fourteen);
|
||||||
String[] fourteencoords = plugin.config.getString("Tribute_fourteen_spawn").split(",");
|
String[] fourteencoords = plugin.spawns.getString("Tribute_fourteen_spawn").split(",");
|
||||||
double fourteenx = Double.parseDouble(fourteencoords[0]);
|
double fourteenx = Double.parseDouble(fourteencoords[0]);
|
||||||
double fourteeny = Double.parseDouble(fourteencoords[1]);
|
double fourteeny = Double.parseDouble(fourteencoords[1]);
|
||||||
double fourteenz = Double.parseDouble(fourteencoords[2]);
|
double fourteenz = Double.parseDouble(fourteencoords[2]);
|
||||||
@ -689,7 +689,7 @@ public class FreezeListener implements Listener {
|
|||||||
String fifteen = plugin.Playing.get(14);
|
String fifteen = plugin.Playing.get(14);
|
||||||
if(pname==fifteen){
|
if(pname==fifteen){
|
||||||
Player tfifteen = plugin.getServer().getPlayerExact(fifteen);
|
Player tfifteen = plugin.getServer().getPlayerExact(fifteen);
|
||||||
String[] fifteencoords = plugin.config.getString("Tribute_fifteen_spawn").split(",");
|
String[] fifteencoords = plugin.spawns.getString("Tribute_fifteen_spawn").split(",");
|
||||||
double fifteenx = Double.parseDouble(fifteencoords[0]);
|
double fifteenx = Double.parseDouble(fifteencoords[0]);
|
||||||
double fifteeny = Double.parseDouble(fifteencoords[1]);
|
double fifteeny = Double.parseDouble(fifteencoords[1]);
|
||||||
double fifteenz = Double.parseDouble(fifteencoords[2]);
|
double fifteenz = Double.parseDouble(fifteencoords[2]);
|
||||||
@ -704,7 +704,7 @@ public class FreezeListener implements Listener {
|
|||||||
String sixteen = plugin.Playing.get(15);
|
String sixteen = plugin.Playing.get(15);
|
||||||
if(pname==sixteen){
|
if(pname==sixteen){
|
||||||
Player tsixteen = plugin.getServer().getPlayerExact(sixteen);
|
Player tsixteen = plugin.getServer().getPlayerExact(sixteen);
|
||||||
String[] sixteencoords = plugin.config.getString("Tribute_sixteen_spawn").split(",");
|
String[] sixteencoords = plugin.spawns.getString("Tribute_sixteen_spawn").split(",");
|
||||||
double sixteenx = Double.parseDouble(sixteencoords[0]);
|
double sixteenx = Double.parseDouble(sixteencoords[0]);
|
||||||
double sixteeny = Double.parseDouble(sixteencoords[1]);
|
double sixteeny = Double.parseDouble(sixteencoords[1]);
|
||||||
double sixteenz = Double.parseDouble(sixteencoords[2]);
|
double sixteenz = Double.parseDouble(sixteencoords[2]);
|
||||||
@ -719,7 +719,7 @@ public class FreezeListener implements Listener {
|
|||||||
String seventeen = plugin.Playing.get(16);
|
String seventeen = plugin.Playing.get(16);
|
||||||
if(pname==seventeen){
|
if(pname==seventeen){
|
||||||
Player tseventeen = plugin.getServer().getPlayerExact(seventeen);
|
Player tseventeen = plugin.getServer().getPlayerExact(seventeen);
|
||||||
String[] seventeencoords = plugin.config.getString("Tribute_seventeen_spawn").split(",");
|
String[] seventeencoords = plugin.spawns.getString("Tribute_seventeen_spawn").split(",");
|
||||||
double seventeenx = Double.parseDouble(seventeencoords[0]);
|
double seventeenx = Double.parseDouble(seventeencoords[0]);
|
||||||
double seventeeny = Double.parseDouble(seventeencoords[1]);
|
double seventeeny = Double.parseDouble(seventeencoords[1]);
|
||||||
double seventeenz = Double.parseDouble(seventeencoords[2]);
|
double seventeenz = Double.parseDouble(seventeencoords[2]);
|
||||||
@ -734,7 +734,7 @@ public class FreezeListener implements Listener {
|
|||||||
String eighteen = plugin.Playing.get(17);
|
String eighteen = plugin.Playing.get(17);
|
||||||
if(pname==eighteen){
|
if(pname==eighteen){
|
||||||
Player teighteen = plugin.getServer().getPlayerExact(eighteen);
|
Player teighteen = plugin.getServer().getPlayerExact(eighteen);
|
||||||
String[] eighteencoords = plugin.config.getString("Tribute_eighteen_spawn").split(",");
|
String[] eighteencoords = plugin.spawns.getString("Tribute_eighteen_spawn").split(",");
|
||||||
double eighteenx = Double.parseDouble(eighteencoords[0]);
|
double eighteenx = Double.parseDouble(eighteencoords[0]);
|
||||||
double eighteeny = Double.parseDouble(eighteencoords[1]);
|
double eighteeny = Double.parseDouble(eighteencoords[1]);
|
||||||
double eighteenz = Double.parseDouble(eighteencoords[2]);
|
double eighteenz = Double.parseDouble(eighteencoords[2]);
|
||||||
@ -749,7 +749,7 @@ public class FreezeListener implements Listener {
|
|||||||
String nineteen = plugin.Playing.get(18);
|
String nineteen = plugin.Playing.get(18);
|
||||||
if(pname==nineteen){
|
if(pname==nineteen){
|
||||||
Player tnineteen = plugin.getServer().getPlayerExact(nineteen);
|
Player tnineteen = plugin.getServer().getPlayerExact(nineteen);
|
||||||
String[] nineteencoords = plugin.config.getString("Tribute_nineteen_spawn").split(",");
|
String[] nineteencoords = plugin.spawns.getString("Tribute_nineteen_spawn").split(",");
|
||||||
double nineteenx = Double.parseDouble(nineteencoords[0]);
|
double nineteenx = Double.parseDouble(nineteencoords[0]);
|
||||||
double nineteeny = Double.parseDouble(nineteencoords[1]);
|
double nineteeny = Double.parseDouble(nineteencoords[1]);
|
||||||
double nineteenz = Double.parseDouble(nineteencoords[2]);
|
double nineteenz = Double.parseDouble(nineteencoords[2]);
|
||||||
@ -764,7 +764,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twenty = plugin.Playing.get(19);
|
String twenty = plugin.Playing.get(19);
|
||||||
if(pname==twenty){
|
if(pname==twenty){
|
||||||
Player ttwenty = plugin.getServer().getPlayerExact(twenty);
|
Player ttwenty = plugin.getServer().getPlayerExact(twenty);
|
||||||
String[] twentycoords = plugin.config.getString("Tribute_twenty_spawn").split(",");
|
String[] twentycoords = plugin.spawns.getString("Tribute_twenty_spawn").split(",");
|
||||||
double twentyx = Double.parseDouble(twentycoords[0]);
|
double twentyx = Double.parseDouble(twentycoords[0]);
|
||||||
double twentyy = Double.parseDouble(twentycoords[1]);
|
double twentyy = Double.parseDouble(twentycoords[1]);
|
||||||
double twentyz = Double.parseDouble(twentycoords[2]);
|
double twentyz = Double.parseDouble(twentycoords[2]);
|
||||||
@ -779,7 +779,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentyone = plugin.Playing.get(20);
|
String twentyone = plugin.Playing.get(20);
|
||||||
if(pname==twentyone){
|
if(pname==twentyone){
|
||||||
Player ttwentyone = plugin.getServer().getPlayerExact(twentyone);
|
Player ttwentyone = plugin.getServer().getPlayerExact(twentyone);
|
||||||
String[] twentyonecoords = plugin.config.getString("Tribute_twentyone_spawn").split(",");
|
String[] twentyonecoords = plugin.spawns.getString("Tribute_twentyone_spawn").split(",");
|
||||||
double twentyonex = Double.parseDouble(twentyonecoords[0]);
|
double twentyonex = Double.parseDouble(twentyonecoords[0]);
|
||||||
double twentyoney = Double.parseDouble(twentyonecoords[1]);
|
double twentyoney = Double.parseDouble(twentyonecoords[1]);
|
||||||
double twentyonez = Double.parseDouble(twentyonecoords[2]);
|
double twentyonez = Double.parseDouble(twentyonecoords[2]);
|
||||||
@ -794,7 +794,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentytwo = plugin.Playing.get(21);
|
String twentytwo = plugin.Playing.get(21);
|
||||||
if(pname==twentytwo){
|
if(pname==twentytwo){
|
||||||
Player ttwentytwo = plugin.getServer().getPlayerExact(twentytwo);
|
Player ttwentytwo = plugin.getServer().getPlayerExact(twentytwo);
|
||||||
String[] twentytwocoords = plugin.config.getString("Tribute_twentytwo_spawn").split(",");
|
String[] twentytwocoords = plugin.spawns.getString("Tribute_twentytwo_spawn").split(",");
|
||||||
double twentytwox = Double.parseDouble(twentytwocoords[0]);
|
double twentytwox = Double.parseDouble(twentytwocoords[0]);
|
||||||
double twentytwoy = Double.parseDouble(twentytwocoords[1]);
|
double twentytwoy = Double.parseDouble(twentytwocoords[1]);
|
||||||
double twentytwoz = Double.parseDouble(twentytwocoords[2]);
|
double twentytwoz = Double.parseDouble(twentytwocoords[2]);
|
||||||
@ -809,7 +809,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentythree = plugin.Playing.get(22);
|
String twentythree = plugin.Playing.get(22);
|
||||||
if(pname==twentythree){
|
if(pname==twentythree){
|
||||||
Player ttwentythree = plugin.getServer().getPlayerExact(twentythree);
|
Player ttwentythree = plugin.getServer().getPlayerExact(twentythree);
|
||||||
String[] twentythreecoords = plugin.config.getString("Tribute_twentythree_spawn").split(",");
|
String[] twentythreecoords = plugin.spawns.getString("Tribute_twentythree_spawn").split(",");
|
||||||
double twentythreex = Double.parseDouble(twentythreecoords[0]);
|
double twentythreex = Double.parseDouble(twentythreecoords[0]);
|
||||||
double twentythreey = Double.parseDouble(twentythreecoords[1]);
|
double twentythreey = Double.parseDouble(twentythreecoords[1]);
|
||||||
double twentythreez = Double.parseDouble(twentythreecoords[2]);
|
double twentythreez = Double.parseDouble(twentythreecoords[2]);
|
||||||
@ -824,7 +824,7 @@ public class FreezeListener implements Listener {
|
|||||||
String twentyfour = plugin.Playing.get(23);
|
String twentyfour = plugin.Playing.get(23);
|
||||||
if(pname==twentyfour){
|
if(pname==twentyfour){
|
||||||
Player ttwentyfour = plugin.getServer().getPlayerExact(twentyfour);
|
Player ttwentyfour = plugin.getServer().getPlayerExact(twentyfour);
|
||||||
String[] twentyfourcoords = plugin.config.getString("Tribute_twentyfour_spawn").split(",");
|
String[] twentyfourcoords = plugin.spawns.getString("Tribute_twentyfour_spawn").split(",");
|
||||||
double twentyfourx = Double.parseDouble(twentyfourcoords[0]);
|
double twentyfourx = Double.parseDouble(twentyfourcoords[0]);
|
||||||
double twentyfoury = Double.parseDouble(twentyfourcoords[1]);
|
double twentyfoury = Double.parseDouble(twentyfourcoords[1]);
|
||||||
double twentyfourz = Double.parseDouble(twentyfourcoords[2]);
|
double twentyfourz = Double.parseDouble(twentyfourcoords[2]);
|
||||||
|
@ -20,10 +20,10 @@ public class HaCommands implements CommandExecutor {
|
|||||||
this.plugin = m;
|
this.plugin = m;
|
||||||
}
|
}
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "deprecation" })
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(final CommandSender sender, Command cmd, String commandLabel, String[] args){
|
public boolean onCommand(final CommandSender sender, Command cmd, String commandLabel, String[] args){
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
double spawny = Double.parseDouble(Spawncoords[1]);
|
double spawny = Double.parseDouble(Spawncoords[1]);
|
||||||
double spawnz = Double.parseDouble(Spawncoords[2]);
|
double spawnz = Double.parseDouble(Spawncoords[2]);
|
||||||
@ -62,6 +62,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
sender.sendMessage(c + "/ha rlist - See who's ready!");
|
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(c + "/startpoint [1,2,3,4,etc] - Sets the starting points of tributes!");
|
||||||
sender.sendMessage(ChatColor.GREEN + "----------------------");
|
sender.sendMessage(ChatColor.GREEN + "----------------------");
|
||||||
|
//////////////////////////////////////// LISTING ///////////////////////////////////////////////
|
||||||
}else if(args[0].equalsIgnoreCase("List")){
|
}else if(args[0].equalsIgnoreCase("List")){
|
||||||
if(p.hasPermission("HungerArena.GameMaker")){
|
if(p.hasPermission("HungerArena.GameMaker")){
|
||||||
sender.sendMessage(ChatColor.AQUA + "-----People Playing-----");
|
sender.sendMessage(ChatColor.AQUA + "-----People Playing-----");
|
||||||
@ -92,19 +93,21 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}else{
|
}else{
|
||||||
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
}
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
}else if(args[0].equalsIgnoreCase("SetSpawn")){
|
}else if(args[0].equalsIgnoreCase("SetSpawn")){
|
||||||
if(p.hasPermission("HungerArena.SetSpawn")){
|
if(p.hasPermission("HungerArena.SetSpawn")){
|
||||||
double x = p.getLocation().getX();
|
double x = p.getLocation().getX();
|
||||||
double y = p.getLocation().getY();
|
double y = p.getLocation().getY();
|
||||||
double z = p.getLocation().getZ();
|
double z = p.getLocation().getZ();
|
||||||
String w = p.getWorld().getName();
|
String w = p.getWorld().getName();
|
||||||
plugin.config.set("Spawn_coords", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Spawn_coords", x + "," + y + "," + z + "," + w);
|
||||||
plugin.config.set("Spawns_set", "true");
|
plugin.spawns.set("Spawns_set", "true");
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn for dead tributes!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn for dead tributes!");
|
||||||
}else{
|
}else{
|
||||||
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
}
|
}
|
||||||
|
///////////////////////////////////// JOINING/LEAVING ////////////////////////////////////////////////////
|
||||||
}else if(args[0].equalsIgnoreCase("Join")){
|
}else if(args[0].equalsIgnoreCase("Join")){
|
||||||
if(p.hasPermission("HungerArena.Join")){
|
if(p.hasPermission("HungerArena.Join")){
|
||||||
if(plugin.Playing.contains(pname)){
|
if(plugin.Playing.contains(pname)){
|
||||||
@ -115,7 +118,9 @@ public class HaCommands implements CommandExecutor {
|
|||||||
p.sendMessage(ChatColor.RED + "There are already 24 Tributes!");
|
p.sendMessage(ChatColor.RED + "There are already 24 Tributes!");
|
||||||
}else if(plugin.canjoin== true){
|
}else if(plugin.canjoin== true){
|
||||||
p.sendMessage(ChatColor.RED + "The game is in progress!");
|
p.sendMessage(ChatColor.RED + "The game is in progress!");
|
||||||
}else if(plugin.config.getString("Spawns_set").equalsIgnoreCase("false")){
|
}else if(!plugin.open){
|
||||||
|
p.sendMessage(ChatColor.RED + "The game is closed!");
|
||||||
|
}else if(plugin.spawns.getString("Spawns_set").equalsIgnoreCase("false")){
|
||||||
p.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!");
|
p.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!");
|
||||||
}else if(plugin.NeedConfirm.contains(pname)){
|
}else if(plugin.NeedConfirm.contains(pname)){
|
||||||
p.sendMessage(ChatColor.RED + "You need to do /ha confirm");
|
p.sendMessage(ChatColor.RED + "You need to do /ha confirm");
|
||||||
@ -129,9 +134,10 @@ public class HaCommands implements CommandExecutor {
|
|||||||
p.getInventory().setChestplate(null);
|
p.getInventory().setChestplate(null);
|
||||||
p.getInventory().setHelmet(null);
|
p.getInventory().setHelmet(null);
|
||||||
p.getInventory().setLeggings(null);
|
p.getInventory().setLeggings(null);
|
||||||
|
p.updateInventory();
|
||||||
plugin.getServer().broadcastMessage(ChatColor.AQUA + pname + " has Joined the Game!");
|
plugin.getServer().broadcastMessage(ChatColor.AQUA + pname + " has Joined the Game!");
|
||||||
if(plugin.Playing.size()== 24){
|
if(plugin.Playing.size()== 24){
|
||||||
p.performCommand("ha warpall");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha warpall");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@ -147,6 +153,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
p.getInventory().setChestplate(null);
|
p.getInventory().setChestplate(null);
|
||||||
p.getInventory().setHelmet(null);
|
p.getInventory().setHelmet(null);
|
||||||
p.getInventory().setLeggings(null);
|
p.getInventory().setLeggings(null);
|
||||||
|
p.updateInventory();
|
||||||
plugin.getServer().broadcastMessage(ChatColor.AQUA + pname + " has Joined the Game!");
|
plugin.getServer().broadcastMessage(ChatColor.AQUA + pname + " has Joined the Game!");
|
||||||
if(plugin.Playing.size()== 24){
|
if(plugin.Playing.size()== 24){
|
||||||
p.performCommand("ha warpall");
|
p.performCommand("ha warpall");
|
||||||
@ -200,6 +207,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1){
|
||||||
//Announce the Winner
|
//Announce the Winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -212,8 +220,10 @@ public class HaCommands implements CommandExecutor {
|
|||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
|
||||||
|
}
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
//Show spectators
|
//Show spectators
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -221,11 +231,13 @@ public class HaCommands implements CommandExecutor {
|
|||||||
for(Player online:plugin.getServer().getOnlinePlayers()){
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
}else if(args[0].equalsIgnoreCase("Watch")){
|
}else if(args[0].equalsIgnoreCase("Watch")){
|
||||||
if(sender.hasPermission("HungerArena.Watch")){
|
if(sender.hasPermission("HungerArena.Watch")){
|
||||||
if(!plugin.Watching.contains(pname) && !plugin.Playing.contains(pname) && plugin.canjoin== true){
|
if(!plugin.Watching.contains(pname) && !plugin.Playing.contains(pname) && plugin.canjoin== true){
|
||||||
@ -268,6 +280,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
target.getInventory().setLeggings(null);
|
target.getInventory().setLeggings(null);
|
||||||
plugin.Quit.add(target.getName());
|
plugin.Quit.add(target.getName());
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -280,8 +293,10 @@ public class HaCommands implements CommandExecutor {
|
|||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
|
||||||
|
}
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -290,6 +305,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
@ -337,6 +353,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}else if(args[0].equalsIgnoreCase("Restart")){
|
}else if(args[0].equalsIgnoreCase("Restart")){
|
||||||
if(p.hasPermission("HungerArena.Restart")){
|
if(p.hasPermission("HungerArena.Restart")){
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -345,6 +362,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
plugin.Dead.clear();
|
plugin.Dead.clear();
|
||||||
plugin.Quit.clear();
|
plugin.Quit.clear();
|
||||||
plugin.Watching.clear();
|
plugin.Watching.clear();
|
||||||
@ -359,20 +377,70 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}else{
|
}else{
|
||||||
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
}
|
}
|
||||||
|
/////////////////////////////////// Toggle //////////////////////////////////////////////////
|
||||||
|
}else if(args[0].equalsIgnoreCase("close")){
|
||||||
|
if(p.hasPermission("HungerArena.toggle")){
|
||||||
|
if(plugin.open){
|
||||||
|
plugin.open = false;
|
||||||
|
for(String players: plugin.Playing){
|
||||||
|
Player tributes = plugin.getServer().getPlayerExact(players);
|
||||||
|
tributes.teleport(tributes.getWorld().getSpawnLocation());
|
||||||
|
tributes.getInventory().clear();
|
||||||
|
tributes.getInventory().setBoots(null);
|
||||||
|
tributes.getInventory().setChestplate(null);
|
||||||
|
tributes.getInventory().setHelmet(null);
|
||||||
|
tributes.getInventory().setLeggings(null);
|
||||||
|
}
|
||||||
|
for(String sname: plugin.Watching){
|
||||||
|
Player spectators = plugin.getServer().getPlayerExact(sname);
|
||||||
|
spectators.teleport(spectators.getWorld().getSpawnLocation());
|
||||||
|
spectators.setAllowFlight(false);
|
||||||
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
|
online.showPlayer(spectators);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugin.Dead.clear();
|
||||||
|
plugin.Quit.clear();
|
||||||
|
plugin.Watching.clear();
|
||||||
|
plugin.Frozen.clear();
|
||||||
|
plugin.Ready.clear();
|
||||||
|
plugin.NeedConfirm.clear();
|
||||||
|
plugin.Out.clear();
|
||||||
|
plugin.Playing.clear();
|
||||||
|
p.performCommand("ha refill");
|
||||||
|
p.sendMessage(ChatColor.GOLD + "Games Closed!");
|
||||||
|
}else{
|
||||||
|
p.sendMessage(ChatColor.RED + "Games alredy close, type /ha open to re-open them!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
p.sendMessage(ChatColor.RED + "No Perms!");
|
||||||
|
}
|
||||||
|
}else if(args[0].equalsIgnoreCase("open")){
|
||||||
|
if(p.hasPermission("HungerArena.toggle")){
|
||||||
|
if(!plugin.open){
|
||||||
|
plugin.open = true;
|
||||||
|
p.sendMessage(ChatColor.GOLD + "Games Opened!!");
|
||||||
|
}else{
|
||||||
|
p.sendMessage(ChatColor.RED + "Games already open, type /ha close to close them!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
p.sendMessage(ChatColor.RED + "No Perms!");
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
}else if(args[0].equalsIgnoreCase("Reload")){
|
}else if(args[0].equalsIgnoreCase("Reload")){
|
||||||
plugin.reloadConfig();
|
plugin.reloadConfig();
|
||||||
p.sendMessage(ChatColor.AQUA + "HungerArena Reloaded!");
|
p.sendMessage(ChatColor.AQUA + "HungerArena Reloaded!");
|
||||||
}else if(args[0].equalsIgnoreCase("WarpAll")){
|
}else if(args[0].equalsIgnoreCase("WarpAll")){
|
||||||
if(p.hasPermission("HungerArena.Warpall")){
|
if(p.hasPermission("HungerArena.Warpall")){
|
||||||
if(plugin.config.getString("Spawns_set").equalsIgnoreCase("false")){
|
if(plugin.spawns.getString("Spawns_set").equalsIgnoreCase("false")){
|
||||||
sender.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!");
|
sender.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!");
|
||||||
}else{
|
}else{
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1){
|
||||||
sender.sendMessage(ChatColor.RED + "There are not enough players!");
|
sender.sendMessage(ChatColor.RED + "There are not enough players!");
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 2){
|
if(plugin.Playing.size()>= 2){
|
||||||
plugin.config.getString("Tribute_one_spawn");
|
plugin.spawns.getString("Tribute_one_spawn");
|
||||||
String[] onecoords = plugin.config.getString("Tribute_one_spawn").split(",");
|
String[] onecoords = plugin.spawns.getString("Tribute_one_spawn").split(",");
|
||||||
Player Tribute_one = plugin.getServer().getPlayerExact(plugin.Playing.get(0));
|
Player Tribute_one = plugin.getServer().getPlayerExact(plugin.Playing.get(0));
|
||||||
double x = Double.parseDouble(onecoords[0]);
|
double x = Double.parseDouble(onecoords[0]);
|
||||||
double y = Double.parseDouble(onecoords[1]);
|
double y = Double.parseDouble(onecoords[1]);
|
||||||
@ -383,8 +451,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_one.teleport(oneloc);
|
Tribute_one.teleport(oneloc);
|
||||||
plugin.Frozen.add(Tribute_one.getName());
|
plugin.Frozen.add(Tribute_one.getName());
|
||||||
Tribute_one.setFoodLevel(20);
|
Tribute_one.setFoodLevel(20);
|
||||||
plugin.config.getString("Tribute_two_spawn");
|
plugin.spawns.getString("Tribute_two_spawn");
|
||||||
String[] twocoords = plugin.config.getString("Tribute_two_spawn").split(",");
|
String[] twocoords = plugin.spawns.getString("Tribute_two_spawn").split(",");
|
||||||
Player Tribute_two = plugin.getServer().getPlayerExact(plugin.Playing.get(1));
|
Player Tribute_two = plugin.getServer().getPlayerExact(plugin.Playing.get(1));
|
||||||
double twox = Double.parseDouble(twocoords[0]);
|
double twox = Double.parseDouble(twocoords[0]);
|
||||||
double twoy = Double.parseDouble(twocoords[1]);
|
double twoy = Double.parseDouble(twocoords[1]);
|
||||||
@ -410,8 +478,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}, 20L);
|
}, 20L);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 3){
|
if(plugin.Playing.size()>= 3){
|
||||||
plugin.config.getString("Tribute_three_spawn");
|
plugin.spawns.getString("Tribute_three_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_three_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_three_spawn").split(",");
|
||||||
Player Tribute_three = plugin.getServer().getPlayerExact(plugin.Playing.get(2));
|
Player Tribute_three = plugin.getServer().getPlayerExact(plugin.Playing.get(2));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -424,8 +492,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_three.setFoodLevel(20);
|
Tribute_three.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 4){
|
if(plugin.Playing.size()>= 4){
|
||||||
plugin.config.getString("Tribute_four_spawn");
|
plugin.spawns.getString("Tribute_four_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_four_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_four_spawn").split(",");
|
||||||
Player Tribute_four = plugin.getServer().getPlayerExact(plugin.Playing.get(3));
|
Player Tribute_four = plugin.getServer().getPlayerExact(plugin.Playing.get(3));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -438,8 +506,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_four.setFoodLevel(20);
|
Tribute_four.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 5){
|
if(plugin.Playing.size()>= 5){
|
||||||
plugin.config.getString("Tribute_five_spawn");
|
plugin.spawns.getString("Tribute_five_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_five_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_five_spawn").split(",");
|
||||||
Player Tribute_five = plugin.getServer().getPlayerExact(plugin.Playing.get(4));
|
Player Tribute_five = plugin.getServer().getPlayerExact(plugin.Playing.get(4));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -452,8 +520,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_five.setFoodLevel(20);
|
Tribute_five.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 6){
|
if(plugin.Playing.size()>= 6){
|
||||||
plugin.config.getString("Tribute_six_spawn");
|
plugin.spawns.getString("Tribute_six_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_six_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_six_spawn").split(",");
|
||||||
Player Tribute_six = plugin.getServer().getPlayerExact(plugin.Playing.get(5));
|
Player Tribute_six = plugin.getServer().getPlayerExact(plugin.Playing.get(5));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -466,8 +534,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_six.setFoodLevel(20);
|
Tribute_six.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 7){
|
if(plugin.Playing.size()>= 7){
|
||||||
plugin.config.getString("Tribute_seven_spawn");
|
plugin.spawns.getString("Tribute_seven_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_seven_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_seven_spawn").split(",");
|
||||||
Player Tribute_seven = plugin.getServer().getPlayerExact(plugin.Playing.get(6));
|
Player Tribute_seven = plugin.getServer().getPlayerExact(plugin.Playing.get(6));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -480,8 +548,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_seven.setFoodLevel(20);
|
Tribute_seven.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 8){
|
if(plugin.Playing.size()>= 8){
|
||||||
plugin.config.getString("Tribute_eight_spawn");
|
plugin.spawns.getString("Tribute_eight_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_eight_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_eight_spawn").split(",");
|
||||||
Player Tribute_eight = plugin.getServer().getPlayerExact(plugin.Playing.get(7));
|
Player Tribute_eight = plugin.getServer().getPlayerExact(plugin.Playing.get(7));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -494,8 +562,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_eight.setFoodLevel(20);
|
Tribute_eight.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 9){
|
if(plugin.Playing.size()>= 9){
|
||||||
plugin.config.getString("Tribute_nine_spawn");
|
plugin.spawns.getString("Tribute_nine_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_nine_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_nine_spawn").split(",");
|
||||||
Player Tribute_nine = plugin.getServer().getPlayerExact(plugin.Playing.get(8));
|
Player Tribute_nine = plugin.getServer().getPlayerExact(plugin.Playing.get(8));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -508,8 +576,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_nine.setFoodLevel(20);
|
Tribute_nine.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 10){
|
if(plugin.Playing.size()>= 10){
|
||||||
plugin.config.getString("Tribute_ten_spawn");
|
plugin.spawns.getString("Tribute_ten_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_ten_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_ten_spawn").split(",");
|
||||||
Player Tribute_ten = plugin.getServer().getPlayerExact(plugin.Playing.get(9));
|
Player Tribute_ten = plugin.getServer().getPlayerExact(plugin.Playing.get(9));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -522,8 +590,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_ten.setFoodLevel(20);
|
Tribute_ten.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 11){
|
if(plugin.Playing.size()>= 11){
|
||||||
plugin.config.getString("Tribute_eleven_spawn");
|
plugin.spawns.getString("Tribute_eleven_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_eleven_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_eleven_spawn").split(",");
|
||||||
Player Tribute_eleven = plugin.getServer().getPlayerExact(plugin.Playing.get(10));
|
Player Tribute_eleven = plugin.getServer().getPlayerExact(plugin.Playing.get(10));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -536,8 +604,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_eleven.setFoodLevel(20);
|
Tribute_eleven.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 12){
|
if(plugin.Playing.size()>= 12){
|
||||||
plugin.config.getString("Tribute_twelve_spawn");
|
plugin.spawns.getString("Tribute_twelve_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twelve_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twelve_spawn").split(",");
|
||||||
Player Tribute_twelve = plugin.getServer().getPlayerExact(plugin.Playing.get(11));
|
Player Tribute_twelve = plugin.getServer().getPlayerExact(plugin.Playing.get(11));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -550,8 +618,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twelve.setFoodLevel(20);
|
Tribute_twelve.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 13){
|
if(plugin.Playing.size()>= 13){
|
||||||
plugin.config.getString("Tribute_thirteen_spawn");
|
plugin.spawns.getString("Tribute_thirteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_thirteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_thirteen_spawn").split(",");
|
||||||
Player Tribute_thirteen = plugin.getServer().getPlayerExact(plugin.Playing.get(12));
|
Player Tribute_thirteen = plugin.getServer().getPlayerExact(plugin.Playing.get(12));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -564,8 +632,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_thirteen.setFoodLevel(20);
|
Tribute_thirteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 14){
|
if(plugin.Playing.size()>= 14){
|
||||||
plugin.config.getString("Tribute_fourteen_spawn");
|
plugin.spawns.getString("Tribute_fourteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_fourteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_fourteen_spawn").split(",");
|
||||||
Player Tribute_fourteen = plugin.getServer().getPlayerExact(plugin.Playing.get(13));
|
Player Tribute_fourteen = plugin.getServer().getPlayerExact(plugin.Playing.get(13));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -578,8 +646,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_fourteen.setFoodLevel(20);
|
Tribute_fourteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 15){
|
if(plugin.Playing.size()>= 15){
|
||||||
plugin.config.getString("Tribute_fifteen_spawn");
|
plugin.spawns.getString("Tribute_fifteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_fifteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_fifteen_spawn").split(",");
|
||||||
Player Tribute_fifteen = plugin.getServer().getPlayerExact(plugin.Playing.get(14));
|
Player Tribute_fifteen = plugin.getServer().getPlayerExact(plugin.Playing.get(14));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -592,8 +660,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_fifteen.setFoodLevel(20);
|
Tribute_fifteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 16){
|
if(plugin.Playing.size()>= 16){
|
||||||
plugin.config.getString("Tribute_sixteen_spawn");
|
plugin.spawns.getString("Tribute_sixteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_sixteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_sixteen_spawn").split(",");
|
||||||
Player Tribute_sixteen = plugin.getServer().getPlayerExact(plugin.Playing.get(15));
|
Player Tribute_sixteen = plugin.getServer().getPlayerExact(plugin.Playing.get(15));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -606,8 +674,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_sixteen.setFoodLevel(20);
|
Tribute_sixteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 17){
|
if(plugin.Playing.size()>= 17){
|
||||||
plugin.config.getString("Tribute_seventeen_spawn");
|
plugin.spawns.getString("Tribute_seventeen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_seventeen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_seventeen_spawn").split(",");
|
||||||
Player Tribute_seventeen = plugin.getServer().getPlayerExact(plugin.Playing.get(16));
|
Player Tribute_seventeen = plugin.getServer().getPlayerExact(plugin.Playing.get(16));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -620,8 +688,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_seventeen.setFoodLevel(20);
|
Tribute_seventeen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 18){
|
if(plugin.Playing.size()>= 18){
|
||||||
plugin.config.getString("Tribute_eighteen_spawn");
|
plugin.spawns.getString("Tribute_eighteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_eighteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_eighteen_spawn").split(",");
|
||||||
Player Tribute_eighteen = plugin.getServer().getPlayerExact(plugin.Playing.get(17));
|
Player Tribute_eighteen = plugin.getServer().getPlayerExact(plugin.Playing.get(17));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -634,8 +702,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_eighteen.setFoodLevel(20);
|
Tribute_eighteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 19){
|
if(plugin.Playing.size()>= 19){
|
||||||
plugin.config.getString("Tribute_nineteen_spawn");
|
plugin.spawns.getString("Tribute_nineteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_nineteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_nineteen_spawn").split(",");
|
||||||
Player Tribute_nineteen = plugin.getServer().getPlayerExact(plugin.Playing.get(18));
|
Player Tribute_nineteen = plugin.getServer().getPlayerExact(plugin.Playing.get(18));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -648,8 +716,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_nineteen.setFoodLevel(20);
|
Tribute_nineteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 20){
|
if(plugin.Playing.size()>= 20){
|
||||||
plugin.config.getString("Tribute_twenty_spawn");
|
plugin.spawns.getString("Tribute_twenty_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twenty_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twenty_spawn").split(",");
|
||||||
Player Tribute_twenty = plugin.getServer().getPlayerExact(plugin.Playing.get(19));
|
Player Tribute_twenty = plugin.getServer().getPlayerExact(plugin.Playing.get(19));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -662,8 +730,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twenty.setFoodLevel(20);
|
Tribute_twenty.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 21){
|
if(plugin.Playing.size()>= 21){
|
||||||
plugin.config.getString("Tribute_twentyone_spawn");
|
plugin.spawns.getString("Tribute_twentyone_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentyone_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentyone_spawn").split(",");
|
||||||
Player Tribute_twentyone = plugin.getServer().getPlayerExact(plugin.Playing.get(20));
|
Player Tribute_twentyone = plugin.getServer().getPlayerExact(plugin.Playing.get(20));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -676,8 +744,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twentyone.setFoodLevel(20);
|
Tribute_twentyone.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 22){
|
if(plugin.Playing.size()>= 22){
|
||||||
plugin.config.getString("Tribute_twentytwo_spawn");
|
plugin.spawns.getString("Tribute_twentytwo_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentytwo_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentytwo_spawn").split(",");
|
||||||
Player Tribute_twentytwo = plugin.getServer().getPlayerExact(plugin.Playing.get(21));
|
Player Tribute_twentytwo = plugin.getServer().getPlayerExact(plugin.Playing.get(21));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -690,8 +758,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twentytwo.setFoodLevel(20);
|
Tribute_twentytwo.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 23){
|
if(plugin.Playing.size()>= 23){
|
||||||
plugin.config.getString("Tribute_twentythree_spawn");
|
plugin.spawns.getString("Tribute_twentythree_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentythree_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentythree_spawn").split(",");
|
||||||
Player Tribute_twentythree = plugin.getServer().getPlayerExact(plugin.Playing.get(22));
|
Player Tribute_twentythree = plugin.getServer().getPlayerExact(plugin.Playing.get(22));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -704,8 +772,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twentythree.setFoodLevel(20);
|
Tribute_twentythree.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 24){
|
if(plugin.Playing.size()>= 24){
|
||||||
plugin.config.getString("Tribute_twentyfour_spawn");
|
plugin.spawns.getString("Tribute_twentyfour_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentyfour_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentyfour_spawn").split(",");
|
||||||
Player Tribute_twentyfour = plugin.getServer().getPlayerExact(plugin.Playing.get(23));
|
Player Tribute_twentyfour = plugin.getServer().getPlayerExact(plugin.Playing.get(23));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -861,6 +929,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
plugin.Quit.add(target.getName());
|
plugin.Quit.add(target.getName());
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
//Announce winner
|
//Announce winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -873,9 +942,11 @@ public class HaCommands implements CommandExecutor {
|
|||||||
winner.getInventory().setLeggings(null);
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerWinGamesEvent(winner));
|
||||||
|
}
|
||||||
plugin.Playing.clear();
|
plugin.Playing.clear();
|
||||||
//Make spectators visible
|
//Make spectators visible
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -884,6 +955,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
@ -923,6 +995,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
}else if(args[0].equalsIgnoreCase("Restart")){
|
}else if(args[0].equalsIgnoreCase("Restart")){
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -931,6 +1004,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
plugin.Dead.clear();
|
plugin.Dead.clear();
|
||||||
plugin.Quit.clear();
|
plugin.Quit.clear();
|
||||||
plugin.Watching.clear();
|
plugin.Watching.clear();
|
||||||
@ -942,19 +1016,61 @@ public class HaCommands implements CommandExecutor {
|
|||||||
plugin.canjoin = false;
|
plugin.canjoin = false;
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha refill");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha refill");
|
||||||
sender.sendMessage(ChatColor.AQUA + "The games have been reset!");
|
sender.sendMessage(ChatColor.AQUA + "The games have been reset!");
|
||||||
|
/////////////////////////////////// Toggle //////////////////////////////////////////////////
|
||||||
|
}else if(args[0].equalsIgnoreCase("close")){
|
||||||
|
if(plugin.open){
|
||||||
|
plugin.open = false;
|
||||||
|
for(String players: plugin.Playing){
|
||||||
|
Player tributes = plugin.getServer().getPlayerExact(players);
|
||||||
|
tributes.teleport(tributes.getWorld().getSpawnLocation());
|
||||||
|
tributes.getInventory().clear();
|
||||||
|
tributes.getInventory().setBoots(null);
|
||||||
|
tributes.getInventory().setChestplate(null);
|
||||||
|
tributes.getInventory().setHelmet(null);
|
||||||
|
tributes.getInventory().setLeggings(null);
|
||||||
|
}
|
||||||
|
for(String sname: plugin.Watching){
|
||||||
|
Player spectators = plugin.getServer().getPlayerExact(sname);
|
||||||
|
spectators.teleport(spectators.getWorld().getSpawnLocation());
|
||||||
|
spectators.setAllowFlight(false);
|
||||||
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
|
online.showPlayer(spectators);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugin.Dead.clear();
|
||||||
|
plugin.Quit.clear();
|
||||||
|
plugin.Watching.clear();
|
||||||
|
plugin.Frozen.clear();
|
||||||
|
plugin.Ready.clear();
|
||||||
|
plugin.NeedConfirm.clear();
|
||||||
|
plugin.Out.clear();
|
||||||
|
plugin.Playing.clear();
|
||||||
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha refill");
|
||||||
|
sender.sendMessage(ChatColor.GOLD + "Games Closed!");
|
||||||
|
}else{
|
||||||
|
sender.sendMessage(ChatColor.RED + "Games alredy close, type /ha open to re-open them!");
|
||||||
|
}
|
||||||
|
}else if(args[0].equalsIgnoreCase("open")){
|
||||||
|
if(!plugin.open){
|
||||||
|
plugin.open = true;
|
||||||
|
sender.sendMessage(ChatColor.GOLD + "Games Opened!!");
|
||||||
|
}else{
|
||||||
|
sender.sendMessage(ChatColor.RED + "Games already open, type /ha close to close them!");
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
}else if(args[0].equalsIgnoreCase("Reload")){
|
}else if(args[0].equalsIgnoreCase("Reload")){
|
||||||
plugin.reloadConfig();
|
plugin.reloadConfig();
|
||||||
sender.sendMessage(ChatColor.AQUA + "HungerArena Reloaded!");
|
sender.sendMessage(ChatColor.AQUA + "HungerArena Reloaded!");
|
||||||
}else if(args[0].equalsIgnoreCase("WarpAll")){
|
}else if(args[0].equalsIgnoreCase("WarpAll")){
|
||||||
if(plugin.config.getString("Spawns_set").equalsIgnoreCase("false")){
|
if(plugin.spawns.getString("Spawns_set").equalsIgnoreCase("false")){
|
||||||
sender.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!");
|
sender.sendMessage(ChatColor.RED + "/ha setspawn hasn't been run!");
|
||||||
}else{
|
}else{
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1){
|
||||||
sender.sendMessage(ChatColor.RED + "There are not enough players!");
|
sender.sendMessage(ChatColor.RED + "There are not enough players!");
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 2){
|
if(plugin.Playing.size()>= 2){
|
||||||
plugin.config.getString("Tribute_one_spawn");
|
plugin.spawns.getString("Tribute_one_spawn");
|
||||||
String[] onecoords = plugin.config.getString("Tribute_one_spawn").split(",");
|
String[] onecoords = plugin.spawns.getString("Tribute_one_spawn").split(",");
|
||||||
Player Tribute_one = plugin.getServer().getPlayerExact(plugin.Playing.get(0));
|
Player Tribute_one = plugin.getServer().getPlayerExact(plugin.Playing.get(0));
|
||||||
double x = Double.parseDouble(onecoords[0]);
|
double x = Double.parseDouble(onecoords[0]);
|
||||||
double y = Double.parseDouble(onecoords[1]);
|
double y = Double.parseDouble(onecoords[1]);
|
||||||
@ -965,8 +1081,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_one.teleport(oneloc);
|
Tribute_one.teleport(oneloc);
|
||||||
plugin.Frozen.add(Tribute_one.getName());
|
plugin.Frozen.add(Tribute_one.getName());
|
||||||
Tribute_one.setFoodLevel(20);
|
Tribute_one.setFoodLevel(20);
|
||||||
plugin.config.getString("Tribute_two_spawn");
|
plugin.spawns.getString("Tribute_two_spawn");
|
||||||
String[] twocoords = plugin.config.getString("Tribute_two_spawn").split(",");
|
String[] twocoords = plugin.spawns.getString("Tribute_two_spawn").split(",");
|
||||||
Player Tribute_two = plugin.getServer().getPlayerExact(plugin.Playing.get(1));
|
Player Tribute_two = plugin.getServer().getPlayerExact(plugin.Playing.get(1));
|
||||||
double twox = Double.parseDouble(twocoords[0]);
|
double twox = Double.parseDouble(twocoords[0]);
|
||||||
double twoy = Double.parseDouble(twocoords[1]);
|
double twoy = Double.parseDouble(twocoords[1]);
|
||||||
@ -992,8 +1108,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}, 20L);
|
}, 20L);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 3){
|
if(plugin.Playing.size()>= 3){
|
||||||
plugin.config.getString("Tribute_three_spawn");
|
plugin.spawns.getString("Tribute_three_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_three_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_three_spawn").split(",");
|
||||||
Player Tribute_three = plugin.getServer().getPlayerExact(plugin.Playing.get(2));
|
Player Tribute_three = plugin.getServer().getPlayerExact(plugin.Playing.get(2));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1006,8 +1122,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_three.setFoodLevel(20);
|
Tribute_three.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 4){
|
if(plugin.Playing.size()>= 4){
|
||||||
plugin.config.getString("Tribute_four_spawn");
|
plugin.spawns.getString("Tribute_four_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_four_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_four_spawn").split(",");
|
||||||
Player Tribute_four = plugin.getServer().getPlayerExact(plugin.Playing.get(3));
|
Player Tribute_four = plugin.getServer().getPlayerExact(plugin.Playing.get(3));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1020,8 +1136,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_four.setFoodLevel(20);
|
Tribute_four.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 5){
|
if(plugin.Playing.size()>= 5){
|
||||||
plugin.config.getString("Tribute_five_spawn");
|
plugin.spawns.getString("Tribute_five_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_five_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_five_spawn").split(",");
|
||||||
Player Tribute_five = plugin.getServer().getPlayerExact(plugin.Playing.get(4));
|
Player Tribute_five = plugin.getServer().getPlayerExact(plugin.Playing.get(4));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1034,8 +1150,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_five.setFoodLevel(20);
|
Tribute_five.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 6){
|
if(plugin.Playing.size()>= 6){
|
||||||
plugin.config.getString("Tribute_six_spawn");
|
plugin.spawns.getString("Tribute_six_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_six_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_six_spawn").split(",");
|
||||||
Player Tribute_six = plugin.getServer().getPlayerExact(plugin.Playing.get(5));
|
Player Tribute_six = plugin.getServer().getPlayerExact(plugin.Playing.get(5));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1048,8 +1164,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_six.setFoodLevel(20);
|
Tribute_six.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 7){
|
if(plugin.Playing.size()>= 7){
|
||||||
plugin.config.getString("Tribute_seven_spawn");
|
plugin.spawns.getString("Tribute_seven_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_seven_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_seven_spawn").split(",");
|
||||||
Player Tribute_seven = plugin.getServer().getPlayerExact(plugin.Playing.get(6));
|
Player Tribute_seven = plugin.getServer().getPlayerExact(plugin.Playing.get(6));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1062,8 +1178,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_seven.setFoodLevel(20);
|
Tribute_seven.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 8){
|
if(plugin.Playing.size()>= 8){
|
||||||
plugin.config.getString("Tribute_eight_spawn");
|
plugin.spawns.getString("Tribute_eight_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_eight_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_eight_spawn").split(",");
|
||||||
Player Tribute_eight = plugin.getServer().getPlayerExact(plugin.Playing.get(7));
|
Player Tribute_eight = plugin.getServer().getPlayerExact(plugin.Playing.get(7));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1076,8 +1192,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_eight.setFoodLevel(20);
|
Tribute_eight.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 9){
|
if(plugin.Playing.size()>= 9){
|
||||||
plugin.config.getString("Tribute_nine_spawn");
|
plugin.spawns.getString("Tribute_nine_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_nine_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_nine_spawn").split(",");
|
||||||
Player Tribute_nine = plugin.getServer().getPlayerExact(plugin.Playing.get(8));
|
Player Tribute_nine = plugin.getServer().getPlayerExact(plugin.Playing.get(8));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1090,8 +1206,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_nine.setFoodLevel(20);
|
Tribute_nine.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 10){
|
if(plugin.Playing.size()>= 10){
|
||||||
plugin.config.getString("Tribute_ten_spawn");
|
plugin.spawns.getString("Tribute_ten_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_ten_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_ten_spawn").split(",");
|
||||||
Player Tribute_ten = plugin.getServer().getPlayerExact(plugin.Playing.get(9));
|
Player Tribute_ten = plugin.getServer().getPlayerExact(plugin.Playing.get(9));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1104,8 +1220,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_ten.setFoodLevel(20);
|
Tribute_ten.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 11){
|
if(plugin.Playing.size()>= 11){
|
||||||
plugin.config.getString("Tribute_eleven_spawn");
|
plugin.spawns.getString("Tribute_eleven_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_eleven_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_eleven_spawn").split(",");
|
||||||
Player Tribute_eleven = plugin.getServer().getPlayerExact(plugin.Playing.get(10));
|
Player Tribute_eleven = plugin.getServer().getPlayerExact(plugin.Playing.get(10));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1118,8 +1234,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_eleven.setFoodLevel(20);
|
Tribute_eleven.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 12){
|
if(plugin.Playing.size()>= 12){
|
||||||
plugin.config.getString("Tribute_twelve_spawn");
|
plugin.spawns.getString("Tribute_twelve_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twelve_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twelve_spawn").split(",");
|
||||||
Player Tribute_twelve = plugin.getServer().getPlayerExact(plugin.Playing.get(11));
|
Player Tribute_twelve = plugin.getServer().getPlayerExact(plugin.Playing.get(11));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1132,8 +1248,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twelve.setFoodLevel(20);
|
Tribute_twelve.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 13){
|
if(plugin.Playing.size()>= 13){
|
||||||
plugin.config.getString("Tribute_thirteen_spawn");
|
plugin.spawns.getString("Tribute_thirteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_thirteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_thirteen_spawn").split(",");
|
||||||
Player Tribute_thirteen = plugin.getServer().getPlayerExact(plugin.Playing.get(12));
|
Player Tribute_thirteen = plugin.getServer().getPlayerExact(plugin.Playing.get(12));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1146,8 +1262,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_thirteen.setFoodLevel(20);
|
Tribute_thirteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 14){
|
if(plugin.Playing.size()>= 14){
|
||||||
plugin.config.getString("Tribute_fourteen_spawn");
|
plugin.spawns.getString("Tribute_fourteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_fourteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_fourteen_spawn").split(",");
|
||||||
Player Tribute_fourteen = plugin.getServer().getPlayerExact(plugin.Playing.get(13));
|
Player Tribute_fourteen = plugin.getServer().getPlayerExact(plugin.Playing.get(13));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1160,8 +1276,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_fourteen.setFoodLevel(20);
|
Tribute_fourteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 15){
|
if(plugin.Playing.size()>= 15){
|
||||||
plugin.config.getString("Tribute_fifteen_spawn");
|
plugin.spawns.getString("Tribute_fifteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_fifteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_fifteen_spawn").split(",");
|
||||||
Player Tribute_fifteen = plugin.getServer().getPlayerExact(plugin.Playing.get(14));
|
Player Tribute_fifteen = plugin.getServer().getPlayerExact(plugin.Playing.get(14));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1174,8 +1290,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_fifteen.setFoodLevel(20);
|
Tribute_fifteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 16){
|
if(plugin.Playing.size()>= 16){
|
||||||
plugin.config.getString("Tribute_sixteen_spawn");
|
plugin.spawns.getString("Tribute_sixteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_sixteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_sixteen_spawn").split(",");
|
||||||
Player Tribute_sixteen = plugin.getServer().getPlayerExact(plugin.Playing.get(15));
|
Player Tribute_sixteen = plugin.getServer().getPlayerExact(plugin.Playing.get(15));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1188,8 +1304,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_sixteen.setFoodLevel(20);
|
Tribute_sixteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 17){
|
if(plugin.Playing.size()>= 17){
|
||||||
plugin.config.getString("Tribute_seventeen_spawn");
|
plugin.spawns.getString("Tribute_seventeen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_seventeen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_seventeen_spawn").split(",");
|
||||||
Player Tribute_seventeen = plugin.getServer().getPlayerExact(plugin.Playing.get(16));
|
Player Tribute_seventeen = plugin.getServer().getPlayerExact(plugin.Playing.get(16));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1202,8 +1318,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_seventeen.setFoodLevel(20);
|
Tribute_seventeen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 18){
|
if(plugin.Playing.size()>= 18){
|
||||||
plugin.config.getString("Tribute_eighteen_spawn");
|
plugin.spawns.getString("Tribute_eighteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_eighteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_eighteen_spawn").split(",");
|
||||||
Player Tribute_eighteen = plugin.getServer().getPlayerExact(plugin.Playing.get(17));
|
Player Tribute_eighteen = plugin.getServer().getPlayerExact(plugin.Playing.get(17));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1216,8 +1332,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_eighteen.setFoodLevel(20);
|
Tribute_eighteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 19){
|
if(plugin.Playing.size()>= 19){
|
||||||
plugin.config.getString("Tribute_nineteen_spawn");
|
plugin.spawns.getString("Tribute_nineteen_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_nineteen_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_nineteen_spawn").split(",");
|
||||||
Player Tribute_nineteen = plugin.getServer().getPlayerExact(plugin.Playing.get(18));
|
Player Tribute_nineteen = plugin.getServer().getPlayerExact(plugin.Playing.get(18));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1230,8 +1346,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_nineteen.setFoodLevel(20);
|
Tribute_nineteen.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 20){
|
if(plugin.Playing.size()>= 20){
|
||||||
plugin.config.getString("Tribute_twenty_spawn");
|
plugin.spawns.getString("Tribute_twenty_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twenty_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twenty_spawn").split(",");
|
||||||
Player Tribute_twenty = plugin.getServer().getPlayerExact(plugin.Playing.get(19));
|
Player Tribute_twenty = plugin.getServer().getPlayerExact(plugin.Playing.get(19));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1244,8 +1360,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twenty.setFoodLevel(20);
|
Tribute_twenty.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 21){
|
if(plugin.Playing.size()>= 21){
|
||||||
plugin.config.getString("Tribute_twentyone_spawn");
|
plugin.spawns.getString("Tribute_twentyone_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentyone_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentyone_spawn").split(",");
|
||||||
Player Tribute_twentyone = plugin.getServer().getPlayerExact(plugin.Playing.get(20));
|
Player Tribute_twentyone = plugin.getServer().getPlayerExact(plugin.Playing.get(20));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1258,8 +1374,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twentyone.setFoodLevel(20);
|
Tribute_twentyone.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 22){
|
if(plugin.Playing.size()>= 22){
|
||||||
plugin.config.getString("Tribute_twentytwo_spawn");
|
plugin.spawns.getString("Tribute_twentytwo_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentytwo_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentytwo_spawn").split(",");
|
||||||
Player Tribute_twentytwo = plugin.getServer().getPlayerExact(plugin.Playing.get(21));
|
Player Tribute_twentytwo = plugin.getServer().getPlayerExact(plugin.Playing.get(21));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1272,8 +1388,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twentytwo.setFoodLevel(20);
|
Tribute_twentytwo.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 23){
|
if(plugin.Playing.size()>= 23){
|
||||||
plugin.config.getString("Tribute_twentythree_spawn");
|
plugin.spawns.getString("Tribute_twentythree_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentythree_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentythree_spawn").split(",");
|
||||||
Player Tribute_twentythree = plugin.getServer().getPlayerExact(plugin.Playing.get(22));
|
Player Tribute_twentythree = plugin.getServer().getPlayerExact(plugin.Playing.get(22));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
@ -1286,8 +1402,8 @@ public class HaCommands implements CommandExecutor {
|
|||||||
Tribute_twentythree.setFoodLevel(20);
|
Tribute_twentythree.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 24){
|
if(plugin.Playing.size()>= 24){
|
||||||
plugin.config.getString("Tribute_twentyfour_spawn");
|
plugin.spawns.getString("Tribute_twentyfour_spawn");
|
||||||
String[] coords = plugin.config.getString("Tribute_twentyfour_spawn").split(",");
|
String[] coords = plugin.spawns.getString("Tribute_twentyfour_spawn").split(",");
|
||||||
Player Tribute_twentyfour = plugin.getServer().getPlayerExact(plugin.Playing.get(23));
|
Player Tribute_twentyfour = plugin.getServer().getPlayerExact(plugin.Playing.get(23));
|
||||||
double x = Double.parseDouble(coords[0]);
|
double x = Double.parseDouble(coords[0]);
|
||||||
double y = Double.parseDouble(coords[1]);
|
double y = Double.parseDouble(coords[1]);
|
||||||
|
@ -31,10 +31,12 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
final Player p = event.getPlayer();
|
final Player p = event.getPlayer();
|
||||||
String pname = p.getName();
|
String pname = p.getName();
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Watching.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
p.hidePlayer(spectator);
|
p.hidePlayer(spectator);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.Out.contains(pname)){
|
if(plugin.Out.contains(pname)){
|
||||||
plugin.Playing.add(pname);
|
plugin.Playing.add(pname);
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
||||||
@ -45,7 +47,7 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
plugin.Out.remove(pname);
|
plugin.Out.remove(pname);
|
||||||
}
|
}
|
||||||
if(plugin.Quit.contains(pname) || plugin.Dead.contains(pname)){
|
if(plugin.Quit.contains(pname) || plugin.Dead.contains(pname)){
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
String w = Spawncoords[3];
|
String w = Spawncoords[3];
|
||||||
World spawnw = plugin.getServer().getWorld(w);
|
World spawnw = plugin.getServer().getWorld(w);
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
@ -67,7 +69,7 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
String pname = p.getName();
|
String pname = p.getName();
|
||||||
if (plugin.Frozen.contains(pname)) {
|
if (plugin.Frozen.contains(pname)) {
|
||||||
plugin.Frozen.remove(pname);
|
plugin.Frozen.remove(pname);
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
String w = Spawncoords[3];
|
String w = Spawncoords[3];
|
||||||
World spawnw = plugin.getServer().getWorld(w);
|
World spawnw = plugin.getServer().getWorld(w);
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
@ -82,7 +84,7 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
public void onPlayerQuit(PlayerQuitEvent event){
|
public void onPlayerQuit(PlayerQuitEvent event){
|
||||||
final Player p = event.getPlayer();
|
final Player p = event.getPlayer();
|
||||||
final String pname = p.getName();
|
final String pname = p.getName();
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
String w = Spawncoords[3];
|
String w = Spawncoords[3];
|
||||||
World spawnw = plugin.getServer().getWorld(w);
|
World spawnw = plugin.getServer().getWorld(w);
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
@ -92,7 +94,6 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
if(plugin.Playing.contains(pname)){
|
if(plugin.Playing.contains(pname)){
|
||||||
plugin.Out.add(pname);
|
plugin.Out.add(pname);
|
||||||
plugin.Playing.remove(pname);
|
plugin.Playing.remove(pname);
|
||||||
}
|
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
||||||
public void run(){
|
public void run(){
|
||||||
if(plugin.Out.contains(pname)){
|
if(plugin.Out.contains(pname)){
|
||||||
@ -101,6 +102,7 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
plugin.Out.remove(pname);
|
plugin.Out.remove(pname);
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1){
|
||||||
//Announce Winner
|
//Announce Winner
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String winnername = plugin.Playing.get(i++);
|
String winnername = plugin.Playing.get(i++);
|
||||||
Player winner = plugin.getServer().getPlayerExact(winnername);
|
Player winner = plugin.getServer().getPlayerExact(winnername);
|
||||||
String winnername2 = winner.getName();
|
String winnername2 = winner.getName();
|
||||||
@ -113,8 +115,10 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
PlayerWinGamesEvent evt = new PlayerWinGamesEvent(winner);
|
PlayerWinGamesEvent evt = new PlayerWinGamesEvent(winner);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(evt);
|
Bukkit.getServer().getPluginManager().callEvent(evt);
|
||||||
|
}
|
||||||
//Make spectators visible
|
//Make spectators visible
|
||||||
if(!plugin.Watching.isEmpty()){
|
if(!plugin.Watching.isEmpty()){
|
||||||
|
for(i = 0; i < plugin.Playing.size(); i++){
|
||||||
String s = plugin.Watching.get(i++);
|
String s = plugin.Watching.get(i++);
|
||||||
Player spectator = plugin.getServer().getPlayerExact(s);
|
Player spectator = plugin.getServer().getPlayerExact(s);
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
@ -123,6 +127,7 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
@ -135,3 +140,4 @@ public class JoinAndQuitListener implements Listener {
|
|||||||
}, 1200L);
|
}, 1200L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package me.Travja.HungerArena;
|
package me.Travja.HungerArena;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import net.milkbowl.vault.economy.Economy;
|
import net.milkbowl.vault.economy.Economy;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
@ -44,7 +49,10 @@ public class Main extends JavaPlugin{
|
|||||||
public boolean canjoin;
|
public boolean canjoin;
|
||||||
public boolean exists;
|
public boolean exists;
|
||||||
public boolean restricted;
|
public boolean restricted;
|
||||||
|
public boolean open = true;
|
||||||
public FileConfiguration config;
|
public FileConfiguration config;
|
||||||
|
public FileConfiguration spawns = null;
|
||||||
|
public File spawnsFile = null;
|
||||||
public ItemStack Reward;
|
public ItemStack Reward;
|
||||||
public ItemStack Cost;
|
public ItemStack Cost;
|
||||||
public boolean vault = false;
|
public boolean vault = false;
|
||||||
@ -53,6 +61,9 @@ public class Main extends JavaPlugin{
|
|||||||
config = this.getConfig();
|
config = this.getConfig();
|
||||||
config.options().copyDefaults(true);
|
config.options().copyDefaults(true);
|
||||||
this.saveDefaultConfig();
|
this.saveDefaultConfig();
|
||||||
|
this.getSpawns();
|
||||||
|
spawns.options().copyDefaults(true);
|
||||||
|
this.saveSpawns();
|
||||||
log.info("[HungerArena] enabled v" + getDescription().getVersion());
|
log.info("[HungerArena] enabled v" + getDescription().getVersion());
|
||||||
getServer().getPluginManager().registerEvents(DeathListener, this);
|
getServer().getPluginManager().registerEvents(DeathListener, this);
|
||||||
getServer().getPluginManager().registerEvents(SpectatorListener, this);
|
getServer().getPluginManager().registerEvents(SpectatorListener, this);
|
||||||
@ -116,4 +127,33 @@ public class Main extends JavaPlugin{
|
|||||||
vault = true;
|
vault = true;
|
||||||
return econ != null;
|
return econ != null;
|
||||||
}
|
}
|
||||||
|
public void reloadSpawns() {
|
||||||
|
if (spawnsFile == null) {
|
||||||
|
spawnsFile = new File(getDataFolder(), "spawns.yml");
|
||||||
|
}
|
||||||
|
spawns = YamlConfiguration.loadConfiguration(spawnsFile);
|
||||||
|
|
||||||
|
// Look for defaults in the jar
|
||||||
|
InputStream defConfigStream = this.getResource("spawns.yml");
|
||||||
|
if (defConfigStream != null) {
|
||||||
|
YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
|
||||||
|
spawns.setDefaults(defConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public FileConfiguration getSpawns() {
|
||||||
|
if (spawns == null) {
|
||||||
|
this.reloadSpawns();
|
||||||
|
}
|
||||||
|
return spawns;
|
||||||
|
}
|
||||||
|
public void saveSpawns() {
|
||||||
|
if (spawns == null || spawnsFile == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
getSpawns().save(spawnsFile);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
this.getLogger().log(Level.SEVERE, "Could not save config to " + spawnsFile, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
if(cmd.getName().equalsIgnoreCase("StartPoint")){
|
if(cmd.getName().equalsIgnoreCase("StartPoint")){
|
||||||
if(p.hasPermission("HungerArena.StartPoint")){
|
if(p.hasPermission("HungerArena.StartPoint")){
|
||||||
if(!plugin.restricted || (plugin.restricted && plugin.worlds.contains(p.getWorld().getName()))){
|
if(!plugin.restricted || (plugin.restricted && plugin.worlds.contains(p.getWorld().getName()))){
|
||||||
if(plugin.restricted && !plugin.worlds.contains(p.getWorld().toString())){
|
if(plugin.restricted && !plugin.worlds.contains(p.getWorld().getName())){
|
||||||
p.sendMessage(ChatColor.GOLD + "We ran the command, however, this isn't a world you defined in the config...");
|
p.sendMessage(ChatColor.GOLD + "We ran the command, however, this isn't a world you defined in the config...");
|
||||||
p.sendMessage(ChatColor.GOLD + "If this is the right world, please disregard this message.");
|
p.sendMessage(ChatColor.GOLD + "If this is the right world, please disregard this message.");
|
||||||
}
|
}
|
||||||
@ -29,8 +29,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_one_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_one_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute one!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute one!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("2")){
|
if(args[0].equalsIgnoreCase("2")){
|
||||||
@ -38,8 +38,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_two_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_two_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute two!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute two!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("3")){
|
if(args[0].equalsIgnoreCase("3")){
|
||||||
@ -47,8 +47,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_three_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_three_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute three!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute three!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("4")){
|
if(args[0].equalsIgnoreCase("4")){
|
||||||
@ -56,8 +56,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_four_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_four_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute four!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute four!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("5")){
|
if(args[0].equalsIgnoreCase("5")){
|
||||||
@ -65,8 +65,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_five_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_five_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute five!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute five!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("6")){
|
if(args[0].equalsIgnoreCase("6")){
|
||||||
@ -74,8 +74,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_six_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_six_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute six!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute six!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("7")){
|
if(args[0].equalsIgnoreCase("7")){
|
||||||
@ -83,8 +83,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_seven_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_seven_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seven!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seven!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("8")){
|
if(args[0].equalsIgnoreCase("8")){
|
||||||
@ -92,8 +92,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_eight_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_eight_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eight!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eight!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("9")){
|
if(args[0].equalsIgnoreCase("9")){
|
||||||
@ -101,8 +101,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_nine_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_nine_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nine!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nine!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("10")){
|
if(args[0].equalsIgnoreCase("10")){
|
||||||
@ -110,8 +110,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_ten_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_ten_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute ten!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute ten!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("11")){
|
if(args[0].equalsIgnoreCase("11")){
|
||||||
@ -119,8 +119,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_eleven_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_eleven_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eleven!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eleven!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("12")){
|
if(args[0].equalsIgnoreCase("12")){
|
||||||
@ -128,8 +128,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_twelve_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_twelve_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twelve!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twelve!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("13")){
|
if(args[0].equalsIgnoreCase("13")){
|
||||||
@ -137,8 +137,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_thirteen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_thirteen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute thirteen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute thirteen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("14")){
|
if(args[0].equalsIgnoreCase("14")){
|
||||||
@ -146,8 +146,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_fourteen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_fourteen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fourteen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fourteen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("15")){
|
if(args[0].equalsIgnoreCase("15")){
|
||||||
@ -155,8 +155,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_fifteen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_fifteen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fifteen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fifteen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("16")){
|
if(args[0].equalsIgnoreCase("16")){
|
||||||
@ -164,8 +164,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_sixteen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_sixteen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute sixteen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute sixteen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("17")){
|
if(args[0].equalsIgnoreCase("17")){
|
||||||
@ -173,8 +173,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_seventeen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_seventeen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seventeen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seventeen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("18")){
|
if(args[0].equalsIgnoreCase("18")){
|
||||||
@ -182,8 +182,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_eighteen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_eighteen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eighteen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eighteen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("19")){
|
if(args[0].equalsIgnoreCase("19")){
|
||||||
@ -191,8 +191,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_nineteen_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_nineteen_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nineteen!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nineteen!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("20")){
|
if(args[0].equalsIgnoreCase("20")){
|
||||||
@ -200,8 +200,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_twenty_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_twenty_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twenty!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twenty!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("21")){
|
if(args[0].equalsIgnoreCase("21")){
|
||||||
@ -209,8 +209,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_twentyone_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_twentyone_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyone!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyone!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("22")){
|
if(args[0].equalsIgnoreCase("22")){
|
||||||
@ -218,8 +218,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_twentytwo_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_twentytwo_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentytwo!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentytwo!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("23")){
|
if(args[0].equalsIgnoreCase("23")){
|
||||||
@ -227,8 +227,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_twentythree_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_twentythree_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentythree!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentythree!");
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("24")){
|
if(args[0].equalsIgnoreCase("24")){
|
||||||
@ -236,8 +236,8 @@ public class SpawnsCommand implements CommandExecutor {
|
|||||||
double y = ploc.getY();
|
double y = ploc.getY();
|
||||||
double z = ploc.getZ();
|
double z = ploc.getZ();
|
||||||
String w = ploc.getWorld().getName();
|
String w = ploc.getWorld().getName();
|
||||||
plugin.config.set("Tribute_twentyfour_spawn", x + "," + y + "," + z + "," + w);
|
plugin.spawns.set("Tribute_twentyfour_spawn", x + "," + y + "," + z + "," + w);
|
||||||
plugin.saveConfig();
|
plugin.saveSpawns();
|
||||||
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyfour!");
|
p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyfour!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public class SpectatorListener implements Listener {
|
|||||||
String pname = p.getName();
|
String pname = p.getName();
|
||||||
if(plugin.Watching.contains(pname)){
|
if(plugin.Watching.contains(pname)){
|
||||||
plugin.Watching.remove(pname);
|
plugin.Watching.remove(pname);
|
||||||
String[] Spawncoords = plugin.config.getString("Spawn_coords").split(",");
|
String[] Spawncoords = plugin.spawns.getString("Spawn_coords").split(",");
|
||||||
String w = Spawncoords[3];
|
String w = Spawncoords[3];
|
||||||
World spawnw = plugin.getServer().getWorld(w);
|
World spawnw = plugin.getServer().getWorld(w);
|
||||||
double spawnx = Double.parseDouble(Spawncoords[0]);
|
double spawnx = Double.parseDouble(Spawncoords[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user