mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 07:02:18 -07:00
Expose the potential player cause of a lightning (#6782)
This commit is contained in:
@@ -34,5 +34,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public void setLifeTicks(int lifeTicks) {
|
||||
+ getHandle().life = lifeTicks;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @org.jetbrains.annotations.Nullable org.bukkit.entity.Entity getCausingEntity() {
|
||||
+ final var cause = this.getHandle().getCause();
|
||||
+ return cause == null ? null : cause.getBukkitEntity();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCausingPlayer(@org.jetbrains.annotations.Nullable org.bukkit.entity.Player causingPlayer) {
|
||||
+ this.getHandle().setCause(causingPlayer == null ? null : ((CraftPlayer) causingPlayer).getHandle());
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
Reference in New Issue
Block a user