mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-21 15:54:45 +01:00
Changed LightningStrikeEvent to return a LightningStrike and not an Entity.
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
d6f44121b1
commit
56ff9f5abd
1 changed files with 4 additions and 3 deletions
|
@ -2,6 +2,7 @@ package org.bukkit.event.weather;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.LightningStrike;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,10 +11,10 @@ import org.bukkit.event.Cancellable;
|
||||||
public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
|
public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
|
||||||
|
|
||||||
private boolean canceled;
|
private boolean canceled;
|
||||||
private Entity bolt;
|
private LightningStrike bolt;
|
||||||
private World world;
|
private World world;
|
||||||
|
|
||||||
public LightningStrikeEvent(World world, Entity bolt) {
|
public LightningStrikeEvent(World world, LightningStrike bolt) {
|
||||||
super(Type.LIGHTNING_STRIKE, world);
|
super(Type.LIGHTNING_STRIKE, world);
|
||||||
this.bolt = bolt;
|
this.bolt = bolt;
|
||||||
this.world = world;
|
this.world = world;
|
||||||
|
@ -44,7 +45,7 @@ public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
|
||||||
*
|
*
|
||||||
* @return lightning entity
|
* @return lightning entity
|
||||||
*/
|
*/
|
||||||
public Entity getLightning() {
|
public LightningStrike getLightning() {
|
||||||
return bolt;
|
return bolt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue