Expose the potential player cause of a lightning (#6782)
This commit is contained in:
parent
4b68f08fe5
commit
7deb2b0f26
2 changed files with 45 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue