fixed keep inv and death messages
This commit is contained in:
parent
ecb33764ef
commit
f551daa9ca
3 changed files with 4 additions and 4 deletions
|
@ -50,7 +50,7 @@ public class Main extends JavaPlugin implements Listener {
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule doImmediateRespawn true");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule doImmediateRespawn true");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule logAdminCommands false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule logAdminCommands false");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule naturalRegeneration false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule naturalRegeneration false");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule keepInventory false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule keepInventory true");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule showDeathMessages false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule showDeathMessages false");
|
||||||
|
|
||||||
// Register Commands
|
// Register Commands
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class Start implements ICommand {
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule doImmediateRespawn true");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule doImmediateRespawn true");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule logAdminCommands false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule logAdminCommands false");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule naturalRegeneration false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule naturalRegeneration false");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule keepInventory false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule keepInventory true");
|
||||||
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule showDeathMessages false");
|
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule showDeathMessages false");
|
||||||
|
|
||||||
playerData = new HashMap<String,Integer>();
|
playerData = new HashMap<String,Integer>();
|
||||||
|
|
|
@ -47,10 +47,10 @@ public class EventManager implements Listener {
|
||||||
public void onDeath(PlayerDeathEvent event) {
|
public void onDeath(PlayerDeathEvent event) {
|
||||||
if(status.equals("Playing")) {
|
if(status.equals("Playing")) {
|
||||||
if(Hider.hasEntry(event.getEntity().getName())) {
|
if(Hider.hasEntry(event.getEntity().getName())) {
|
||||||
Bukkit.getServer().broadcastMessage(String.format(messagePrefix + "%s%s has died", ChatColor.GOLD, event.getEntity().getName()));
|
Bukkit.getServer().broadcastMessage(String.format(messagePrefix + "%s%s%s has died and become a seeker", ChatColor.GOLD, event.getEntity().getName(), ChatColor.WHITE));
|
||||||
}
|
}
|
||||||
if(Seeker.hasEntry(event.getEntity().getName())) {
|
if(Seeker.hasEntry(event.getEntity().getName())) {
|
||||||
Bukkit.getServer().broadcastMessage(String.format(messagePrefix + "%s%s has died", ChatColor.RED, event.getEntity().getName()));
|
Bukkit.getServer().broadcastMessage(String.format(messagePrefix + "%s%s%s has been beat by a hider", ChatColor.RED, event.getEntity().getName(), ChatColor.WHITE));
|
||||||
}
|
}
|
||||||
|
|
||||||
setPlayerData(event.getEntity().getName(), "Death", 1);
|
setPlayerData(event.getEntity().getName(), "Death", 1);
|
||||||
|
|
Loading…
Reference in a new issue