Compile chat API with 1.6
This commit is contained in:
@@ -112,7 +112,7 @@ public enum ChatColor
|
||||
/**
|
||||
* Colour instances keyed by their active character.
|
||||
*/
|
||||
private static final Map<Character, ChatColor> BY_CHAR = new HashMap<>();
|
||||
private static final Map<Character, ChatColor> BY_CHAR = new HashMap<Character, ChatColor>();
|
||||
/**
|
||||
* The code appended to {@link #COLOR_CHAR} to make usable colour.
|
||||
*/
|
||||
|
@@ -323,7 +323,7 @@ public abstract class BaseComponent
|
||||
{
|
||||
if ( extra == null )
|
||||
{
|
||||
extra = new ArrayList<>();
|
||||
extra = new ArrayList<BaseComponent>();
|
||||
}
|
||||
component.parent = this;
|
||||
extra.add( component );
|
||||
|
@@ -26,7 +26,7 @@ public class ComponentBuilder
|
||||
{
|
||||
|
||||
private TextComponent current;
|
||||
private final List<BaseComponent> parts = new ArrayList<>();
|
||||
private final List<BaseComponent> parts = new ArrayList<BaseComponent>();
|
||||
|
||||
/**
|
||||
* Creates a ComponentBuilder from the other given ComponentBuilder to clone
|
||||
|
@@ -30,7 +30,7 @@ public class TextComponent extends BaseComponent
|
||||
*/
|
||||
public static BaseComponent[] fromLegacyText(String message)
|
||||
{
|
||||
ArrayList<BaseComponent> components = new ArrayList<>();
|
||||
ArrayList<BaseComponent> components = new ArrayList<BaseComponent>();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
TextComponent component = new TextComponent();
|
||||
Matcher matcher = url.matcher( message );
|
||||
|
@@ -60,7 +60,7 @@ public class TranslatableComponent extends BaseComponent
|
||||
public TranslatableComponent(String translate, Object... with)
|
||||
{
|
||||
setTranslate( translate );
|
||||
List<BaseComponent> temp = new ArrayList<>();
|
||||
List<BaseComponent> temp = new ArrayList<BaseComponent>();
|
||||
for ( Object w : with )
|
||||
{
|
||||
if ( w instanceof String )
|
||||
@@ -121,7 +121,7 @@ public class TranslatableComponent extends BaseComponent
|
||||
{
|
||||
if ( with == null )
|
||||
{
|
||||
with = new ArrayList<>();
|
||||
with = new ArrayList<BaseComponent>();
|
||||
}
|
||||
component.parent = this;
|
||||
with.add( component );
|
||||
|
@@ -23,7 +23,7 @@ public class ComponentSerializer implements JsonDeserializer<BaseComponent>
|
||||
registerTypeAdapter( TranslatableComponent.class, new TranslatableComponentSerializer() ).
|
||||
create();
|
||||
|
||||
public final static ThreadLocal<HashSet<BaseComponent>> serializedComponents = new ThreadLocal<>();
|
||||
public final static ThreadLocal<HashSet<BaseComponent>> serializedComponents = new ThreadLocal<HashSet<BaseComponent>>();
|
||||
|
||||
public static BaseComponent[] parse(String json)
|
||||
{
|
||||
|
Reference in New Issue
Block a user