mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-10 09:31:57 +01:00
Changed fromTo to be Block, Face
By: durron597 <martin.jared@gmail.com>
This commit is contained in:
parent
d9184242dc
commit
53b6d54100
@ -1,17 +1,18 @@
|
|||||||
package org.bukkit.event.block;
|
package org.bukkit.event.block;
|
||||||
|
|
||||||
import org.bukkit.Block;
|
import org.bukkit.Block;
|
||||||
|
import org.bukkit.BlockFace;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds information for events with a source block and a destination block
|
* Holds information for events with a source block and a destination block
|
||||||
*/
|
*/
|
||||||
public class BlockFromToEvent extends BlockEvent {
|
public class BlockFromToEvent extends BlockEvent {
|
||||||
protected Block from;
|
protected BlockFace face;
|
||||||
|
|
||||||
public BlockFromToEvent(final Event.Type type, final Block from, final Block to) {
|
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
|
||||||
super(type, to);
|
super(type, block);
|
||||||
this.from = from;
|
this.face = face;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -19,16 +20,7 @@ public class BlockFromToEvent extends BlockEvent {
|
|||||||
*
|
*
|
||||||
* @return Block the block is event originated from
|
* @return Block the block is event originated from
|
||||||
*/
|
*/
|
||||||
public Block getFrom() {
|
public BlockFace getFace() {
|
||||||
return from;
|
return face;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the target block of this event
|
|
||||||
*
|
|
||||||
* @return Block the block containing this event
|
|
||||||
*/
|
|
||||||
public Block getTo() {
|
|
||||||
return getBlock();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user