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.MissileWars;
|
||||
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.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -48,8 +50,14 @@ public class DeathListener extends BasicListener {
|
||||
@EventHandler
|
||||
public void onDeath(PlayerDeathEvent e) {
|
||||
e.setDeathMessage(null);
|
||||
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
|
||||
public void onRespawn(PlayerRespawnEvent e){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren