Use new method
This commit is contained in:
parent
da2ab6324a
commit
130dc42e5f
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final ServerLevel nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
String teamName = Util.getTeamName(uuid);
|
String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
|
@ -31,13 +31,7 @@ public class HumanController extends AbstractEntityController {
|
||||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||||
String coloredName = npc.getFullName();
|
String coloredName = npc.getFullName();
|
||||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||||
UUID uuid = npc.getUniqueId();
|
UUID uuid = npc.getMinecraftUniqueId();
|
||||||
if (uuid.version() == 4) { // set version to 2
|
|
||||||
long msb = uuid.getMostSignificantBits();
|
|
||||||
msb &= ~0x0000000000004000L;
|
|
||||||
msb |= 0x0000000000002000L;
|
|
||||||
uuid = new UUID(msb, uuid.getLeastSignificantBits());
|
|
||||||
}
|
|
||||||
final String teamName = Util.getTeamName(uuid);
|
final String teamName = Util.getTeamName(uuid);
|
||||||
if (npc.requiresNameHologram()) {
|
if (npc.requiresNameHologram()) {
|
||||||
name = teamName;
|
name = teamName;
|
||||||
|
|
Loading…
Reference in New Issue