Fix formatting

This commit is contained in:
md_5 2016-04-24 22:31:04 +10:00
parent 1cd3e42182
commit 80b3135a93
24 changed files with 356 additions and 347 deletions

View File

@ -136,20 +136,24 @@ public class ServerPing
}
@Deprecated
public void setDescription(String description) {
public void setDescription(String description)
{
this.description = new TextComponent( TextComponent.fromLegacyText( description ) );
}
@Deprecated
public String getDescription() {
public String getDescription()
{
return BaseComponent.toLegacyText( description );
}
public void setDescriptionComponent(BaseComponent description) {
public void setDescriptionComponent(BaseComponent description)
{
this.description = description;
}
public BaseComponent getDescriptionComponent() {
public BaseComponent getDescriptionComponent()
{
return description;
}
}

View File

@ -73,7 +73,8 @@ public class AsyncEvent<T> extends Event
{
done.done( (T) this, null );
}
} else {
} else
{
latch.decrementAndGet();
}
}

View File

@ -250,11 +250,13 @@ public class ComponentBuilder
{
/**
* Specify that we do not want to retain anything from the previous component.
* Specify that we do not want to retain anything from the previous
* component.
*/
NONE,
/**
* Specify that we want the formatting retained from the previous component.
* Specify that we want the formatting retained from the previous
* component.
*/
FORMATTING,
/**
@ -262,7 +264,8 @@ public class ComponentBuilder
*/
EVENTS,
/**
* Specify that we want to retain everything from the previous component.
* Specify that we want to retain everything from the previous
* component.
*/
ALL
}

View File

@ -140,7 +140,8 @@ public class TranslatableComponent extends BaseComponent
try
{
trans = locales.getString( translate );
} catch ( MissingResourceException e ) {
} catch ( MissingResourceException ex )
{
trans = translate;
}
@ -184,7 +185,8 @@ public class TranslatableComponent extends BaseComponent
try
{
trans = locales.getString( translate );
} catch ( MissingResourceException e ) {
} catch ( MissingResourceException e )
{
trans = translate;
}

View File

@ -5,7 +5,9 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class TranslatableComponentTest {
public class TranslatableComponentTest
{
@Test
public void testMissingPlaceholdersAdded()
{

View File

@ -22,8 +22,8 @@ public abstract class ConfigurationProvider
{
return providers.get( provider );
}
/*------------------------------------------------------------------------*/
/*------------------------------------------------------------------------*/
public abstract void save(Configuration config, File file) throws IOException;
public abstract void save(Configuration config, Writer writer);

View File

@ -129,7 +129,6 @@ public enum Protocol
private final TIntObjectMap<TIntIntMap> packetRemap = new TIntObjectHashMap<>();
private final TIntObjectMap<TIntIntMap> packetRemapInv = new TIntObjectHashMap<>();
{
packetRemap.put( ProtocolConstants.MINECRAFT_1_8, new TIntIntHashMap() );
packetRemapInv.put( ProtocolConstants.MINECRAFT_1_8, new TIntIntHashMap() );

View File

@ -14,6 +14,7 @@ import java.util.UUID;
public class PlayerInfoSerializer implements JsonSerializer<ServerPing.PlayerInfo>, JsonDeserializer<ServerPing.PlayerInfo>
{
@Override
public ServerPing.PlayerInfo deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{

View File

@ -46,9 +46,7 @@ public abstract class EntityMap
{
clientboundInts[id] = true;
}
} else
{
if ( varint )
} else if ( varint )
{
serverboundVarInts[id] = true;
} else
@ -56,7 +54,6 @@ public abstract class EntityMap
serverboundInts[id] = true;
}
}
}
public void rewriteServerbound(ByteBuf packet, int oldId, int newId)
{

View File

@ -12,6 +12,7 @@ import java.util.UUID;
class EntityMap_1_9 extends EntityMap
{
static final EntityMap_1_9 INSTANCE = new EntityMap_1_9();
EntityMap_1_9()

View File

@ -4,7 +4,6 @@ import java.util.Map;
import net.md_5.bungee.ServerConnector;
import net.md_5.bungee.UserConnection;
import net.md_5.bungee.forge.ForgeLogger.LogDirection;
import net.md_5.bungee.protocol.ProtocolConstants;
import net.md_5.bungee.protocol.packet.PluginMessage;
/**

View File

@ -72,8 +72,7 @@ public class ForgeUtils
// We know from the regex that we have an int.
return Integer.parseInt( matcher.group( 4 ) );
}
}
else
} else
{
Matcher matcher = ForgeConstants.FML_HANDSHAKE_VERSION_REGEX.matcher( fmlVersion );
if ( matcher.find() )

View File

@ -5,7 +5,8 @@ import org.junit.Test;
import static org.junit.Assert.*;
public class BoundedArrayListTest {
public class BoundedArrayListTest
{
@Test
public void testGoodAdd() throws Exception