@@ -8,7 +8,7 @@ import org.bukkit.entity.Painting;
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PaintingBreakByEntityEvent extends PaintingBreakEvent {
|
||||
private Entity remover;
|
||||
private final Entity remover;
|
||||
|
||||
public PaintingBreakByEntityEvent(final Painting painting, final Entity remover) {
|
||||
super(painting, RemoveCause.ENTITY);
|
||||
|
||||
@@ -12,10 +12,10 @@ public class PaintingBreakEvent extends PaintingEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancelled;
|
||||
private RemoveCause cause;
|
||||
private final RemoveCause cause;
|
||||
|
||||
public PaintingBreakEvent(final Painting painting, RemoveCause cause) {
|
||||
super(Type.PAINTING_BREAK, painting);
|
||||
public PaintingBreakEvent(final Painting painting, final RemoveCause cause) {
|
||||
super(painting);
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@ public abstract class PaintingEvent extends Event {
|
||||
|
||||
protected Painting painting;
|
||||
|
||||
protected PaintingEvent(final Type type, final Painting painting) {
|
||||
super(type);
|
||||
protected PaintingEvent(final Painting painting) {
|
||||
this.painting = painting;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Painting;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
/**
|
||||
@@ -17,12 +16,12 @@ public class PaintingPlaceEvent extends PaintingEvent implements Cancellable {
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
private Player player;
|
||||
private Block block;
|
||||
private BlockFace blockFace;
|
||||
private final Player player;
|
||||
private final Block block;
|
||||
private final BlockFace blockFace;
|
||||
|
||||
public PaintingPlaceEvent(final Painting painting, final Player player, Block block, BlockFace blockFace) {
|
||||
super(Event.Type.PAINTING_PLACE, painting);
|
||||
public PaintingPlaceEvent(final Painting painting, final Player player, final Block block, final BlockFace blockFace) {
|
||||
super(painting);
|
||||
this.player = player;
|
||||
this.block = block;
|
||||
this.blockFace = blockFace;
|
||||
|
||||
Reference in New Issue
Block a user