Code style changes.
This commit is contained in:
@ -21,16 +21,16 @@ package com.l2jmobius.commons.geodriver;
|
||||
*/
|
||||
public interface IBlock
|
||||
{
|
||||
public static final int TYPE_FLAT = 0;
|
||||
public static final int TYPE_COMPLEX = 1;
|
||||
public static final int TYPE_MULTILAYER = 2;
|
||||
int TYPE_FLAT = 0;
|
||||
int TYPE_COMPLEX = 1;
|
||||
int TYPE_MULTILAYER = 2;
|
||||
|
||||
/** Cells in a block on the x axis */
|
||||
public static final int BLOCK_CELLS_X = 8;
|
||||
int BLOCK_CELLS_X = 8;
|
||||
/** Cells in a block on the y axis */
|
||||
public static final int BLOCK_CELLS_Y = 8;
|
||||
int BLOCK_CELLS_Y = 8;
|
||||
/** Cells in a block */
|
||||
public static final int BLOCK_CELLS = BLOCK_CELLS_X * BLOCK_CELLS_Y;
|
||||
int BLOCK_CELLS = BLOCK_CELLS_X * BLOCK_CELLS_Y;
|
||||
|
||||
boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe);
|
||||
|
||||
|
@ -21,19 +21,19 @@ package com.l2jmobius.commons.geodriver;
|
||||
*/
|
||||
public interface IRegion
|
||||
{
|
||||
/** Blocks in a region on the x axis */
|
||||
public static final int REGION_BLOCKS_X = 256;
|
||||
/** Blocks in a region on the y axis */
|
||||
public static final int REGION_BLOCKS_Y = 256;
|
||||
/** Blocks in a region */
|
||||
public static final int REGION_BLOCKS = REGION_BLOCKS_X * REGION_BLOCKS_Y;
|
||||
/** Blocks in a region on the x axis. */
|
||||
int REGION_BLOCKS_X = 256;
|
||||
/** Blocks in a region on the y axis. */
|
||||
int REGION_BLOCKS_Y = 256;
|
||||
/** Blocks in a region. */
|
||||
int REGION_BLOCKS = REGION_BLOCKS_X * REGION_BLOCKS_Y;
|
||||
|
||||
/** Cells in a region on the x axis */
|
||||
public static final int REGION_CELLS_X = REGION_BLOCKS_X * IBlock.BLOCK_CELLS_X;
|
||||
/** Cells in a regioin on the y axis */
|
||||
public static final int REGION_CELLS_Y = REGION_BLOCKS_Y * IBlock.BLOCK_CELLS_Y;
|
||||
/** Cells in a region */
|
||||
public static final int REGION_CELLS = REGION_CELLS_X * REGION_CELLS_Y;
|
||||
/** Cells in a region on the x axis. */
|
||||
int REGION_CELLS_X = REGION_BLOCKS_X * IBlock.BLOCK_CELLS_X;
|
||||
/** Cells in a regioin on the y axis. */
|
||||
int REGION_CELLS_Y = REGION_BLOCKS_Y * IBlock.BLOCK_CELLS_Y;
|
||||
/** Cells in a region. */
|
||||
int REGION_CELLS = REGION_CELLS_X * REGION_CELLS_Y;
|
||||
|
||||
boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe);
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class JavaScriptEngine extends AbstractScriptEngine implements Compilable
|
||||
}
|
||||
|
||||
// create a ClassLoader to load classes from MemoryJavaFileManager
|
||||
return parseMain((new MemoryClassLoader(classBytes, classPath, getParentLoader(ctx))), ctx);
|
||||
return parseMain(new MemoryClassLoader(classBytes, classPath, getParentLoader(ctx)), ctx);
|
||||
}
|
||||
|
||||
protected static Class<?> parseMain(MemoryClassLoader loader, ScriptContext ctx) throws ScriptException
|
||||
|
@ -23,5 +23,5 @@ import java.nio.channels.SocketChannel;
|
||||
*/
|
||||
public interface IAcceptFilter
|
||||
{
|
||||
public boolean accept(SocketChannel sc);
|
||||
boolean accept(SocketChannel sc);
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ package com.l2jmobius.commons.mmocore;
|
||||
*/
|
||||
public interface IClientFactory<T extends MMOClient<?>>
|
||||
{
|
||||
public T create(MMOConnection<T> con);
|
||||
T create(MMOConnection<T> con);
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ package com.l2jmobius.commons.mmocore;
|
||||
*/
|
||||
public interface IMMOExecutor<T extends MMOClient<?>>
|
||||
{
|
||||
public void execute(ReceivablePacket<T> packet);
|
||||
void execute(ReceivablePacket<T> packet);
|
||||
}
|
||||
|
@ -24,5 +24,5 @@ import java.nio.ByteBuffer;
|
||||
*/
|
||||
public interface IPacketHandler<T extends MMOClient<?>>
|
||||
{
|
||||
public ReceivablePacket<T> handlePacket(ByteBuffer buf, T client);
|
||||
ReceivablePacket<T> handlePacket(ByteBuffer buf, T client);
|
||||
}
|
||||
|
@ -106,13 +106,13 @@ public final class SelectorThread<T extends MMOClient<?>>extends Thread
|
||||
|
||||
final ServerSocket ss = selectable.socket();
|
||||
|
||||
if (address == null)
|
||||
if (address != null)
|
||||
{
|
||||
ss.bind(new InetSocketAddress(tcpPort));
|
||||
ss.bind(new InetSocketAddress(address, tcpPort));
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.bind(new InetSocketAddress(address, tcpPort));
|
||||
ss.bind(new InetSocketAddress(tcpPort));
|
||||
}
|
||||
|
||||
selectable.register(_selector, SelectionKey.OP_ACCEPT);
|
||||
@ -289,8 +289,8 @@ public final class SelectorThread<T extends MMOClient<?>>extends Thread
|
||||
{
|
||||
return;
|
||||
}
|
||||
ByteBuffer buf;
|
||||
if ((buf = con.getReadBuffer()) == null)
|
||||
ByteBuffer buf = con.getReadBuffer();
|
||||
if (buf == null)
|
||||
{
|
||||
buf = READ_BUFFER;
|
||||
}
|
||||
|
Reference in New Issue
Block a user