[FEAT] Paper Support

This commit is contained in:
2024-10-22 20:13:32 +02:00
parent 86149ace11
commit e0e37685e2
352 changed files with 5772 additions and 1588 deletions

View File

@@ -14,8 +14,14 @@ public class CraterPlayerDeathEvent extends CraterEvent {
private final BridgedPlayer player;
private final DamageSource damageSource;
private Component deathMessage;
public CraterPlayerDeathEvent(BridgedPlayer player, DamageSource damageSource, Component deathMessage) {
this(player, null);
this.deathMessage = deathMessage;
}
public Component getDeathMessage() {
return ChatUtils.mojangToAdventure(damageSource.getLocalizedDeathMessage(player.toMojang()));
return deathMessage != null ? deathMessage : ChatUtils.mojangToAdventure(damageSource.getLocalizedDeathMessage(player.toMojang()));
}
}