mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Change the block type check to be implementation-dependent. The Bukkit plugin now checks Bukkit's Material.
This commit is contained in:
@ -42,6 +42,11 @@ public class BukkitServerInterface extends ServerInterface {
|
||||
public boolean isValidMobType(String type) {
|
||||
return CreatureType.fromName(type) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidBlockType(int type) {
|
||||
return Material.getMaterial(type) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
|
@ -39,6 +39,7 @@ import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeType;
|
||||
import org.bukkit.World;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
@ -627,6 +628,17 @@ public class BukkitWorld extends LocalWorld {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether a block has a valid ID.
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isValidBlockType(int type) {
|
||||
return Material.getMaterial(type) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
|
Reference in New Issue
Block a user