From d79d139cae645a4ee622992974275885c31f9e52 Mon Sep 17 00:00:00 2001 From: Niklas Date: Sun, 28 Jun 2020 21:14:18 +0200 Subject: [PATCH] change blocks on revive --- .../org/kapelle/hardcore_revive/RevivePlayer.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/kapelle/hardcore_revive/RevivePlayer.java b/src/main/java/org/kapelle/hardcore_revive/RevivePlayer.java index e4914ea..f1d5bb5 100644 --- a/src/main/java/org/kapelle/hardcore_revive/RevivePlayer.java +++ b/src/main/java/org/kapelle/hardcore_revive/RevivePlayer.java @@ -92,13 +92,21 @@ public class RevivePlayer{ private void revivePlayer(Player player, Location headLocation){ // Break blocks headLocation.getBlock().setType(Material.AIR); - headLocation.add(new Vector(0,-1,0)).getBlock().setType(Material.AIR); - headLocation.add(new Vector(0,-1,0)).getBlock().setType(Material.AIR); + headLocation.clone().add(0,-1,0).getBlock().setType(Material.AIR); + + for (int x = -1; x < 2; x++) { + for (int y = -1; y < 2; y++) { + headLocation.clone().add(x,-2,y).getBlock().setType(Material.ANDESITE); + } + } // Teleport player player.teleport(headLocation); // Set player gamemode player.setGameMode(GameMode.SURVIVAL); + + // Set player to 1 heart + player.setHealth(2); } }