Remove FawePlayer and API modifications

This commit is contained in:
MattBDev
2019-09-13 23:05:16 -04:00
parent c65e06cb1b
commit 14ed3f1d9c
105 changed files with 1614 additions and 2407 deletions

View File

@ -48,7 +48,7 @@ public class CompoundTag extends Tag {
* @return true if the tag contains the given key
*/
public boolean containsKey(String key) {
return getValue().containsKey(key);
return value.containsKey(key);
}
@Override
@ -85,7 +85,7 @@ public class CompoundTag extends Tag {
* @return a byte array
*/
public byte[] getByteArray(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ByteArrayTag) {
return ((ByteArrayTag) tag).getValue();
} else {
@ -103,7 +103,7 @@ public class CompoundTag extends Tag {
* @return a byte
*/
public byte getByte(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ByteTag) {
return ((ByteTag) tag).getValue();
} else {
@ -121,7 +121,7 @@ public class CompoundTag extends Tag {
* @return a double
*/
public double getDouble(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof DoubleTag) {
return ((DoubleTag) tag).getValue();
} else {
@ -140,7 +140,7 @@ public class CompoundTag extends Tag {
* @return a double
*/
public double asDouble(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ByteTag) {
return ((ByteTag) tag).getValue();
@ -174,7 +174,7 @@ public class CompoundTag extends Tag {
* @return a float
*/
public float getFloat(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof FloatTag) {
return ((FloatTag) tag).getValue();
} else {
@ -192,7 +192,7 @@ public class CompoundTag extends Tag {
* @return an int array
*/
public int[] getIntArray(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof IntArrayTag) {
return ((IntArrayTag) tag).getValue();
} else {
@ -210,7 +210,7 @@ public class CompoundTag extends Tag {
* @return an int
*/
public int getInt(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof IntTag) {
return ((IntTag) tag).getValue();
} else {
@ -229,7 +229,7 @@ public class CompoundTag extends Tag {
* @return an int
*/
public int asInt(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ByteTag) {
return ((ByteTag) tag).getValue();
@ -263,7 +263,7 @@ public class CompoundTag extends Tag {
* @return a list of tags
*/
public List<Tag> getList(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ListTag) {
return ((ListTag) tag).getValue();
} else {
@ -281,7 +281,7 @@ public class CompoundTag extends Tag {
* @return a tag list instance
*/
public ListTag getListTag(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ListTag) {
return (ListTag) tag;
} else {
@ -304,7 +304,7 @@ public class CompoundTag extends Tag {
*/
@SuppressWarnings("unchecked")
public <T extends Tag> List<T> getList(String key, Class<T> listType) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ListTag) {
ListTag listTag = (ListTag) tag;
if (listTag.getType().equals(listType)) {
@ -327,7 +327,7 @@ public class CompoundTag extends Tag {
* @return an int array
*/
public long[] getLongArray(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof LongArrayTag) {
return ((LongArrayTag) tag).getValue();
} else {
@ -345,7 +345,7 @@ public class CompoundTag extends Tag {
* @return a long
*/
public long getLong(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof LongTag) {
return ((LongTag) tag).getValue();
} else {
@ -364,7 +364,7 @@ public class CompoundTag extends Tag {
* @return a long
*/
public long asLong(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ByteTag) {
return ((ByteTag) tag).getValue();
@ -398,7 +398,7 @@ public class CompoundTag extends Tag {
* @return a short
*/
public short getShort(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof ShortTag) {
return ((ShortTag) tag).getValue();
} else {
@ -416,7 +416,7 @@ public class CompoundTag extends Tag {
* @return a string
*/
public String getString(String key) {
Tag tag = getValue().get(key);
Tag tag = value.get(key);
if (tag instanceof StringTag) {
return ((StringTag) tag).getValue();
} else {
@ -437,8 +437,8 @@ public class CompoundTag extends Tag {
@Override
public String toString() {
StringBuilder bldr = new StringBuilder();
bldr.append("TAG_Compound").append(": ").append(getValue().size()).append(" entries\r\n{\r\n");
for (Map.Entry<String, Tag> entry : getValue().entrySet()) {
bldr.append("TAG_Compound").append(": ").append(value.size()).append(" entries\r\n{\r\n");
for (Map.Entry<String, Tag> entry : value.entrySet()) {
bldr.append(" ").append(entry.getValue().toString().replaceAll("\r\n", "\r\n ")).append("\r\n");
}
bldr.append("}");