mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Abstracted all block IDs to BlockID and item ids to ItemType. Overloaded recently changed methods for compatibility and cleaned a few things up.
This commit is contained in:
@ -23,6 +23,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.bags.*;
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
|
||||
public class BukkitPlayerBlockBag extends BlockBag {
|
||||
/**
|
||||
@ -68,7 +69,7 @@ public class BukkitPlayerBlockBag extends BlockBag {
|
||||
*/
|
||||
@Override
|
||||
public void fetchBlock(int id) throws BlockBagException {
|
||||
if (id == 0) {
|
||||
if (id == BlockID.AIR) {
|
||||
throw new IllegalArgumentException("Can't fetch air block");
|
||||
}
|
||||
|
||||
@ -114,7 +115,7 @@ public class BukkitPlayerBlockBag extends BlockBag {
|
||||
*/
|
||||
@Override
|
||||
public void storeBlock(int id) throws BlockBagException {
|
||||
if (id == 0) {
|
||||
if (id == BlockID.AIR) {
|
||||
throw new IllegalArgumentException("Can't store air block");
|
||||
}
|
||||
|
||||
|
@ -135,9 +135,7 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
* Register the events used by WorldEdit.
|
||||
*/
|
||||
protected void registerEvents() {
|
||||
@SuppressWarnings("unused")
|
||||
PlayerListener playerListener = new WorldEditPlayerListener(this);
|
||||
@SuppressWarnings("unused")
|
||||
PlayerListener criticalPlayerListener = new WorldEditCriticalPlayerListener(this);
|
||||
|
||||
// The permissions resolver has some hooks of its own
|
||||
|
Reference in New Issue
Block a user