Dieser Commit ist enthalten in:
Ursprung
1ad1b6f74c
Commit
0306500466
@ -58,7 +58,7 @@ public class TowerRunGame {
|
||||
|
||||
for (Location door : WorldConfig.DOORS) {
|
||||
door.getBlock().setType(Material.AIR);
|
||||
door.add(0, 1, 0).getBlock().setType(Material.AIR);
|
||||
door.clone().add(0, 1, 0).getBlock().setType(Material.AIR);
|
||||
}
|
||||
} else {
|
||||
throw new IllegalStateException("Game is already running!");
|
||||
|
@ -34,6 +34,7 @@ import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
@ -114,4 +115,11 @@ public class IngameListener extends GameStateBukkitListener {
|
||||
public void onPlayerRespawn(PlayerRespawnEvent event) {
|
||||
event.setRespawnLocation(WorldConfig.SPAWN);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEntityRegainHealth(EntityRegainHealthEvent event) {
|
||||
if (event.getEntityType() == EntityType.PLAYER) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren