mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-11-14 14:35:11 +01:00
Fix Checkstyle warnings
This commit is contained in:
parent
4f86a8e9c2
commit
a7b9b72f96
@ -77,7 +77,9 @@
|
||||
<module name="NestedIfDepth">
|
||||
<property name="max" value="3"/>
|
||||
</module>
|
||||
<module name="NestedTryDepth"/>
|
||||
<module name="NestedTryDepth">
|
||||
<property name="max" value="2"/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="PackageDeclaration"/>
|
||||
|
@ -11,8 +11,8 @@
|
||||
checks="EqualsHashCode"
|
||||
files="[\\/]me[\\/]filoghost[\\/]holographicdisplays[\\/]plugin[\\/]lib[\\/]nbt[\\/].+\.java"/>
|
||||
<suppress
|
||||
checks="LeftCurly|EmptyLineSeparator"
|
||||
files="[\\/]me[\\/]filoghost[\\/]holographicdisplays[\\/]nms[\\/]\w+[\\/]Craft.+\.java"/>
|
||||
checks="IllegalImport"
|
||||
files="[\\/]me[\\/]filoghost[\\/]holographicdisplays[\\/]nms[\\/](v1_9_R2|v1_10_R1)[\\/].+\.java"/>
|
||||
<suppress
|
||||
checks="SummaryJavadoc"
|
||||
files="[\\/]com[\\/]gmail[\\/]filoghost[\\/](holograms|holographicdisplays)[\\/]api[\\/].+\.java"/>
|
||||
|
@ -14,7 +14,8 @@ public interface NMSPacketList {
|
||||
|
||||
void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, String customName);
|
||||
|
||||
void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName);
|
||||
void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName);
|
||||
|
||||
void addArmorStandNameChangePackets(EntityID entityID, String customName);
|
||||
|
||||
|
@ -25,7 +25,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntitySpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -24,7 +24,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntitySpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -24,7 +24,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntitySpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntitySpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class VersionNMSManager implements NMSManager {
|
||||
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD = ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD =
|
||||
ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private final Supplier<Integer> entityIDGenerator;
|
||||
|
||||
public VersionNMSManager(ErrorCollector errorCollector) {
|
||||
|
@ -31,7 +31,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new IndividualNMSPacket(player -> EntityLivingSpawnNMSPacket.builder(
|
||||
entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class VersionNMSManager implements NMSManager {
|
||||
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD = ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD =
|
||||
ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private final Supplier<Integer> entityIDGenerator;
|
||||
|
||||
public VersionNMSManager(ErrorCollector errorCollector) {
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntityLivingSpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class VersionNMSManager implements NMSManager {
|
||||
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD = ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD =
|
||||
ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private final Supplier<Integer> entityIDGenerator;
|
||||
|
||||
public VersionNMSManager(ErrorCollector errorCollector) {
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntityLivingSpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class VersionNMSManager implements NMSManager {
|
||||
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD = ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD =
|
||||
ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private final Supplier<Integer> entityIDGenerator;
|
||||
|
||||
public VersionNMSManager(ErrorCollector errorCollector) {
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntityLivingSpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class VersionNMSManager implements NMSManager {
|
||||
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD = ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private static final ReflectField<AtomicInteger> ENTITY_ID_COUNTER_FIELD =
|
||||
ReflectField.lookup(AtomicInteger.class, Entity.class, "entityCount");
|
||||
private final Supplier<Integer> entityIDGenerator;
|
||||
|
||||
public VersionNMSManager(ErrorCollector errorCollector) {
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntityLivingSpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -28,7 +28,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntityLivingSpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -9,9 +9,12 @@ import net.minecraft.server.v1_8_R3.ItemStack;
|
||||
|
||||
class DataWatcherKey<T> {
|
||||
|
||||
private static final DataWatcherSerializer<Byte> BYTE_SERIALIZER = new DataWatcherSerializer<>(0, PacketByteBuffer::writeByte);
|
||||
private static final DataWatcherSerializer<String> STRING_SERIALIZER = new DataWatcherSerializer<>(4, PacketByteBuffer::writeString);
|
||||
private static final DataWatcherSerializer<ItemStack> ITEM_STACK_SERIALIZER = new DataWatcherSerializer<>(5, PacketByteBuffer::writeItemStack);
|
||||
private static final DataWatcherSerializer<Byte> BYTE_SERIALIZER =
|
||||
new DataWatcherSerializer<>(0, PacketByteBuffer::writeByte);
|
||||
private static final DataWatcherSerializer<String> STRING_SERIALIZER =
|
||||
new DataWatcherSerializer<>(4, PacketByteBuffer::writeString);
|
||||
private static final DataWatcherSerializer<ItemStack> ITEM_STACK_SERIALIZER =
|
||||
new DataWatcherSerializer<>(5, PacketByteBuffer::writeItemStack);
|
||||
|
||||
static final DataWatcherKey<Byte> ENTITY_STATUS = new DataWatcherKey<>(0, BYTE_SERIALIZER);
|
||||
static final DataWatcherKey<String> CUSTOM_NAME = new DataWatcherKey<>(2, STRING_SERIALIZER);
|
||||
|
@ -24,7 +24,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntitySpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -25,7 +25,8 @@ abstract class DataWatcherPacketBuilder<T> {
|
||||
|
||||
DataWatcherPacketBuilder<T> setArmorStandMarker() {
|
||||
setInvisible();
|
||||
packetByteBuffer.writeDataWatcherEntry(DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x08 | 0x10)); // Small, no base plate, marker
|
||||
packetByteBuffer.writeDataWatcherEntry(
|
||||
DataWatcherKey.ARMOR_STAND_STATUS, (byte) (0x01 | 0x02 | 0x08 | 0x10)); // Small, no gravity, no base plate, marker
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,8 @@ class VersionNMSPacketList extends AbstractNMSPacketList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addArmorStandSpawnPackets(EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
public void addArmorStandSpawnPackets(
|
||||
EntityID entityID, double positionX, double positionY, double positionZ, IndividualCustomName individualCustomName) {
|
||||
add(new EntitySpawnNMSPacket(entityID, EntityTypeID.ARMOR_STAND, positionX, positionY, positionZ));
|
||||
add(new IndividualNMSPacket(player -> EntityMetadataNMSPacket.builder(entityID)
|
||||
.setArmorStandMarker()
|
||||
|
@ -81,7 +81,11 @@ public class V2HologramAdapter implements Hologram {
|
||||
|
||||
@Override
|
||||
public Location getLocation() {
|
||||
return new Location(v3Hologram.getPositionWorldIfLoaded(), v3Hologram.getPositionX(), v3Hologram.getPositionY(), v3Hologram.getPositionZ());
|
||||
return new Location(
|
||||
v3Hologram.getPositionWorldIfLoaded(),
|
||||
v3Hologram.getPositionX(),
|
||||
v3Hologram.getPositionY(),
|
||||
v3Hologram.getPositionZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,7 +58,8 @@ public class InsertlineCommand extends LineEditingCommand implements QuickEditCo
|
||||
sender.sendMessage(ColorScheme.PRIMARY + "Line appended at the end.");
|
||||
DisplayFormat.sendTip(sender, "You can use \"/" + context.getRootLabel() + " addline\" to append a line at the end.");
|
||||
} else {
|
||||
sender.sendMessage(ColorScheme.PRIMARY + "Line inserted between lines " + insertAfterIndex + " and " + (insertAfterIndex + 1) + ".");
|
||||
sender.sendMessage(ColorScheme.PRIMARY + "Line inserted between lines " + insertAfterIndex
|
||||
+ " and " + (insertAfterIndex + 1) + ".");
|
||||
}
|
||||
commandManager.sendQuickEditCommands(context, hologram);
|
||||
}
|
||||
|
@ -62,7 +62,8 @@ public abstract class BaseItemLine extends BaseClickableLine {
|
||||
checkNotDeleted();
|
||||
|
||||
if (itemStack != null) {
|
||||
Preconditions.checkArgument(0 < itemStack.getAmount() && itemStack.getAmount() <= 64, "itemStack's amount must be between 1 and 64");
|
||||
Preconditions.checkArgument(0 < itemStack.getAmount() && itemStack.getAmount() <= 64,
|
||||
"itemStack's amount must be between 1 and 64");
|
||||
}
|
||||
this.itemStack = clone(itemStack);
|
||||
setChanged();
|
||||
|
@ -77,11 +77,14 @@ public class TextLineTracker extends ClickableLineTracker<BaseTextLine> {
|
||||
super.addSpawnPackets(packetList);
|
||||
|
||||
if (!allowPlaceholders) {
|
||||
packetList.addArmorStandSpawnPackets(armorStandEntityID, positionX, getArmorStandPositionY(), positionZ, displayText.getWithoutReplacements());
|
||||
packetList.addArmorStandSpawnPackets(
|
||||
armorStandEntityID, positionX, getArmorStandPositionY(), positionZ, displayText.getWithoutReplacements());
|
||||
} else if (displayText.containsIndividualPlaceholders()) {
|
||||
packetList.addArmorStandSpawnPackets(armorStandEntityID, positionX, getArmorStandPositionY(), positionZ, displayText::getWithIndividualReplacements);
|
||||
packetList.addArmorStandSpawnPackets(
|
||||
armorStandEntityID, positionX, getArmorStandPositionY(), positionZ, displayText::getWithIndividualReplacements);
|
||||
} else {
|
||||
packetList.addArmorStandSpawnPackets(armorStandEntityID, positionX, getArmorStandPositionY(), positionZ, displayText.getWithGlobalReplacements());
|
||||
packetList.addArmorStandSpawnPackets(
|
||||
armorStandEntityID, positionX, getArmorStandPositionY(), positionZ, displayText.getWithGlobalReplacements());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,8 +341,7 @@ public final class MojangsonParser {
|
||||
* are met, the parser advances by one. If these conditions are not met, an exception is thrown.
|
||||
*
|
||||
* @param c the expected character
|
||||
* @throws MojangsonParseException if {@link #currentChar()} does not equal {@code c} or if {@link #hasNext()}
|
||||
* returns false
|
||||
* @throws MojangsonParseException if {@link #currentChar()} does not equal {@code c} or if {@link #hasNext()} returns false
|
||||
*/
|
||||
private void expectChar(char c) throws MojangsonParseException {
|
||||
skipWhitespace();
|
||||
|
@ -36,7 +36,8 @@ public class PlaceholderRegistry {
|
||||
this.changeListener = changeListener;
|
||||
}
|
||||
|
||||
public void registerIndividualPlaceholderReplacer(Plugin plugin, String identifier, int refreshIntervalTicks, IndividualPlaceholderReplacer placeholderReplacer) {
|
||||
public void registerIndividualPlaceholderReplacer(
|
||||
Plugin plugin, String identifier, int refreshIntervalTicks, IndividualPlaceholderReplacer placeholderReplacer) {
|
||||
registerIndividualPlaceholder(plugin, identifier, new SimpleIndividualPlaceholder(refreshIntervalTicks, placeholderReplacer));
|
||||
}
|
||||
|
||||
@ -49,7 +50,8 @@ public class PlaceholderRegistry {
|
||||
registerExpansion(expansion);
|
||||
}
|
||||
|
||||
public void registerGlobalPlaceholderReplacer(Plugin plugin, String identifier, int refreshIntervalTicks, PlaceholderReplacer placeholderReplacer) {
|
||||
public void registerGlobalPlaceholderReplacer(
|
||||
Plugin plugin, String identifier, int refreshIntervalTicks, PlaceholderReplacer placeholderReplacer) {
|
||||
registerGlobalPlaceholder(plugin, identifier, new SimpleGlobalPlaceholder(refreshIntervalTicks, placeholderReplacer));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user