mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 10:57:11 +00:00
Use CraftBukkit version 1.4.6
This commit is contained in:
parent
090052df5a
commit
e75b0ab34c
2
pom.xml
2
pom.xml
@ -90,7 +90,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.3.1-R2.0</version>
|
||||
<version>1.4.6-R0.1</version>
|
||||
<scope>compile</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
package com.sk89q.worldedit.bukkit;
|
||||
|
||||
@ -26,23 +26,23 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.server.NBTBase;
|
||||
import net.minecraft.server.NBTTagByte;
|
||||
import net.minecraft.server.NBTTagByteArray;
|
||||
import net.minecraft.server.NBTTagCompound;
|
||||
import net.minecraft.server.NBTTagDouble;
|
||||
import net.minecraft.server.NBTTagEnd;
|
||||
import net.minecraft.server.NBTTagFloat;
|
||||
import net.minecraft.server.NBTTagInt;
|
||||
import net.minecraft.server.NBTTagIntArray;
|
||||
import net.minecraft.server.NBTTagList;
|
||||
import net.minecraft.server.NBTTagLong;
|
||||
import net.minecraft.server.NBTTagShort;
|
||||
import net.minecraft.server.NBTTagString;
|
||||
import net.minecraft.server.TileEntity;
|
||||
import net.minecraft.server.v1_4_6.NBTBase;
|
||||
import net.minecraft.server.v1_4_6.NBTTagByte;
|
||||
import net.minecraft.server.v1_4_6.NBTTagByteArray;
|
||||
import net.minecraft.server.v1_4_6.NBTTagCompound;
|
||||
import net.minecraft.server.v1_4_6.NBTTagDouble;
|
||||
import net.minecraft.server.v1_4_6.NBTTagEnd;
|
||||
import net.minecraft.server.v1_4_6.NBTTagFloat;
|
||||
import net.minecraft.server.v1_4_6.NBTTagInt;
|
||||
import net.minecraft.server.v1_4_6.NBTTagIntArray;
|
||||
import net.minecraft.server.v1_4_6.NBTTagList;
|
||||
import net.minecraft.server.v1_4_6.NBTTagLong;
|
||||
import net.minecraft.server.v1_4_6.NBTTagShort;
|
||||
import net.minecraft.server.v1_4_6.NBTTagString;
|
||||
import net.minecraft.server.v1_4_6.TileEntity;
|
||||
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_4_6.CraftWorld;
|
||||
|
||||
import com.sk89q.jnbt.ByteArrayTag;
|
||||
import com.sk89q.jnbt.ByteTag;
|
||||
@ -81,7 +81,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
||||
static {
|
||||
Field field;
|
||||
try {
|
||||
field = net.minecraft.server.Block.class.getDeclaredField("isTileEntity");
|
||||
field = net.minecraft.server.v1_4_6.Block.class.getDeclaredField("isTileEntity");
|
||||
field.setAccessible(true);
|
||||
} catch (NoSuchFieldException e) {
|
||||
logger.severe("Could not find NMS block tile entity field!");
|
||||
@ -266,7 +266,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
||||
}
|
||||
|
||||
public static boolean hasTileEntity(int type) {
|
||||
net.minecraft.server.Block nmsBlock = getNmsBlock(type);
|
||||
net.minecraft.server.v1_4_6.Block nmsBlock = getNmsBlock(type);
|
||||
if (nmsBlock == null) {
|
||||
return false;
|
||||
}
|
||||
@ -278,11 +278,11 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
||||
}
|
||||
}
|
||||
|
||||
public static net.minecraft.server.Block getNmsBlock(int type) {
|
||||
if (type < 0 || type >= net.minecraft.server.Block.byId.length) {
|
||||
public static net.minecraft.server.v1_4_6.Block getNmsBlock(int type) {
|
||||
if (type < 0 || type >= net.minecraft.server.v1_4_6.Block.byId.length) {
|
||||
return null;
|
||||
}
|
||||
return net.minecraft.server.Block.byId[type];
|
||||
return net.minecraft.server.v1_4_6.Block.byId[type];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -308,7 +308,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
||||
} catch (Throwable t) {
|
||||
try {
|
||||
logger.warning("WorldEdit: Couldn't get NBTTagCompound.c(), " +
|
||||
"so we're going to try to get at the 'map' field directly from now on");
|
||||
"so we're going to try to get at the 'map' field directly from now on");
|
||||
|
||||
if (compoundMapField == null) {
|
||||
compoundMapField = NBTTagCompound.class.getDeclaredField("map");
|
||||
@ -436,7 +436,7 @@ class NmsBlock extends BaseBlock implements TileEntityBlock {
|
||||
}
|
||||
|
||||
public static boolean isValidBlockType(int type) throws NoClassDefFoundError {
|
||||
return type == 0 || (type >= 1 && type < net.minecraft.server.Block.byId.length
|
||||
&& net.minecraft.server.Block.byId[type] != null);
|
||||
return type == 0 || (type >= 1 && type < net.minecraft.server.v1_4_6.Block.byId.length
|
||||
&& net.minecraft.server.v1_4_6.Block.byId[type] != null);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user