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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user