Use names consistently
This commit is contained in:
parent
8f21f87867
commit
0e2dd23096
|
@ -315,28 +315,28 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||
lib.loadLibrary(Library.builder().groupId("net{}sf{}trove4j").artifactId("trove4j").version("3.0.3")
|
||||
.relocate("gnu{}trove", "clib{}trove").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-minimessage")
|
||||
.version("4.11.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-bukkit").version("4.1.2")
|
||||
.version("4.12.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-bukkit").version("4.2.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-api").version("4.1.2")
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-api").version("4.2.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-facet").version("4.1.2")
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-facet").version("4.2.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-viaversion")
|
||||
.version("4.1.2").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-api").version("4.11.0")
|
||||
.version("4.2.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-api").version("4.12.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-bungeecord")
|
||||
.version("4.1.2").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
.version("4.2.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-legacy")
|
||||
.version("4.11.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
.version("4.12.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson")
|
||||
.version("4.11.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
.version("4.12.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson-legacy-impl")
|
||||
.version("4.11.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-nbt").version("4.11.0")
|
||||
.version("4.12.0").relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-nbt").version("4.12.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-key").version("4.11.0")
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-key").version("4.12.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-api").version("1.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -583,10 +583,10 @@ public class NPCCommands {
|
|||
public void copy(CommandContext args, CommandSender sender, NPC npc, @Flag("name") String name)
|
||||
throws CommandException {
|
||||
if (name == null) {
|
||||
name = npc.getFullName();
|
||||
name = npc.getRawName();
|
||||
}
|
||||
NPC copy = npc.clone();
|
||||
if (!copy.getFullName().equals(name)) {
|
||||
if (!copy.getRawName().equals(name)) {
|
||||
copy.setName(name);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ public class CopierEditor extends Editor {
|
|||
public CopierEditor(Player player, NPC npc) {
|
||||
this.player = player;
|
||||
this.npc = npc;
|
||||
this.name = npc.getFullName();
|
||||
this.name = npc.getRawName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +38,7 @@ public class CopierEditor extends Editor {
|
|||
return;
|
||||
}
|
||||
NPC copy = npc.clone();
|
||||
if (!copy.getFullName().equals(name)) {
|
||||
if (!copy.getRawName().equals(name)) {
|
||||
copy.setName(name);
|
||||
}
|
||||
|
||||
|
|
|
@ -517,8 +517,8 @@ public class CitizensNPC extends AbstractNPC {
|
|||
|
||||
@Override
|
||||
public void updateCustomName() {
|
||||
if (nameComponentCache != null) {
|
||||
NMS.setCustomName(getEntity(), nameComponentCache, nameStringComponentCache);
|
||||
if (coloredNameComponentCache != null) {
|
||||
NMS.setCustomName(getEntity(), coloredNameComponentCache, coloredNameStringCache);
|
||||
} else {
|
||||
super.updateCustomName();
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ public class HologramTrait extends Trait {
|
|||
.parseBoolean(npc.data().<Object> get(NPC.Metadata.NAMEPLATE_VISIBLE, true).toString());
|
||||
currentLoc = npc.getStoredLocation();
|
||||
if (npc.requiresNameHologram() && lastNameplateVisible) {
|
||||
nameNPC = createHologram(npc.getFullName(), 0);
|
||||
nameNPC = createHologram(Placeholders.replace(npc.getRawName(), null, npc), 0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
|
@ -252,7 +252,7 @@ public class HologramTrait extends Trait {
|
|||
nameNPC.destroy();
|
||||
nameNPC = null;
|
||||
} else if (nameNPC == null && nameplateVisible) {
|
||||
nameNPC = createHologram(npc.getFullName(), 0);
|
||||
nameNPC = createHologram(Placeholders.replace(npc.getRawName(), null, npc), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ public class HologramTrait extends Trait {
|
|||
if (updatePosition) {
|
||||
nameNPC.teleport(currentLoc.clone().add(0, getEntityHeight(), 0), TeleportCause.PLUGIN);
|
||||
}
|
||||
nameNPC.setName(npc.getFullName());
|
||||
nameNPC.setName(Placeholders.replace(npc.getRawName(), null, npc));
|
||||
}
|
||||
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
|
|
Loading…
Reference in New Issue