From f551daa9ca1c14900ba2dd9e495134361fb377d8 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 13 Aug 2021 23:08:24 -0400 Subject: [PATCH] fixed keep inv and death messages --- src/main/java/net/tylermurphy/hideAndSeek/Main.java | 2 +- src/main/java/net/tylermurphy/hideAndSeek/commands/Start.java | 2 +- .../net/tylermurphy/hideAndSeek/manager/EventManager.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/tylermurphy/hideAndSeek/Main.java b/src/main/java/net/tylermurphy/hideAndSeek/Main.java index 47d0387..d35ece8 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/Main.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/Main.java @@ -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 logAdminCommands 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"); // Register Commands diff --git a/src/main/java/net/tylermurphy/hideAndSeek/commands/Start.java b/src/main/java/net/tylermurphy/hideAndSeek/commands/Start.java index 8c0056b..5bf1c13 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/commands/Start.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/commands/Start.java @@ -41,7 +41,7 @@ public class Start implements ICommand { Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule doImmediateRespawn true"); Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "gamerule logAdminCommands 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"); playerData = new HashMap(); diff --git a/src/main/java/net/tylermurphy/hideAndSeek/manager/EventManager.java b/src/main/java/net/tylermurphy/hideAndSeek/manager/EventManager.java index 8a4923e..00c59d2 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/manager/EventManager.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/manager/EventManager.java @@ -47,10 +47,10 @@ public class EventManager implements Listener { public void onDeath(PlayerDeathEvent event) { if(status.equals("Playing")) { 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())) { - 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);