Fix formatting in a bunch of files.
This commit is contained in:
parent
2055c98ebe
commit
61cee2d27c
@ -4,17 +4,18 @@ import net.md_5.bungee.api.chat.BaseComponent;
|
|||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a configuration of a title.
|
* Represents a configuration of a title. A title in Minecraft consists of a
|
||||||
* A title in Minecraft consists of a main title and a sub title.
|
* main title and a sub title. It will {@link #fadeIn(int)}, {@link #stay(int)},
|
||||||
* It will {@link #fadeIn(int)}, {@link #stay(int)}, and {@link #fadeOut(int)}
|
* and {@link #fadeOut(int)} for a specified amount of time. In most cases you
|
||||||
* for a specified amount of time.
|
* will want to {@link #reset()} the current title first so your title won't be
|
||||||
* In most cases you will want to {@link #reset()} the current title first so
|
* affected by a previous one.
|
||||||
* your title won't be affected by a previous one.
|
|
||||||
* <p>
|
* <p>
|
||||||
* You can create a new configuration by calling {@link ProxyServer#createTitle()}.
|
* You can create a new configuration by calling
|
||||||
|
* {@link ProxyServer#createTitle()}.
|
||||||
*/
|
*/
|
||||||
public interface Title
|
public interface Title
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the title to send to the player.
|
* Set the title to send to the player.
|
||||||
*
|
*
|
||||||
@ -31,7 +32,6 @@ public interface Title
|
|||||||
*/
|
*/
|
||||||
public Title title(BaseComponent... text);
|
public Title title(BaseComponent... text);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the subtitle to send to the player.
|
* Set the subtitle to send to the player.
|
||||||
*
|
*
|
||||||
@ -48,12 +48,11 @@ public interface Title
|
|||||||
*/
|
*/
|
||||||
public Title subTitle(BaseComponent... text);
|
public Title subTitle(BaseComponent... text);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the duration in ticks of the fade in effect of the title.
|
* Set the duration in ticks of the fade in effect of the title. Once this
|
||||||
* Once this period of time is over the title will stay for the amount
|
* period of time is over the title will stay for the amount of time
|
||||||
* of time specified in {@link #stay(int)}.
|
* specified in {@link #stay(int)}. The default value for the official
|
||||||
* The default value for the official Minecraft version is 20 (1 second).
|
* Minecraft version is 20 (1 second).
|
||||||
*
|
*
|
||||||
* @param ticks The amount of ticks (1/20 second) for the fade in effect.
|
* @param ticks The amount of ticks (1/20 second) for the fade in effect.
|
||||||
* @return This title configuration.
|
* @return This title configuration.
|
||||||
@ -62,9 +61,9 @@ public interface Title
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the duration in ticks how long the title should stay on the screen.
|
* Set the duration in ticks how long the title should stay on the screen.
|
||||||
* Once this period of time is over the title will fade out using the duration
|
* Once this period of time is over the title will fade out using the
|
||||||
* specified in {@link #fadeOut(int)}.
|
* duration specified in {@link #fadeOut(int)}. The default value for the
|
||||||
* The default value for the official Minecraft version is 60 (3 seconds).
|
* official Minecraft version is 60 (3 seconds).
|
||||||
*
|
*
|
||||||
* @param ticks The amount of ticks (1/20 second) for the fade in effect.
|
* @param ticks The amount of ticks (1/20 second) for the fade in effect.
|
||||||
* @return This title configuration.
|
* @return This title configuration.
|
||||||
@ -72,35 +71,33 @@ public interface Title
|
|||||||
public Title stay(int ticks);
|
public Title stay(int ticks);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the duration in ticks of the fade out effect of the title.
|
* Set the duration in ticks of the fade out effect of the title. The
|
||||||
* The default value for the official Minecraft version is 20 (1 second).
|
* default value for the official Minecraft version is 20 (1 second).
|
||||||
*
|
*
|
||||||
* @param ticks The amount of ticks (1/20 second) for the fade out effect.
|
* @param ticks The amount of ticks (1/20 second) for the fade out effect.
|
||||||
* @return This title configuration.
|
* @return This title configuration.
|
||||||
*/
|
*/
|
||||||
public Title fadeOut(int ticks);
|
public Title fadeOut(int ticks);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the currently displayed title from the player's screen.
|
* Remove the currently displayed title from the player's screen. This will
|
||||||
* This will keep the currently used display times and will only remove the title.
|
* keep the currently used display times and will only remove the title.
|
||||||
*
|
*
|
||||||
* @return This title configuration.
|
* @return This title configuration.
|
||||||
*/
|
*/
|
||||||
public Title clear();
|
public Title clear();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the currently displayed title from the player's screen
|
* Remove the currently displayed title from the player's screen and set the
|
||||||
* and set the configuration back to the default values.
|
* configuration back to the default values.
|
||||||
*
|
*
|
||||||
* @return This title configuration.
|
* @return This title configuration.
|
||||||
*/
|
*/
|
||||||
public Title reset();
|
public Title reset();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send this title configuration to the specified player.
|
* Send this title configuration to the specified player. This is the same
|
||||||
* This is the same as calling {@link ProxiedPlayer#sendTitle(Title)}.
|
* as calling {@link ProxiedPlayer#sendTitle(Title)}.
|
||||||
*
|
*
|
||||||
* @param player The player to send the title to.
|
* @param player The player to send the title to.
|
||||||
* @return This title configuration.
|
* @return This title configuration.
|
||||||
|
@ -181,6 +181,7 @@ public interface ProxiedPlayer extends Connection, CommandSender
|
|||||||
* <code>false</code> even if the user is a FML user, as Bungee can only
|
* <code>false</code> even if the user is a FML user, as Bungee can only
|
||||||
* determine this information if a handshake successfully completes.
|
* determine this information if a handshake successfully completes.
|
||||||
* </p>
|
* </p>
|
||||||
|
*
|
||||||
* @return <code>true</code> if it is known that the user is using a FML
|
* @return <code>true</code> if it is known that the user is using a FML
|
||||||
* client, <code>false</code> otherwise.
|
* client, <code>false</code> otherwise.
|
||||||
*/
|
*/
|
||||||
|
@ -5,6 +5,7 @@ package net.md_5.bungee.api;
|
|||||||
*/
|
*/
|
||||||
public enum ChatMessageType
|
public enum ChatMessageType
|
||||||
{
|
{
|
||||||
|
|
||||||
CHAT,
|
CHAT,
|
||||||
SYSTEM,
|
SYSTEM,
|
||||||
ACTION_BAR
|
ACTION_BAR
|
||||||
|
@ -18,11 +18,13 @@ public final class Configuration
|
|||||||
final Map<String, Object> self;
|
final Map<String, Object> self;
|
||||||
private final Configuration defaults;
|
private final Configuration defaults;
|
||||||
|
|
||||||
public Configuration() {
|
public Configuration()
|
||||||
|
{
|
||||||
this( null );
|
this( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
public Configuration(Configuration defaults) {
|
public Configuration(Configuration defaults)
|
||||||
|
{
|
||||||
this( new LinkedHashMap<String, Object>(), defaults );
|
this( new LinkedHashMap<String, Object>(), defaults );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,14 +29,18 @@ public abstract class ConfigurationProvider
|
|||||||
public abstract void save(Configuration config, Writer writer);
|
public abstract void save(Configuration config, Writer writer);
|
||||||
|
|
||||||
public abstract Configuration load(File file) throws IOException;
|
public abstract Configuration load(File file) throws IOException;
|
||||||
|
|
||||||
public abstract Configuration load(File file, Configuration defaults) throws IOException;
|
public abstract Configuration load(File file, Configuration defaults) throws IOException;
|
||||||
|
|
||||||
public abstract Configuration load(Reader reader);
|
public abstract Configuration load(Reader reader);
|
||||||
|
|
||||||
public abstract Configuration load(Reader reader, Configuration defaults);
|
public abstract Configuration load(Reader reader, Configuration defaults);
|
||||||
|
|
||||||
public abstract Configuration load(InputStream is);
|
public abstract Configuration load(InputStream is);
|
||||||
|
|
||||||
public abstract Configuration load(InputStream is, Configuration defaults);
|
public abstract Configuration load(InputStream is, Configuration defaults);
|
||||||
|
|
||||||
public abstract Configuration load(String string);
|
public abstract Configuration load(String string);
|
||||||
|
|
||||||
public abstract Configuration load(String string, Configuration defaults);
|
public abstract Configuration load(String string, Configuration defaults);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import net.md_5.bungee.protocol.DefinedPacket;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class LegacyPing extends DefinedPacket
|
public class LegacyPing extends DefinedPacket
|
||||||
{
|
{
|
||||||
|
|
||||||
private final boolean v1_5;
|
private final boolean v1_5;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,6 +16,7 @@ import net.md_5.bungee.protocol.ProtocolConstants;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class PlayerListHeaderFooter extends DefinedPacket
|
public class PlayerListHeaderFooter extends DefinedPacket
|
||||||
{
|
{
|
||||||
|
|
||||||
private String header;
|
private String header;
|
||||||
private String footer;
|
private String footer;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ import net.md_5.bungee.protocol.ProtocolConstants;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class Title extends DefinedPacket
|
public class Title extends DefinedPacket
|
||||||
{
|
{
|
||||||
|
|
||||||
private Action action;
|
private Action action;
|
||||||
|
|
||||||
// TITLE & SUBTITLE
|
// TITLE & SUBTITLE
|
||||||
@ -68,6 +69,7 @@ public class Title extends DefinedPacket
|
|||||||
|
|
||||||
public static enum Action
|
public static enum Action
|
||||||
{
|
{
|
||||||
|
|
||||||
TITLE,
|
TITLE,
|
||||||
SUBTITLE,
|
SUBTITLE,
|
||||||
TIMES,
|
TIMES,
|
||||||
|
@ -10,6 +10,7 @@ import net.md_5.bungee.protocol.packet.Title.Action;
|
|||||||
|
|
||||||
public class BungeeTitle implements Title
|
public class BungeeTitle implements Title
|
||||||
{
|
{
|
||||||
|
|
||||||
private net.md_5.bungee.protocol.packet.Title title, subtitle, times, clear, reset;
|
private net.md_5.bungee.protocol.packet.Title title, subtitle, times, clear, reset;
|
||||||
|
|
||||||
private static net.md_5.bungee.protocol.packet.Title createPacket(Action action)
|
private static net.md_5.bungee.protocol.packet.Title createPacket(Action action)
|
||||||
|
@ -42,8 +42,8 @@ public class ForgeClientHandler
|
|||||||
private PluginMessage serverIdList = null;
|
private PluginMessage serverIdList = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets or sets a value indicating whether the '\00FML\00' token was found in
|
* Gets or sets a value indicating whether the '\00FML\00' token was found
|
||||||
* the handshake.
|
* in the handshake.
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ -150,9 +150,9 @@ public class ForgeClientHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether we know if the user is a forge user.
|
* Returns whether we know if the user is a forge user. In FML 1.8, a "FML"
|
||||||
* In FML 1.8, a "FML" token is included in the initial handshake.
|
* token is included in the initial handshake. We can use that to determine
|
||||||
* We can use that to determine if the user is a Forge 1.8 user.
|
* if the user is a Forge 1.8 user.
|
||||||
*
|
*
|
||||||
* @return <code>true</code> if the user is a forge user.
|
* @return <code>true</code> if the user is a forge user.
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,7 @@ public class Global extends TabList
|
|||||||
item.setProperties( props );
|
item.setProperties( props );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
item.setProperties( new String[0][0] );
|
item.setProperties( new String[ 0 ][ 0 ] );
|
||||||
}
|
}
|
||||||
item.setGamemode( ( (UserConnection) p ).getGamemode() );
|
item.setGamemode( ( (UserConnection) p ).getGamemode() );
|
||||||
item.setPing( p.getPing() );
|
item.setPing( p.getPing() );
|
||||||
@ -115,7 +115,8 @@ public class Global extends TabList
|
|||||||
item.setUsername( player.getName() );
|
item.setUsername( player.getName() );
|
||||||
item.setDisplayName( ComponentSerializer.toString( TextComponent.fromLegacyText( player.getDisplayName() ) ) );
|
item.setDisplayName( ComponentSerializer.toString( TextComponent.fromLegacyText( player.getDisplayName() ) ) );
|
||||||
LoginResult loginResult = ( (UserConnection) player ).getPendingConnection().getLoginProfile();
|
LoginResult loginResult = ( (UserConnection) player ).getPendingConnection().getLoginProfile();
|
||||||
if ( loginResult != null ) {
|
if ( loginResult != null )
|
||||||
|
{
|
||||||
String[][] props = new String[ loginResult.getProperties().length ][];
|
String[][] props = new String[ loginResult.getProperties().length ][];
|
||||||
for ( int j = 0; j < props.length; j++ )
|
for ( int j = 0; j < props.length; j++ )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user