@@ -13,10 +13,10 @@ public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean canceled;
|
||||
private LightningStrike bolt;
|
||||
private final LightningStrike bolt;
|
||||
|
||||
public LightningStrikeEvent(World world, LightningStrike bolt) {
|
||||
super(Type.LIGHTNING_STRIKE, world);
|
||||
public LightningStrikeEvent(final World world, final LightningStrike bolt) {
|
||||
super(world);
|
||||
this.bolt = bolt;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ public class ThunderChangeEvent extends WeatherEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean canceled;
|
||||
private boolean to;
|
||||
private final boolean to;
|
||||
|
||||
public ThunderChangeEvent(World world, boolean to) {
|
||||
super(Type.THUNDER_CHANGE, world);
|
||||
public ThunderChangeEvent(final World world, final boolean to) {
|
||||
super(world);
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ public class WeatherChangeEvent extends WeatherEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean canceled;
|
||||
private boolean to;
|
||||
private final boolean to;
|
||||
|
||||
public WeatherChangeEvent(World world, boolean to) {
|
||||
super(Type.WEATHER_CHANGE, world);
|
||||
public WeatherChangeEvent(final World world, final boolean to) {
|
||||
super(world);
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ import org.bukkit.event.Event;
|
||||
public abstract class WeatherEvent extends Event {
|
||||
protected World world;
|
||||
|
||||
public WeatherEvent(final Event.Type type, final World where) {
|
||||
super(type);
|
||||
public WeatherEvent(final World where) {
|
||||
world = where;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package org.bukkit.event.weather;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
/**
|
||||
* Handles all events fired in relation to weather
|
||||
*/
|
||||
@Deprecated
|
||||
public class WeatherListener implements Listener {
|
||||
public WeatherListener() {}
|
||||
|
||||
/**
|
||||
* Called when a weather change occurs
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onWeatherChange(WeatherChangeEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when the state of thunder changes
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onThunderChange(ThunderChangeEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when lightning strikes
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
public void onLightningStrike(LightningStrikeEvent event) {}
|
||||
}
|
||||
Reference in New Issue
Block a user