fastow
Ньюби
- Баллы
- 1
Перепробовал все. То что ниже не единственный вариант. Нечего не работает, в цикл даже не заходит, ибо "Ты умер!" не высвечивается, помогите(
@EventHandler
public void onDeathPlayer(PlayerDeathEvent e) {
Player p = e.getEntity();
if (p.isDead()) {
p.sendMessage("Ты умер!");
Location loc = e.getEntity().getLocation();
p.getLocation().getWorld().spawnEntity(loc, EntityType.ZOMBIE);
}
@EventHandler
public void onDeathPlayer(PlayerDeathEvent e) {
Player p = e.getEntity();
if (p.isDead()) {
p.sendMessage("Ты умер!");
Location loc = e.getEntity().getLocation();
p.getLocation().getWorld().spawnEntity(loc, EntityType.ZOMBIE);
}