mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-10-22 12:20:26 +02:00
Added set uuid option for nbt.
This commit is contained in:
parent
186b61fb2a
commit
bbc4840adb
@ -1,5 +1,7 @@
|
||||
package com.songoda.core.nms.nbt;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface NBTCompound {
|
||||
|
||||
NBTCompound set(String tag, String s);
|
||||
@ -18,6 +20,8 @@ public interface NBTCompound {
|
||||
|
||||
NBTCompound set(String tag, int[] i);
|
||||
|
||||
NBTCompound set(String tag, UUID u);
|
||||
|
||||
NBTCompound remove(String tag);
|
||||
|
||||
boolean has(String tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_10_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_10_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_11_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_11_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_12_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_13_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_13_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_13_R2.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_14_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_14_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_15_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_16_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_16_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_16_R2.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_16_R2.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_8_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,13 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
set(tag + "Most", u.getMostSignificantBits());
|
||||
set(tag + "Least", u.getLeastSignificantBits());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R2.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_8_R2.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,13 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
set(tag + "Most", u.getMostSignificantBits());
|
||||
set(tag + "Least", u.getLeastSignificantBits());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R3.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_8_R3.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,13 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
set(tag + "Most", u.getMostSignificantBits());
|
||||
set(tag + "Least", u.getLeastSignificantBits());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_9_R1.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_9_R1.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.server.v1_9_R2.NBTCompressedStreamTools;
|
||||
import net.minecraft.server.v1_9_R2.NBTTagCompound;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
|
||||
@ -67,6 +68,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound set(String tag, UUID u) {
|
||||
compound.a(tag, u);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTCompound remove(String tag) {
|
||||
compound.remove(tag);
|
||||
|
Loading…
Reference in New Issue
Block a user