added display_name property
This commit is contained in:
parent
f3c0df41dc
commit
27a6f32f4f
3 changed files with 3 additions and 2 deletions
|
@ -120,6 +120,7 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
||||||
register(new EquipmentProperty(packetFactory, "offhand", EquipmentSlot.OFF_HAND));
|
register(new EquipmentProperty(packetFactory, "offhand", EquipmentSlot.OFF_HAND));
|
||||||
|
|
||||||
register(new NameProperty(legacyNames, optionalComponents));
|
register(new NameProperty(legacyNames, optionalComponents));
|
||||||
|
register(new DummyProperty<>("display_name", String.class));
|
||||||
register(new DinnerboneProperty(legacyNames, optionalComponents));
|
register(new DinnerboneProperty(legacyNames, optionalComponents));
|
||||||
|
|
||||||
register(new DummyProperty<>("look", LookType.FIXED));
|
register(new DummyProperty<>("look", LookType.FIXED));
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class NpcTypeImpl implements NpcType {
|
||||||
public NpcTypeImpl build() {
|
public NpcTypeImpl build() {
|
||||||
ServerVersion version = PacketEvents.getAPI().getServerManager().getVersion();
|
ServerVersion version = PacketEvents.getAPI().getServerManager().getVersion();
|
||||||
addProperties("fire", "invisible", "silent", "look", "look_distance", "view_distance",
|
addProperties("fire", "invisible", "silent", "look", "look_distance", "view_distance",
|
||||||
"potion_color", "potion_ambient");
|
"potion_color", "potion_ambient", "display_name");
|
||||||
if (!type.equals(EntityTypes.PLAYER)) addProperties("dinnerbone");
|
if (!type.equals(EntityTypes.PLAYER)) addProperties("dinnerbone");
|
||||||
// TODO: make this look nicer after completing the rest of the properties
|
// TODO: make this look nicer after completing the rest of the properties
|
||||||
if (version.isNewerThanOrEquals(ServerVersion.V_1_9)) addProperties("glow");
|
if (version.isNewerThanOrEquals(ServerVersion.V_1_9)) addProperties("glow");
|
||||||
|
|
|
@ -14,6 +14,6 @@ public class StringParser extends ParserType<String> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String parse(Deque<String> deque) throws CommandExecutionException {
|
public String parse(Deque<String> deque) throws CommandExecutionException {
|
||||||
return deque.pollFirst();
|
return String.join(" ", deque);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue