Merge pull request #23 from boy0001/1.13.2-R0.1-NBT

Fixing NBT
This commit is contained in:
NotMyFault 2018-12-19 16:40:23 +01:00 committed by GitHub
commit f37bd403d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ dependencies {
compile project(':worldedit-core') compile project(':worldedit-core')
compile 'com.sk89q:dummypermscompat:1.8' compile 'com.sk89q:dummypermscompat:1.8'
compile 'com.destroystokyo.paper:paper-api:1.13-R0.1-SNAPSHOT' compile 'com.destroystokyo.paper:paper-api:1.13-R0.1-SNAPSHOT'
compile "org.spigotmc:spigot-1.13:SNAPSHOT" compile 'org.spigotmc:spigot:1.13.2-R0.1-SNAPSHOT'
testCompile 'org.mockito:mockito-core:1.9.0-rc1' testCompile 'org.mockito:mockito-core:1.9.0-rc1'
compile 'net.milkbowl.vault:VaultAPI:1.5.6' compile 'net.milkbowl.vault:VaultAPI:1.5.6'
compile 'com.massivecraft:factions:2.8.0' compile 'com.massivecraft:factions:2.8.0'

View File

@ -411,15 +411,15 @@ public final class Spigot_v1_13_R2 extends CachedBukkitAdapter implements Bukkit
} }
return new CompoundTag(values); return new CompoundTag(values);
} else if (foreign instanceof NBTTagByte) { } else if (foreign instanceof NBTTagByte) {
return new ByteTag(((NBTTagByte) foreign).g()); // getByte return new ByteTag(((NBTTagByte) foreign).asByte()); // getByte
} else if (foreign instanceof NBTTagByteArray) { } else if (foreign instanceof NBTTagByteArray) {
return new ByteArrayTag(((NBTTagByteArray) foreign).c()); // data return new ByteArrayTag(((NBTTagByteArray) foreign).c()); // data
} else if (foreign instanceof NBTTagDouble) { } else if (foreign instanceof NBTTagDouble) {
return new DoubleTag(((NBTTagDouble) foreign).asDouble()); // getDouble return new DoubleTag(((NBTTagDouble) foreign).asDouble()); // getDouble
} else if (foreign instanceof NBTTagFloat) { } else if (foreign instanceof NBTTagFloat) {
return new FloatTag(((NBTTagFloat) foreign).i()); // getFloat return new FloatTag(((NBTTagFloat) foreign).asFloat()); // getFloat
} else if (foreign instanceof NBTTagInt) { } else if (foreign instanceof NBTTagInt) {
return new IntTag(((NBTTagInt) foreign).e()); // getInt return new IntTag(((NBTTagInt) foreign).asInt()); // getInt
} else if (foreign instanceof NBTTagIntArray) { } else if (foreign instanceof NBTTagIntArray) {
return new IntArrayTag(((NBTTagIntArray) foreign).d()); // data return new IntArrayTag(((NBTTagIntArray) foreign).d()); // data
} else if (foreign instanceof NBTTagList) { } else if (foreign instanceof NBTTagList) {
@ -430,11 +430,11 @@ public final class Spigot_v1_13_R2 extends CachedBukkitAdapter implements Bukkit
return new ListTag(ByteTag.class, new ArrayList<ByteTag>()); return new ListTag(ByteTag.class, new ArrayList<ByteTag>());
} }
} else if (foreign instanceof NBTTagLong) { } else if (foreign instanceof NBTTagLong) {
return new LongTag(((NBTTagLong) foreign).d()); // getLong return new LongTag(((NBTTagLong) foreign).asLong()); // getLong
} else if (foreign instanceof NBTTagShort) { } else if (foreign instanceof NBTTagShort) {
return new ShortTag(((NBTTagShort) foreign).f()); // getShort return new ShortTag(((NBTTagShort) foreign).asShort()); // getShort
} else if (foreign instanceof NBTTagString) { } else if (foreign instanceof NBTTagString) {
return new StringTag(foreign.b_()); // data return new StringTag(foreign.asString()); // data
} else if (foreign instanceof NBTTagEnd) { } else if (foreign instanceof NBTTagEnd) {
return EndTag.INSTANCE; return EndTag.INSTANCE;
} else { } else {