Fix formatting
This commit is contained in:
parent
1cd3e42182
commit
80b3135a93
@ -136,20 +136,24 @@ public class ServerPing
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description)
|
||||||
|
{
|
||||||
this.description = new TextComponent( TextComponent.fromLegacyText( description ) );
|
this.description = new TextComponent( TextComponent.fromLegacyText( description ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getDescription() {
|
public String getDescription()
|
||||||
|
{
|
||||||
return BaseComponent.toLegacyText( description );
|
return BaseComponent.toLegacyText( description );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDescriptionComponent(BaseComponent description) {
|
public void setDescriptionComponent(BaseComponent description)
|
||||||
|
{
|
||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseComponent getDescriptionComponent() {
|
public BaseComponent getDescriptionComponent()
|
||||||
|
{
|
||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,8 @@ public class AsyncEvent<T> extends Event
|
|||||||
{
|
{
|
||||||
done.done( (T) this, null );
|
done.done( (T) this, null );
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
|
{
|
||||||
latch.decrementAndGet();
|
latch.decrementAndGet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,
|
NONE,
|
||||||
/**
|
/**
|
||||||
* Specify that we want the formatting retained from the previous component.
|
* Specify that we want the formatting retained from the previous
|
||||||
|
* component.
|
||||||
*/
|
*/
|
||||||
FORMATTING,
|
FORMATTING,
|
||||||
/**
|
/**
|
||||||
@ -262,7 +264,8 @@ public class ComponentBuilder
|
|||||||
*/
|
*/
|
||||||
EVENTS,
|
EVENTS,
|
||||||
/**
|
/**
|
||||||
* Specify that we want to retain everything from the previous component.
|
* Specify that we want to retain everything from the previous
|
||||||
|
* component.
|
||||||
*/
|
*/
|
||||||
ALL
|
ALL
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,8 @@ public class TranslatableComponent extends BaseComponent
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
trans = locales.getString( translate );
|
trans = locales.getString( translate );
|
||||||
} catch ( MissingResourceException e ) {
|
} catch ( MissingResourceException ex )
|
||||||
|
{
|
||||||
trans = translate;
|
trans = translate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +185,8 @@ public class TranslatableComponent extends BaseComponent
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
trans = locales.getString( translate );
|
trans = locales.getString( translate );
|
||||||
} catch ( MissingResourceException e ) {
|
} catch ( MissingResourceException e )
|
||||||
|
{
|
||||||
trans = translate;
|
trans = translate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class TranslatableComponentTest {
|
public class TranslatableComponentTest
|
||||||
|
{
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMissingPlaceholdersAdded()
|
public void testMissingPlaceholdersAdded()
|
||||||
{
|
{
|
||||||
|
@ -22,8 +22,8 @@ public abstract class ConfigurationProvider
|
|||||||
{
|
{
|
||||||
return providers.get( provider );
|
return providers.get( provider );
|
||||||
}
|
}
|
||||||
/*------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
public abstract void save(Configuration config, File file) throws IOException;
|
public abstract void save(Configuration config, File file) throws IOException;
|
||||||
|
|
||||||
public abstract void save(Configuration config, Writer writer);
|
public abstract void save(Configuration config, Writer writer);
|
||||||
|
@ -129,7 +129,6 @@ public enum Protocol
|
|||||||
private final TIntObjectMap<TIntIntMap> packetRemap = new TIntObjectHashMap<>();
|
private final TIntObjectMap<TIntIntMap> packetRemap = new TIntObjectHashMap<>();
|
||||||
private final TIntObjectMap<TIntIntMap> packetRemapInv = new TIntObjectHashMap<>();
|
private final TIntObjectMap<TIntIntMap> packetRemapInv = new TIntObjectHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
packetRemap.put( ProtocolConstants.MINECRAFT_1_8, new TIntIntHashMap() );
|
packetRemap.put( ProtocolConstants.MINECRAFT_1_8, new TIntIntHashMap() );
|
||||||
packetRemapInv.put( ProtocolConstants.MINECRAFT_1_8, new TIntIntHashMap() );
|
packetRemapInv.put( ProtocolConstants.MINECRAFT_1_8, new TIntIntHashMap() );
|
||||||
|
@ -14,6 +14,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
public class PlayerInfoSerializer implements JsonSerializer<ServerPing.PlayerInfo>, JsonDeserializer<ServerPing.PlayerInfo>
|
public class PlayerInfoSerializer implements JsonSerializer<ServerPing.PlayerInfo>, JsonDeserializer<ServerPing.PlayerInfo>
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ServerPing.PlayerInfo deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
public ServerPing.PlayerInfo deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
|
||||||
{
|
{
|
||||||
|
@ -46,9 +46,7 @@ public abstract class EntityMap
|
|||||||
{
|
{
|
||||||
clientboundInts[id] = true;
|
clientboundInts[id] = true;
|
||||||
}
|
}
|
||||||
} else
|
} else if ( varint )
|
||||||
{
|
|
||||||
if ( varint )
|
|
||||||
{
|
{
|
||||||
serverboundVarInts[id] = true;
|
serverboundVarInts[id] = true;
|
||||||
} else
|
} else
|
||||||
@ -56,7 +54,6 @@ public abstract class EntityMap
|
|||||||
serverboundInts[id] = true;
|
serverboundInts[id] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void rewriteServerbound(ByteBuf packet, int oldId, int newId)
|
public void rewriteServerbound(ByteBuf packet, int oldId, int newId)
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
class EntityMap_1_9 extends EntityMap
|
class EntityMap_1_9 extends EntityMap
|
||||||
{
|
{
|
||||||
|
|
||||||
static final EntityMap_1_9 INSTANCE = new EntityMap_1_9();
|
static final EntityMap_1_9 INSTANCE = new EntityMap_1_9();
|
||||||
|
|
||||||
EntityMap_1_9()
|
EntityMap_1_9()
|
||||||
|
@ -4,7 +4,6 @@ import java.util.Map;
|
|||||||
import net.md_5.bungee.ServerConnector;
|
import net.md_5.bungee.ServerConnector;
|
||||||
import net.md_5.bungee.UserConnection;
|
import net.md_5.bungee.UserConnection;
|
||||||
import net.md_5.bungee.forge.ForgeLogger.LogDirection;
|
import net.md_5.bungee.forge.ForgeLogger.LogDirection;
|
||||||
import net.md_5.bungee.protocol.ProtocolConstants;
|
|
||||||
import net.md_5.bungee.protocol.packet.PluginMessage;
|
import net.md_5.bungee.protocol.packet.PluginMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,8 +72,7 @@ public class ForgeUtils
|
|||||||
// We know from the regex that we have an int.
|
// We know from the regex that we have an int.
|
||||||
return Integer.parseInt( matcher.group( 4 ) );
|
return Integer.parseInt( matcher.group( 4 ) );
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Matcher matcher = ForgeConstants.FML_HANDSHAKE_VERSION_REGEX.matcher( fmlVersion );
|
Matcher matcher = ForgeConstants.FML_HANDSHAKE_VERSION_REGEX.matcher( fmlVersion );
|
||||||
if ( matcher.find() )
|
if ( matcher.find() )
|
||||||
|
@ -5,7 +5,8 @@ import org.junit.Test;
|
|||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class BoundedArrayListTest {
|
public class BoundedArrayListTest
|
||||||
|
{
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGoodAdd() throws Exception
|
public void testGoodAdd() throws Exception
|
||||||
|
Loading…
Reference in New Issue
Block a user