Dieser Commit ist enthalten in:
Ursprung
9bf5aec1d4
Commit
e61d1ae278
@ -23,6 +23,8 @@ import de.steamwar.misslewars.FightState;
|
|||||||
import de.steamwar.misslewars.MWTeam;
|
import de.steamwar.misslewars.MWTeam;
|
||||||
import de.steamwar.misslewars.MissileWars;
|
import de.steamwar.misslewars.MissileWars;
|
||||||
import de.steamwar.misslewars.SpawnPlatformCreator;
|
import de.steamwar.misslewars.SpawnPlatformCreator;
|
||||||
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
|
import net.md_5.bungee.api.chat.TextComponent;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -48,7 +50,13 @@ public class DeathListener extends BasicListener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onDeath(PlayerDeathEvent e) {
|
public void onDeath(PlayerDeathEvent e) {
|
||||||
e.setDeathMessage(null);
|
e.setDeathMessage(null);
|
||||||
Bukkit.broadcastMessage(e.getEntity().getDisplayName() + " §cstarb");
|
if(Bukkit.getOnlinePlayers().size() > 10) {
|
||||||
|
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||||
|
onlinePlayer.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(e.getEntity().getDisplayName() + " §cstarb"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Bukkit.broadcastMessage(e.getEntity().getDisplayName() + " §cstarb");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren