Cleanup some formatting
This commit is contained in:
@@ -87,8 +87,10 @@ public interface Connection
|
||||
|
||||
/**
|
||||
* Queue a packet to this connection.
|
||||
* If the packet is not registered for the connections current encoder protocol, it will be queued until it is,
|
||||
* otherwise it will be sent immediately.
|
||||
*
|
||||
* If the packet is not registered for the connections current encoder
|
||||
* protocol, it will be queued until it is, otherwise it will be sent
|
||||
* immediately.
|
||||
*
|
||||
* @param packet the packet to be queued
|
||||
* @throws UnsupportedOperationException if used for a PendingConnection
|
||||
|
@@ -386,6 +386,7 @@ public interface ProxiedPlayer extends Connection, CommandSender
|
||||
|
||||
/**
|
||||
* Gets the client brand of this player.
|
||||
*
|
||||
* If the player has not sent a brand packet yet, it will return null.
|
||||
*
|
||||
* @return the brand of the client, or null if not received yet
|
||||
|
@@ -474,8 +474,7 @@ public final class PluginManager
|
||||
{
|
||||
for ( Method method : listener.getClass().getDeclaredMethods() )
|
||||
{
|
||||
Preconditions.checkArgument( !method.isAnnotationPresent( Subscribe.class ),
|
||||
"Listener %s has registered using deprecated subscribe annotation! Please update to @EventHandler.", listener );
|
||||
Preconditions.checkArgument( !method.isAnnotationPresent( Subscribe.class ), "Listener %s has registered using deprecated subscribe annotation! Please update to @EventHandler.", listener );
|
||||
}
|
||||
eventBus.register( listener );
|
||||
listenersByPlugin.put( plugin, listener );
|
||||
|
@@ -313,8 +313,9 @@ public abstract class BaseComponent
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shadow color of this component. This uses the parent's shadow color if this
|
||||
* component doesn't have one. null is returned if no shadow color is found.
|
||||
* Returns the shadow color of this component. This uses the parent's shadow
|
||||
* color if this component doesn't have one. null is returned if no shadow
|
||||
* color is found.
|
||||
*
|
||||
* @return the shadow color of this component
|
||||
*/
|
||||
|
@@ -38,7 +38,8 @@ public final class DialogListDialog implements Dialog
|
||||
*/
|
||||
private Integer columns;
|
||||
/**
|
||||
* The width of the dialog buttons (default: 150, minimum: 1, maximum: 1024).
|
||||
* The width of the dialog buttons (default: 150, minimum: 1, maximum:
|
||||
* 1024).
|
||||
*/
|
||||
@SerializedName("button_width")
|
||||
private Integer buttonWidth;
|
||||
|
@@ -37,7 +37,8 @@ public final class ServerLinksDialog implements Dialog
|
||||
*/
|
||||
private Integer columns;
|
||||
/**
|
||||
* The width of the dialog buttons (default: 150, minimum: 1, maximum: 1024).
|
||||
* The width of the dialog buttons (default: 150, minimum: 1, maximum:
|
||||
* 1024).
|
||||
*/
|
||||
@SerializedName("button_width")
|
||||
private Integer buttonWidth;
|
||||
|
@@ -6,8 +6,8 @@ import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* Executes a command. If the command requires a permission
|
||||
* higher than 0, a confirmation dialog will be shown by the client.
|
||||
* Executes a command. If the command requires a permission higher than 0, a
|
||||
* confirmation dialog will be shown by the client.
|
||||
*/
|
||||
@Data
|
||||
@Accessors(fluent = true)
|
||||
|
@@ -81,9 +81,8 @@ public interface Tag
|
||||
void write(DataOutput output) throws IOException;
|
||||
|
||||
/**
|
||||
* Reads a {@link Tag} from the given {@link DataInput},
|
||||
* based on the specified tag type, with limitations of the
|
||||
* {@link NBTLimiter}.
|
||||
* Reads a {@link Tag} from the given {@link DataInput}, based on the
|
||||
* specified tag type, with limitations of the {@link NBTLimiter}.
|
||||
*
|
||||
* @param id the nbt type
|
||||
* @param input the input to read from
|
||||
@@ -104,8 +103,8 @@ public interface Tag
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a {@link NamedTag} from the given {@link DataInput},
|
||||
* with limitations of the {@link NBTLimiter}.
|
||||
* Reads a {@link NamedTag} from the given {@link DataInput}, with
|
||||
* limitations of the {@link NBTLimiter}.
|
||||
*
|
||||
* @param input the data input to read from
|
||||
* @param limiter the limiter for this read operation
|
||||
@@ -120,8 +119,8 @@ public interface Tag
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the given {@link TypedTag} into a byte array.
|
||||
* This is the inverse operation of {@link #fromByteArray(byte[])}.
|
||||
* Serializes the given {@link TypedTag} into a byte array. This is the
|
||||
* inverse operation of {@link #fromByteArray(byte[])}.
|
||||
*
|
||||
* @param tag the tag to convert
|
||||
* @return the serialized byte array
|
||||
@@ -137,8 +136,8 @@ public interface Tag
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the given byte array into a {@link TypedTag}.
|
||||
* This is the inverse operation of {@link #toByteArray(TypedTag)}.
|
||||
* Deserializes the given byte array into a {@link TypedTag}. This is the
|
||||
* inverse operation of {@link #toByteArray(TypedTag)}.
|
||||
*
|
||||
* @param data the byte array to read from
|
||||
* @return the deserialized {@link TypedTag}
|
||||
@@ -150,8 +149,8 @@ public interface Tag
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserializes the given byte array into a {@link TypedTag},
|
||||
* with limitations of the {@link NBTLimiter}.
|
||||
* Deserializes the given byte array into a {@link TypedTag}, with
|
||||
* limitations of the {@link NBTLimiter}.
|
||||
*
|
||||
* @param data the byte array to read from
|
||||
* @param limiter the limiter for this read operation
|
||||
|
@@ -7,8 +7,11 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* This class hold a netty channel initializer that calls the given {@link ChannelAcceptor}.
|
||||
* Use {@link BungeeChannelInitializer#create(ChannelAcceptor)} to create a new instance.
|
||||
* This class hold a netty channel initializer that calls the given
|
||||
* {@link ChannelAcceptor}.
|
||||
*
|
||||
* Use {@link BungeeChannelInitializer#create(ChannelAcceptor)} to create a new
|
||||
* instance.
|
||||
* <p>
|
||||
* Please note that this API is unsafe and doesn't provide any guarantees about
|
||||
* the stability of the channel pipeline or the API itself. Use at your own
|
||||
|
@@ -13,10 +13,12 @@ import net.md_5.bungee.protocol.DefinedPacket;
|
||||
/**
|
||||
* prepends length of message and optionally compresses message beforehand
|
||||
* <br>
|
||||
* combining these operations allows to keep space infront of compressed data for length varint
|
||||
* combining these operations allows to keep space infront of compressed data
|
||||
* for length varint
|
||||
*/
|
||||
public class LengthPrependerAndCompressor extends MessageToMessageEncoder<ByteBuf>
|
||||
{
|
||||
|
||||
// reasonable to not support length varints > 4 byte (268435455 byte > 268MB)
|
||||
// if ever changed to smaller than 4, also change varintSize method to check for that
|
||||
private static final byte MAX_SUPPORTED_VARINT_LENGTH_LEN = 4;
|
||||
|
@@ -20,11 +20,12 @@ public class ClickEventSerializer
|
||||
public static final ClickEventSerializer NEW = new ClickEventSerializer( ClickType.NEW );
|
||||
public static final ClickEventSerializer DIALOG = new ClickEventSerializer( ClickType.DIALOG );
|
||||
//
|
||||
private final ClickType type;
|
||||
|
||||
public enum ClickType
|
||||
{
|
||||
OLD, NEW, DIALOG;
|
||||
}
|
||||
private final ClickType type;
|
||||
|
||||
public ClickEvent deserialize(JsonObject clickEvent, JsonDeserializationContext context) throws JsonParseException
|
||||
{
|
||||
|
@@ -265,7 +265,7 @@ public class VersionedComponentSerializer implements JsonDeserializer<BaseCompon
|
||||
if ( json.isJsonArray() )
|
||||
{
|
||||
JsonArray arr = json.getAsJsonArray();
|
||||
BaseComponent[] components = new BaseComponent[arr.size()];
|
||||
BaseComponent[] components = new BaseComponent[ arr.size() ];
|
||||
for ( int i = 0; i < arr.size(); i++ )
|
||||
{
|
||||
components[i] = deserialize( arr.get( i ), BaseComponent.class, context );
|
||||
|
@@ -29,6 +29,7 @@ import net.md_5.bungee.chat.VersionedComponentSerializer;
|
||||
@RequiredArgsConstructor
|
||||
public class DialogSerializer implements JsonDeserializer<Dialog>, JsonSerializer<Dialog>
|
||||
{
|
||||
|
||||
private static final ThreadLocal<Set<Dialog>> serializedDialogs = new ThreadLocal<>();
|
||||
private static final BiMap<String, Class<? extends Dialog>> TYPES;
|
||||
private final VersionedComponentSerializer serializer;
|
||||
|
Reference in New Issue
Block a user