Moved block stuff from org.bukkit to org.bukkit.block

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-01-15 21:37:08 +00:00
parent 1de48a9184
commit 73edbc4902
26 changed files with 102 additions and 99 deletions

View file

@ -1,6 +1,7 @@
package org.bukkit;
import org.bukkit.block.Block;
import org.bukkit.inventory.ItemStack;
import org.bukkit.entity.ItemDrop;
import org.bukkit.entity.PoweredMinecart;

View file

@ -1,5 +1,5 @@
package org.bukkit;
package org.bukkit.block;
/**
* Holds all accepted Biomes in the default server

View file

@ -1,5 +1,8 @@
package org.bukkit;
package org.bukkit.block;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.BlockState;
/**

View file

@ -1,4 +1,4 @@
package org.bukkit;
package org.bukkit.block;
public enum BlockDamageLevel {
STARTED(0), DIGGING(1), BROKEN(3), STOPPED(2);

View file

@ -1,4 +1,4 @@
package org.bukkit;
package org.bukkit.block;
/**
* Represents the face of a block

View file

@ -1,7 +1,6 @@
package org.bukkit.block;
import org.bukkit.Block;
import org.bukkit.Chunk;
import org.bukkit.Material;
import org.bukkit.World;

View file

@ -3,7 +3,7 @@
*/
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.Material;
/**

View file

@ -1,7 +1,7 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.BlockDamageLevel;
import org.bukkit.block.Block;
import org.bukkit.block.BlockDamageLevel;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;

View file

@ -1,24 +1,24 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.event.Event;
/**
* Represents a block related event
*/
public class BlockEvent extends Event {
protected Block block;
public BlockEvent(final Event.Type type, final Block theBlock) {
super(type);
block = theBlock;
}
/**
* Returns the block involved in this event
* @return Block which block is involved in this event
*/
public final Block getBlock() {
return block;
}
}
package org.bukkit.event.block;
import org.bukkit.block.Block;
import org.bukkit.event.Event;
/**
* Represents a block related event
*/
public class BlockEvent extends Event {
protected Block block;
public BlockEvent(final Event.Type type, final Block theBlock) {
super(type);
block = theBlock;
}
/**
* Returns the block involved in this event
* @return Block which block is involved in this event
*/
public final Block getBlock() {
return block;
}
}

View file

@ -1,48 +1,48 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.BlockFace;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
/**
* Holds information for events with a source block and a destination block
*/
public class BlockFromToEvent extends BlockEvent implements Cancellable {
protected Block from;
protected BlockFace face;
protected boolean cancel;
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
super(type, block);
this.face = face;
this.from = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
this.cancel = false;
}
/**
* Gets the location this player moved to
*
* @return Block the block is event originated from
*/
public BlockFace getFace() {
return face;
}
/**
* Convenience method for getting the faced block
*
* @return Block the faced block
*/
public Block getFromBlock() {
return from;
}
public boolean isCancelled() {
return cancel;
}
public void setCancelled(boolean cancel) {
this.cancel = cancel;
}
}
package org.bukkit.event.block;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
/**
* Holds information for events with a source block and a destination block
*/
public class BlockFromToEvent extends BlockEvent implements Cancellable {
protected Block from;
protected BlockFace face;
protected boolean cancel;
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
super(type, block);
this.face = face;
this.from = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
this.cancel = false;
}
/**
* Gets the location this player moved to
*
* @return Block the block is event originated from
*/
public BlockFace getFace() {
return face;
}
/**
* Convenience method for getting the faced block
*
* @return Block the faced block
*/
public Block getFromBlock() {
return from;
}
public boolean isCancelled() {
return cancel;
}
public void setCancelled(boolean cancel) {
this.cancel = cancel;
}
}

View file

@ -1,6 +1,6 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;

View file

@ -1,6 +1,6 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;

View file

@ -1,6 +1,6 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.Material;
import org.bukkit.event.Event;

View file

@ -1,6 +1,6 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.inventory.ItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;

View file

@ -5,8 +5,8 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.BlockFace;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
/**
*

View file

@ -1,7 +1,7 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.BlockFace;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.inventory.ItemStack;
import org.bukkit.entity.Player;

View file

@ -1,7 +1,7 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.event.Cancellable;
/**

View file

@ -1,6 +1,6 @@
package org.bukkit.event.entity;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;

View file

@ -1,7 +1,7 @@
package org.bukkit.event.player;
import org.bukkit.Block;
import org.bukkit.BlockFace;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.inventory.ItemStack;
import org.bukkit.Material;
import org.bukkit.entity.Player;

View file

@ -1,6 +1,6 @@
package org.bukkit.event.vehicle;
import org.bukkit.Block;
import org.bukkit.block.Block;
import org.bukkit.entity.Vehicle;
/**

View file

@ -1,7 +1,7 @@
package org.bukkit.material;
import org.bukkit.BlockFace;
import org.bukkit.block.BlockFace;
/**
* Indicates that a block can be attached to another block

View file

@ -1,7 +1,7 @@
package org.bukkit.material;
import org.bukkit.BlockFace;
import org.bukkit.block.BlockFace;
import org.bukkit.Material;
/**

View file

@ -1,7 +1,7 @@
package org.bukkit.material;
import org.bukkit.BlockFace;
import org.bukkit.block.BlockFace;
import org.bukkit.Material;
/**

View file

@ -1,7 +1,7 @@
package org.bukkit.material;
import org.bukkit.BlockFace;
import org.bukkit.block.BlockFace;
import org.bukkit.Material;
/**

View file

@ -1,7 +1,7 @@
package org.bukkit.material;
import org.bukkit.BlockFace;
import org.bukkit.block.BlockFace;
import org.bukkit.Material;
/**

View file

@ -1,7 +1,7 @@
package org.bukkit.material;
import org.bukkit.BlockFace;
import org.bukkit.block.BlockFace;
import org.bukkit.Material;
/**