Use varargs instead of arrays
This commit is contained in:
@@ -36,7 +36,7 @@ public interface CommandSender
|
||||
*
|
||||
* @param message the message to send
|
||||
*/
|
||||
public void sendMessage(BaseComponent[] message);
|
||||
public void sendMessage(BaseComponent... message);
|
||||
|
||||
/**
|
||||
* Send a message to this sender.
|
||||
|
@@ -240,7 +240,7 @@ public abstract class ProxyServer
|
||||
*
|
||||
* @param message the message to broadcast
|
||||
*/
|
||||
public abstract void broadcast(BaseComponent[] message);
|
||||
public abstract void broadcast(BaseComponent... message);
|
||||
|
||||
/**
|
||||
* Send the specified message to the console and all connected players.
|
||||
|
@@ -50,7 +50,7 @@ public abstract class BaseComponent
|
||||
setObfuscated( old.isObfuscatedRaw() );
|
||||
}
|
||||
|
||||
public static String toLegacyText(BaseComponent[] components)
|
||||
public static String toLegacyText(BaseComponent... components)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for ( BaseComponent msg : components )
|
||||
@@ -60,7 +60,7 @@ public abstract class BaseComponent
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public static String toPlainText(BaseComponent[] components)
|
||||
public static String toPlainText(BaseComponent... components)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for ( BaseComponent msg : components )
|
||||
|
@@ -39,7 +39,7 @@ public interface Connection
|
||||
* @param reason the reason shown to the player / sent to the server on
|
||||
* disconnect
|
||||
*/
|
||||
void disconnect(BaseComponent[] reason);
|
||||
void disconnect(BaseComponent... reason);
|
||||
|
||||
/**
|
||||
* Disconnects this end of the connection for the specified reason. If this
|
||||
|
Reference in New Issue
Block a user