set DamageCause to SUICIDE for scissor's DamageSource

This commit is contained in:
granny
2025-02-17 17:21:28 -08:00
parent b0d36caeda
commit 97dcff409b

View File

@@ -9,12 +9,13 @@
public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) { public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) {
final DamageSource damageSource = this.copy(); final DamageSource damageSource = this.copy();
@@ -42,6 +_,29 @@ @@ -42,6 +_,30 @@
return this.knownCause; return this.knownCause;
} }
+ // Purpur start - Dont run with scissors! + // Purpur start - Dont run with scissors!
+ public DamageSource scissors() { + public DamageSource scissors() {
+ this.knownCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause.SUICIDE);
+ this.scissors = true; + this.scissors = true;
+ return this; + return this;
+ } + }