changed to adventure gamemode
This commit is contained in:
parent
1922bb3499
commit
c1981178a4
5 changed files with 3 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -20,7 +20,7 @@ public class PlayerListener implements Listener {
|
|||
public void onDeath(PlayerDeathEvent e) {
|
||||
System.out.println("Resurrection: A player has died!");
|
||||
Player p = e.getEntity();
|
||||
p.setGameMode(GameMode.SPECTATOR);
|
||||
p.setGameMode(GameMode.ADVENTURE);
|
||||
Long timeOfDeath = System.currentTimeMillis();
|
||||
Long resurrectionTime = timeOfDeath + 86400000;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class CommandResurrect implements CommandExecutor {
|
|||
p.sendMessage("That player does not exist! Failed to resurrect.");
|
||||
return false;
|
||||
}
|
||||
if (resurrectPlayer.getGameMode() == GameMode.SPECTATOR) {
|
||||
if (resurrectPlayer.getGameMode() == GameMode.ADVENTURE) {
|
||||
for (PotionEffect effect : resurrectPlayer.getActivePotionEffects())
|
||||
resurrectPlayer.removePotionEffect(effect.getType());
|
||||
resurrectPlayer.setGameMode(GameMode.SURVIVAL);
|
||||
|
@ -44,7 +44,7 @@ public class CommandResurrect implements CommandExecutor {
|
|||
System.out.println("That player does not exist! Failed to resurrect.");
|
||||
return false;
|
||||
}
|
||||
if (resurrectPlayer.getGameMode() == GameMode.SPECTATOR) {
|
||||
if (resurrectPlayer.getGameMode() == GameMode.ADVENTURE) {
|
||||
for (PotionEffect effect : resurrectPlayer.getActivePotionEffects())
|
||||
resurrectPlayer.removePotionEffect(effect.getType());
|
||||
resurrectPlayer.setGameMode(GameMode.SURVIVAL);
|
||||
|
|
Loading…
Add table
Reference in a new issue