Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge branch 'SpigotMC-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sleiss committed Jul 29, 2018
2 parents d999f37 + 2da2561 commit 0405b0e
Show file tree
Hide file tree
Showing 56 changed files with 892 additions and 160 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ Most of them are, so get rid of 1.7 fast and move to 1.10.2/1.11.2 modpacks asap

This version is maintained by https://hexagonmc.eu

<<<<<<< HEAD
###Releases can be downloaded here: [Releases](https://github.com/HexagonMC/BungeeCord/releases)
```
Modules are automatically downloaded from the releases page.
```
=======
(c) 2012-2018 SpigotMC Pty. Ltd.
>>>>>>> 6fadb4250cb7f89feb2a98d9de973f6d627e33ae
4 changes: 2 additions & 2 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BungeeCord-API</name>
Expand Down
8 changes: 0 additions & 8 deletions api/src/main/java/net/md_5/bungee/api/ProxyServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,6 @@ public static void setInstance(ProxyServer instance)
*/
public abstract void stop(String reason);

/**
* Start this instance so that it may accept connections.
*
* @throws Exception any exception thrown during startup causing the
* instance to fail to boot
*/
public abstract void start() throws Exception;

/**
* Register a channel for use with plugin messages. This is required by some
* server / client implementations.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/net/md_5/bungee/api/Title.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface Title
* duration specified in {@link #fadeOut(int)}. The default value for the
* 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 stay effect.
* @return This title configuration.
*/
public Title stay(int ticks);
Expand Down
8 changes: 8 additions & 0 deletions api/src/main/java/net/md_5/bungee/api/config/ServerInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public interface ServerInfo
* Send data by any available means to this server. This data may be queued
* and there is no guarantee of its timely arrival.
*
* In recent Minecraft versions channel names must contain a colon separator
* and consist of [a-z0-9/._-]. This will be enforced in a future version.
* The "BungeeCord" channel is an exception and may only take this form.
*
* @param channel the channel to send this data via
* @param data the data to send
*/
Expand All @@ -64,6 +68,10 @@ public interface ServerInfo
/**
* Send data by any available means to this server.
*
* In recent Minecraft versions channel names must contain a colon separator
* and consist of [a-z0-9/._-]. This will be enforced in a future version.
* The "BungeeCord" channel is an exception and may only take this form.
*
* @param channel the channel to send this data via
* @param data the data to send
* @param queue hold the message for later sending if it cannot be sent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ public enum MainHand
/**
* Send a plugin message to this player.
*
* In recent Minecraft versions channel names must contain a colon separator
* and consist of [a-z0-9/._-]. This will be enforced in a future version.
* The "BungeeCord" channel is an exception and may only take this form.
*
* @param channel the channel to send this data via
* @param data the data to send
*/
Expand Down
4 changes: 4 additions & 0 deletions api/src/main/java/net/md_5/bungee/api/connection/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public interface Server extends Connection
/**
* Send data by any available means to this server.
*
* In recent Minecraft versions channel names must contain a colon separator
* and consist of [a-z0-9/._-]. This will be enforced in a future version.
* The "BungeeCord" channel is an exception and may only take this form.
*
* @param channel the channel to send this data via
* @param data the data to send
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public boolean dispatchCommand(CommandSender sender, String commandLine, List<St
String permission = command.getPermission();
if ( permission != null && !permission.isEmpty() && !sender.hasPermission( permission ) )
{
if ( !( command instanceof TabExecutor ) || tabResults == null )
if ( tabResults == null )
{
sender.sendMessage( proxy.getTranslation( "no_permission" ) );
}
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/net/md_5/bungee/api/score/Team.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Team
private byte friendlyFire;
private String nameTagVisibility;
private String collisionRule;
private byte color;
private int color;
private Set<String> players = new HashSet<>();

public Collection<String> getPlayers()
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-bootstrap</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BungeeCord-Bootstrap</name>
Expand Down
4 changes: 2 additions & 2 deletions chat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BungeeCord-Chat</name>
Expand Down
52 changes: 52 additions & 0 deletions chat/src/main/java/net/md_5/bungee/api/chat/ComponentBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,37 @@ public ComponentBuilder append(String text, FormatRetention retention)
return this;
}

/**
* Allows joining additional components to this builder using the given
* {@link Joiner} and {@link FormatRetention#ALL}.
*
* Simply executes the provided joiner on this instance to facilitate a
* chain pattern.
*
* @param joiner joiner used for operation
* @return this ComponentBuilder for chaining
*/
public ComponentBuilder append(Joiner joiner)
{
return joiner.join( this, FormatRetention.ALL );
}

/**
* Allows joining additional components to this builder using the given
* {@link Joiner}.
*
* Simply executes the provided joiner on this instance to facilitate a
* chain pattern.
*
* @param joiner joiner used for operation
* @param retention the formatting to retain
* @return this ComponentBuilder for chaining
*/
public ComponentBuilder append(Joiner joiner, FormatRetention retention)
{
return joiner.join( this, retention );
}

/**
* Sets the color of the current part.
*
Expand Down Expand Up @@ -332,4 +363,25 @@ public static enum FormatRetention
*/
ALL
}

/**
* Functional interface to join additional components to a ComponentBuilder.
*/
public interface Joiner
{

/**
* Joins additional components to the provided {@link ComponentBuilder}
* and then returns it to fulfill a chain pattern.
*
* Retention may be ignored and is to be understood as an optional
* recommendation to the Joiner and not as a guarantee to have a
* previous component in builder unmodified.
*
* @param componentBuilder to which to append additional components
* @param retention the formatting to possibly retain
* @return input componentBuilder for chaining
*/
ComponentBuilder join(ComponentBuilder componentBuilder, FormatRetention retention);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ public TranslatableComponent(String translate, Object... with)
List<BaseComponent> temp = new ArrayList<BaseComponent>();
for ( Object w : with )
{
if ( w instanceof String )
if ( w instanceof BaseComponent )
{
temp.add( new TextComponent( (String) w ) );
temp.add( (BaseComponent) w );
} else
{
temp.add( (BaseComponent) w );
temp.add( new TextComponent( String.valueOf( w ) ) );
}
}
setWith( temp );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class TranslatableComponentTest
@Test
public void testMissingPlaceholdersAdded()
{
TranslatableComponent testComponent = new TranslatableComponent( "Test string with %s placeholders: %s", "2", "aoeu" );
TranslatableComponent testComponent = new TranslatableComponent( "Test string with %s placeholders: %s", 2, "aoeu" );
assertEquals( "Test string with 2 placeholders: aoeu", testComponent.toPlainText() );
assertEquals( "§fTest string with §f2§f placeholders: §faoeu", testComponent.toLegacyText() );
}
Expand Down
6 changes: 3 additions & 3 deletions config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-config</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BungeeCord-Config</name>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.19</version>
<version>1.21</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-event</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BungeeCord-Event</name>
Expand Down
4 changes: 2 additions & 2 deletions log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-log</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BungeeCord-Log</name>
Expand Down
4 changes: 2 additions & 2 deletions module/cmd-alert/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-module</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-module-cmd-alert</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cmd_alert</name>
Expand Down
4 changes: 2 additions & 2 deletions module/cmd-find/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-module</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-module-cmd-find</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cmd_find</name>
Expand Down
4 changes: 2 additions & 2 deletions module/cmd-list/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-module</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-module-cmd-list</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cmd_list</name>
Expand Down
4 changes: 2 additions & 2 deletions module/cmd-send/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-module</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-module-cmd-send</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cmd_send</name>
Expand Down
4 changes: 2 additions & 2 deletions module/cmd-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-module</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-module-cmd-server</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>jar</packaging>

<name>cmd_server</name>
Expand Down
4 changes: 2 additions & 2 deletions module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-parent</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>net.md-5</groupId>
<artifactId>bungeecord-module</artifactId>
<version>1.12-SNAPSHOT</version>
<version>1.13-SNAPSHOT</version>
<packaging>pom</packaging>

<name>BungeeCord Modules</name>
Expand Down
Loading

0 comments on commit 0405b0e

Please sign in to comment.