Minor grammar and code changes

This commit is contained in:
filoghost 2021-08-09 08:17:24 +02:00
parent cc8b068bf0
commit f5e320a420
7 changed files with 23 additions and 23 deletions

View File

@ -217,7 +217,7 @@ public interface Hologram {
/**
* Sets if the hologram should track and replace placeholders.
* By default if will not track them.
* By default, it will not track them.
*
* @param allowPlaceholders if the hologram should track placeholders
* @since 1

View File

@ -17,7 +17,7 @@ public abstract class AbstractNMSPacketList implements NMSPacketList {
private @Nullable NMSPacket singlePacket;
private @Nullable List<NMSPacket> multiplePackets;
protected void add(NMSPacket packet) {
protected final void add(NMSPacket packet) {
if (multiplePackets != null) {
multiplePackets.add(packet);
} else if (singlePacket != null) {
@ -31,7 +31,7 @@ public abstract class AbstractNMSPacketList implements NMSPacketList {
}
@Override
public void sendTo(Player player) {
public final void sendTo(Player player) {
if (multiplePackets != null) {
for (NMSPacket packet : multiplePackets) {
packet.sendTo(player);

View File

@ -21,12 +21,12 @@ class DataWatcherKey<T> {
private static final DataWatcherSerializer<ItemStack> ITEM_STACK_SERIALIZER = DataWatcherRegistry.g;
private static final DataWatcherSerializer<Optional<IChatBaseComponent>> OPTIONAL_CHAT_COMPONENT_SERIALIZER = DataWatcherRegistry.f;
static DataWatcherKey<Byte> ENTITY_STATUS = new DataWatcherKey<>(0, BYTE_SERIALIZER);
static DataWatcherKey<Optional<IChatBaseComponent>> CUSTOM_NAME = new DataWatcherKey<>(2, OPTIONAL_CHAT_COMPONENT_SERIALIZER);
static DataWatcherKey<Boolean> CUSTOM_NAME_VISIBILITY = new DataWatcherKey<>(3, BOOLEAN_SERIALIZER);
static DataWatcherKey<ItemStack> ITEM_STACK = new DataWatcherKey<>(8, ITEM_STACK_SERIALIZER);
static DataWatcherKey<Byte> ARMOR_STAND_STATUS = new DataWatcherKey<>(15, BYTE_SERIALIZER);
static DataWatcherKey<Integer> SLIME_SIZE = new DataWatcherKey<>(16, INT_SERIALIZER);
static final DataWatcherKey<Byte> ENTITY_STATUS = new DataWatcherKey<>(0, BYTE_SERIALIZER);
static final DataWatcherKey<Optional<IChatBaseComponent>> CUSTOM_NAME = new DataWatcherKey<>(2, OPTIONAL_CHAT_COMPONENT_SERIALIZER);
static final DataWatcherKey<Boolean> CUSTOM_NAME_VISIBILITY = new DataWatcherKey<>(3, BOOLEAN_SERIALIZER);
static final DataWatcherKey<ItemStack> ITEM_STACK = new DataWatcherKey<>(8, ITEM_STACK_SERIALIZER);
static final DataWatcherKey<Byte> ARMOR_STAND_STATUS = new DataWatcherKey<>(15, BYTE_SERIALIZER);
static final DataWatcherKey<Integer> SLIME_SIZE = new DataWatcherKey<>(16, INT_SERIALIZER);
private final int index;
private final DataWatcherSerializer<T> serializer;

View File

@ -108,7 +108,7 @@ public class APIHologram extends BaseHologram implements Hologram {
}
@Override
public boolean removeLine(HologramLine line) {
public boolean removeLine(@NotNull HologramLine line) {
checkNotDeleted();
if (line instanceof APIHologramLine) {

View File

@ -111,7 +111,7 @@ public class ItemLineTracker extends ClickableLineTracker<BaseItemLine> {
addItemDestroyPackets(packetList);
}
} else if (itemStackChanged) {
// Only send item changes if full spawn/destroy packets we not sent
// Only send item changes if full spawn/destroy packets were not sent
packetList.addItemStackChangePackets(itemEntityID, itemStack);
}
}

View File

@ -57,7 +57,7 @@ public final class NBTCompound extends NBTTag {
* Returns a tag named with the given key.
*
* @param key the key
* @return a byte
* @return a tag
* @throws NoSuchElementException if there is no tag with given name
*/
public NBTTag getTag(String key) {
@ -83,10 +83,10 @@ public final class NBTCompound extends NBTTag {
}
/**
* Returns an short named with the given key.
* Returns a short named with the given key.
*
* @param key the key
* @return an short
* @return a short
* @throws NoSuchElementException if there is no short with given name
*/
public short getShort(String key) {
@ -113,10 +113,10 @@ public final class NBTCompound extends NBTTag {
}
/**
* Returns an long named with the given key.
* Returns a long named with the given key.
*
* @param key the key
* @return an long
* @return a long
* @throws NoSuchElementException if there is no long with given name
*/
public long getLong(String key) {
@ -128,7 +128,7 @@ public final class NBTCompound extends NBTTag {
}
/**
* Returns float named with the given key.
* Returns a float named with the given key.
*
* @param key the key
* @return a float
@ -214,10 +214,10 @@ public final class NBTCompound extends NBTTag {
}
/**
* Returns a list named with the given key.
* Returns a compound named with the given key.
*
* @param key the key
* @return a list
* @return a compound
* @throws NoSuchElementException if there is no compound with given name
*/
public Map<String, NBTTag> getCompound(String key) {
@ -243,7 +243,7 @@ public final class NBTCompound extends NBTTag {
* Returns an int array named with the given key.
*
* @param key the key
* @return a int array
* @return an int array
* @throws NoSuchElementException if there is no int array with given name
*/
public int[] getIntArray(String key) {
@ -258,7 +258,7 @@ public final class NBTCompound extends NBTTag {
* Returns a long array named with the given key.
*
* @param key the key
* @return a int array
* @return a long array
* @throws NoSuchElementException if there is no int array with given name
*/
public long[] getLongArray(String key) {

View File

@ -172,7 +172,7 @@ public enum NBTType {
/**
* Returns whether this tag type is primitive, meaning that it is not a {@link NBTByteArray}, {@link NBTIntArray},
* {@link NBTList}, {@link NBTCompound} or {@link NBTEnd}.
* {@link NBTList}, {@link NBTCompound}.
*
* @return whether this type is numeric
*/
@ -181,7 +181,7 @@ public enum NBTType {
}
/**
* Returns whether this tag type is is an array type such as {@link NBTByteArray} or {@link NBTIntArray}.
* Returns whether this tag type is an array type such as {@link NBTByteArray} or {@link NBTIntArray}.
*
* @return whether this type is an array type
*/