Added console support and fixed more bugs
This commit is contained in:
parent
872448d92a
commit
e844f612a8
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.
@ -1,5 +1,6 @@
|
|||||||
package me.Travja.HungerArena;
|
package me.Travja.HungerArena;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -61,10 +62,10 @@ public class DeathListener implements Listener{
|
|||||||
event.setDeathMessage("");
|
event.setDeathMessage("");
|
||||||
s.broadcastMessage(ChatColor.LIGHT_PURPLE + "**BOOM** Tribute " + pname + " was killed by tribute " + killername + " with their FIST!");
|
s.broadcastMessage(ChatColor.LIGHT_PURPLE + "**BOOM** Tribute " + pname + " was killed by tribute " + killername + " with their FIST!");
|
||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
for(Player winner:plugin.Playing){
|
for(Player winner:plugin.Playing){
|
||||||
String winnername = winner.getName();
|
String winnername = winner.getName();
|
||||||
s.broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
plugin.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
||||||
winner.getInventory().clear();
|
winner.getInventory().clear();
|
||||||
winner.teleport(Spawn);
|
winner.teleport(Spawn);
|
||||||
winner.getInventory().setBoots(null);
|
winner.getInventory().setBoots(null);
|
||||||
@ -82,11 +83,7 @@ public class DeathListener implements Listener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
plugin.Dead.clear();
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
plugin.Quit.clear();
|
|
||||||
plugin.Watching.clear();
|
|
||||||
plugin.Frozen.clear();
|
|
||||||
plugin.canjoin = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@ -97,10 +94,10 @@ public class DeathListener implements Listener{
|
|||||||
event.setDeathMessage("");
|
event.setDeathMessage("");
|
||||||
s.broadcastMessage(msg);
|
s.broadcastMessage(msg);
|
||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
for(Player winner:plugin.Playing){
|
for(Player winner:plugin.Playing){
|
||||||
String winnername = winner.getName();
|
String winnername = winner.getName();
|
||||||
s.broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
plugin.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
||||||
winner.getInventory().clear();
|
winner.getInventory().clear();
|
||||||
winner.teleport(Spawn);
|
winner.teleport(Spawn);
|
||||||
winner.getInventory().setBoots(null);
|
winner.getInventory().setBoots(null);
|
||||||
@ -118,11 +115,7 @@ public class DeathListener implements Listener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
plugin.Dead.clear();
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
plugin.Quit.clear();
|
|
||||||
plugin.Watching.clear();
|
|
||||||
plugin.Frozen.clear();
|
|
||||||
plugin.canjoin = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -130,10 +123,10 @@ public class DeathListener implements Listener{
|
|||||||
event.setDeathMessage("");
|
event.setDeathMessage("");
|
||||||
s.broadcastMessage(ChatColor.LIGHT_PURPLE + pname + " died of natural causes!");
|
s.broadcastMessage(ChatColor.LIGHT_PURPLE + pname + " died of natural causes!");
|
||||||
s.broadcastMessage(leftmsg);
|
s.broadcastMessage(leftmsg);
|
||||||
if(plugin.Playing.size()== 1){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
for(Player winner:plugin.Playing){
|
for(Player winner:plugin.Playing){
|
||||||
String winnername = winner.getName();
|
String winnername = winner.getName();
|
||||||
s.broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
plugin.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
||||||
winner.getInventory().clear();
|
winner.getInventory().clear();
|
||||||
winner.teleport(Spawn);
|
winner.teleport(Spawn);
|
||||||
winner.getInventory().setBoots(null);
|
winner.getInventory().setBoots(null);
|
||||||
@ -151,11 +144,7 @@ public class DeathListener implements Listener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
plugin.Dead.clear();
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
plugin.Quit.clear();
|
|
||||||
plugin.Watching.clear();
|
|
||||||
plugin.Frozen.clear();
|
|
||||||
plugin.canjoin = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,20 @@ public class HaCommands implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.RED + "You don't have permission!");
|
sender.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(args[0].equalsIgnoreCase("rList")){
|
||||||
|
if(p.hasPermission("HungerArena.GameMaker") || sender instanceof ConsoleCommandSender){
|
||||||
|
sender.sendMessage(ChatColor.AQUA + "-----People Ready-----");
|
||||||
|
for(Player ready:plugin.Ready){
|
||||||
|
sender.sendMessage(ChatColor.GREEN + ready.getDisplayName() + " Life: " + ready.getHealth() + "/20");
|
||||||
|
}
|
||||||
|
if(plugin.Playing.size()== 0){
|
||||||
|
sender.sendMessage(ChatColor.GRAY + "No one is ready!");
|
||||||
|
}
|
||||||
|
sender.sendMessage(ChatColor.AQUA + "---------------------");
|
||||||
|
}else{
|
||||||
|
sender.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
|
}
|
||||||
|
}
|
||||||
if(args[0].equalsIgnoreCase("SetSpawn")){
|
if(args[0].equalsIgnoreCase("SetSpawn")){
|
||||||
if(sender instanceof ConsoleCommandSender){
|
if(sender instanceof ConsoleCommandSender){
|
||||||
sender.sendMessage(ChatColor.RED + "That can only be run by a player!");
|
sender.sendMessage(ChatColor.RED + "That can only be run by a player!");
|
||||||
@ -129,6 +143,7 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}else if(plugin.NeedConfirm.contains(p)){
|
}else if(plugin.NeedConfirm.contains(p)){
|
||||||
plugin.Playing.add(p);
|
plugin.Playing.add(p);
|
||||||
plugin.NeedConfirm.remove(p);
|
plugin.NeedConfirm.remove(p);
|
||||||
|
p.sendMessage(ChatColor.GREEN + "Do /ha ready to vote to start the games!");
|
||||||
p.getInventory().clear();
|
p.getInventory().clear();
|
||||||
p.getInventory().setBoots(null);
|
p.getInventory().setBoots(null);
|
||||||
p.getInventory().setChestplate(null);
|
p.getInventory().setChestplate(null);
|
||||||
@ -144,11 +159,17 @@ public class HaCommands implements CommandExecutor {
|
|||||||
if(sender instanceof ConsoleCommandSender){
|
if(sender instanceof ConsoleCommandSender){
|
||||||
sender.sendMessage(ChatColor.RED + "That can only be run by a player!");
|
sender.sendMessage(ChatColor.RED + "That can only be run by a player!");
|
||||||
}else if(plugin.Playing.contains(p)){
|
}else if(plugin.Playing.contains(p)){
|
||||||
|
if(plugin.Ready.contains(p)){
|
||||||
|
p.sendMessage(ChatColor.RED + "You're already ready!");
|
||||||
|
}else if(plugin.Playing.size()== 1){
|
||||||
|
p.sendMessage(ChatColor.RED + "You can't be ready when no one else is playing!");
|
||||||
|
}else{
|
||||||
plugin.Ready.add(p);
|
plugin.Ready.add(p);
|
||||||
p.sendMessage(ChatColor.AQUA + "You have marked yourself as READY!");
|
p.sendMessage(ChatColor.AQUA + "You have marked yourself as READY!");
|
||||||
if(plugin.Playing.size()== plugin.Ready.size()){
|
if(plugin.Playing.size()== plugin.Ready.size()){
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha warpall");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha warpall");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else if(!plugin.Playing.contains(p)){
|
}else if(!plugin.Playing.contains(p)){
|
||||||
p.sendMessage(ChatColor.RED + "You aren't playing!");
|
p.sendMessage(ChatColor.RED + "You aren't playing!");
|
||||||
}
|
}
|
||||||
@ -172,18 +193,29 @@ public class HaCommands implements CommandExecutor {
|
|||||||
if(plugin.Frozen.contains(p)){
|
if(plugin.Frozen.contains(p)){
|
||||||
plugin.Frozen.remove(p);
|
plugin.Frozen.remove(p);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1){
|
||||||
for(Player winner:plugin.Playing){
|
for(Player winner:plugin.Playing){
|
||||||
String winnername = winner.getName();
|
String winnername = winner.getName();
|
||||||
p.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
plugin.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
||||||
winner.getInventory().clear();
|
winner.getInventory().clear();
|
||||||
|
winner.teleport(Spawn);
|
||||||
|
winner.getInventory().setBoots(null);
|
||||||
|
winner.getInventory().setChestplate(null);
|
||||||
|
winner.getInventory().setHelmet(null);
|
||||||
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
}
|
}
|
||||||
|
plugin.Playing.clear();
|
||||||
for(Player spectator:plugin.Watching){
|
for(Player spectator:plugin.Watching){
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
|
spectator.teleport(Spawn);
|
||||||
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
|
online.showPlayer(spectator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
plugin.canjoin= false;
|
|
||||||
plugin.Watching.clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -232,15 +264,26 @@ public class HaCommands implements CommandExecutor {
|
|||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
for(Player winner:plugin.Playing){
|
for(Player winner:plugin.Playing){
|
||||||
String winnername = winner.getName();
|
String winnername = winner.getName();
|
||||||
sender.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
plugin.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
||||||
winner.getInventory().clear();
|
winner.getInventory().clear();
|
||||||
|
winner.teleport(Spawn);
|
||||||
|
winner.getInventory().setBoots(null);
|
||||||
|
winner.getInventory().setChestplate(null);
|
||||||
|
winner.getInventory().setHelmet(null);
|
||||||
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
}
|
}
|
||||||
|
plugin.Playing.clear();
|
||||||
for(Player spectator:plugin.Watching){
|
for(Player spectator:plugin.Watching){
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
|
spectator.teleport(Spawn);
|
||||||
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
|
online.showPlayer(spectator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
plugin.canjoin= false;
|
|
||||||
plugin.Watching.clear();
|
|
||||||
}else{
|
}else{
|
||||||
plugin.Playing.remove(target);
|
plugin.Playing.remove(target);
|
||||||
plugin.Quit.add(target);
|
plugin.Quit.add(target);
|
||||||
@ -288,16 +331,21 @@ public class HaCommands implements CommandExecutor {
|
|||||||
if(sender.hasPermission("HungerArena.Restart") || sender instanceof ConsoleCommandSender){
|
if(sender.hasPermission("HungerArena.Restart") || sender instanceof ConsoleCommandSender){
|
||||||
for(Player spectator:plugin.Watching){
|
for(Player spectator:plugin.Watching){
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
|
spectator.teleport(Spawn);
|
||||||
for(Player online:plugin.getServer().getOnlinePlayers()){
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugin.Dead.clear();
|
plugin.Dead.clear();
|
||||||
plugin.Playing.clear();
|
|
||||||
plugin.Quit.clear();
|
plugin.Quit.clear();
|
||||||
plugin.Watching.clear();
|
plugin.Watching.clear();
|
||||||
plugin.Frozen.clear();
|
plugin.Frozen.clear();
|
||||||
|
plugin.Ready.clear();
|
||||||
|
plugin.NeedConfirm.clear();
|
||||||
|
plugin.Out.clear();
|
||||||
|
plugin.Playing.clear();
|
||||||
plugin.canjoin = false;
|
plugin.canjoin = false;
|
||||||
|
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!");
|
||||||
}else{
|
}else{
|
||||||
sender.sendMessage(ChatColor.RED + "You don't have permission!");
|
sender.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
@ -341,6 +389,13 @@ public class HaCommands implements CommandExecutor {
|
|||||||
plugin.Frozen.add(Tribute_two);
|
plugin.Frozen.add(Tribute_two);
|
||||||
Tribute_two.setFoodLevel(20);
|
Tribute_two.setFoodLevel(20);
|
||||||
p.getWorld().setTime(0);
|
p.getWorld().setTime(0);
|
||||||
|
if(plugin.config.getString("Auto_Start").equalsIgnoreCase("true")){
|
||||||
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
||||||
|
public void run(){
|
||||||
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha start");
|
||||||
|
}
|
||||||
|
}, 20L);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 3){
|
if(plugin.Playing.size()>= 3){
|
||||||
plugin.config.getString("Tribute_three_spawn");
|
plugin.config.getString("Tribute_three_spawn");
|
||||||
@ -650,16 +705,6 @@ public class HaCommands implements CommandExecutor {
|
|||||||
plugin.Frozen.add(Tribute_twentyfour);
|
plugin.Frozen.add(Tribute_twentyfour);
|
||||||
Tribute_twentyfour.setFoodLevel(20);
|
Tribute_twentyfour.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 2){
|
|
||||||
if(plugin.config.getString("Auto_Start").equalsIgnoreCase("true")){
|
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
|
||||||
public void run(){
|
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha start");
|
|
||||||
}
|
|
||||||
}, 20L);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -728,13 +773,14 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}, 220L);
|
}, 220L);
|
||||||
}else{
|
}else{
|
||||||
plugin.Frozen.clear();
|
plugin.Frozen.clear();
|
||||||
p.getServer().broadcastMessage(ChatColor.AQUA + "Let the Games Begin!!");
|
p.getServer().broadcastMessage(msg);
|
||||||
plugin.canjoin = true;
|
plugin.canjoin = true;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
p.sendMessage(ChatColor.RED + "You don't have permission!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else if(sender instanceof ConsoleCommandSender){
|
}else if(sender instanceof ConsoleCommandSender){
|
||||||
if(cmd.getName().equalsIgnoreCase("Ha")){
|
if(cmd.getName().equalsIgnoreCase("Ha")){
|
||||||
if(args.length== 0){
|
if(args.length== 0){
|
||||||
@ -771,7 +817,6 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
sender.sendMessage(ChatColor.AQUA + "----------------------");
|
sender.sendMessage(ChatColor.AQUA + "----------------------");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(args[0].equalsIgnoreCase("SetSpawn")){
|
if(args[0].equalsIgnoreCase("SetSpawn")){
|
||||||
if(sender instanceof ConsoleCommandSender){
|
if(sender instanceof ConsoleCommandSender){
|
||||||
sender.sendMessage(ChatColor.RED + "That can only be run by a player!");
|
sender.sendMessage(ChatColor.RED + "That can only be run by a player!");
|
||||||
@ -825,15 +870,26 @@ public class HaCommands implements CommandExecutor {
|
|||||||
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
if(plugin.Playing.size()== 1 && plugin.canjoin== true){
|
||||||
for(Player winner:plugin.Playing){
|
for(Player winner:plugin.Playing){
|
||||||
String winnername = winner.getName();
|
String winnername = winner.getName();
|
||||||
sender.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
plugin.getServer().broadcastMessage(ChatColor.GREEN + winnername + " is the victor of this Hunger Games!");
|
||||||
winner.getInventory().clear();
|
winner.getInventory().clear();
|
||||||
|
winner.teleport(Spawn);
|
||||||
|
winner.getInventory().setBoots(null);
|
||||||
|
winner.getInventory().setChestplate(null);
|
||||||
|
winner.getInventory().setHelmet(null);
|
||||||
|
winner.getInventory().setLeggings(null);
|
||||||
winner.getInventory().addItem(plugin.Reward);
|
winner.getInventory().addItem(plugin.Reward);
|
||||||
}
|
}
|
||||||
|
plugin.Playing.clear();
|
||||||
for(Player spectator:plugin.Watching){
|
for(Player spectator:plugin.Watching){
|
||||||
spectator.setAllowFlight(false);
|
spectator.setAllowFlight(false);
|
||||||
|
spectator.teleport(Spawn);
|
||||||
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
|
online.showPlayer(spectator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(plugin.config.getString("Auto_Restart").equalsIgnoreCase("True")){
|
||||||
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha restart");
|
||||||
}
|
}
|
||||||
plugin.canjoin= false;
|
|
||||||
plugin.Watching.clear();
|
|
||||||
}else{
|
}else{
|
||||||
plugin.Playing.remove(target);
|
plugin.Playing.remove(target);
|
||||||
plugin.Quit.add(target);
|
plugin.Quit.add(target);
|
||||||
@ -881,15 +937,25 @@ public class HaCommands implements CommandExecutor {
|
|||||||
online.showPlayer(spectator);
|
online.showPlayer(spectator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for(Player spectator:plugin.Watching){
|
||||||
|
spectator.setAllowFlight(false);
|
||||||
|
spectator.teleport(Spawn);
|
||||||
|
for(Player online:plugin.getServer().getOnlinePlayers()){
|
||||||
|
online.showPlayer(spectator);
|
||||||
|
}
|
||||||
|
}
|
||||||
plugin.Dead.clear();
|
plugin.Dead.clear();
|
||||||
plugin.Playing.clear();
|
|
||||||
plugin.Quit.clear();
|
plugin.Quit.clear();
|
||||||
plugin.Watching.clear();
|
plugin.Watching.clear();
|
||||||
plugin.Frozen.clear();
|
plugin.Frozen.clear();
|
||||||
|
plugin.Ready.clear();
|
||||||
|
plugin.NeedConfirm.clear();
|
||||||
|
plugin.Out.clear();
|
||||||
|
plugin.Playing.clear();
|
||||||
plugin.canjoin = false;
|
plugin.canjoin = false;
|
||||||
|
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!");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(args[0].equalsIgnoreCase("Reload")){
|
if(args[0].equalsIgnoreCase("Reload")){
|
||||||
plugin.reloadConfig();
|
plugin.reloadConfig();
|
||||||
sender.sendMessage(ChatColor.AQUA + "HungerArena Reloaded!");
|
sender.sendMessage(ChatColor.AQUA + "HungerArena Reloaded!");
|
||||||
@ -927,6 +993,13 @@ public class HaCommands implements CommandExecutor {
|
|||||||
plugin.Frozen.add(Tribute_two);
|
plugin.Frozen.add(Tribute_two);
|
||||||
Tribute_two.setFoodLevel(20);
|
Tribute_two.setFoodLevel(20);
|
||||||
Tribute_one.getWorld().setTime(0);
|
Tribute_one.getWorld().setTime(0);
|
||||||
|
if(plugin.config.getString("Auto_Start").equalsIgnoreCase("true")){
|
||||||
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
||||||
|
public void run(){
|
||||||
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha start");
|
||||||
|
}
|
||||||
|
}, 20L);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 3){
|
if(plugin.Playing.size()>= 3){
|
||||||
plugin.config.getString("Tribute_three_spawn");
|
plugin.config.getString("Tribute_three_spawn");
|
||||||
@ -1236,15 +1309,6 @@ public class HaCommands implements CommandExecutor {
|
|||||||
plugin.Frozen.add(Tribute_twentyfour);
|
plugin.Frozen.add(Tribute_twentyfour);
|
||||||
Tribute_twentyfour.setFoodLevel(20);
|
Tribute_twentyfour.setFoodLevel(20);
|
||||||
}
|
}
|
||||||
if(plugin.Playing.size()>= 2){
|
|
||||||
if(plugin.config.getString("Auto_Start").equalsIgnoreCase("true")){
|
|
||||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
|
|
||||||
public void run(){
|
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "ha start");
|
|
||||||
}
|
|
||||||
}, 20L);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(args[0].equalsIgnoreCase("Start")){
|
if(args[0].equalsIgnoreCase("Start")){
|
||||||
@ -1311,10 +1375,12 @@ public class HaCommands implements CommandExecutor {
|
|||||||
}, 220L);
|
}, 220L);
|
||||||
}else{
|
}else{
|
||||||
plugin.Frozen.clear();
|
plugin.Frozen.clear();
|
||||||
plugin.getServer().broadcastMessage(ChatColor.AQUA + "Let the Games Begin!!");
|
plugin.getServer().broadcastMessage(msg);
|
||||||
plugin.canjoin = true;
|
plugin.canjoin = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user