* ------------------------------------------------------------------------------
* Rand.java: By Bob Jenkins. My random number generator, ISAAC.
@@ -20,7 +20,7 @@ package net.burtleburtle.bob.rand;
*
* This class has been changed to be more conformant to Java and javadoc conventions.
*
- *
+ *
* @author Bob Jenkins
*/
public final class IsaacRandom {
@@ -31,79 +31,125 @@ public final class IsaacRandom {
private static final int GOLDEN_RATIO = 0x9e3779b9;
/**
- * The log of the size of the result and memory arrays.
+ * The log of the size of the result and state arrays.
*/
- private static final int LOG_SIZE = 8;
+ private static final int LOG_SIZE = Long.BYTES;
/**
- * The size of the result and memory arrays.
+ * The size of the result and states arrays.
*/
private static final int SIZE = 1 << LOG_SIZE;
/**
- * A mask for pseudorandom lookup.
+ * A mask for pseudo-random lookup.
*/
private static int MASK = SIZE - 1 << 2;
/**
- * The accumulator.
+ * The results given to the user.
*/
- private int a;
-
- /**
- * The last result.
- */
- private int b;
-
- /**
- * The counter.
- */
- private int c;
-
- /**
- * The count through the results in the results array.
- */
- private int count;
+ private final int[] results = new int[SIZE];
/**
* The internal state.
*/
- private int[] mem;
+ private final int[] state = new int[SIZE];
/**
- * The results given to the user.
+ * The count through the results in the results array.
*/
- private int[] rsl;
+ private int count = SIZE;
/**
- * Creates the random number generator without an initial seed.
+ * The accumulator.
*/
- public IsaacRandom() {
- mem = new int[SIZE];
- rsl = new int[SIZE];
- init(false);
- }
+ private int accumulator;
+
+ /**
+ * The last result.
+ */
+ private int last;
+
+ /**
+ * The counter.
+ */
+ private int counter;
/**
* Creates the random number generator with the specified seed.
- *
+ *
* @param seed The seed.
*/
public IsaacRandom(int[] seed) {
- mem = new int[SIZE];
- rsl = new int[SIZE];
- for (int i = 0; i < seed.length; ++i) {
- rsl[i] = seed[i];
- }
- init(true);
+ int length = Math.min(seed.length, results.length);
+ System.arraycopy(seed, 0, results, 0, length);
+ init();
}
/**
- * Initialises this random number generator.
- *
- * @param hasSeed Set to {@code true} if a seed was passed to the constructor.
+ * Generates 256 results.
*/
- private void init(boolean hasSeed) {
+ private void isaac() {
+ int i, j, x, y;
+
+ last += ++counter;
+ for (i = 0, j = SIZE / 2; i < SIZE / 2;) {
+ x = state[i];
+ accumulator ^= accumulator << 13;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+
+ x = state[i];
+ accumulator ^= accumulator >>> 6;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+
+ x = state[i];
+ accumulator ^= accumulator << 2;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+
+ x = state[i];
+ accumulator ^= accumulator >>> 16;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+ }
+
+ for (j = 0; j < SIZE / 2;) {
+ x = state[i];
+ accumulator ^= accumulator << 13;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+
+ x = state[i];
+ accumulator ^= accumulator >>> 6;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+
+ x = state[i];
+ accumulator ^= accumulator << 2;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+
+ x = state[i];
+ accumulator ^= accumulator >>> 16;
+ accumulator += state[j++];
+ state[i] = y = state[(x & MASK) >> 2] + accumulator + last;
+ results[i++] = last = state[(y >> LOG_SIZE & MASK) >> 2] + x;
+ }
+ }
+
+ /**
+ * Initializes this random number generator.
+ */
+ private void init() {
int i;
int a, b, c, d, e, f, g, h;
a = b = c = d = e = f = g = h = GOLDEN_RATIO;
@@ -136,16 +182,15 @@ public final class IsaacRandom {
}
for (i = 0; i < SIZE; i += 8) { /* fill in mem[] with messy stuff */
- if (hasSeed) {
- a += rsl[i];
- b += rsl[i + 1];
- c += rsl[i + 2];
- d += rsl[i + 3];
- e += rsl[i + 4];
- f += rsl[i + 5];
- g += rsl[i + 6];
- h += rsl[i + 7];
- }
+ a += results[i];
+ b += results[i + 1];
+ c += results[i + 2];
+ d += results[i + 3];
+ e += results[i + 4];
+ f += results[i + 5];
+ g += results[i + 6];
+ h += results[i + 7];
+
a ^= b << 11;
d += a;
b += c;
@@ -170,128 +215,65 @@ public final class IsaacRandom {
h ^= a >>> 9;
c += h;
a += b;
- mem[i] = a;
- mem[i + 1] = b;
- mem[i + 2] = c;
- mem[i + 3] = d;
- mem[i + 4] = e;
- mem[i + 5] = f;
- mem[i + 6] = g;
- mem[i + 7] = h;
+ state[i] = a;
+ state[i + 1] = b;
+ state[i + 2] = c;
+ state[i + 3] = d;
+ state[i + 4] = e;
+ state[i + 5] = f;
+ state[i + 6] = g;
+ state[i + 7] = h;
}
- if (hasSeed) { /* second pass makes all of seed affect all of mem */
- for (i = 0; i < SIZE; i += 8) {
- a += mem[i];
- b += mem[i + 1];
- c += mem[i + 2];
- d += mem[i + 3];
- e += mem[i + 4];
- f += mem[i + 5];
- g += mem[i + 6];
- h += mem[i + 7];
- a ^= b << 11;
- d += a;
- b += c;
- b ^= c >>> 2;
- e += b;
- c += d;
- c ^= d << 8;
- f += c;
- d += e;
- d ^= e >>> 16;
- g += d;
- e += f;
- e ^= f << 10;
- h += e;
- f += g;
- f ^= g >>> 4;
- a += f;
- g += h;
- g ^= h << 8;
- b += g;
- h += a;
- h ^= a >>> 9;
- c += h;
- a += b;
- mem[i] = a;
- mem[i + 1] = b;
- mem[i + 2] = c;
- mem[i + 3] = d;
- mem[i + 4] = e;
- mem[i + 5] = f;
- mem[i + 6] = g;
- mem[i + 7] = h;
- }
+ for (i = 0; i < SIZE; i += 8) {
+ a += state[i];
+ b += state[i + 1];
+ c += state[i + 2];
+ d += state[i + 3];
+ e += state[i + 4];
+ f += state[i + 5];
+ g += state[i + 6];
+ h += state[i + 7];
+ a ^= b << 11;
+ d += a;
+ b += c;
+ b ^= c >>> 2;
+ e += b;
+ c += d;
+ c ^= d << 8;
+ f += c;
+ d += e;
+ d ^= e >>> 16;
+ g += d;
+ e += f;
+ e ^= f << 10;
+ h += e;
+ f += g;
+ f ^= g >>> 4;
+ a += f;
+ g += h;
+ g ^= h << 8;
+ b += g;
+ h += a;
+ h ^= a >>> 9;
+ c += h;
+ a += b;
+ state[i] = a;
+ state[i + 1] = b;
+ state[i + 2] = c;
+ state[i + 3] = d;
+ state[i + 4] = e;
+ state[i + 5] = f;
+ state[i + 6] = g;
+ state[i + 7] = h;
}
isaac();
- count = SIZE;
- }
-
- /**
- * Generates 256 results.
- */
- private void isaac() {
- int i, j, x, y;
-
- b += ++c;
- for (i = 0, j = SIZE / 2; i < SIZE / 2;) {
- x = mem[i];
- a ^= a << 13;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
-
- x = mem[i];
- a ^= a >>> 6;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
-
- x = mem[i];
- a ^= a << 2;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
-
- x = mem[i];
- a ^= a >>> 16;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
- }
-
- for (j = 0; j < SIZE / 2;) {
- x = mem[i];
- a ^= a << 13;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
-
- x = mem[i];
- a ^= a >>> 6;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
-
- x = mem[i];
- a ^= a << 2;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
-
- x = mem[i];
- a ^= a >>> 16;
- a += mem[j++];
- mem[i] = y = mem[(x & MASK) >> 2] + a + b;
- rsl[i++] = b = mem[(y >> LOG_SIZE & MASK) >> 2] + x;
- }
}
/**
* Gets the next random value.
- *
+ *
* @return The next random value.
*/
public int nextInt() {
@@ -299,7 +281,7 @@ public final class IsaacRandom {
isaac();
count = SIZE - 1;
}
- return rsl[count];
+ return results[count];
}
}
\ No newline at end of file
diff --git a/src/org/apollo/Server.java b/src/org/apollo/Server.java
index eb3703c9..c9f90077 100644
--- a/src/org/apollo/Server.java
+++ b/src/org/apollo/Server.java
@@ -10,6 +10,7 @@ import io.netty.channel.socket.nio.NioServerSocketChannel;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.file.Paths;
+import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -25,9 +26,11 @@ import org.apollo.net.release.r317.Release317;
import org.apollo.util.plugin.PluginContext;
import org.apollo.util.plugin.PluginManager;
+import com.google.common.base.Stopwatch;
+
/**
* The core class of the Apollo server.
- *
+ *
* @author Graham
*/
public final class Server {
@@ -39,12 +42,13 @@ public final class Server {
/**
* The entry point of the Apollo server application.
- *
+ *
* @param args The command-line arguments passed to the application.
*/
public static void main(String[] args) {
+ Stopwatch stopwatch = Stopwatch.createStarted();
+
try {
- long start = System.currentTimeMillis();
Server server = new Server();
server.init(args.length == 1 ? args[0] : Release317.class.getName());
@@ -53,10 +57,11 @@ public final class Server {
SocketAddress jaggrab = new InetSocketAddress(NetworkConstants.JAGGRAB_PORT);
server.bind(service, http, jaggrab);
- logger.fine("Starting apollo took " + (System.currentTimeMillis() - start) + " ms.");
} catch (Throwable t) {
logger.log(Level.SEVERE, "Error whilst starting server.", t);
}
+
+ logger.fine("Starting apollo took " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms.");
}
/**
@@ -81,16 +86,14 @@ public final class Server {
/**
* Creates the Apollo server.
- *
- * @throws Exception If an error occurs whilst creating services.
*/
- public Server() throws Exception {
+ public Server() {
logger.info("Starting Apollo...");
}
/**
* Binds the server to the specified address.
- *
+ *
* @param serviceAddress The service address to bind to.
* @param httpAddress The HTTP address to bind to.
* @param jagGrabAddress The JAGGRAB address to bind to.
@@ -98,14 +101,14 @@ public final class Server {
public void bind(SocketAddress serviceAddress, SocketAddress httpAddress, SocketAddress jagGrabAddress) {
try {
logger.fine("Binding service listener to address: " + serviceAddress + "...");
- serviceBootstrap.bind(serviceAddress).syncUninterruptibly();
+ serviceBootstrap.bind(serviceAddress).sync();
logger.fine("Binding HTTP listener to address: " + httpAddress + "...");
- httpBootstrap.bind(httpAddress).syncUninterruptibly();
+ httpBootstrap.bind(httpAddress).sync();
logger.fine("Binding JAGGRAB listener to address: " + jagGrabAddress + "...");
- jagGrabBootstrap.bind(jagGrabAddress).syncUninterruptibly();
- } catch (Exception e) {
+ jagGrabBootstrap.bind(jagGrabAddress).sync();
+ } catch (InterruptedException e) {
logger.log(Level.SEVERE, "Binding to a port failed: ensure apollo isn't already running.", e);
System.exit(1);
}
@@ -115,15 +118,16 @@ public final class Server {
/**
* Initialises the server.
- *
+ *
* @param releaseClassName The class name of the current active {@link Release}.
* @throws Exception If an error occurs.
*/
public void init(String releaseClassName) throws Exception {
Class> clazz = Class.forName(releaseClassName);
Release release = (Release) clazz.newInstance();
+ int releaseNo = release.getReleaseNumber();
- logger.info("Initialized release #" + release.getReleaseNumber() + ".");
+ logger.info("Initialized release #" + releaseNo + ".");
serviceBootstrap.group(loopGroup);
httpBootstrap.group(loopGroup);
@@ -131,7 +135,8 @@ public final class Server {
World world = new World();
ServiceManager serviceManager = new ServiceManager(world);
- ServerContext context = new ServerContext(release, serviceManager);
+ IndexedFileSystem fs = new IndexedFileSystem(Paths.get("data/fs", Integer.toString(releaseNo)), true);
+ ServerContext context = new ServerContext(release, serviceManager, fs);
ApolloHandler handler = new ApolloHandler(context);
ChannelInitializer serviceInitializer = new ServiceChannelInitializer(handler);
@@ -149,8 +154,6 @@ public final class Server {
PluginManager manager = new PluginManager(world, new PluginContext(context));
serviceManager.startAll();
- int releaseNo = release.getReleaseNumber();
- IndexedFileSystem fs = new IndexedFileSystem(Paths.get("data/fs", Integer.toString(releaseNo)), true);
world.init(releaseNo, fs, manager);
}
diff --git a/src/org/apollo/ServerContext.java b/src/org/apollo/ServerContext.java
index b5b99744..6d8162fe 100644
--- a/src/org/apollo/ServerContext.java
+++ b/src/org/apollo/ServerContext.java
@@ -1,12 +1,15 @@
package org.apollo;
+import java.util.Objects;
+
+import org.apollo.fs.IndexedFileSystem;
import org.apollo.net.release.Release;
/**
* A {@link ServerContext} is created along with the {@link Server} object. The primary difference is that a reference
* to the current context should be passed around within the server. The {@link Server} should not be as it allows
* access to some methods such as {@link Server#bind} which user scripts/code should not be able to access.
- *
+ *
* @author Graham
*/
public final class ServerContext {
@@ -21,30 +24,46 @@ public final class ServerContext {
*/
private final ServiceManager serviceManager;
+ /**
+ * The IndexedFileSystem.
+ */
+ private final IndexedFileSystem fileSystem;
+
/**
* Creates a new server context.
- *
+ *
* @param release The current release.
* @param serviceManager The service manager.
+ * @param fileSystem The indexed file system.
*/
- ServerContext(Release release, ServiceManager serviceManager) {
- this.release = release;
- this.serviceManager = serviceManager;
+ protected ServerContext(Release release, ServiceManager serviceManager, IndexedFileSystem fileSystem) {
+ this.release = Objects.requireNonNull(release);
+ this.serviceManager = Objects.requireNonNull(serviceManager);
this.serviceManager.setContext(this);
+ this.fileSystem = Objects.requireNonNull(fileSystem);
}
/**
* Gets the current release.
- *
+ *
* @return The current release.
*/
public Release getRelease() {
return release;
}
+ /**
+ * Gets the IndexeFileSystem
+ *
+ * @return The IndexedFileSystem.
+ */
+ public IndexedFileSystem getFileSystem() {
+ return fileSystem;
+ }
+
/**
* Gets a service. This method is shorthand for {@code getServiceManager().getService(...)}.
- *
+ *
* @param clazz The service class.
* @return The service, or {@code null} if it could not be found.
*/
@@ -54,7 +73,7 @@ public final class ServerContext {
/**
* Gets the service manager.
- *
+ *
* @return The service manager.
*/
public ServiceManager getServiceManager() {
diff --git a/src/org/apollo/Service.java b/src/org/apollo/Service.java
index 8b19ee74..6734dd53 100644
--- a/src/org/apollo/Service.java
+++ b/src/org/apollo/Service.java
@@ -4,7 +4,7 @@ import org.apollo.game.model.World;
/**
* Represents a service that the server provides for a {@link World}.
- *
+ *
* @author Graham
*/
public abstract class Service {
@@ -30,7 +30,7 @@ public abstract class Service {
/**
* Gets the {@link ServerContext}.
- *
+ *
* @return The context.
*/
public final ServerContext getContext() {
@@ -39,7 +39,7 @@ public abstract class Service {
/**
* Sets the {@link ServerContext}.
- *
+ *
* @param context The context.
*/
public final void setContext(ServerContext context) {
diff --git a/src/org/apollo/ServiceManager.java b/src/org/apollo/ServiceManager.java
index 736a84cc..3a66a516 100644
--- a/src/org/apollo/ServiceManager.java
+++ b/src/org/apollo/ServiceManager.java
@@ -14,7 +14,7 @@ import org.xml.sax.SAXException;
/**
* A class which manages {@link Service}s.
- *
+ *
* @author Graham
*/
public final class ServiceManager {
@@ -27,11 +27,11 @@ public final class ServiceManager {
/**
* The service map.
*/
- private Map, Service> services = new HashMap<>();
+ private final Map, Service> services = new HashMap<>();
/**
* Creates and initializes the {@link ServiceManager}.
- *
+ *
* @param world The {@link World} to create the {@link Service}s for.
* @throws IOException If there is an error reading from the xml file.
* @throws SAXException If there is an error parsing the xml file.
@@ -43,7 +43,7 @@ public final class ServiceManager {
/**
* Gets a service.
- *
+ *
* @param clazz The service class.
* @return The service.
*/
@@ -54,7 +54,7 @@ public final class ServiceManager {
/**
* Initializes this service manager.
- *
+ *
* @param world The {@link World} to create the {@link Service}s for.
* @throws SAXException If the service XML file could not be parsed.
* @throws IOException If the file could not be accessed.
@@ -91,7 +91,7 @@ public final class ServiceManager {
/**
* Registers a service.
- *
+ *
* @param clazz The service's class.
* @param service The service.
*/
@@ -102,7 +102,7 @@ public final class ServiceManager {
/**
* Sets the context of all services.
- *
+ *
* @param ctx The server context.
*/
public void setContext(ServerContext ctx) {
diff --git a/src/org/apollo/fs/FileDescriptor.java b/src/org/apollo/fs/FileDescriptor.java
index 902bfb99..8d93914f 100644
--- a/src/org/apollo/fs/FileDescriptor.java
+++ b/src/org/apollo/fs/FileDescriptor.java
@@ -2,7 +2,7 @@ package org.apollo.fs;
/**
* A class which points to a file in the cache.
- *
+ *
* @author Graham
*/
public final class FileDescriptor {
@@ -19,7 +19,7 @@ public final class FileDescriptor {
/**
* Creates the file descriptor.
- *
+ *
* @param type The file type.
* @param file The file id.
*/
@@ -30,7 +30,7 @@ public final class FileDescriptor {
/**
* Gets the file id.
- *
+ *
* @return The file id.
*/
public int getFile() {
@@ -39,7 +39,7 @@ public final class FileDescriptor {
/**
* Gets the file type.
- *
+ *
* @return The file type.
*/
public int getType() {
diff --git a/src/org/apollo/fs/FileSystemConstants.java b/src/org/apollo/fs/FileSystemConstants.java
index 630b5fd4..39ab1887 100644
--- a/src/org/apollo/fs/FileSystemConstants.java
+++ b/src/org/apollo/fs/FileSystemConstants.java
@@ -2,7 +2,7 @@ package org.apollo.fs;
/**
* Holds file system related constants.
- *
+ *
* @author Graham
*/
public final class FileSystemConstants {
diff --git a/src/org/apollo/fs/Index.java b/src/org/apollo/fs/Index.java
index c112c616..66610ca1 100644
--- a/src/org/apollo/fs/Index.java
+++ b/src/org/apollo/fs/Index.java
@@ -4,14 +4,14 @@ import com.google.common.base.Preconditions;
/**
* An {@link Index} points to a file in the {@code main_file_cache.dat} file.
- *
+ *
* @author Graham
*/
public final class Index {
/**
* Decodes a buffer into an index.
- *
+ *
* @param buffer The buffer.
* @return The decoded {@link Index}.
* @throws IllegalArgumentException If the buffer length is invalid.
@@ -37,7 +37,7 @@ public final class Index {
/**
* Creates the index.
- *
+ *
* @param size The size of the file.
* @param block The first block of the file.
*/
@@ -48,7 +48,7 @@ public final class Index {
/**
* Gets the first block of the file.
- *
+ *
* @return The first block of the file.
*/
public int getBlock() {
@@ -57,7 +57,7 @@ public final class Index {
/**
* Gets the size of the file.
- *
+ *
* @return The size of the file.
*/
public int getSize() {
diff --git a/src/org/apollo/fs/IndexedFileSystem.java b/src/org/apollo/fs/IndexedFileSystem.java
index a890b8eb..bb98190e 100644
--- a/src/org/apollo/fs/IndexedFileSystem.java
+++ b/src/org/apollo/fs/IndexedFileSystem.java
@@ -7,6 +7,7 @@ import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.util.Arrays;
import java.util.zip.CRC32;
import com.google.common.base.Preconditions;
@@ -14,7 +15,7 @@ import com.google.common.base.Preconditions;
/**
* A file system based on top of the operating system's file system. It consists of a data file and index files. Index
* files point to blocks in the data file, which contains the actual data.
- *
+ *
* @author Graham
*/
public final class IndexedFileSystem implements Closeable {
@@ -24,6 +25,11 @@ public final class IndexedFileSystem implements Closeable {
*/
private ByteBuffer crcTable;
+ /**
+ * The {@link #crcTable} represented as an {@code int} array.
+ */
+ private int[] crcs;
+
/**
* The data file.
*/
@@ -32,7 +38,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* The index files.
*/
- private RandomAccessFile[] indices = new RandomAccessFile[256];
+ private final RandomAccessFile[] indices = new RandomAccessFile[256];
/**
* Read only flag.
@@ -41,7 +47,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Creates the file system with the specified base directory.
- *
+ *
* @param base The base directory.
* @param readOnly Indicates whether the file system will be read only or not.
* @throws FileNotFoundException If the data files could not be found.
@@ -70,7 +76,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Automatically detect the layout of the specified directory.
- *
+ *
* @param base The base directory.
* @throws FileNotFoundException If the data files could not be found.
*/
@@ -97,7 +103,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Gets the CRC table.
- *
+ *
* @return The CRC table.
* @throws IOException If there is an error accessing files to create the table.
* @throws IllegalStateException If this file system is not read-only.
@@ -143,9 +149,26 @@ public final class IndexedFileSystem implements Closeable {
throw new IllegalStateException("Cannot get CRC table from a writable file system.");
}
+ /**
+ * Gets the CRC table as an {@code int} array.
+ *
+ * @return The CRC table as an {@code int} array.
+ * @throws IOException If there is an error accessing files to create the table.
+ */
+ public int[] getCrcs() throws IOException {
+ if (crcs != null) {
+ return crcs;
+ }
+
+ ByteBuffer buffer = getCrcTable();
+ crcs = new int[(buffer.remaining() / Integer.BYTES) - 1];
+ Arrays.setAll(crcs, crc -> buffer.getInt());
+ return crcs;
+ }
+
/**
* Gets a file.
- *
+ *
* @param descriptor The {@link FileDescriptor} pointing to the file.
* @return A {@link ByteBuffer} containing the contents of the file.
* @throws IOException If there is an error decoding the file.
@@ -211,7 +234,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Gets a file.
- *
+ *
* @param type The file type.
* @param file The file id.
* @return A {@link ByteBuffer} which contains the contents of the file.
@@ -223,7 +246,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Gets the number of files with the specified type.
- *
+ *
* @param type The type.
* @return The number of files.
* @throws IOException If there is an error getting the length of the specified index file.
@@ -241,7 +264,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Gets the index of a file.
- *
+ *
* @param descriptor The {@link FileDescriptor} which points to the file.
* @return The {@link Index}.
* @throws IOException If there is an error reading from the index file.
@@ -269,7 +292,7 @@ public final class IndexedFileSystem implements Closeable {
/**
* Checks if this {@link IndexedFileSystem} is read only.
- *
+ *
* @return {@code true} if so, {@code false} if not.
*/
public boolean isReadOnly() {
diff --git a/src/org/apollo/fs/archive/Archive.java b/src/org/apollo/fs/archive/Archive.java
index 76448df9..dcd6fee5 100644
--- a/src/org/apollo/fs/archive/Archive.java
+++ b/src/org/apollo/fs/archive/Archive.java
@@ -9,14 +9,14 @@ import org.apollo.util.CompressionUtil;
/**
* Represents an archive.
- *
+ *
* @author Graham
*/
public final class Archive {
/**
* Decodes the archive in the specified buffer.
- *
+ *
* @param buffer The buffer.
* @return The archive.
* @throws IOException If there is an error decompressing the archive.
@@ -72,7 +72,7 @@ public final class Archive {
/**
* Creates a new archive.
- *
+ *
* @param entries The entries in this archive.
*/
public Archive(ArchiveEntry[] entries) {
@@ -81,7 +81,7 @@ public final class Archive {
/**
* Gets an {@link ArchiveEntry} by its name.
- *
+ *
* @param name The name.
* @return The entry.
* @throws FileNotFoundException If the entry could not be found.
@@ -99,7 +99,7 @@ public final class Archive {
/**
* Hashes the specified string into an integer used to identify an {@link ArchiveEntry}.
- *
+ *
* @param name The name of the entry.
* @return The hash.
*/
diff --git a/src/org/apollo/fs/archive/ArchiveEntry.java b/src/org/apollo/fs/archive/ArchiveEntry.java
index a8a9ffbf..253987c8 100644
--- a/src/org/apollo/fs/archive/ArchiveEntry.java
+++ b/src/org/apollo/fs/archive/ArchiveEntry.java
@@ -4,7 +4,7 @@ import java.nio.ByteBuffer;
/**
* Represents a single entry in an {@link Archive}.
- *
+ *
* @author Graham
*/
public final class ArchiveEntry {
@@ -21,7 +21,7 @@ public final class ArchiveEntry {
/**
* Creates a new archive entry.
- *
+ *
* @param identifier The identifier.
* @param buffer The buffer.
*/
@@ -32,7 +32,7 @@ public final class ArchiveEntry {
/**
* Gets the buffer of this entry.
- *
+ *
* @return This buffer of this entry.
*/
public ByteBuffer getBuffer() {
@@ -41,7 +41,7 @@ public final class ArchiveEntry {
/**
* Gets the identifier of this entry.
- *
+ *
* @return The identifier of this entry.
*/
public int getIdentifier() {
diff --git a/src/org/apollo/fs/decoder/GameObjectDecoder.java b/src/org/apollo/fs/decoder/GameObjectDecoder.java
index d7ec481a..fbb3583f 100644
--- a/src/org/apollo/fs/decoder/GameObjectDecoder.java
+++ b/src/org/apollo/fs/decoder/GameObjectDecoder.java
@@ -26,7 +26,7 @@ import com.google.common.collect.Iterables;
/**
* Parses static object definitions, which include map tiles and landscapes.
- *
+ *
* @author Ryley
* @author Major
*/
@@ -59,7 +59,7 @@ public final class GameObjectDecoder {
/**
* Creates the GameObjectDecoder.
- *
+ *
* @param fs The {@link IndexedFileSystem}.
* @param regions The {@link RegionRepository}.
*/
@@ -70,7 +70,7 @@ public final class GameObjectDecoder {
/**
* Decodes the GameObjects from their MapDefinitions.
- *
+ *
* @param world The {@link World} containing the StaticGameObjects.
* @return The decoded objects.
* @throws IOException If there is an error decoding the {@link MapDefinition}s.
@@ -99,7 +99,7 @@ public final class GameObjectDecoder {
/**
* Blocks tiles covered by a GameObject, if applicable.
- *
+ *
* @param object The {@link GameObject}.
* @param position The position of the GameObject.
*/
@@ -133,7 +133,7 @@ public final class GameObjectDecoder {
if (block) {
for (int dx = 0; dx < definition.getWidth(); dx++) {
for (int dy = 0; dy < definition.getLength(); dy++) {
- int localX = (x % Region.SIZE) + dx, localY = (y % Region.SIZE) + dy;
+ int localX = x % Region.SIZE + dx, localY = y % Region.SIZE + dy;
if (localX > 7 || localY > 7) {
int nextLocalX = localX > 7 ? x + localX - 7 : x + localX;
@@ -141,11 +141,13 @@ public final class GameObjectDecoder {
Position nextPosition = new Position(nextLocalX, nextLocalY);
Region next = regions.fromPosition(nextPosition);
- int nextX = (nextPosition.getX() % Region.SIZE) + dx, nextY = (nextPosition.getY() % Region.SIZE) + dy;
- if (nextX > 7)
+ int nextX = nextPosition.getX() % Region.SIZE + dx, nextY = nextPosition.getY() % Region.SIZE + dy;
+ if (nextX > 7) {
nextX -= 7;
- if (nextY > 7)
+ }
+ if (nextY > 7) {
nextY -= 7;
+ }
next.getMatrix(height).block(nextX, nextY);
continue;
@@ -159,7 +161,7 @@ public final class GameObjectDecoder {
/**
* Decodes the attributes of a terrain file, blocking the tile if necessary.
- *
+ *
* @param attributes The terrain attributes.
* @param position The {@link Position} of the tile whose attributes are being decoded.
*/
@@ -181,14 +183,14 @@ public final class GameObjectDecoder {
}
if (block) {
- int localX = (x % Region.SIZE), localY = (y % Region.SIZE);
+ int localX = x % Region.SIZE, localY = y % Region.SIZE;
current.block(localX, localY);
}
}
/**
* Decodes object data stored in the specified {@link ByteBuffer}.
- *
+ *
* @param world The {@link World} containing the StaticGameObjects.
* @param buffer The ByteBuffer.
* @param x The x coordinate of the top left tile of the map file.
@@ -209,7 +211,7 @@ public final class GameObjectDecoder {
int localY = packed & 0x3F;
int localX = packed >> 6 & 0x3F;
- int height = (packed >> 12) & 0x3;
+ int height = packed >> 12 & 0x3;
int attributes = buffer.get() & 0xFF;
int type = attributes >> 2;
@@ -229,7 +231,7 @@ public final class GameObjectDecoder {
/**
* Decodes terrain data stored in the specified {@link ByteBuffer}.
- *
+ *
* @param buffer The ByteBuffer.
* @param x The x coordinate of the top left tile of the map file.
* @param y The y coordinate of the top left tile of the map file.
diff --git a/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java b/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java
index 9124041f..7596e74d 100644
--- a/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java
+++ b/src/org/apollo/fs/decoder/ItemDefinitionDecoder.java
@@ -10,7 +10,7 @@ import org.apollo.util.BufferUtil;
/**
* Decodes item data from the {@code obj.dat} file into {@link ItemDefinition}s.
- *
+ *
* @author Graham
*/
public final class ItemDefinitionDecoder {
@@ -22,7 +22,7 @@ public final class ItemDefinitionDecoder {
/**
* Creates the item definition decoder.
- *
+ *
* @param fs The indexed file system.
*/
public ItemDefinitionDecoder(IndexedFileSystem fs) {
@@ -31,7 +31,7 @@ public final class ItemDefinitionDecoder {
/**
* Decodes the item definitions.
- *
+ *
* @return The item definitions.
* @throws IOException If an I/O error occurs.
*/
@@ -58,7 +58,7 @@ public final class ItemDefinitionDecoder {
/**
* Decodes a single definition.
- *
+ *
* @param id The item's id.
* @param buffer The buffer.
* @return The {@link ItemDefinition}.
diff --git a/src/org/apollo/fs/decoder/MapFileDecoder.java b/src/org/apollo/fs/decoder/MapFileDecoder.java
index 56be7d18..44e8ee96 100644
--- a/src/org/apollo/fs/decoder/MapFileDecoder.java
+++ b/src/org/apollo/fs/decoder/MapFileDecoder.java
@@ -12,7 +12,7 @@ import org.apollo.game.model.area.Region;
/**
* Decodes {@link MapDefinition}s from the {@link IndexedFileSystem}.
- *
+ *
* @author Ryley
* @author Major
*/
@@ -82,7 +82,7 @@ public final class MapFileDecoder {
/**
* Creates the {@link MapDefinition}.
- *
+ *
* @param packedCoordinates The packed coordinates.
* @param terrain The terrain file id.
* @param objects The object file id.
@@ -97,7 +97,7 @@ public final class MapFileDecoder {
/**
* Gets the packed coordinates.
- *
+ *
* @return The packed coordinates.
*/
public int getPackedCoordinates() {
@@ -106,7 +106,7 @@ public final class MapFileDecoder {
/**
* Gets the id of the file containing the terrain data.
- *
+ *
* @return The file id.
*/
public int getTerrainFile() {
@@ -115,7 +115,7 @@ public final class MapFileDecoder {
/**
* Gets the id of the file containing the object data.
- *
+ *
* @return The file id.
*/
public int getObjectFile() {
@@ -124,7 +124,7 @@ public final class MapFileDecoder {
/**
* Returns whether or not this MapDefinition is for a members-only area of the world.
- *
+ *
* @return {@code true} if this MapDefinition is for a members-only area, {@code false} if not.
*/
public boolean isMembersOnly() {
diff --git a/src/org/apollo/fs/decoder/NpcDefinitionDecoder.java b/src/org/apollo/fs/decoder/NpcDefinitionDecoder.java
index 743a2342..c7244b04 100644
--- a/src/org/apollo/fs/decoder/NpcDefinitionDecoder.java
+++ b/src/org/apollo/fs/decoder/NpcDefinitionDecoder.java
@@ -11,7 +11,7 @@ import org.apollo.util.BufferUtil;
/**
* Decodes npc data from the {@code npc.dat} file into {@link NpcDefinition}s.
- *
+ *
* @author Major
*/
public final class NpcDefinitionDecoder {
@@ -23,7 +23,7 @@ public final class NpcDefinitionDecoder {
/**
* Creates the npc definition decoder.
- *
+ *
* @param fs The indexed file system.
*/
public NpcDefinitionDecoder(IndexedFileSystem fs) {
@@ -32,7 +32,7 @@ public final class NpcDefinitionDecoder {
/**
* Decodes the npc definitions.
- *
+ *
* @return An array of all parsed npc definitions.
* @throws IOException If an I/O error occurs.
*/
@@ -59,7 +59,7 @@ public final class NpcDefinitionDecoder {
/**
* Decodes a single definition.
- *
+ *
* @param id The npc's id.
* @param buffer The buffer.
* @return The {@link NpcDefinition}.
@@ -121,24 +121,20 @@ public final class NpcDefinitionDecoder {
} else if (opcode == 102 || opcode == 103) {
buffer.getShort();
} else if (opcode == 106) {
- @SuppressWarnings("unused")
- int morphVariableBitsIndex = wrap(buffer.getShort());
- @SuppressWarnings("unused")
- int morphismCount = wrap(buffer.getShort());
+ wrap(buffer.getShort());
+ wrap(buffer.getShort());
int count = buffer.get() & 0xFF;
int[] morphisms = new int[count + 1];
Arrays.setAll(morphisms, index -> wrap(buffer.getShort()));
} else if (opcode == 107) {
- @SuppressWarnings("unused")
- boolean clickable = false;
}
}
}
/**
* Wraps a morphism value around, returning -1 if the specified value is 65,535.
- *
+ *
* @param value The value.
* @return -1 if {@code value} is 65,535, otherwise {@code value}.
*/
diff --git a/src/org/apollo/fs/decoder/ObjectDefinitionDecoder.java b/src/org/apollo/fs/decoder/ObjectDefinitionDecoder.java
index ac998c30..fe231040 100644
--- a/src/org/apollo/fs/decoder/ObjectDefinitionDecoder.java
+++ b/src/org/apollo/fs/decoder/ObjectDefinitionDecoder.java
@@ -10,7 +10,7 @@ import org.apollo.util.BufferUtil;
/**
* Decodes object data from the {@code loc.dat} file into {@link ObjectDefinition}s.
- *
+ *
* @author Major
*/
public final class ObjectDefinitionDecoder {
@@ -22,7 +22,7 @@ public final class ObjectDefinitionDecoder {
/**
* Creates the decoder.
- *
+ *
* @param fs The {@link IndexedFileSystem}.
*/
public ObjectDefinitionDecoder(IndexedFileSystem fs) {
@@ -31,7 +31,7 @@ public final class ObjectDefinitionDecoder {
/**
* Decodes all of the data into {@link ObjectDefinition}s.
- *
+ *
* @return The definitions.
* @throws IOException If an error occurs when decoding the archive or finding an entry.
*/
@@ -57,7 +57,7 @@ public final class ObjectDefinitionDecoder {
/**
* Decodes data from the cache into an {@link ObjectDefinition}.
- *
+ *
* @param id The id of the object.
* @param data The {@link ByteBuffer} containing the data.
* @return The object definition.
diff --git a/src/org/apollo/game/GameConstants.java b/src/org/apollo/game/GameConstants.java
index 270427d2..f44f7497 100644
--- a/src/org/apollo/game/GameConstants.java
+++ b/src/org/apollo/game/GameConstants.java
@@ -2,7 +2,7 @@ package org.apollo.game;
/**
* Contains game-related constants.
- *
+ *
* @author Graham
*/
public final class GameConstants {
diff --git a/src/org/apollo/game/GamePulseHandler.java b/src/org/apollo/game/GamePulseHandler.java
index 2222cda0..d9ba67a2 100644
--- a/src/org/apollo/game/GamePulseHandler.java
+++ b/src/org/apollo/game/GamePulseHandler.java
@@ -5,7 +5,7 @@ import java.util.logging.Logger;
/**
* A class which handles the logic for each pulse of the {@link GameService}.
- *
+ *
* @author Graham
*/
public final class GamePulseHandler implements Runnable {
@@ -22,7 +22,7 @@ public final class GamePulseHandler implements Runnable {
/**
* Creates the game pulse handler object.
- *
+ *
* @param service The {@link GameService}.
*/
protected GamePulseHandler(GameService service) {
diff --git a/src/org/apollo/game/GameService.java b/src/org/apollo/game/GameService.java
index b85a7b91..02fd3f73 100644
--- a/src/org/apollo/game/GameService.java
+++ b/src/org/apollo/game/GameService.java
@@ -20,15 +20,14 @@ import org.apollo.io.MessageHandlerChainSetParser;
import org.apollo.login.LoginService;
import org.apollo.net.session.GameSession;
import org.apollo.util.MobRepository;
+import org.apollo.util.ThreadUtil;
import org.apollo.util.xml.XmlNode;
import org.apollo.util.xml.XmlParser;
import org.xml.sax.SAXException;
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
-
/**
* The {@link GameService} class schedules and manages the execution of the {@link GamePulseHandler} class.
- *
+ *
* @author Graham
*/
public final class GameService extends Service {
@@ -52,7 +51,7 @@ public final class GameService extends Service {
/**
* The scheduled executor service.
*/
- private final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder().setNameFormat("GameService").build());
+ private final ScheduledExecutorService scheduledExecutor = Executors.newSingleThreadScheduledExecutor(ThreadUtil.build("GameService"));
/**
* The {@link ClientSynchronizer}.
@@ -61,7 +60,7 @@ public final class GameService extends Service {
/**
* Creates the GameService.
- *
+ *
* @param world The {@link World} the GameService is for.
* @throws Exception If an error occurs during initialization.
*/
@@ -72,7 +71,7 @@ public final class GameService extends Service {
/**
* Finalizes the unregistration of a player.
- *
+ *
* @param player The player.
*/
public void finalizePlayerUnregistration(Player player) {
@@ -83,7 +82,7 @@ public final class GameService extends Service {
/**
* Gets the MessageHandlerChainSet
- *
+ *
* @return The set of MessageHandlerChain's.
*/
public MessageHandlerChainSet getMessageHandlerChainSet() {
@@ -112,7 +111,7 @@ public final class GameService extends Service {
/**
* Registers a {@link Player} (may block!).
- *
+ *
* @param player The Player.
* @param session The {@link GameSession} of the Player.
* @return A {@link RegistrationStatus}.
@@ -133,7 +132,7 @@ public final class GameService extends Service {
/**
* Shuts down this game service.
- *
+ *
* @param natural Whether or not the shutdown was expected.
*/
public void shutdown(boolean natural) {
@@ -148,7 +147,7 @@ public final class GameService extends Service {
/**
* Unregisters a player. Returns immediately. The player is unregistered at the start of the next cycle.
- *
+ *
* @param player The player.
*/
public void unregisterPlayer(Player player) {
@@ -173,7 +172,7 @@ public final class GameService extends Service {
/**
* Initializes the game service.
- *
+ *
* @throws IOException If there is an error accessing the file.
* @throws SAXException If there is an error parsing the file.
* @throws ReflectiveOperationException If a MessageHandler could not be created.
diff --git a/src/org/apollo/game/action/Action.java b/src/org/apollo/game/action/Action.java
index 20b56023..6702bae6 100644
--- a/src/org/apollo/game/action/Action.java
+++ b/src/org/apollo/game/action/Action.java
@@ -9,7 +9,7 @@ import org.apollo.game.scheduling.ScheduledTask;
* ALL actions MUST implement the {@link #equals(Object)} method. This is to check if
* two actions are identical: if they are, then the new action does not replace the old one (so spam/accidental clicking
* won't cancel your action, and start another from scratch).
- *
+ *
* @author Graham
* @param The type of mob.
*/
@@ -27,7 +27,7 @@ public abstract class Action extends ScheduledTask {
/**
* Creates a new action.
- *
+ *
* @param delay The delay in pulses.
* @param immediate A flag indicating if the action should happen immediately.
* @param mob The mob performing the action.
@@ -39,7 +39,7 @@ public abstract class Action extends ScheduledTask {
/**
* Gets the mob which performed the action.
- *
+ *
* @return The mob.
*/
public final T getMob() {
diff --git a/src/org/apollo/game/action/DistancedAction.java b/src/org/apollo/game/action/DistancedAction.java
index 83b69c26..d626106a 100644
--- a/src/org/apollo/game/action/DistancedAction.java
+++ b/src/org/apollo/game/action/DistancedAction.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.Mob;
/**
* An @{link Action} which fires when a distance requirement is met.
- *
+ *
* @author Blake
* @author Graham
* @param The type of {@link Mob}.
@@ -39,7 +39,7 @@ public abstract class DistancedAction extends Action {
/**
* Creates a new DistancedAction.
- *
+ *
* @param delay The delay between executions once the distance threshold is reached.
* @param immediate Whether or not this action fires immediately after the distance threshold is reached.
* @param mob The mob.
diff --git a/src/org/apollo/game/command/Command.java b/src/org/apollo/game/command/Command.java
index b5bf90b4..70eb8f3e 100644
--- a/src/org/apollo/game/command/Command.java
+++ b/src/org/apollo/game/command/Command.java
@@ -2,7 +2,7 @@ package org.apollo.game.command;
/**
* Represents a command.
- *
+ *
* @author Graham
*/
public final class Command {
@@ -19,7 +19,7 @@ public final class Command {
/**
* Creates the command.
- *
+ *
* @param name The name of the command.
* @param arguments The command's arguments.
*/
@@ -30,7 +30,7 @@ public final class Command {
/**
* Gets the command's arguments.
- *
+ *
* @return The command's arguments.
*/
public String[] getArguments() {
@@ -39,7 +39,7 @@ public final class Command {
/**
* Gets the name of the command.
- *
+ *
* @return The name of the command.
*/
public String getName() {
diff --git a/src/org/apollo/game/command/CommandDispatcher.java b/src/org/apollo/game/command/CommandDispatcher.java
index 2dbeb852..70c76962 100644
--- a/src/org/apollo/game/command/CommandDispatcher.java
+++ b/src/org/apollo/game/command/CommandDispatcher.java
@@ -8,7 +8,7 @@ import org.apollo.game.model.entity.Player;
/**
* A class that dispatches {@link Command}s to {@link CommandListener}s.
- *
+ *
* @author Graham
*/
public final class CommandDispatcher {
@@ -20,7 +20,7 @@ public final class CommandDispatcher {
/**
* Initialises this CommandDispatcher.
- *
+ *
* @param authors The {@link Set} of plugin authors.
*/
public void init(Set authors) {
@@ -29,7 +29,7 @@ public final class CommandDispatcher {
/**
* Dispatches a command to the appropriate listener.
- *
+ *
* @param player The player.
* @param command The command.
*/
@@ -42,7 +42,7 @@ public final class CommandDispatcher {
/**
* Registers a listener with the dispatcher.
- *
+ *
* @param command The command's name.
* @param listener The listener.
*/
diff --git a/src/org/apollo/game/command/CommandListener.java b/src/org/apollo/game/command/CommandListener.java
index 97202fa1..68e6a5c5 100644
--- a/src/org/apollo/game/command/CommandListener.java
+++ b/src/org/apollo/game/command/CommandListener.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.setting.PrivilegeLevel;
/**
* An interface which should be implemented to listen to {@link Command}s.
- *
+ *
* @author Graham
* @author Major
*/
@@ -25,7 +25,7 @@ public abstract class CommandListener {
/**
* Creates a new command listener.
- *
+ *
* @param level The required {@link PrivilegeLevel}.
*/
public CommandListener(PrivilegeLevel level) {
@@ -34,7 +34,7 @@ public abstract class CommandListener {
/**
* Executes the action for this command.
- *
+ *
* @param player The player.
* @param command The command.
*/
@@ -42,7 +42,7 @@ public abstract class CommandListener {
/**
* Executes a privileged command.
- *
+ *
* @param player The player.
* @param command The command.
*/
diff --git a/src/org/apollo/game/command/CreditsCommandListener.java b/src/org/apollo/game/command/CreditsCommandListener.java
index 0983b36f..1363bf62 100644
--- a/src/org/apollo/game/command/CreditsCommandListener.java
+++ b/src/org/apollo/game/command/CreditsCommandListener.java
@@ -10,16 +10,16 @@ import com.google.common.collect.ImmutableSet;
/**
* Implements a {@code ::credits} command that lists the authors of all plugins used in the server.
- *
+ *
* @author Graham
*/
public final class CreditsCommandListener extends CommandListener {
-
+
/**
* The Set of authors.
*/
private final Set authors;
-
+
/**
* Creates the CreditsCommandListener.
*
diff --git a/src/org/apollo/game/message/Message.java b/src/org/apollo/game/message/Message.java
index 13b0c59f..4c863efa 100644
--- a/src/org/apollo/game/message/Message.java
+++ b/src/org/apollo/game/message/Message.java
@@ -2,7 +2,7 @@ package org.apollo.game.message;
/**
* A message sent by the client that can be intercepted.
- *
+ *
* @author Graham
* @author Major
*/
@@ -22,7 +22,7 @@ public abstract class Message {
/**
* Returns whether or not the Message chain has been terminated.
- *
+ *
* @return {@code true} if the Message chain has been terminated, otherwise {@code false}.
*/
public final boolean terminated() {
diff --git a/src/org/apollo/game/message/MessageHandler.java b/src/org/apollo/game/message/MessageHandler.java
index ec787281..4b8a1218 100644
--- a/src/org/apollo/game/message/MessageHandler.java
+++ b/src/org/apollo/game/message/MessageHandler.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.Player;
/**
* Listens for {@link Message}s received from the client.
- *
+ *
* @author Graham
* @author Ryley
* @param The type of Message this class is listening for.
@@ -28,7 +28,7 @@ public abstract class MessageHandler {
/**
* Handles the Message that was received.
- *
+ *
* @param player The player to handle the Message for.
* @param message The Message.
*/
diff --git a/src/org/apollo/game/message/MessageHandlerChain.java b/src/org/apollo/game/message/MessageHandlerChain.java
index 413a4ecf..767242ea 100644
--- a/src/org/apollo/game/message/MessageHandlerChain.java
+++ b/src/org/apollo/game/message/MessageHandlerChain.java
@@ -9,7 +9,7 @@ import com.google.common.base.MoreObjects;
/**
* A chain of {@link MessageHandler}s
- *
+ *
* @author Graham
* @author Ryley
* @param The Message type this chain represents.
@@ -28,7 +28,7 @@ public final class MessageHandlerChain {
/**
* Constructs a new {@link MessageHandlerChain}.
- *
+ *
* @param type The Class type of this chain.
*/
public MessageHandlerChain(Class type) {
@@ -37,7 +37,7 @@ public final class MessageHandlerChain {
/**
* Adds the specified {@link MessageHandler} to this chain.
- *
+ *
* @param handler The MessageHandler.
*/
public void addHandler(MessageHandler handler) {
@@ -46,7 +46,7 @@ public final class MessageHandlerChain {
/**
* Notifies each {@link MessageHandler} in this chain that a {@link Message} has been received.
- *
+ *
* @param player The Player to handle this message for.
* @param message The Message.
* @return {@code true} if and only if the Message propagated down the chain without being terminated, otherwise
diff --git a/src/org/apollo/game/message/MessageHandlerChainSet.java b/src/org/apollo/game/message/MessageHandlerChainSet.java
index 804ca458..95f67487 100644
--- a/src/org/apollo/game/message/MessageHandlerChainSet.java
+++ b/src/org/apollo/game/message/MessageHandlerChainSet.java
@@ -7,7 +7,7 @@ import org.apollo.game.model.entity.Player;
/**
* A group of {@link MessageHandlerChain}s classified by the {@link Message} type.
- *
+ *
* @author Graham
* @author Ryley
* @author Major
@@ -30,12 +30,12 @@ public final class MessageHandlerChainSet {
public boolean notify(Player player, M message) {
@SuppressWarnings("unchecked")
MessageHandlerChain chain = (MessageHandlerChain) chains.get(message.getClass());
- return (chain == null) || chain.notify(player, message);
+ return chain == null || chain.notify(player, message);
}
/**
* Places the {@link MessageHandlerChain} into this set.
- *
+ *
* @param clazz The {@link Class} to associate the MessageHandlerChain with.
* @param handler The MessageHandlerChain.
*/
diff --git a/src/org/apollo/game/message/handler/BankButtonMessageHandler.java b/src/org/apollo/game/message/handler/BankButtonMessageHandler.java
index 730b4e3e..27f122f3 100644
--- a/src/org/apollo/game/message/handler/BankButtonMessageHandler.java
+++ b/src/org/apollo/game/message/handler/BankButtonMessageHandler.java
@@ -7,7 +7,7 @@ import org.apollo.game.model.entity.Player;
/**
* A {@link MessageHandler} that responds to {@link ButtonMessage}s for withdrawing items as notes.
- *
+ *
* @author Graham
*/
public final class BankButtonMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/BankMessageHandler.java b/src/org/apollo/game/message/handler/BankMessageHandler.java
index f6c7d7a3..8b8c87c2 100644
--- a/src/org/apollo/game/message/handler/BankMessageHandler.java
+++ b/src/org/apollo/game/message/handler/BankMessageHandler.java
@@ -12,14 +12,14 @@ import org.apollo.game.model.inter.bank.BankWithdrawEnterAmountListener;
/**
* A {@link MessageHandler} that handles withdrawing and depositing items from/to a player's bank.
- *
+ *
* @author Graham
*/
public final class BankMessageHandler extends MessageHandler {
/**
* Converts an option to an amount.
- *
+ *
* @param option The option.
* @return The amount.
* @throws IllegalArgumentException If the option is invalid.
@@ -63,7 +63,7 @@ public final class BankMessageHandler extends MessageHandler
/**
* Handles a deposit action.
- *
+ *
* @param player The player.
* @param message The message.
*/
@@ -80,7 +80,7 @@ public final class BankMessageHandler extends MessageHandler
/**
* Handles a withdraw action.
- *
+ *
* @param player The player.
* @param message The message.
*/
diff --git a/src/org/apollo/game/message/handler/ChatMessageHandler.java b/src/org/apollo/game/message/handler/ChatMessageHandler.java
index a8bdaf4c..0432075d 100644
--- a/src/org/apollo/game/message/handler/ChatMessageHandler.java
+++ b/src/org/apollo/game/message/handler/ChatMessageHandler.java
@@ -8,7 +8,7 @@ import org.apollo.game.sync.block.SynchronizationBlock;
/**
* A {@link MessageHandler} that broadcasts public chat messages.
- *
+ *
* @author Graham
*/
public final class ChatMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/ChatVerificationHandler.java b/src/org/apollo/game/message/handler/ChatVerificationHandler.java
index 7b0a8902..c0ddb3b2 100644
--- a/src/org/apollo/game/message/handler/ChatVerificationHandler.java
+++ b/src/org/apollo/game/message/handler/ChatVerificationHandler.java
@@ -7,7 +7,7 @@ import org.apollo.game.model.entity.Player;
/**
* A {@link MessageHandler} that verifies {@link ChatMessage}s.
- *
+ *
* @author Graham
*/
public final class ChatVerificationHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/ClosedInterfaceMessageHandler.java b/src/org/apollo/game/message/handler/ClosedInterfaceMessageHandler.java
index 50dbacff..03f53067 100644
--- a/src/org/apollo/game/message/handler/ClosedInterfaceMessageHandler.java
+++ b/src/org/apollo/game/message/handler/ClosedInterfaceMessageHandler.java
@@ -7,7 +7,7 @@ import org.apollo.game.model.entity.Player;
/**
* A {@link MessageHandler} for the {@link ClosedInterfaceMessage}.
- *
+ *
* @author Graham
*/
public final class ClosedInterfaceMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/CommandMessageHandler.java b/src/org/apollo/game/message/handler/CommandMessageHandler.java
index 7f1983e5..64f729b3 100644
--- a/src/org/apollo/game/message/handler/CommandMessageHandler.java
+++ b/src/org/apollo/game/message/handler/CommandMessageHandler.java
@@ -9,7 +9,7 @@ import org.apollo.game.model.entity.Player;
/**
* A {@link MessageHandler} that dispatches {@link CommandMessage}s.
- *
+ *
* @author Graham
*/
public final class CommandMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/DialogueButtonHandler.java b/src/org/apollo/game/message/handler/DialogueButtonHandler.java
index f348f990..b5497289 100644
--- a/src/org/apollo/game/message/handler/DialogueButtonHandler.java
+++ b/src/org/apollo/game/message/handler/DialogueButtonHandler.java
@@ -9,7 +9,7 @@ import org.apollo.game.model.inter.InterfaceType;
/**
* A {@link MessageHandler} which intercepts button clicks on dialogues, and forwards the message to the current
* listener.
- *
+ *
* @author Chris Fletcher
*/
public final class DialogueButtonHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/DialogueContinueMessageHandler.java b/src/org/apollo/game/message/handler/DialogueContinueMessageHandler.java
index afdb57a9..99a57d51 100644
--- a/src/org/apollo/game/message/handler/DialogueContinueMessageHandler.java
+++ b/src/org/apollo/game/message/handler/DialogueContinueMessageHandler.java
@@ -8,7 +8,7 @@ import org.apollo.game.model.inter.InterfaceType;
/**
* A {@link MessageHandler} for the {@link DialogueContinueMessage}.
- *
+ *
* @author Chris Fletcher
*/
public final class DialogueContinueMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/EnteredAmountMessageHandler.java b/src/org/apollo/game/message/handler/EnteredAmountMessageHandler.java
index 6e9d2117..9ba5bf99 100644
--- a/src/org/apollo/game/message/handler/EnteredAmountMessageHandler.java
+++ b/src/org/apollo/game/message/handler/EnteredAmountMessageHandler.java
@@ -7,7 +7,7 @@ import org.apollo.game.model.entity.Player;
/**
* A {@link MessageHandler} for the {@link EnteredAmountMessage}.
- *
+ *
* @author Graham
*/
public final class EnteredAmountMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/EquipItemHandler.java b/src/org/apollo/game/message/handler/EquipItemHandler.java
index c9441c2e..c7d3e81e 100644
--- a/src/org/apollo/game/message/handler/EquipItemHandler.java
+++ b/src/org/apollo/game/message/handler/EquipItemHandler.java
@@ -14,13 +14,13 @@ import org.apollo.util.LanguageUtil;
/**
* A {@link MessageHandler} that equips items.
- *
+ *
* @author Major
* @author Graham
* @author Ryley
*/
public final class EquipItemHandler extends MessageHandler {
-
+
/**
* The option used when equipping an item.
*/
@@ -98,8 +98,7 @@ public final class EquipItemHandler extends MessageHandler {
return;
}
- if (definition.getSlot() == EquipmentConstants.SHIELD && weapon != null
- && EquipmentDefinition.lookup(weapon.getId()).isTwoHanded()) {
+ if (definition.getSlot() == EquipmentConstants.SHIELD && weapon != null && EquipmentDefinition.lookup(weapon.getId()).isTwoHanded()) {
equipment.set(EquipmentConstants.SHIELD, inventory.reset(inventorySlot));
inventory.add(equipment.reset(EquipmentConstants.WEAPON));
return;
diff --git a/src/org/apollo/game/message/handler/ItemOnItemVerificationHandler.java b/src/org/apollo/game/message/handler/ItemOnItemVerificationHandler.java
index fe202073..596d65f1 100644
--- a/src/org/apollo/game/message/handler/ItemOnItemVerificationHandler.java
+++ b/src/org/apollo/game/message/handler/ItemOnItemVerificationHandler.java
@@ -11,7 +11,7 @@ import org.apollo.game.model.inv.SynchronizationInventoryListener;
/**
* A {@link MessageHandler} that verifies the target item in {@link ItemOnItemMessage}s.
- *
+ *
* @author Chris Fletcher
*/
public final class ItemOnItemVerificationHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/ItemOnObjectVerificationHandler.java b/src/org/apollo/game/message/handler/ItemOnObjectVerificationHandler.java
index 33e530f8..ea543d69 100644
--- a/src/org/apollo/game/message/handler/ItemOnObjectVerificationHandler.java
+++ b/src/org/apollo/game/message/handler/ItemOnObjectVerificationHandler.java
@@ -11,7 +11,7 @@ import org.apollo.game.model.inv.SynchronizationInventoryListener;
/**
* A {@link MessageHandler} that verifies {@link ItemOnObjectMessage}s.
- *
+ *
* @author Major
*/
public final class ItemOnObjectVerificationHandler extends MessageHandler {
@@ -27,8 +27,7 @@ public final class ItemOnObjectVerificationHandler extends MessageHandleriff the specified id does not already have a mapping.
- *
+ *
* @param id The id of the interface.
* @param supplier The {@link InventorySupplier}.
*/
diff --git a/src/org/apollo/game/message/handler/ObjectActionVerificationHandler.java b/src/org/apollo/game/message/handler/ObjectActionVerificationHandler.java
index e9b2bd3f..a7b37c9f 100644
--- a/src/org/apollo/game/message/handler/ObjectActionVerificationHandler.java
+++ b/src/org/apollo/game/message/handler/ObjectActionVerificationHandler.java
@@ -15,14 +15,14 @@ import org.apollo.game.model.entity.obj.GameObject;
/**
* A verification {@link MessageHandler} for the {@link ObjectActionMessage}.
- *
+ *
* @author Major
*/
public final class ObjectActionVerificationHandler extends MessageHandler {
/**
* Indicates whether or not the {@link List} of {@link GameObject}s contains the object with the specified id.
- *
+ *
* @param id The id of the object.
* @param objects The list of objects.
* @return {@code true} if the list does contain the object with the specified id, otherwise {@code false}.
diff --git a/src/org/apollo/game/message/handler/PlayerActionVerificationHandler.java b/src/org/apollo/game/message/handler/PlayerActionVerificationHandler.java
index 25020c45..b1fa3ee8 100644
--- a/src/org/apollo/game/message/handler/PlayerActionVerificationHandler.java
+++ b/src/org/apollo/game/message/handler/PlayerActionVerificationHandler.java
@@ -8,7 +8,7 @@ import org.apollo.util.MobRepository;
/**
* A verification {@link MessageHandler} for the {@link PlayerActionMessage}.
- *
+ *
* @author Major
*/
public final class PlayerActionVerificationHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/PlayerDesignMessageHandler.java b/src/org/apollo/game/message/handler/PlayerDesignMessageHandler.java
index 2df3b92b..df5ad3d6 100644
--- a/src/org/apollo/game/message/handler/PlayerDesignMessageHandler.java
+++ b/src/org/apollo/game/message/handler/PlayerDesignMessageHandler.java
@@ -8,7 +8,7 @@ import org.apollo.game.model.entity.Player;
/**
* A {@link MessageHandler} that handles {@link PlayerDesignMessage}s.
- *
+ *
* @author Graham
*/
public final class PlayerDesignMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/PlayerDesignVerificationHandler.java b/src/org/apollo/game/message/handler/PlayerDesignVerificationHandler.java
index 84d2b2e5..5e6bc704 100644
--- a/src/org/apollo/game/message/handler/PlayerDesignVerificationHandler.java
+++ b/src/org/apollo/game/message/handler/PlayerDesignVerificationHandler.java
@@ -9,7 +9,7 @@ import org.apollo.game.model.entity.setting.Gender;
/**
* A {@link MessageHandler} that verifies {@link PlayerDesignMessage}s.
- *
+ *
* @author Graham
*/
public final class PlayerDesignVerificationHandler extends MessageHandler {
@@ -32,7 +32,7 @@ public final class PlayerDesignVerificationHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/handler/WalkMessageHandler.java b/src/org/apollo/game/message/handler/WalkMessageHandler.java
index 903d4b9a..707385a4 100644
--- a/src/org/apollo/game/message/handler/WalkMessageHandler.java
+++ b/src/org/apollo/game/message/handler/WalkMessageHandler.java
@@ -9,7 +9,7 @@ import org.apollo.game.model.entity.WalkingQueue;
/**
* A {@link MessageHandler} that handles {@link WalkMessage}s.
- *
+ *
* @author Graham
*/
public final class WalkMessageHandler extends MessageHandler {
diff --git a/src/org/apollo/game/message/impl/AddFriendMessage.java b/src/org/apollo/game/message/impl/AddFriendMessage.java
index 19c888bb..13d6452d 100644
--- a/src/org/apollo/game/message/impl/AddFriendMessage.java
+++ b/src/org/apollo/game/message/impl/AddFriendMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when a player adds someone to their friends list.
- *
+ *
* @author Major
*/
public final class AddFriendMessage extends Message {
@@ -16,7 +16,7 @@ public final class AddFriendMessage extends Message {
/**
* Creates a new befriend user message.
- *
+ *
* @param username The befriended player's username.
*/
public AddFriendMessage(String username) {
@@ -25,7 +25,7 @@ public final class AddFriendMessage extends Message {
/**
* Gets the username of the befriended player.
- *
+ *
* @return The username.
*/
public String getUsername() {
diff --git a/src/org/apollo/game/message/impl/AddIgnoreMessage.java b/src/org/apollo/game/message/impl/AddIgnoreMessage.java
index 7c825df8..6cc43091 100644
--- a/src/org/apollo/game/message/impl/AddIgnoreMessage.java
+++ b/src/org/apollo/game/message/impl/AddIgnoreMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when a player adds someone to their ignore list.
- *
+ *
* @author Major
*/
public final class AddIgnoreMessage extends Message {
@@ -16,7 +16,7 @@ public final class AddIgnoreMessage extends Message {
/**
* Creates a new ignore player message.
- *
+ *
* @param username The ignored player's username.
*/
public AddIgnoreMessage(String username) {
@@ -25,7 +25,7 @@ public final class AddIgnoreMessage extends Message {
/**
* Gets the username of the ignored player.
- *
+ *
* @return The username.
*/
public String getUsername() {
diff --git a/src/org/apollo/game/message/impl/ArrowKeyMessage.java b/src/org/apollo/game/message/impl/ArrowKeyMessage.java
index 5db0efda..99df8bd9 100644
--- a/src/org/apollo/game/message/impl/ArrowKeyMessage.java
+++ b/src/org/apollo/game/message/impl/ArrowKeyMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when the user has pressed an arrow key.
- *
+ *
* @author Major
*/
public final class ArrowKeyMessage extends Message {
@@ -21,7 +21,7 @@ public final class ArrowKeyMessage extends Message {
/**
* Creates a new arrow key message.
- *
+ *
* @param roll The camera roll.
* @param yaw The camera yaw.
*/
@@ -32,7 +32,7 @@ public final class ArrowKeyMessage extends Message {
/**
* Gets the roll of the camera.
- *
+ *
* @return The roll.
*/
public int getRoll() {
@@ -41,7 +41,7 @@ public final class ArrowKeyMessage extends Message {
/**
* Gets the yaw of the camera.
- *
+ *
* @return The yaw.
*/
public int getYaw() {
diff --git a/src/org/apollo/game/message/impl/ButtonMessage.java b/src/org/apollo/game/message/impl/ButtonMessage.java
index 8de71050..36c20cae 100644
--- a/src/org/apollo/game/message/impl/ButtonMessage.java
+++ b/src/org/apollo/game/message/impl/ButtonMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when a player clicks a button.
- *
+ *
* @author Graham
*/
public final class ButtonMessage extends Message {
@@ -16,7 +16,7 @@ public final class ButtonMessage extends Message {
/**
* Creates the button message.
- *
+ *
* @param widgetId The widget id.
*/
public ButtonMessage(int widgetId) {
@@ -25,7 +25,7 @@ public final class ButtonMessage extends Message {
/**
* Gets the widget id.
- *
+ *
* @return The widget id.
*/
public int getWidgetId() {
diff --git a/src/org/apollo/game/message/impl/ChatMessage.java b/src/org/apollo/game/message/impl/ChatMessage.java
index 8b6b3b56..164432de 100644
--- a/src/org/apollo/game/message/impl/ChatMessage.java
+++ b/src/org/apollo/game/message/impl/ChatMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client to send a public chat message to other players.
- *
+ *
* @author Graham
*/
public final class ChatMessage extends Message {
@@ -31,7 +31,7 @@ public final class ChatMessage extends Message {
/**
* Creates a new chat message.
- *
+ *
* @param message The message.
* @param compressedMessage The compressed message.
* @param color The text color.
@@ -46,7 +46,7 @@ public final class ChatMessage extends Message {
/**
* Gets the compressed message.
- *
+ *
* @return The compressed message.
*/
public byte[] getCompressedMessage() {
@@ -55,7 +55,7 @@ public final class ChatMessage extends Message {
/**
* Gets the message.
- *
+ *
* @return The message.
*/
public String getMessage() {
@@ -64,7 +64,7 @@ public final class ChatMessage extends Message {
/**
* Gets the text color.
- *
+ *
* @return The text color.
*/
public int getTextColor() {
@@ -73,7 +73,7 @@ public final class ChatMessage extends Message {
/**
* Gets the text effects.
- *
+ *
* @return The text effects.
*/
public int getTextEffects() {
diff --git a/src/org/apollo/game/message/impl/ClearRegionMessage.java b/src/org/apollo/game/message/impl/ClearRegionMessage.java
index f37c127e..765266fb 100644
--- a/src/org/apollo/game/message/impl/ClearRegionMessage.java
+++ b/src/org/apollo/game/message/impl/ClearRegionMessage.java
@@ -23,7 +23,7 @@ public final class ClearRegionMessage extends Message {
/**
* Creates the ClearRegionMessage.
- *
+ *
* @param player The {@link Position} of the Player this {@link Message} is being sent to.
* @param region The {@link RegionCoordinates} of the Region being cleared.
*/
@@ -34,7 +34,7 @@ public final class ClearRegionMessage extends Message {
/**
* Gets the {@link Position} of the Player this {@link Message} is being sent to..
- *
+ *
* @return The Position.
*/
public Position getPlayerPosition() {
@@ -43,7 +43,7 @@ public final class ClearRegionMessage extends Message {
/**
* Gets the {@link Position} of the Region being cleared.
- *
+ *
* @return The Position.
*/
public Position getRegionPosition() {
diff --git a/src/org/apollo/game/message/impl/CloseInterfaceMessage.java b/src/org/apollo/game/message/impl/CloseInterfaceMessage.java
index 79cba224..a0fc3c08 100644
--- a/src/org/apollo/game/message/impl/CloseInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/CloseInterfaceMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that closes the open interface.
- *
+ *
* @author Graham
*/
public final class CloseInterfaceMessage extends Message {
diff --git a/src/org/apollo/game/message/impl/ClosedInterfaceMessage.java b/src/org/apollo/game/message/impl/ClosedInterfaceMessage.java
index 9b8c9348..89db7eea 100644
--- a/src/org/apollo/game/message/impl/ClosedInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/ClosedInterfaceMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when the current interface is closed.
- *
+ *
* @author Graham
*/
public final class ClosedInterfaceMessage extends Message {
diff --git a/src/org/apollo/game/message/impl/CommandMessage.java b/src/org/apollo/game/message/impl/CommandMessage.java
index 977bf39a..11ff2912 100644
--- a/src/org/apollo/game/message/impl/CommandMessage.java
+++ b/src/org/apollo/game/message/impl/CommandMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client to send a {@code ::} command.
- *
+ *
* @author Graham
*/
public final class CommandMessage extends Message {
@@ -16,7 +16,7 @@ public final class CommandMessage extends Message {
/**
* Creates the command message.
- *
+ *
* @param command The command.
*/
public CommandMessage(String command) {
@@ -25,7 +25,7 @@ public final class CommandMessage extends Message {
/**
* Gets the command.
- *
+ *
* @return The command.
*/
public String getCommand() {
diff --git a/src/org/apollo/game/message/impl/ConfigMessage.java b/src/org/apollo/game/message/impl/ConfigMessage.java
index 0a68b271..a71413e5 100644
--- a/src/org/apollo/game/message/impl/ConfigMessage.java
+++ b/src/org/apollo/game/message/impl/ConfigMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to adjust a certain config or attribute setting.
- *
+ *
* @author Chris Fletcher
*/
public final class ConfigMessage extends Message {
@@ -21,7 +21,7 @@ public final class ConfigMessage extends Message {
/**
* Creates a new config message.
- *
+ *
* @param id The config's identifier.
* @param value The value.
*/
@@ -32,7 +32,7 @@ public final class ConfigMessage extends Message {
/**
* Gets the config's identifier.
- *
+ *
* @return The config id.
*/
public int getId() {
@@ -41,7 +41,7 @@ public final class ConfigMessage extends Message {
/**
* Gets the config's value.
- *
+ *
* @return The config value.
*/
public int getValue() {
diff --git a/src/org/apollo/game/message/impl/DialogueContinueMessage.java b/src/org/apollo/game/message/impl/DialogueContinueMessage.java
index 7c6798e7..0b916053 100644
--- a/src/org/apollo/game/message/impl/DialogueContinueMessage.java
+++ b/src/org/apollo/game/message/impl/DialogueContinueMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when the player clicks the "Click here to continue" button on a dialogue
* interface.
- *
+ *
* @author Chris Fletcher
*/
public final class DialogueContinueMessage extends Message {
@@ -17,7 +17,7 @@ public final class DialogueContinueMessage extends Message {
/**
* Creates a new dialogue continue message.
- *
+ *
* @param interfaceId The interface id.
*/
public DialogueContinueMessage(int interfaceId) {
@@ -26,7 +26,7 @@ public final class DialogueContinueMessage extends Message {
/**
* Gets the interface id of the button.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
diff --git a/src/org/apollo/game/message/impl/DisplayCrossbonesMessage.java b/src/org/apollo/game/message/impl/DisplayCrossbonesMessage.java
index bc3d7c38..cedf96ec 100644
--- a/src/org/apollo/game/message/impl/DisplayCrossbonesMessage.java
+++ b/src/org/apollo/game/message/impl/DisplayCrossbonesMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to display crossbones when the player enters a multi-combat zone.
- *
+ *
* @author Major
*/
public final class DisplayCrossbonesMessage extends Message {
@@ -16,7 +16,7 @@ public final class DisplayCrossbonesMessage extends Message {
/**
* Creates a display crossbones message.
- *
+ *
* @param display Whether or not the crossbones should be displayed.
*/
public DisplayCrossbonesMessage(boolean display) {
@@ -25,7 +25,7 @@ public final class DisplayCrossbonesMessage extends Message {
/**
* Indicates whether the crossbones will be displayed.
- *
+ *
* @return {@code true} if the crossbones will be displayed, otherwise {@code false}.
*/
public boolean isDisplayed() {
diff --git a/src/org/apollo/game/message/impl/DisplayTabInterfaceMessage.java b/src/org/apollo/game/message/impl/DisplayTabInterfaceMessage.java
index ce93187d..3588e23c 100644
--- a/src/org/apollo/game/message/impl/DisplayTabInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/DisplayTabInterfaceMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to change the currently displayed tab interface.
- *
+ *
* @author Chris Fletcher
*/
public final class DisplayTabInterfaceMessage extends Message {
@@ -16,7 +16,7 @@ public final class DisplayTabInterfaceMessage extends Message {
/**
* Creates a new display tab interface message.
- *
+ *
* @param tab The index of the tab to display.
*/
public DisplayTabInterfaceMessage(int tab) {
@@ -25,7 +25,7 @@ public final class DisplayTabInterfaceMessage extends Message {
/**
* Gets the index of the tab to display.
- *
+ *
* @return The tab index.
*/
public int getTab() {
diff --git a/src/org/apollo/game/message/impl/EnterAmountMessage.java b/src/org/apollo/game/message/impl/EnterAmountMessage.java
index a26d7fb5..faa88813 100644
--- a/src/org/apollo/game/message/impl/EnterAmountMessage.java
+++ b/src/org/apollo/game/message/impl/EnterAmountMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to open up the enter amount interface.
- *
+ *
* @author Graham
*/
public final class EnterAmountMessage extends Message {
diff --git a/src/org/apollo/game/message/impl/EnteredAmountMessage.java b/src/org/apollo/game/message/impl/EnteredAmountMessage.java
index 0da1c84b..861d399a 100644
--- a/src/org/apollo/game/message/impl/EnteredAmountMessage.java
+++ b/src/org/apollo/game/message/impl/EnteredAmountMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when the player has entered an amount.
- *
+ *
* @author Graham
*/
public final class EnteredAmountMessage extends Message {
@@ -16,7 +16,7 @@ public final class EnteredAmountMessage extends Message {
/**
* Creates the entered amount message.
- *
+ *
* @param amount The amount.
*/
public EnteredAmountMessage(int amount) {
@@ -25,7 +25,7 @@ public final class EnteredAmountMessage extends Message {
/**
* Gets the amount.
- *
+ *
* @return The amount.
*/
public int getAmount() {
diff --git a/src/org/apollo/game/message/impl/FifthItemActionMessage.java b/src/org/apollo/game/message/impl/FifthItemActionMessage.java
index d3934715..846b5da7 100644
--- a/src/org/apollo/game/message/impl/FifthItemActionMessage.java
+++ b/src/org/apollo/game/message/impl/FifthItemActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The fifth {@link ItemActionMessage}.
- *
+ *
* @author Graham
*/
public final class FifthItemActionMessage extends ItemActionMessage {
/**
* Creates the fifth item action message.
- *
+ *
* @param interfaceId The interface id.
* @param id The item id.
* @param slot The item slot.
diff --git a/src/org/apollo/game/message/impl/FifthItemOptionMessage.java b/src/org/apollo/game/message/impl/FifthItemOptionMessage.java
index 0826d39a..2f61d064 100644
--- a/src/org/apollo/game/message/impl/FifthItemOptionMessage.java
+++ b/src/org/apollo/game/message/impl/FifthItemOptionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The fifth {@link ItemOptionMessage}.
- *
+ *
* @author Chris Fletcher
*/
public final class FifthItemOptionMessage extends ItemOptionMessage {
/**
* Creates the fifth item option message.
- *
+ *
* @param interfaceId The interface id.
* @param id The id.
* @param slot The slot.
diff --git a/src/org/apollo/game/message/impl/FifthNpcActionMessage.java b/src/org/apollo/game/message/impl/FifthNpcActionMessage.java
index 02347bcb..509b3208 100644
--- a/src/org/apollo/game/message/impl/FifthNpcActionMessage.java
+++ b/src/org/apollo/game/message/impl/FifthNpcActionMessage.java
@@ -2,7 +2,7 @@ package org.apollo.game.message.impl;
/**
* The fifth {@link NpcActionMessage}.
- *
+ *
* @author Major
* @author Stuart
*/
diff --git a/src/org/apollo/game/message/impl/FifthPlayerActionMessage.java b/src/org/apollo/game/message/impl/FifthPlayerActionMessage.java
index 73934b79..8b0ddfa2 100644
--- a/src/org/apollo/game/message/impl/FifthPlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/FifthPlayerActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The fifth {@link PlayerActionMessage}.
- *
+ *
* @author Major
*/
public final class FifthPlayerActionMessage extends PlayerActionMessage {
/**
* Creates a fifth player action message.
- *
+ *
* @param playerIndex The index of the clicked player.
*/
public FifthPlayerActionMessage(int playerIndex) {
diff --git a/src/org/apollo/game/message/impl/FirstItemActionMessage.java b/src/org/apollo/game/message/impl/FirstItemActionMessage.java
index cb399cd4..649bd4ab 100644
--- a/src/org/apollo/game/message/impl/FirstItemActionMessage.java
+++ b/src/org/apollo/game/message/impl/FirstItemActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The first {@link ItemActionMessage}.
- *
+ *
* @author Graham
*/
public final class FirstItemActionMessage extends ItemActionMessage {
/**
* Creates the first item action message.
- *
+ *
* @param interfaceId The interface id.
* @param id The item id.
* @param slot The item slot.
diff --git a/src/org/apollo/game/message/impl/FirstItemOptionMessage.java b/src/org/apollo/game/message/impl/FirstItemOptionMessage.java
index 72b1125b..31f005eb 100644
--- a/src/org/apollo/game/message/impl/FirstItemOptionMessage.java
+++ b/src/org/apollo/game/message/impl/FirstItemOptionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The first {@link ItemOptionMessage}.
- *
+ *
* @author Chris Fletcher
*/
public final class FirstItemOptionMessage extends ItemOptionMessage {
/**
* Creates the first item option message.
- *
+ *
* @param interfaceId The interface id.
* @param id The id.
* @param slot The slot.
diff --git a/src/org/apollo/game/message/impl/FirstNpcActionMessage.java b/src/org/apollo/game/message/impl/FirstNpcActionMessage.java
index 9578c82c..ec334660 100644
--- a/src/org/apollo/game/message/impl/FirstNpcActionMessage.java
+++ b/src/org/apollo/game/message/impl/FirstNpcActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The first {@link NpcActionMessage}.
- *
+ *
* @author Major
*/
public final class FirstNpcActionMessage extends NpcActionMessage {
/**
* Creates a new first npc action message.
- *
+ *
* @param index The index of the npc.
*/
public FirstNpcActionMessage(int index) {
diff --git a/src/org/apollo/game/message/impl/FirstObjectActionMessage.java b/src/org/apollo/game/message/impl/FirstObjectActionMessage.java
index cef59087..7b408837 100644
--- a/src/org/apollo/game/message/impl/FirstObjectActionMessage.java
+++ b/src/org/apollo/game/message/impl/FirstObjectActionMessage.java
@@ -4,14 +4,14 @@ import org.apollo.game.model.Position;
/**
* The first {@link ObjectActionMessage}.
- *
+ *
* @author Graham
*/
public final class FirstObjectActionMessage extends ObjectActionMessage {
/**
* Creates the first object action message.
- *
+ *
* @param id The id.
* @param position The position.
*/
diff --git a/src/org/apollo/game/message/impl/FirstPlayerActionMessage.java b/src/org/apollo/game/message/impl/FirstPlayerActionMessage.java
index c1261202..2aeade66 100644
--- a/src/org/apollo/game/message/impl/FirstPlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/FirstPlayerActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The first {@link PlayerActionMessage}.
- *
+ *
* @author Major
*/
public final class FirstPlayerActionMessage extends PlayerActionMessage {
/**
* Creates a first player action message.
- *
+ *
* @param playerIndex The index of the clicked player.
*/
public FirstPlayerActionMessage(int playerIndex) {
diff --git a/src/org/apollo/game/message/impl/FlaggedMouseEventMessage.java b/src/org/apollo/game/message/impl/FlaggedMouseEventMessage.java
index 9f427d19..2763842b 100644
--- a/src/org/apollo/game/message/impl/FlaggedMouseEventMessage.java
+++ b/src/org/apollo/game/message/impl/FlaggedMouseEventMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when the player clicks with their mouse (or mousekeys etc).
- *
+ *
* @author Major
*/
public final class FlaggedMouseEventMessage extends Message {
@@ -32,7 +32,7 @@ public final class FlaggedMouseEventMessage extends Message {
/**
* Creates a new mouse click message.
- *
+ *
* @param clickCount The number of clicks on this point.
* @param x The x coordinate of the mouse click.
* @param y The y coordinate of the mouse click.
@@ -47,7 +47,7 @@ public final class FlaggedMouseEventMessage extends Message {
/**
* Gets the number of clicks on this point - maximum value of 2047.
- *
+ *
* @return The number of clicks.
*/
public int getClickCount() {
@@ -56,7 +56,7 @@ public final class FlaggedMouseEventMessage extends Message {
/**
* The x coordinate of the click.
- *
+ *
* @return The x coordinate.
*/
public int getX() {
@@ -65,7 +65,7 @@ public final class FlaggedMouseEventMessage extends Message {
/**
* The y coordinate of the click.
- *
+ *
* @return The y coordinate.
*/
public int getY() {
@@ -75,7 +75,7 @@ public final class FlaggedMouseEventMessage extends Message {
/**
* Gets the value indicating whether the {@link #x} and {@link #y} values represent the deviation from the last
* click or an actual point.
- *
+ *
* @return The value.
*/
public boolean getDelta() {
diff --git a/src/org/apollo/game/message/impl/FlashTabInterfaceMessage.java b/src/org/apollo/game/message/impl/FlashTabInterfaceMessage.java
index e6fb19d7..12d482d8 100644
--- a/src/org/apollo/game/message/impl/FlashTabInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/FlashTabInterfaceMessage.java
@@ -25,7 +25,7 @@ public final class FlashTabInterfaceMessage extends Message {
/**
* Gets the id of the tab to flash.
- *
+ *
* @return The id.
*/
public int getTab() {
diff --git a/src/org/apollo/game/message/impl/FlashingTabClickedMessage.java b/src/org/apollo/game/message/impl/FlashingTabClickedMessage.java
index ae7e1056..12682651 100644
--- a/src/org/apollo/game/message/impl/FlashingTabClickedMessage.java
+++ b/src/org/apollo/game/message/impl/FlashingTabClickedMessage.java
@@ -25,7 +25,7 @@ public final class FlashingTabClickedMessage extends Message {
/**
* Gets the index of the tab that was clicked.
- *
+ *
* @return The tab index.
*/
public int getTab() {
diff --git a/src/org/apollo/game/message/impl/FocusUpdateMessage.java b/src/org/apollo/game/message/impl/FocusUpdateMessage.java
index 85e1c521..ed27ca28 100644
--- a/src/org/apollo/game/message/impl/FocusUpdateMessage.java
+++ b/src/org/apollo/game/message/impl/FocusUpdateMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client to indicate a change in the client's focus (i.e. if it is the active window).
- *
+ *
* @author Major
*/
public final class FocusUpdateMessage extends Message {
@@ -16,7 +16,7 @@ public final class FocusUpdateMessage extends Message {
/**
* Creates a new focus update message.
- *
+ *
* @param focused The data received.
*/
public FocusUpdateMessage(boolean focused) {
@@ -25,7 +25,7 @@ public final class FocusUpdateMessage extends Message {
/**
* Indicates whether or not the client is focused.
- *
+ *
* @return {@code true} if the client is focused, otherwise {@code false}.
*/
public boolean isFocused() {
diff --git a/src/org/apollo/game/message/impl/ForwardPrivateChatMessage.java b/src/org/apollo/game/message/impl/ForwardPrivateChatMessage.java
index b31d5397..98a8c204 100644
--- a/src/org/apollo/game/message/impl/ForwardPrivateChatMessage.java
+++ b/src/org/apollo/game/message/impl/ForwardPrivateChatMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.setting.PrivilegeLevel;
/**
* A {@link Message} sent to the client that forwards a private chat.
- *
+ *
* @author Major
*/
public final class ForwardPrivateChatMessage extends Message {
@@ -27,20 +27,20 @@ public final class ForwardPrivateChatMessage extends Message {
/**
* Creates a new forward private message message.
- *
+ *
* @param username The username of the player sending the message.
* @param level The {@link PrivilegeLevel} of the player sending the message.
* @param message The compressed message.
*/
public ForwardPrivateChatMessage(String username, PrivilegeLevel level, byte[] message) {
this.username = username;
- this.privilege = level;
+ privilege = level;
this.message = message;
}
/**
* Gets the username of the sender.
- *
+ *
* @return The username.
*/
public String getSenderUsername() {
@@ -49,7 +49,7 @@ public final class ForwardPrivateChatMessage extends Message {
/**
* Gets the {@link PrivilegeLevel} of the sender.
- *
+ *
* @return The privilege level.
*/
public PrivilegeLevel getSenderPrivilege() {
@@ -58,7 +58,7 @@ public final class ForwardPrivateChatMessage extends Message {
/**
* Gets the compressed message.
- *
+ *
* @return The message.
*/
public byte[] getCompressedMessage() {
diff --git a/src/org/apollo/game/message/impl/FourthItemActionMessage.java b/src/org/apollo/game/message/impl/FourthItemActionMessage.java
index 7f969520..19b31a9e 100644
--- a/src/org/apollo/game/message/impl/FourthItemActionMessage.java
+++ b/src/org/apollo/game/message/impl/FourthItemActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The fourth {@link ItemActionMessage}.
- *
+ *
* @author Graham
*/
public final class FourthItemActionMessage extends ItemActionMessage {
/**
* Creates the fourth item action message.
- *
+ *
* @param interfaceId The interface id.
* @param id The item id.
* @param slot The item slot.
diff --git a/src/org/apollo/game/message/impl/FourthItemOptionMessage.java b/src/org/apollo/game/message/impl/FourthItemOptionMessage.java
index cdc8e6d8..4143efd4 100644
--- a/src/org/apollo/game/message/impl/FourthItemOptionMessage.java
+++ b/src/org/apollo/game/message/impl/FourthItemOptionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The fourth {@link ItemOptionMessage}.
- *
+ *
* @author Chris Fletcher
*/
public final class FourthItemOptionMessage extends ItemOptionMessage {
/**
* Creates the fourth item option message.
- *
+ *
* @param interfaceId The interface id.
* @param id The id.
* @param slot The slot.
diff --git a/src/org/apollo/game/message/impl/FourthNpcActionMessage.java b/src/org/apollo/game/message/impl/FourthNpcActionMessage.java
index d0babf44..7471dc38 100644
--- a/src/org/apollo/game/message/impl/FourthNpcActionMessage.java
+++ b/src/org/apollo/game/message/impl/FourthNpcActionMessage.java
@@ -2,7 +2,7 @@ package org.apollo.game.message.impl;
/**
* The fourth {@link NpcActionMessage}.
- *
+ *
* @author Major
* @author Stuart
*/
@@ -10,7 +10,7 @@ public final class FourthNpcActionMessage extends NpcActionMessage {
/**
* Creates the FourthNpcActionMessage.
- *
+ *
* @param index The index of the Npc.
*/
public FourthNpcActionMessage(int index) {
diff --git a/src/org/apollo/game/message/impl/FourthPlayerActionMessage.java b/src/org/apollo/game/message/impl/FourthPlayerActionMessage.java
index 9454bfa7..576bc6b5 100644
--- a/src/org/apollo/game/message/impl/FourthPlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/FourthPlayerActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The fourth {@link PlayerActionMessage}.
- *
+ *
* @author Major
*/
public final class FourthPlayerActionMessage extends PlayerActionMessage {
/**
* Creates a fourth player action message.
- *
+ *
* @param playerIndex The index of the clicked player.
*/
public FourthPlayerActionMessage(int playerIndex) {
diff --git a/src/org/apollo/game/message/impl/FriendServerStatusMessage.java b/src/org/apollo/game/message/impl/FriendServerStatusMessage.java
index 4960b853..6c64fbc7 100644
--- a/src/org/apollo/game/message/impl/FriendServerStatusMessage.java
+++ b/src/org/apollo/game/message/impl/FriendServerStatusMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.setting.ServerStatus;
/**
* A {@link Message} sent to the client to update the friend server status.
- *
+ *
* @author Major
*/
public final class FriendServerStatusMessage extends Message {
@@ -17,7 +17,7 @@ public final class FriendServerStatusMessage extends Message {
/**
* Creates a new friend server status message.
- *
+ *
* @param status The status.
*/
public FriendServerStatusMessage(ServerStatus status) {
@@ -26,7 +26,7 @@ public final class FriendServerStatusMessage extends Message {
/**
* Gets the status code of the friend server.
- *
+ *
* @return The status code.
*/
public int getStatusCode() {
diff --git a/src/org/apollo/game/message/impl/GroupedRegionUpdateMessage.java b/src/org/apollo/game/message/impl/GroupedRegionUpdateMessage.java
index a605c9ac..087b4152 100644
--- a/src/org/apollo/game/message/impl/GroupedRegionUpdateMessage.java
+++ b/src/org/apollo/game/message/impl/GroupedRegionUpdateMessage.java
@@ -14,9 +14,9 @@ import org.apollo.game.model.area.RegionCoordinates;
public final class GroupedRegionUpdateMessage extends Message {
/**
- * The Position of the Player.
+ * The last known region Position of the Player.
*/
- private final Position player;
+ private final Position lastKnownRegion;
/**
* The Position of the Region being updated.
@@ -30,29 +30,29 @@ public final class GroupedRegionUpdateMessage extends Message {
/**
* Creates the GroupedRegionUpdateMessage.
- *
- * @param player The {@link Position} of the Player.
+ *
+ * @param lastKnownRegion The last known region {@link Position} of the Player.
* @param coordinates The {@link RegionCoordinates} of the Region being updated.
* @param messages The {@link List} of {@link RegionUpdateMessage}s.
*/
- public GroupedRegionUpdateMessage(Position player, RegionCoordinates coordinates, List messages) {
- this.player = player;
- this.region = new Position(coordinates.getAbsoluteX(), coordinates.getAbsoluteY());
+ public GroupedRegionUpdateMessage(Position lastKnownRegion, RegionCoordinates coordinates, List messages) {
+ this.lastKnownRegion = lastKnownRegion;
+ region = new Position(coordinates.getAbsoluteX(), coordinates.getAbsoluteY());
this.messages = messages;
}
/**
* Gets the {@link Position} of the Player.
- *
+ *
* @return The Position.
*/
- public Position getPlayerPosition() {
- return player;
+ public Position getLastKnownRegion() {
+ return lastKnownRegion;
}
/**
* Gets the {@link List} of {@link RegionUpdateMessage}s.
- *
+ *
* @return The Collection.
*/
public List getMessages() {
@@ -61,7 +61,7 @@ public final class GroupedRegionUpdateMessage extends Message {
/**
* Gets the {@link Position} of the Region these updates affect.
- *
+ *
* @return The Position.
*/
public Position getRegionPosition() {
diff --git a/src/org/apollo/game/message/impl/HintIconMessage.java b/src/org/apollo/game/message/impl/HintIconMessage.java
index b99c958e..a6b9a8d4 100644
--- a/src/org/apollo/game/message/impl/HintIconMessage.java
+++ b/src/org/apollo/game/message/impl/HintIconMessage.java
@@ -47,7 +47,7 @@ public final class HintIconMessage extends Message {
/**
* Gets the value of this type.
- *
+ *
* @return The value.
*/
public int getValue() {
@@ -58,7 +58,7 @@ public final class HintIconMessage extends Message {
/**
* Creates a HintIconMessage for the Npc with the specified index.
- *
+ *
* @param index The index of the Npc.
* @return The HintIconMessage.
*/
@@ -68,7 +68,7 @@ public final class HintIconMessage extends Message {
/**
* Creates a HintIconMessage for the Player with the specified index.
- *
+ *
* @param index The index of the Player.
* @return The HintIconMessage.
*/
@@ -78,7 +78,7 @@ public final class HintIconMessage extends Message {
/**
* Creates a HintIconMessage that removes the current Npc hint icon.
- *
+ *
* @return The HintIconMessage.
*/
public static HintIconMessage resetNpc() {
@@ -87,7 +87,7 @@ public final class HintIconMessage extends Message {
/**
* Creates a HintIconMessage that removes the current Player hint icon.
- *
+ *
* @return The HintIconMessage.
*/
public static HintIconMessage resetPlayer() {
diff --git a/src/org/apollo/game/message/impl/IdAssignmentMessage.java b/src/org/apollo/game/message/impl/IdAssignmentMessage.java
index 72e50362..4b04b77c 100644
--- a/src/org/apollo/game/message/impl/IdAssignmentMessage.java
+++ b/src/org/apollo/game/message/impl/IdAssignmentMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.setting.MembershipStatus;
/**
* A {@link Message} sent to the client that specifies the local id and membership status of the current player.
- *
+ *
* @author Graham
*/
public final class IdAssignmentMessage extends Message {
@@ -22,7 +22,7 @@ public final class IdAssignmentMessage extends Message {
/**
* Creates the local id message.
- *
+ *
* @param id The id.
* @param members The MembershipStatus.
*/
@@ -33,7 +33,7 @@ public final class IdAssignmentMessage extends Message {
/**
* Gets the id.
- *
+ *
* @return The id.
*/
public int getId() {
@@ -42,7 +42,7 @@ public final class IdAssignmentMessage extends Message {
/**
* Gets whether or not the Player is a {@link MembershipStatus#PAID paying member}.
- *
+ *
* @return {@code true} if the Player is a paying member, {@code false} if not.
*/
public boolean isMembers() {
diff --git a/src/org/apollo/game/message/impl/IgnoreListMessage.java b/src/org/apollo/game/message/impl/IgnoreListMessage.java
index 29ec2767..8389c4ab 100644
--- a/src/org/apollo/game/message/impl/IgnoreListMessage.java
+++ b/src/org/apollo/game/message/impl/IgnoreListMessage.java
@@ -6,7 +6,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that updates the ignored user list.
- *
+ *
* @author Major
*/
public final class IgnoreListMessage extends Message {
@@ -18,7 +18,7 @@ public final class IgnoreListMessage extends Message {
/**
* Creates a new ignore list message.
- *
+ *
* @param usernames The {@link List} of usernames to send.
*/
public IgnoreListMessage(List usernames) {
@@ -27,7 +27,7 @@ public final class IgnoreListMessage extends Message {
/**
* Gets the list of ignored usernames.
- *
+ *
* @return The usernames.
*/
public List getUsernames() {
diff --git a/src/org/apollo/game/message/impl/InventoryItemMessage.java b/src/org/apollo/game/message/impl/InventoryItemMessage.java
index 49af4b5c..3c92e26c 100644
--- a/src/org/apollo/game/message/impl/InventoryItemMessage.java
+++ b/src/org/apollo/game/message/impl/InventoryItemMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} that represents some sort of action on an item in an inventory. Note that this is the parent of
* both item option and item action message, and so cannot be used to determine when one of those messages is fired.
- *
+ *
* @author Chris Fletcher
*/
public abstract class InventoryItemMessage extends Message {
@@ -32,7 +32,7 @@ public abstract class InventoryItemMessage extends Message {
/**
* Creates the item action message.
- *
+ *
* @param option The option number.
* @param interfaceId The interface id.
* @param id The id.
@@ -47,7 +47,7 @@ public abstract class InventoryItemMessage extends Message {
/**
* Gets the item id.
- *
+ *
* @return The item id.
*/
public final int getId() {
@@ -56,7 +56,7 @@ public abstract class InventoryItemMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public final int getInterfaceId() {
@@ -65,7 +65,7 @@ public abstract class InventoryItemMessage extends Message {
/**
* Gets the option number.
- *
+ *
* @return The option number.
*/
public final int getOption() {
@@ -74,7 +74,7 @@ public abstract class InventoryItemMessage extends Message {
/**
* Gets the slot.
- *
+ *
* @return The slot.
*/
public final int getSlot() {
diff --git a/src/org/apollo/game/message/impl/ItemActionMessage.java b/src/org/apollo/game/message/impl/ItemActionMessage.java
index 0ec8b5ef..e636f94d 100644
--- a/src/org/apollo/game/message/impl/ItemActionMessage.java
+++ b/src/org/apollo/game/message/impl/ItemActionMessage.java
@@ -6,14 +6,14 @@ import org.apollo.game.message.Message;
* A {@link Message} sent by the client that represents some sort of action on an item. Note that the actual message
* sent by the client is one of the five item action messages, but this is the message that should be intercepted (and
* the option verified).
- *
+ *
* @author Chris Fletcher
*/
public abstract class ItemActionMessage extends InventoryItemMessage {
/**
* Creates the item action message.
- *
+ *
* @param option The option number.
* @param interfaceId The interface id.
* @param id The id.
diff --git a/src/org/apollo/game/message/impl/ItemOnItemMessage.java b/src/org/apollo/game/message/impl/ItemOnItemMessage.java
index 62b4c17f..164595fb 100644
--- a/src/org/apollo/game/message/impl/ItemOnItemMessage.java
+++ b/src/org/apollo/game/message/impl/ItemOnItemMessage.java
@@ -2,7 +2,7 @@ package org.apollo.game.message.impl;
/**
* A {@link InventoryItemMessage} sent by the client when a player uses one inventory item on another.
- *
+ *
* @author Chris Fletcher
*/
public final class ItemOnItemMessage extends InventoryItemMessage {
@@ -24,7 +24,7 @@ public final class ItemOnItemMessage extends InventoryItemMessage {
/**
* Creates a new item-on-item message.
- *
+ *
* @param usedInterface The interface id of the used item.
* @param usedId The id of the used item.
* @param usedSlot The slot of the target item.
@@ -41,7 +41,7 @@ public final class ItemOnItemMessage extends InventoryItemMessage {
/**
* Gets the id of the target item.
- *
+ *
* @return The target item's interface id.
*/
public int getTargetId() {
@@ -50,7 +50,7 @@ public final class ItemOnItemMessage extends InventoryItemMessage {
/**
* Gets the interface id of the target item.
- *
+ *
* @return The target item's interface id.
*/
public int getTargetInterfaceId() {
@@ -59,7 +59,7 @@ public final class ItemOnItemMessage extends InventoryItemMessage {
/**
* Gets the slot of the target item.
- *
+ *
* @return The slot of the target item.
*/
public int getTargetSlot() {
diff --git a/src/org/apollo/game/message/impl/ItemOnObjectMessage.java b/src/org/apollo/game/message/impl/ItemOnObjectMessage.java
index 48ca26fe..60586247 100644
--- a/src/org/apollo/game/message/impl/ItemOnObjectMessage.java
+++ b/src/org/apollo/game/message/impl/ItemOnObjectMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Position;
/**
* A {@link Message} sent by the client when an item is used on an object.
- *
+ *
* @author Major
*/
public final class ItemOnObjectMessage extends InventoryItemMessage {
@@ -22,7 +22,7 @@ public final class ItemOnObjectMessage extends InventoryItemMessage {
/**
* Creates an item on object message.
- *
+ *
* @param interfaceId The interface id.
* @param itemId The item id.
* @param itemSlot The slot the item is in.
@@ -33,12 +33,12 @@ public final class ItemOnObjectMessage extends InventoryItemMessage {
public ItemOnObjectMessage(int interfaceId, int itemId, int itemSlot, int objectId, int x, int y) {
super(0, interfaceId, itemId, itemSlot);
this.objectId = objectId;
- this.position = new Position(x, y);
+ position = new Position(x, y);
}
/**
* Gets the object id.
- *
+ *
* @return The object id.
*/
public int getObjectId() {
@@ -47,7 +47,7 @@ public final class ItemOnObjectMessage extends InventoryItemMessage {
/**
* Gets the position of the object.
- *
+ *
* @return The position.
*/
public Position getPosition() {
diff --git a/src/org/apollo/game/message/impl/ItemOptionMessage.java b/src/org/apollo/game/message/impl/ItemOptionMessage.java
index 626c7e0e..3a7641df 100644
--- a/src/org/apollo/game/message/impl/ItemOptionMessage.java
+++ b/src/org/apollo/game/message/impl/ItemOptionMessage.java
@@ -4,14 +4,14 @@ package org.apollo.game.message.impl;
* An {@link InventoryItemMessage} sent by the client when an item's option is clicked (e.g. equip, eat, drink, etc).
* Note that the actual message sent by the client is one of the five item option messages, but this is the message that
* should be intercepted (and the option verified).
- *
+ *
* @author Chris Fletcher
*/
public abstract class ItemOptionMessage extends InventoryItemMessage {
/**
* Creates the item option message.
- *
+ *
* @param option The option number.
* @param interfaceId The interface id.
* @param id The id.
diff --git a/src/org/apollo/game/message/impl/KeepAliveMessage.java b/src/org/apollo/game/message/impl/KeepAliveMessage.java
index 24e11f7b..c74efc5f 100644
--- a/src/org/apollo/game/message/impl/KeepAliveMessage.java
+++ b/src/org/apollo/game/message/impl/KeepAliveMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} periodically sent by the client to keep a connection alive.
- *
+ *
* @author Graham
*/
public final class KeepAliveMessage extends Message {
@@ -23,7 +23,7 @@ public final class KeepAliveMessage extends Message {
/**
* Gets the time when this message was created.
- *
+ *
* @return The time when this message was created.
*/
public long getCreatedAt() {
diff --git a/src/org/apollo/game/message/impl/LogoutMessage.java b/src/org/apollo/game/message/impl/LogoutMessage.java
index 16e147c6..89a0b241 100644
--- a/src/org/apollo/game/message/impl/LogoutMessage.java
+++ b/src/org/apollo/game/message/impl/LogoutMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that cleanly logs it out.
- *
+ *
* @author Graham
*/
public final class LogoutMessage extends Message {
diff --git a/src/org/apollo/game/message/impl/MagicOnItemMessage.java b/src/org/apollo/game/message/impl/MagicOnItemMessage.java
index 068e6140..75ee2767 100644
--- a/src/org/apollo/game/message/impl/MagicOnItemMessage.java
+++ b/src/org/apollo/game/message/impl/MagicOnItemMessage.java
@@ -2,7 +2,7 @@ package org.apollo.game.message.impl;
/**
* A {@link InventoryItemMessage} sent by the client when a player casts a spell on an inventory item.
- *
+ *
* @author Chris Fletcher
*/
public final class MagicOnItemMessage extends InventoryItemMessage {
@@ -14,7 +14,7 @@ public final class MagicOnItemMessage extends InventoryItemMessage {
/**
* Creates a new magic on item message.
- *
+ *
* @param interfaceId The interface id.
* @param id The item id.
* @param slot The item slot.
@@ -27,7 +27,7 @@ public final class MagicOnItemMessage extends InventoryItemMessage {
/**
* Gets the spell id.
- *
+ *
* @return The spell id.
*/
public int getSpellId() {
diff --git a/src/org/apollo/game/message/impl/MobAnimationResetMessage.java b/src/org/apollo/game/message/impl/MobAnimationResetMessage.java
index 3ad14e18..a8d3f88f 100644
--- a/src/org/apollo/game/message/impl/MobAnimationResetMessage.java
+++ b/src/org/apollo/game/message/impl/MobAnimationResetMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to reset the animations of every mob.
- *
+ *
* @author Major
*/
public final class MobAnimationResetMessage extends Message {
diff --git a/src/org/apollo/game/message/impl/NpcActionMessage.java b/src/org/apollo/game/message/impl/NpcActionMessage.java
index 67173a42..eee877ac 100644
--- a/src/org/apollo/game/message/impl/NpcActionMessage.java
+++ b/src/org/apollo/game/message/impl/NpcActionMessage.java
@@ -6,7 +6,7 @@ import org.apollo.game.message.Message;
* A {@link Message} sent by the client representing the clicking of an npc menu action. Note that the actual message
* sent by the client is one of the three npc action messages, but this is the message that should be intercepted (and
* the option verified).
- *
+ *
* @author Major
*/
public abstract class NpcActionMessage extends Message {
@@ -23,7 +23,7 @@ public abstract class NpcActionMessage extends Message {
/**
* Creates an npc action message.
- *
+ *
* @param option The option number.
* @param index The index of the npc.
*/
@@ -34,7 +34,7 @@ public abstract class NpcActionMessage extends Message {
/**
* Gets the menu action number (i.e. the action message 'option') clicked.
- *
+ *
* @return The option number.
*/
public int getOption() {
@@ -43,7 +43,7 @@ public abstract class NpcActionMessage extends Message {
/**
* Gets the index of the npc clicked.
- *
+ *
* @return The npc index.
*/
public int getIndex() {
diff --git a/src/org/apollo/game/message/impl/NpcSynchronizationMessage.java b/src/org/apollo/game/message/impl/NpcSynchronizationMessage.java
index e474b83e..8c78dac5 100644
--- a/src/org/apollo/game/message/impl/NpcSynchronizationMessage.java
+++ b/src/org/apollo/game/message/impl/NpcSynchronizationMessage.java
@@ -9,7 +9,7 @@ import org.apollo.game.sync.seg.SynchronizationSegment;
/**
* A {@link Message} sent to the client to synchronize npcs with players.
- *
+ *
* @author Major
*/
public final class NpcSynchronizationMessage extends Message {
@@ -31,7 +31,7 @@ public final class NpcSynchronizationMessage extends Message {
/**
* Creates a new {@link NpcSynchronizationMessage}.
- *
+ *
* @param position The position of the {@link Npc}.
* @param segments The list of segments.
* @param localNpcs The amount of local npcs.
@@ -44,7 +44,7 @@ public final class NpcSynchronizationMessage extends Message {
/**
* Gets the number of local npcs.
- *
+ *
* @return The number of local npcs.
*/
public int getLocalNpcCount() {
@@ -53,7 +53,7 @@ public final class NpcSynchronizationMessage extends Message {
/**
* Gets the npc's position.
- *
+ *
* @return The npc's position.
*/
public Position getPosition() {
@@ -62,7 +62,7 @@ public final class NpcSynchronizationMessage extends Message {
/**
* Gets the synchronization segments.
- *
+ *
* @return The segments.
*/
public List getSegments() {
diff --git a/src/org/apollo/game/message/impl/ObjectActionMessage.java b/src/org/apollo/game/message/impl/ObjectActionMessage.java
index ffbc210b..8233cc7f 100644
--- a/src/org/apollo/game/message/impl/ObjectActionMessage.java
+++ b/src/org/apollo/game/message/impl/ObjectActionMessage.java
@@ -7,7 +7,7 @@ import org.apollo.game.model.Position;
* A {@link Message} sent by the client that represents some sort of action on an object. Note that the actual message
* sent by the client is one of the five object action messages, but this is the message that should be intercepted (and
* the option verified).
- *
+ *
* @author Graham
*/
public abstract class ObjectActionMessage extends Message {
@@ -29,7 +29,7 @@ public abstract class ObjectActionMessage extends Message {
/**
* Creates a new object action message.
- *
+ *
* @param option The option number.
* @param id The id of the object.
* @param position The position of the object.
@@ -42,7 +42,7 @@ public abstract class ObjectActionMessage extends Message {
/**
* Gets the id of the object.
- *
+ *
* @return The id of the object.
*/
public int getId() {
@@ -51,7 +51,7 @@ public abstract class ObjectActionMessage extends Message {
/**
* Gets the option number.
- *
+ *
* @return The option number.
*/
public int getOption() {
@@ -60,7 +60,7 @@ public abstract class ObjectActionMessage extends Message {
/**
* Gets the position of the object.
- *
+ *
* @return The position of the object.
*/
public Position getPosition() {
diff --git a/src/org/apollo/game/message/impl/OpenDialogueInterfaceMessage.java b/src/org/apollo/game/message/impl/OpenDialogueInterfaceMessage.java
index 4ce7e5ac..48e6a705 100644
--- a/src/org/apollo/game/message/impl/OpenDialogueInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/OpenDialogueInterfaceMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that opens a dialogue interface (an interface that appears in the chat box).
- *
+ *
* @author Chris Fletcher
*/
public final class OpenDialogueInterfaceMessage extends Message {
@@ -16,7 +16,7 @@ public final class OpenDialogueInterfaceMessage extends Message {
/**
* Creates a new message with the specified interface id.
- *
+ *
* @param interfaceId The interface id.
*/
public OpenDialogueInterfaceMessage(int interfaceId) {
@@ -25,7 +25,7 @@ public final class OpenDialogueInterfaceMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
diff --git a/src/org/apollo/game/message/impl/OpenDialogueOverlayMessage.java b/src/org/apollo/game/message/impl/OpenDialogueOverlayMessage.java
index b785f569..46291f83 100644
--- a/src/org/apollo/game/message/impl/OpenDialogueOverlayMessage.java
+++ b/src/org/apollo/game/message/impl/OpenDialogueOverlayMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that opens a dialogue interface (an interface that appears in the chat box).
- *
+ *
* @author Chris Fletcher
*/
public final class OpenDialogueOverlayMessage extends Message {
@@ -16,7 +16,7 @@ public final class OpenDialogueOverlayMessage extends Message {
/**
* Creates a new message with the specified interface id.
- *
+ *
* @param interfaceId The interface id.
*/
public OpenDialogueOverlayMessage(int interfaceId) {
@@ -25,7 +25,7 @@ public final class OpenDialogueOverlayMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
diff --git a/src/org/apollo/game/message/impl/OpenInterfaceMessage.java b/src/org/apollo/game/message/impl/OpenInterfaceMessage.java
index 64a48ed3..f2a8e189 100644
--- a/src/org/apollo/game/message/impl/OpenInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/OpenInterfaceMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that opens an interface.
- *
+ *
* @author Graham
*/
public final class OpenInterfaceMessage extends Message {
@@ -16,7 +16,7 @@ public final class OpenInterfaceMessage extends Message {
/**
* Creates the message with the specified interface id.
- *
+ *
* @param id The interface id.
*/
public OpenInterfaceMessage(int id) {
@@ -25,7 +25,7 @@ public final class OpenInterfaceMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getId() {
diff --git a/src/org/apollo/game/message/impl/OpenInterfaceSidebarMessage.java b/src/org/apollo/game/message/impl/OpenInterfaceSidebarMessage.java
index 66775c5d..5db52354 100644
--- a/src/org/apollo/game/message/impl/OpenInterfaceSidebarMessage.java
+++ b/src/org/apollo/game/message/impl/OpenInterfaceSidebarMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to open an interface and a sidebar.
- *
+ *
* @author Graham
*/
public final class OpenInterfaceSidebarMessage extends Message {
@@ -21,7 +21,7 @@ public final class OpenInterfaceSidebarMessage extends Message {
/**
* Creates the OpenInterfaceSidebarMessage.
- *
+ *
* @param interfaceId The interface id.
* @param sidebarId The sidebar id.
*/
@@ -32,7 +32,7 @@ public final class OpenInterfaceSidebarMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
@@ -41,7 +41,7 @@ public final class OpenInterfaceSidebarMessage extends Message {
/**
* Gets the sidebar id.
- *
+ *
* @return The sidebar id.
*/
public int getSidebarId() {
diff --git a/src/org/apollo/game/message/impl/OpenOverlayMessage.java b/src/org/apollo/game/message/impl/OpenOverlayMessage.java
index 79c029d6..76ea44d9 100644
--- a/src/org/apollo/game/message/impl/OpenOverlayMessage.java
+++ b/src/org/apollo/game/message/impl/OpenOverlayMessage.java
@@ -16,7 +16,7 @@ public final class OpenOverlayMessage extends Message {
/**
* Creates the OpenSidebarMessage.
- *
+ *
* @param overlayId The overlay id.
*/
public OpenOverlayMessage(int overlayId) {
@@ -25,7 +25,7 @@ public final class OpenOverlayMessage extends Message {
/**
* Gets the overlay id.
- *
+ *
* @return The overlay id.
*/
public int getOverlayId() {
diff --git a/src/org/apollo/game/message/impl/OpenSidebarMessage.java b/src/org/apollo/game/message/impl/OpenSidebarMessage.java
index 1f3a41d8..81755a4f 100644
--- a/src/org/apollo/game/message/impl/OpenSidebarMessage.java
+++ b/src/org/apollo/game/message/impl/OpenSidebarMessage.java
@@ -16,7 +16,7 @@ public final class OpenSidebarMessage extends Message {
/**
* Creates the OpenSidebarMessage.
- *
+ *
* @param sidebarId The sidebar id.
*/
public OpenSidebarMessage(int sidebarId) {
@@ -25,7 +25,7 @@ public final class OpenSidebarMessage extends Message {
/**
* Gets the sidebar id.
- *
+ *
* @return The sidebar id.
*/
public int getSidebarId() {
diff --git a/src/org/apollo/game/message/impl/PlayerActionMessage.java b/src/org/apollo/game/message/impl/PlayerActionMessage.java
index 7f109c5d..99faa421 100644
--- a/src/org/apollo/game/message/impl/PlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/PlayerActionMessage.java
@@ -6,7 +6,7 @@ import org.apollo.game.message.Message;
* A {@link Message} sent by the client representing the clicking of a player menu action. Note that the actual message
* sent by the client is one of the five player action messages, but this is the message that should be intercepted (and
* the option verified).
- *
+ *
* @author Major
*/
public abstract class PlayerActionMessage extends Message {
@@ -23,7 +23,7 @@ public abstract class PlayerActionMessage extends Message {
/**
* Creates a player action message.
- *
+ *
* @param option The option number.
* @param index The index of the player.
*/
@@ -34,7 +34,7 @@ public abstract class PlayerActionMessage extends Message {
/**
* Gets the menu action number (i.e. the action message 'option') clicked.
- *
+ *
* @return The option number.
*/
public int getOption() {
@@ -43,7 +43,7 @@ public abstract class PlayerActionMessage extends Message {
/**
* Gets the index of the clicked player.
- *
+ *
* @return The index.
*/
public int getIndex() {
diff --git a/src/org/apollo/game/message/impl/PlayerDesignMessage.java b/src/org/apollo/game/message/impl/PlayerDesignMessage.java
index bad236aa..d729d372 100644
--- a/src/org/apollo/game/message/impl/PlayerDesignMessage.java
+++ b/src/org/apollo/game/message/impl/PlayerDesignMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Appearance;
/**
* A {@link Message} sent by the client when the player modifies their design.
- *
+ *
* @author Graham
*/
public final class PlayerDesignMessage extends Message {
@@ -17,7 +17,7 @@ public final class PlayerDesignMessage extends Message {
/**
* Creates the player design message.
- *
+ *
* @param appearance The appearance.
*/
public PlayerDesignMessage(Appearance appearance) {
@@ -26,7 +26,7 @@ public final class PlayerDesignMessage extends Message {
/**
* Gets the appearance.
- *
+ *
* @return The appearance.
*/
public Appearance getAppearance() {
diff --git a/src/org/apollo/game/message/impl/PlayerSynchronizationMessage.java b/src/org/apollo/game/message/impl/PlayerSynchronizationMessage.java
index 1f017a3c..01ebed4d 100644
--- a/src/org/apollo/game/message/impl/PlayerSynchronizationMessage.java
+++ b/src/org/apollo/game/message/impl/PlayerSynchronizationMessage.java
@@ -8,7 +8,7 @@ import org.apollo.game.sync.seg.SynchronizationSegment;
/**
* A {@link Message} sent to the client to synchronize players.
- *
+ *
* @author Graham
*/
public final class PlayerSynchronizationMessage extends Message {
@@ -45,7 +45,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Creates the player synchronization message.
- *
+ *
* @param lastKnownRegion The last known region.
* @param position The player's current position.
* @param regionChanged A flag indicating if the region has changed.
@@ -64,7 +64,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Gets the last known region.
- *
+ *
* @return The last known region.
*/
public Position getLastKnownRegion() {
@@ -73,7 +73,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Gets the number of local players.
- *
+ *
* @return The number of local players.
*/
public int getLocalPlayers() {
@@ -82,7 +82,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Gets the player's position.
- *
+ *
* @return The player's position.
*/
public Position getPosition() {
@@ -91,7 +91,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Gets the current player's segment.
- *
+ *
* @return The current player's segment.
*/
public SynchronizationSegment getSegment() {
@@ -100,7 +100,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Gets the synchronization segments.
- *
+ *
* @return The segments.
*/
public List getSegments() {
@@ -109,7 +109,7 @@ public final class PlayerSynchronizationMessage extends Message {
/**
* Checks if the region has changed.
- *
+ *
* @return {@code true} if so, {@code false} if not.
*/
public boolean hasRegionChanged() {
diff --git a/src/org/apollo/game/message/impl/PrivacyOptionMessage.java b/src/org/apollo/game/message/impl/PrivacyOptionMessage.java
index c84f8812..8753219c 100644
--- a/src/org/apollo/game/message/impl/PrivacyOptionMessage.java
+++ b/src/org/apollo/game/message/impl/PrivacyOptionMessage.java
@@ -6,7 +6,7 @@ import org.apollo.game.model.entity.setting.PrivacyState;
/**
* A {@link Message} sent both by and to the client to update the public chat, private (friend) chat, and trade chat
* privacy state.
- *
+ *
* @author Kyle Stevenson
* @author Major
*/
@@ -29,7 +29,7 @@ public final class PrivacyOptionMessage extends Message {
/**
* Creates a privacy option message.
- *
+ *
* @param chatPrivacy The privacy state of the player's chat.
* @param friendPrivacy The privacy state of the player's friend chat.
* @param tradePrivacy The privacy state of the player's trade chat.
@@ -42,7 +42,7 @@ public final class PrivacyOptionMessage extends Message {
/**
* Gets the chat {@link PrivacyState}.
- *
+ *
* @return The privacy state.
*/
public PrivacyState getChatPrivacy() {
@@ -51,7 +51,7 @@ public final class PrivacyOptionMessage extends Message {
/**
* Gets the friend {@link PrivacyState}.
- *
+ *
* @return The privacy state.
*/
public PrivacyState getFriendPrivacy() {
@@ -60,7 +60,7 @@ public final class PrivacyOptionMessage extends Message {
/**
* Gets the trade {@link PrivacyState}.
- *
+ *
* @return The privacy state.
*/
public PrivacyState getTradePrivacy() {
diff --git a/src/org/apollo/game/message/impl/PrivateChatMessage.java b/src/org/apollo/game/message/impl/PrivateChatMessage.java
index e672877d..0c251d40 100644
--- a/src/org/apollo/game/message/impl/PrivateChatMessage.java
+++ b/src/org/apollo/game/message/impl/PrivateChatMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client to send private chat to another player.
- *
+ *
* @author Major
*/
public final class PrivateChatMessage extends Message {
@@ -26,7 +26,7 @@ public final class PrivateChatMessage extends Message {
/**
* Creates a new private chat message.
- *
+ *
* @param username The username of the player the message is being sent to.
* @param chat The chat string.
* @param compressedChat The chat string, in a compressed form.
@@ -39,7 +39,7 @@ public final class PrivateChatMessage extends Message {
/**
* Gets the chat string being sent.
- *
+ *
* @return The chat string.
*/
public String getChat() {
@@ -48,7 +48,7 @@ public final class PrivateChatMessage extends Message {
/**
* Gets the compressed chat string.
- *
+ *
* @return The compressed chat string.
*/
public byte[] getCompressedChat() {
@@ -57,7 +57,7 @@ public final class PrivateChatMessage extends Message {
/**
* Gets the username of the player the chat string is being sent to.
- *
+ *
* @return The username.
*/
public String getUsername() {
diff --git a/src/org/apollo/game/message/impl/RegionChangeMessage.java b/src/org/apollo/game/message/impl/RegionChangeMessage.java
index 724ca354..599f49af 100644
--- a/src/org/apollo/game/message/impl/RegionChangeMessage.java
+++ b/src/org/apollo/game/message/impl/RegionChangeMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Position;
/**
* A {@link Message} sent to the client instructing it to load the specified region.
- *
+ *
* @author Graham
*/
public final class RegionChangeMessage extends Message {
@@ -17,7 +17,7 @@ public final class RegionChangeMessage extends Message {
/**
* Creates the region changed message.
- *
+ *
* @param position The position of the region.
*/
public RegionChangeMessage(Position position) {
@@ -26,7 +26,7 @@ public final class RegionChangeMessage extends Message {
/**
* Gets the position of the region to load.
- *
+ *
* @return The position of the region to load.
*/
public Position getPosition() {
diff --git a/src/org/apollo/game/message/impl/RegionUpdateMessage.java b/src/org/apollo/game/message/impl/RegionUpdateMessage.java
index 33a631c1..d5d69468 100644
--- a/src/org/apollo/game/message/impl/RegionUpdateMessage.java
+++ b/src/org/apollo/game/message/impl/RegionUpdateMessage.java
@@ -34,7 +34,7 @@ public abstract class RegionUpdateMessage extends Message implements Comparable<
/**
* Gets the priority of this RegionUpdateMessage, to use when sorting.
- *
+ *
* @return The priority. Should be either 1 (low) or 0 (high).
*/
public abstract int priority();
diff --git a/src/org/apollo/game/message/impl/RemoveFriendMessage.java b/src/org/apollo/game/message/impl/RemoveFriendMessage.java
index 025ec7be..7a9ea4fb 100644
--- a/src/org/apollo/game/message/impl/RemoveFriendMessage.java
+++ b/src/org/apollo/game/message/impl/RemoveFriendMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when a player removes someone from their friends list.
- *
+ *
* @author Major
*/
public final class RemoveFriendMessage extends Message {
@@ -16,7 +16,7 @@ public final class RemoveFriendMessage extends Message {
/**
* Creates a new defriend user message.
- *
+ *
* @param username The defriended player's username.
*/
public RemoveFriendMessage(String username) {
@@ -25,7 +25,7 @@ public final class RemoveFriendMessage extends Message {
/**
* Gets the username of the defriended player.
- *
+ *
* @return The username.
*/
public String getUsername() {
diff --git a/src/org/apollo/game/message/impl/RemoveIgnoreMessage.java b/src/org/apollo/game/message/impl/RemoveIgnoreMessage.java
index 5cb5995e..ceedcca1 100644
--- a/src/org/apollo/game/message/impl/RemoveIgnoreMessage.java
+++ b/src/org/apollo/game/message/impl/RemoveIgnoreMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when a player removes someone from their ignore list.
- *
+ *
* @author Major
*/
public final class RemoveIgnoreMessage extends Message {
@@ -16,7 +16,7 @@ public final class RemoveIgnoreMessage extends Message {
/**
* Creates a new unignore player message.
- *
+ *
* @param username The unignored player's username.
*/
public RemoveIgnoreMessage(String username) {
@@ -25,7 +25,7 @@ public final class RemoveIgnoreMessage extends Message {
/**
* Gets the username of the unignored player.
- *
+ *
* @return The username.
*/
public String getUsername() {
diff --git a/src/org/apollo/game/message/impl/RemoveObjectMessage.java b/src/org/apollo/game/message/impl/RemoveObjectMessage.java
index f475014f..1283a38f 100644
--- a/src/org/apollo/game/message/impl/RemoveObjectMessage.java
+++ b/src/org/apollo/game/message/impl/RemoveObjectMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.obj.GameObject;
/**
* A {@link Message} sent to the client to remove an object from a tile.
- *
+ *
* @author Major
*/
public final class RemoveObjectMessage extends RegionUpdateMessage {
@@ -27,14 +27,14 @@ public final class RemoveObjectMessage extends RegionUpdateMessage {
/**
* Creates the RemoveObjectMessage.
- *
+ *
* @param object The {@link GameObject} to send.
* @param positionOffset The offset of the GameObject's Position from the Region's top-left position.
*/
public RemoveObjectMessage(GameObject object, int positionOffset) {
this.positionOffset = positionOffset;
- this.type = object.getType();
- this.orientation = object.getOrientation();
+ type = object.getType();
+ orientation = object.getOrientation();
}
@Override
@@ -49,7 +49,7 @@ public final class RemoveObjectMessage extends RegionUpdateMessage {
/**
* Gets the orientation of the object.
- *
+ *
* @return The orientation.
*/
public int getOrientation() {
@@ -67,7 +67,7 @@ public final class RemoveObjectMessage extends RegionUpdateMessage {
/**
* Gets the type of the object.
- *
+ *
* @return The type.
*/
public int getType() {
diff --git a/src/org/apollo/game/message/impl/RemoveTileItemMessage.java b/src/org/apollo/game/message/impl/RemoveTileItemMessage.java
index 1117aa11..84a882ec 100644
--- a/src/org/apollo/game/message/impl/RemoveTileItemMessage.java
+++ b/src/org/apollo/game/message/impl/RemoveTileItemMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Item;
/**
* A {@link Message} sent to the client to remove an item from a tile.
- *
+ *
* @author Major
*/
public final class RemoveTileItemMessage extends RegionUpdateMessage {
@@ -22,7 +22,7 @@ public final class RemoveTileItemMessage extends RegionUpdateMessage {
/**
* Creates the RemoveTileItemMessage.
- *
+ *
* @param id The id of the {@link Item} to remove.
* @param positionOffset The offset from the 'base' position.
*/
@@ -33,7 +33,7 @@ public final class RemoveTileItemMessage extends RegionUpdateMessage {
/**
* Creates the RemoveTileItemMessage.
- *
+ *
* @param item The {@link Item} to remove.
* @param positionOffset The offset from the 'base' position.
*/
@@ -53,7 +53,7 @@ public final class RemoveTileItemMessage extends RegionUpdateMessage {
/**
* Gets the id of the item to remove.
- *
+ *
* @return The id.
*/
public int getId() {
@@ -62,7 +62,7 @@ public final class RemoveTileItemMessage extends RegionUpdateMessage {
/**
* Gets the offset from the 'base' position.
- *
+ *
* @return The offset.
*/
public int getPositionOffset() {
diff --git a/src/org/apollo/game/message/impl/SecondItemActionMessage.java b/src/org/apollo/game/message/impl/SecondItemActionMessage.java
index a9731053..b12dfad9 100644
--- a/src/org/apollo/game/message/impl/SecondItemActionMessage.java
+++ b/src/org/apollo/game/message/impl/SecondItemActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The second {@link ItemActionMessage}.
- *
+ *
* @author Graham
*/
public final class SecondItemActionMessage extends ItemActionMessage {
/**
* Creates the second item action message.
- *
+ *
* @param interfaceId The interface id.
* @param id The item id.
* @param slot The item slot.
diff --git a/src/org/apollo/game/message/impl/SecondItemOptionMessage.java b/src/org/apollo/game/message/impl/SecondItemOptionMessage.java
index 3f7341f9..2722ac92 100644
--- a/src/org/apollo/game/message/impl/SecondItemOptionMessage.java
+++ b/src/org/apollo/game/message/impl/SecondItemOptionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The second {@link ItemOptionMessage}.
- *
+ *
* @author Chris Fletcher
*/
public final class SecondItemOptionMessage extends ItemOptionMessage {
/**
* Creates the second item option message.
- *
+ *
* @param interfaceId The interface id.
* @param id The id.
* @param slot The slot.
diff --git a/src/org/apollo/game/message/impl/SecondNpcActionMessage.java b/src/org/apollo/game/message/impl/SecondNpcActionMessage.java
index 679daf73..d64a11e0 100644
--- a/src/org/apollo/game/message/impl/SecondNpcActionMessage.java
+++ b/src/org/apollo/game/message/impl/SecondNpcActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The second {@link NpcActionMessage}.
- *
+ *
* @author Major
*/
public final class SecondNpcActionMessage extends NpcActionMessage {
/**
* Creates a new second npc action message.
- *
+ *
* @param index The index of the npc.
*/
public SecondNpcActionMessage(int index) {
diff --git a/src/org/apollo/game/message/impl/SecondObjectActionMessage.java b/src/org/apollo/game/message/impl/SecondObjectActionMessage.java
index 43b76c03..c9f2b80e 100644
--- a/src/org/apollo/game/message/impl/SecondObjectActionMessage.java
+++ b/src/org/apollo/game/message/impl/SecondObjectActionMessage.java
@@ -4,14 +4,14 @@ import org.apollo.game.model.Position;
/**
* The second {@link ObjectActionMessage}.
- *
+ *
* @author Graham
*/
public final class SecondObjectActionMessage extends ObjectActionMessage {
/**
* Creates the second object action message.
- *
+ *
* @param id The id.
* @param position The position.
*/
diff --git a/src/org/apollo/game/message/impl/SecondPlayerActionMessage.java b/src/org/apollo/game/message/impl/SecondPlayerActionMessage.java
index 577cb18d..04fbf115 100644
--- a/src/org/apollo/game/message/impl/SecondPlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/SecondPlayerActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The second {@link PlayerActionMessage}.
- *
+ *
* @author Major
*/
public final class SecondPlayerActionMessage extends PlayerActionMessage {
/**
* Creates a second player action message.
- *
+ *
* @param playerIndex The index of the clicked player.
*/
public SecondPlayerActionMessage(int playerIndex) {
diff --git a/src/org/apollo/game/message/impl/SendFriendMessage.java b/src/org/apollo/game/message/impl/SendFriendMessage.java
index e6f11089..32da9afd 100644
--- a/src/org/apollo/game/message/impl/SendFriendMessage.java
+++ b/src/org/apollo/game/message/impl/SendFriendMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to add a player to the friend list.
- *
+ *
* @author Major
*/
public final class SendFriendMessage extends Message {
@@ -21,7 +21,7 @@ public final class SendFriendMessage extends Message {
/**
* Creates a new send friend message.
- *
+ *
* @param username The username of the friend.
* @param world The world the friend is in.
*/
@@ -32,7 +32,7 @@ public final class SendFriendMessage extends Message {
/**
* Gets the username of the friend.
- *
+ *
* @return The username.
*/
public String getUsername() {
@@ -41,7 +41,7 @@ public final class SendFriendMessage extends Message {
/**
* Gets the world id the friend is in.
- *
+ *
* @return The world id.
*/
public int getWorld() {
diff --git a/src/org/apollo/game/message/impl/SendObjectMessage.java b/src/org/apollo/game/message/impl/SendObjectMessage.java
index f075a75b..47d2ea80 100644
--- a/src/org/apollo/game/message/impl/SendObjectMessage.java
+++ b/src/org/apollo/game/message/impl/SendObjectMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.obj.GameObject;
/**
* A {@link Message} sent to the client to spawn an object.
- *
+ *
* @author Major
*/
public final class SendObjectMessage extends RegionUpdateMessage {
@@ -32,15 +32,15 @@ public final class SendObjectMessage extends RegionUpdateMessage {
/**
* Creates the SendObjectMessage.
- *
+ *
* @param object The {@link GameObject} to send.
* @param positionOffset The offset of the object's position from the region's central position.
*/
public SendObjectMessage(GameObject object, int positionOffset) {
- this.id = object.getId();
+ id = object.getId();
this.positionOffset = positionOffset;
- this.type = object.getType();
- this.orientation = object.getOrientation();
+ type = object.getType();
+ orientation = object.getOrientation();
}
@Override
@@ -68,7 +68,7 @@ public final class SendObjectMessage extends RegionUpdateMessage {
/**
* Gets the orientation of the object.
- *
+ *
* @return The orientation.
*/
public int getOrientation() {
@@ -86,7 +86,7 @@ public final class SendObjectMessage extends RegionUpdateMessage {
/**
* Gets the orientation of the object.
- *
+ *
* @return The type.
*/
public int getType() {
diff --git a/src/org/apollo/game/message/impl/SendPublicTileItemMessage.java b/src/org/apollo/game/message/impl/SendPublicTileItemMessage.java
index 282fcd80..d82c8d75 100644
--- a/src/org/apollo/game/message/impl/SendPublicTileItemMessage.java
+++ b/src/org/apollo/game/message/impl/SendPublicTileItemMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Item;
/**
* A {@link Message} sent to the client to display an item on a tile for every player.
- *
+ *
* @author Major
*/
public final class SendPublicTileItemMessage extends RegionUpdateMessage {
@@ -27,7 +27,7 @@ public final class SendPublicTileItemMessage extends RegionUpdateMessage {
/**
* Creates the SendPublicTileItemMessage.
- *
+ *
* @param item The item to add to the tile.
* @param index The index of the player who dropped the item.
* @param positionOffset The offset from the 'base' position.
@@ -50,7 +50,7 @@ public final class SendPublicTileItemMessage extends RegionUpdateMessage {
/**
* Gets the amount of the item.
- *
+ *
* @return The amount.
*/
public int getAmount() {
@@ -59,7 +59,7 @@ public final class SendPublicTileItemMessage extends RegionUpdateMessage {
/**
* Gets the id of the item.
- *
+ *
* @return The id.
*/
public int getId() {
@@ -68,7 +68,7 @@ public final class SendPublicTileItemMessage extends RegionUpdateMessage {
/**
* Gets the index of the player who dropped the item.
- *
+ *
* @return The index.
*/
public int getIndex() {
@@ -77,7 +77,7 @@ public final class SendPublicTileItemMessage extends RegionUpdateMessage {
/**
* Gets the offset from the 'base' position.
- *
+ *
* @return The offset.
*/
public int getPositionOffset() {
diff --git a/src/org/apollo/game/message/impl/SendTileItemMessage.java b/src/org/apollo/game/message/impl/SendTileItemMessage.java
index 73018849..82769472 100644
--- a/src/org/apollo/game/message/impl/SendTileItemMessage.java
+++ b/src/org/apollo/game/message/impl/SendTileItemMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Item;
/**
* A {@link Message} sent to the client that adds an item to a tile.
- *
+ *
* @author Major
*/
public final class SendTileItemMessage extends RegionUpdateMessage {
@@ -22,7 +22,7 @@ public final class SendTileItemMessage extends RegionUpdateMessage {
/**
* Creates the SendTileItemMessage.
- *
+ *
* @param item The item to add to the tile.
* @param positionOffset The offset from the 'base' position.
*/
@@ -33,7 +33,7 @@ public final class SendTileItemMessage extends RegionUpdateMessage {
/**
* Gets the id of the item.
- *
+ *
* @return The id.
*/
public int getId() {
@@ -42,7 +42,7 @@ public final class SendTileItemMessage extends RegionUpdateMessage {
/**
* Gets the amount of the item.
- *
+ *
* @return The amount.
*/
public int getAmount() {
@@ -51,7 +51,7 @@ public final class SendTileItemMessage extends RegionUpdateMessage {
/**
* Gets the offset from the 'base' position.
- *
+ *
* @return The offset.
*/
public int getPositionOffset() {
diff --git a/src/org/apollo/game/message/impl/ServerChatMessage.java b/src/org/apollo/game/message/impl/ServerChatMessage.java
index ec2df797..2f0a335f 100644
--- a/src/org/apollo/game/message/impl/ServerChatMessage.java
+++ b/src/org/apollo/game/message/impl/ServerChatMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to display a server chat message.
- *
+ *
* @author Graham
*/
public final class ServerChatMessage extends Message {
@@ -16,7 +16,7 @@ public final class ServerChatMessage extends Message {
/**
* Creates a server chat message.
- *
+ *
* @param message The chat message.
*/
public ServerChatMessage(String message) {
@@ -25,7 +25,7 @@ public final class ServerChatMessage extends Message {
/**
* Creates a server chat message.
- *
+ *
* @param message The chat message.
* @param filterable Whether or not the message can be filtered.
*/
@@ -35,7 +35,7 @@ public final class ServerChatMessage extends Message {
/**
* Gets the chat message.
- *
+ *
* @return The chat message.
*/
public String getMessage() {
diff --git a/src/org/apollo/game/message/impl/SetPlayerActionMessage.java b/src/org/apollo/game/message/impl/SetPlayerActionMessage.java
index c933e198..2f8c0804 100644
--- a/src/org/apollo/game/message/impl/SetPlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/SetPlayerActionMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client to add an action to the menu when a player right-clicks another.
- *
+ *
* @author Major
*/
public final class SetPlayerActionMessage extends Message {
@@ -26,7 +26,7 @@ public final class SetPlayerActionMessage extends Message {
/**
* Creates the set player action message.
- *
+ *
* @param text The action text.
* @param slot The menu slot.
*/
@@ -36,7 +36,7 @@ public final class SetPlayerActionMessage extends Message {
/**
* Creates the set player action message.
- *
+ *
* @param text The action text.
* @param slot The menu slot.
* @param primaryInteraction Whether or not the action is the primary action.
@@ -44,12 +44,12 @@ public final class SetPlayerActionMessage extends Message {
public SetPlayerActionMessage(String text, int slot, boolean primaryInteraction) {
this.text = text;
this.slot = slot;
- this.primaryAction = primaryInteraction;
+ primaryAction = primaryInteraction;
}
/**
* Gets the action text.
- *
+ *
* @return The text.
*/
public String getText() {
@@ -58,7 +58,7 @@ public final class SetPlayerActionMessage extends Message {
/**
* Gets the menu slot this action occupies.
- *
+ *
* @return The slot.
*/
public int getSlot() {
@@ -68,7 +68,7 @@ public final class SetPlayerActionMessage extends Message {
/**
* Whether or not this action is the primary one (i.e. should be displayed when the player hovers over the other
* player).
- *
+ *
* @return {@code true} if this action is the primary action, {@code false} if not.
*/
public boolean isPrimaryAction() {
diff --git a/src/org/apollo/game/message/impl/SetUpdatedRegionMessage.java b/src/org/apollo/game/message/impl/SetUpdatedRegionMessage.java
index c335aa96..564811fd 100644
--- a/src/org/apollo/game/message/impl/SetUpdatedRegionMessage.java
+++ b/src/org/apollo/game/message/impl/SetUpdatedRegionMessage.java
@@ -6,7 +6,7 @@ import org.apollo.game.model.area.RegionCoordinates;
/**
* A {@link Message} sent to the client to set the coordinates of the Region currently being updated.
- *
+ *
* @author Major
*/
public final class SetUpdatedRegionMessage extends Message {
@@ -23,7 +23,7 @@ public final class SetUpdatedRegionMessage extends Message {
/**
* Creates the SetUpdatedRegionMessage.
- *
+ *
* @param player The {@link Position} of the Player this {@link Message} is being sent to.
* @param region The {@link RegionCoordinates} of the Region being set.
*/
@@ -34,7 +34,7 @@ public final class SetUpdatedRegionMessage extends Message {
/**
* Gets the {@link Position} of the Player this {@link Message} is being sent to..
- *
+ *
* @return The Position.
*/
public Position getPlayerPosition() {
@@ -43,7 +43,7 @@ public final class SetUpdatedRegionMessage extends Message {
/**
* Gets the {@link Position} of the Region being cleared.
- *
+ *
* @return The Position.
*/
public Position getRegionPosition() {
diff --git a/src/org/apollo/game/message/impl/SetWidgetItemModelMessage.java b/src/org/apollo/game/message/impl/SetWidgetItemModelMessage.java
index aa406c3d..9e5a70cf 100644
--- a/src/org/apollo/game/message/impl/SetWidgetItemModelMessage.java
+++ b/src/org/apollo/game/message/impl/SetWidgetItemModelMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to set a widget's displayed item model.
- *
+ *
* @author Chris Fletcher
*/
public final class SetWidgetItemModelMessage extends Message {
@@ -26,7 +26,7 @@ public final class SetWidgetItemModelMessage extends Message {
/**
* Creates a new set interface item model message.
- *
+ *
* @param interfaceId The interface's id.
* @param modelId The model's (item) id.
* @param zoom The zoom level.
@@ -39,7 +39,7 @@ public final class SetWidgetItemModelMessage extends Message {
/**
* Gets the interface's id.
- *
+ *
* @return The id.
*/
public int getInterfaceId() {
@@ -48,7 +48,7 @@ public final class SetWidgetItemModelMessage extends Message {
/**
* Gets the model's (item) id.
- *
+ *
* @return The id.
*/
public int getModelId() {
@@ -57,7 +57,7 @@ public final class SetWidgetItemModelMessage extends Message {
/**
* Gets the zoom level.
- *
+ *
* @return The zoom.
*/
public int getZoom() {
diff --git a/src/org/apollo/game/message/impl/SetWidgetModelAnimationMessage.java b/src/org/apollo/game/message/impl/SetWidgetModelAnimationMessage.java
index 30a491a0..f1600bce 100644
--- a/src/org/apollo/game/message/impl/SetWidgetModelAnimationMessage.java
+++ b/src/org/apollo/game/message/impl/SetWidgetModelAnimationMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to set a widget's displayed mob's animation.
- *
+ *
* @author Chris Fletcher
*/
public final class SetWidgetModelAnimationMessage extends Message {
@@ -21,7 +21,7 @@ public final class SetWidgetModelAnimationMessage extends Message {
/**
* Creates a new set interface npc model's animation message.
- *
+ *
* @param interfaceId The interface id.
* @param animation The model's animation id.
*/
@@ -32,7 +32,7 @@ public final class SetWidgetModelAnimationMessage extends Message {
/**
* Gets the model's mood id.
- *
+ *
* @return The model's mood id.
*/
public int getAnimation() {
@@ -41,7 +41,7 @@ public final class SetWidgetModelAnimationMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
diff --git a/src/org/apollo/game/message/impl/SetWidgetNpcModelMessage.java b/src/org/apollo/game/message/impl/SetWidgetNpcModelMessage.java
index 1add8bb3..31bbd0b7 100644
--- a/src/org/apollo/game/message/impl/SetWidgetNpcModelMessage.java
+++ b/src/org/apollo/game/message/impl/SetWidgetNpcModelMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to set a widget's displayed npc model.
- *
+ *
* @author Chris Fletcher
*/
public final class SetWidgetNpcModelMessage extends Message {
@@ -21,7 +21,7 @@ public final class SetWidgetNpcModelMessage extends Message {
/**
* Creates a new set interface NPC model message.
- *
+ *
* @param interfaceId The interface's id.
* @param modelId The model's (NPC) id.
*/
@@ -32,7 +32,7 @@ public final class SetWidgetNpcModelMessage extends Message {
/**
* Gets the interface's id.
- *
+ *
* @return The id.
*/
public int getInterfaceId() {
@@ -41,7 +41,7 @@ public final class SetWidgetNpcModelMessage extends Message {
/**
* Gets the model's (NPC) id.
- *
+ *
* @return The id.
*/
public int getModelId() {
diff --git a/src/org/apollo/game/message/impl/SetWidgetPlayerModelMessage.java b/src/org/apollo/game/message/impl/SetWidgetPlayerModelMessage.java
index 3a7890c0..53eeb6e3 100644
--- a/src/org/apollo/game/message/impl/SetWidgetPlayerModelMessage.java
+++ b/src/org/apollo/game/message/impl/SetWidgetPlayerModelMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to set a widget's displayed player model.
- *
+ *
* @author Chris Fletcher
*/
public final class SetWidgetPlayerModelMessage extends Message {
@@ -16,7 +16,7 @@ public final class SetWidgetPlayerModelMessage extends Message {
/**
* Creates a new set interface player model message.
- *
+ *
* @param interfaceId The interface's id.
*/
public SetWidgetPlayerModelMessage(int interfaceId) {
@@ -25,7 +25,7 @@ public final class SetWidgetPlayerModelMessage extends Message {
/**
* Gets the interface's id.
- *
+ *
* @return The id.
*/
public int getInterfaceId() {
diff --git a/src/org/apollo/game/message/impl/SetWidgetTextMessage.java b/src/org/apollo/game/message/impl/SetWidgetTextMessage.java
index 7700981a..d5bede6b 100644
--- a/src/org/apollo/game/message/impl/SetWidgetTextMessage.java
+++ b/src/org/apollo/game/message/impl/SetWidgetTextMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to set a widget's text.
- *
+ *
* @author Graham
*/
public final class SetWidgetTextMessage extends Message {
@@ -21,7 +21,7 @@ public final class SetWidgetTextMessage extends Message {
/**
* Creates the set interface text message.
- *
+ *
* @param interfaceId The interface's id.
* @param text The interface's text.
*/
@@ -32,7 +32,7 @@ public final class SetWidgetTextMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
@@ -41,7 +41,7 @@ public final class SetWidgetTextMessage extends Message {
/**
* Gets the interface's text.
- *
+ *
* @return The interface's text.
*/
public String getText() {
diff --git a/src/org/apollo/game/message/impl/SetWidgetVisibilityMessage.java b/src/org/apollo/game/message/impl/SetWidgetVisibilityMessage.java
index 8cfe885f..245cc749 100644
--- a/src/org/apollo/game/message/impl/SetWidgetVisibilityMessage.java
+++ b/src/org/apollo/game/message/impl/SetWidgetVisibilityMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client that changes the state of a hidden widget component (e.g. the special attack bar
* on the weapon tab).
- *
+ *
* @author Chris Fletcher
*/
public final class SetWidgetVisibilityMessage extends Message {
@@ -22,7 +22,7 @@ public final class SetWidgetVisibilityMessage extends Message {
/**
* Creates the interface component state message.
- *
+ *
* @param component The compononent id.
* @param visible The flag for showing or hiding the component.
*/
@@ -33,7 +33,7 @@ public final class SetWidgetVisibilityMessage extends Message {
/**
* Gets the id of the interface component.
- *
+ *
* @return The component id.
*/
public int getWidgetId() {
@@ -42,7 +42,7 @@ public final class SetWidgetVisibilityMessage extends Message {
/**
* Gets the visible flag.
- *
+ *
* @return {@code true} if the component has been set to visible, {@code false} if not.
*/
public boolean isVisible() {
diff --git a/src/org/apollo/game/message/impl/SpamPacketMessage.java b/src/org/apollo/game/message/impl/SpamPacketMessage.java
index 804e7684..1f26eb1f 100644
--- a/src/org/apollo/game/message/impl/SpamPacketMessage.java
+++ b/src/org/apollo/game/message/impl/SpamPacketMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client after a short period of time containing random data.
- *
+ *
* @author Major
*/
public final class SpamPacketMessage extends Message {
@@ -16,7 +16,7 @@ public final class SpamPacketMessage extends Message {
/**
* Creates a new spam packet message.
- *
+ *
* @param data The data sent.
*/
public SpamPacketMessage(byte[] data) {
@@ -25,7 +25,7 @@ public final class SpamPacketMessage extends Message {
/**
* Gets the data sent.
- *
+ *
* @return The data.
*/
public byte[] getData() {
diff --git a/src/org/apollo/game/message/impl/SwitchItemMessage.java b/src/org/apollo/game/message/impl/SwitchItemMessage.java
index 02c5d753..0dc4b49e 100644
--- a/src/org/apollo/game/message/impl/SwitchItemMessage.java
+++ b/src/org/apollo/game/message/impl/SwitchItemMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent by the client when two items are switched.
- *
+ *
* @author Graham
*/
public final class SwitchItemMessage extends Message {
@@ -31,7 +31,7 @@ public final class SwitchItemMessage extends Message {
/**
* Creates a new switch item message.
- *
+ *
* @param interfaceId The interface id.
* @param inserting A flag indicating if the interface is in 'insert' mode instead of swap mode.
* @param oldSlot The old slot.
@@ -46,7 +46,7 @@ public final class SwitchItemMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
@@ -55,7 +55,7 @@ public final class SwitchItemMessage extends Message {
/**
* Gets the new slot.
- *
+ *
* @return The new slot.
*/
public int getNewSlot() {
@@ -64,7 +64,7 @@ public final class SwitchItemMessage extends Message {
/**
* Gets the old slot.
- *
+ *
* @return The old slot.
*/
public int getOldSlot() {
@@ -73,7 +73,7 @@ public final class SwitchItemMessage extends Message {
/**
* Checks if this message is in insertion mode.
- *
+ *
* @return The insertion flag.
*/
public boolean isInserting() {
@@ -82,7 +82,7 @@ public final class SwitchItemMessage extends Message {
/**
* Checks if this message is in swap mode.
- *
+ *
* @return The swap flag.
*/
public boolean isSwapping() {
diff --git a/src/org/apollo/game/message/impl/SwitchTabInterfaceMessage.java b/src/org/apollo/game/message/impl/SwitchTabInterfaceMessage.java
index 9516cac9..44bb3141 100644
--- a/src/org/apollo/game/message/impl/SwitchTabInterfaceMessage.java
+++ b/src/org/apollo/game/message/impl/SwitchTabInterfaceMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to change the interface of a tab.
- *
+ *
* @author Graham
*/
public final class SwitchTabInterfaceMessage extends Message {
@@ -21,7 +21,7 @@ public final class SwitchTabInterfaceMessage extends Message {
/**
* Creates the switch interface message.
- *
+ *
* @param tab The tab id.
* @param interfaceId The interface id.
*/
@@ -32,7 +32,7 @@ public final class SwitchTabInterfaceMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
@@ -41,7 +41,7 @@ public final class SwitchTabInterfaceMessage extends Message {
/**
* Gets the tab id.
- *
+ *
* @return The tab id.
*/
public int getTabId() {
diff --git a/src/org/apollo/game/message/impl/TakeTileItemMessage.java b/src/org/apollo/game/message/impl/TakeTileItemMessage.java
index c0dbd62b..a02e7d22 100644
--- a/src/org/apollo/game/message/impl/TakeTileItemMessage.java
+++ b/src/org/apollo/game/message/impl/TakeTileItemMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Position;
/**
* A {@link Message} sent by the client to pick up an item on a tile.
- *
+ *
* @author Major
*/
public final class TakeTileItemMessage extends Message {
@@ -22,7 +22,7 @@ public final class TakeTileItemMessage extends Message {
/**
* Creates a new take tile item message.
- *
+ *
* @param id The id of the item.
* @param position The position of the tile.
*/
@@ -33,7 +33,7 @@ public final class TakeTileItemMessage extends Message {
/**
* Gets the id of the item.
- *
+ *
* @return The id.
*/
public int getId() {
@@ -42,7 +42,7 @@ public final class TakeTileItemMessage extends Message {
/**
* Gets the position of the tile.
- *
+ *
* @return The position.
*/
public Position getPosition() {
diff --git a/src/org/apollo/game/message/impl/ThirdItemActionMessage.java b/src/org/apollo/game/message/impl/ThirdItemActionMessage.java
index e371bdcf..1c48fa2a 100644
--- a/src/org/apollo/game/message/impl/ThirdItemActionMessage.java
+++ b/src/org/apollo/game/message/impl/ThirdItemActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The third {@link ItemActionMessage}.
- *
+ *
* @author Graham
*/
public final class ThirdItemActionMessage extends ItemActionMessage {
/**
* Creates the third item action message.
- *
+ *
* @param interfaceId The interface id.
* @param id The item id.
* @param slot The item slot.
diff --git a/src/org/apollo/game/message/impl/ThirdItemOptionMessage.java b/src/org/apollo/game/message/impl/ThirdItemOptionMessage.java
index 0df3fe86..fc1b1a67 100644
--- a/src/org/apollo/game/message/impl/ThirdItemOptionMessage.java
+++ b/src/org/apollo/game/message/impl/ThirdItemOptionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The third {@link ItemOptionMessage}.
- *
+ *
* @author Chris Fletcher
*/
public final class ThirdItemOptionMessage extends ItemOptionMessage {
/**
* Creates the third item option message.
- *
+ *
* @param interfaceId The interface id.
* @param id The id.
* @param slot The slot.
diff --git a/src/org/apollo/game/message/impl/ThirdNpcActionMessage.java b/src/org/apollo/game/message/impl/ThirdNpcActionMessage.java
index 9685f9b0..2cdf2ac0 100644
--- a/src/org/apollo/game/message/impl/ThirdNpcActionMessage.java
+++ b/src/org/apollo/game/message/impl/ThirdNpcActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The third {@link NpcActionMessage}.
- *
+ *
* @author Major
*/
public final class ThirdNpcActionMessage extends NpcActionMessage {
/**
* Creates a new third npc action message.
- *
+ *
* @param index The index of the npc.
*/
public ThirdNpcActionMessage(int index) {
diff --git a/src/org/apollo/game/message/impl/ThirdObjectActionMessage.java b/src/org/apollo/game/message/impl/ThirdObjectActionMessage.java
index 3dbe2aff..0f012e57 100644
--- a/src/org/apollo/game/message/impl/ThirdObjectActionMessage.java
+++ b/src/org/apollo/game/message/impl/ThirdObjectActionMessage.java
@@ -4,14 +4,14 @@ import org.apollo.game.model.Position;
/**
* The third {@link ObjectActionMessage}.
- *
+ *
* @author Graham
*/
public final class ThirdObjectActionMessage extends ObjectActionMessage {
/**
* Creates the third object action message.
- *
+ *
* @param id The id.
* @param position The position.
*/
diff --git a/src/org/apollo/game/message/impl/ThirdPlayerActionMessage.java b/src/org/apollo/game/message/impl/ThirdPlayerActionMessage.java
index c3e1e125..b19608bb 100644
--- a/src/org/apollo/game/message/impl/ThirdPlayerActionMessage.java
+++ b/src/org/apollo/game/message/impl/ThirdPlayerActionMessage.java
@@ -2,14 +2,14 @@ package org.apollo.game.message.impl;
/**
* The third {@link PlayerActionMessage}.
- *
+ *
* @author Major
*/
public final class ThirdPlayerActionMessage extends PlayerActionMessage {
/**
* Creates a third player action message.
- *
+ *
* @param playerIndex The index of the clicked player.
*/
public ThirdPlayerActionMessage(int playerIndex) {
diff --git a/src/org/apollo/game/message/impl/UpdateItemsMessage.java b/src/org/apollo/game/message/impl/UpdateItemsMessage.java
index 6b508f34..1bcab98a 100644
--- a/src/org/apollo/game/message/impl/UpdateItemsMessage.java
+++ b/src/org/apollo/game/message/impl/UpdateItemsMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Item;
/**
* A {@link Message} sent to the client that updates all the items in an interface.
- *
+ *
* @author Graham
*/
public final class UpdateItemsMessage extends Message {
@@ -22,7 +22,7 @@ public final class UpdateItemsMessage extends Message {
/**
* Creates the update inventory interface message.
- *
+ *
* @param interfaceId The interface id.
* @param items The items.
*/
@@ -33,7 +33,7 @@ public final class UpdateItemsMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
@@ -42,7 +42,7 @@ public final class UpdateItemsMessage extends Message {
/**
* Gets the items.
- *
+ *
* @return The items.
*/
public Item[] getItems() {
diff --git a/src/org/apollo/game/message/impl/UpdateRunEnergyMessage.java b/src/org/apollo/game/message/impl/UpdateRunEnergyMessage.java
index 6edde6f6..23f60cb4 100644
--- a/src/org/apollo/game/message/impl/UpdateRunEnergyMessage.java
+++ b/src/org/apollo/game/message/impl/UpdateRunEnergyMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to update the remaining run energy value.
- *
+ *
* @author Major
*/
public final class UpdateRunEnergyMessage extends Message {
@@ -16,7 +16,7 @@ public final class UpdateRunEnergyMessage extends Message {
/**
* Creates a new update run energy message.
- *
+ *
* @param energy The energy.
*/
public UpdateRunEnergyMessage(int energy) {
@@ -25,7 +25,7 @@ public final class UpdateRunEnergyMessage extends Message {
/**
* Gets the amount of run energy.
- *
+ *
* @return The energy.
*/
public int getEnergy() {
diff --git a/src/org/apollo/game/message/impl/UpdateSkillMessage.java b/src/org/apollo/game/message/impl/UpdateSkillMessage.java
index 5cda75e3..4b0b3a25 100644
--- a/src/org/apollo/game/message/impl/UpdateSkillMessage.java
+++ b/src/org/apollo/game/message/impl/UpdateSkillMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.entity.Skill;
/**
* A {@link Message} sent to the client to update a player's skill level.
- *
+ *
* @author Graham
*/
public final class UpdateSkillMessage extends Message {
@@ -22,7 +22,7 @@ public final class UpdateSkillMessage extends Message {
/**
* Creates an update skill message.
- *
+ *
* @param id The id.
* @param skill The skill.
*/
@@ -33,7 +33,7 @@ public final class UpdateSkillMessage extends Message {
/**
* Gets the skill's id.
- *
+ *
* @return The skill's id.
*/
public int getId() {
@@ -42,7 +42,7 @@ public final class UpdateSkillMessage extends Message {
/**
* Gets the skill.
- *
+ *
* @return The skill.
*/
public Skill getSkill() {
diff --git a/src/org/apollo/game/message/impl/UpdateSlottedItemsMessage.java b/src/org/apollo/game/message/impl/UpdateSlottedItemsMessage.java
index 6947ecc3..e44d18a1 100644
--- a/src/org/apollo/game/message/impl/UpdateSlottedItemsMessage.java
+++ b/src/org/apollo/game/message/impl/UpdateSlottedItemsMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.inv.SlottedItem;
/**
* A {@link Message} sent to the client that updates a single item in an interface.
- *
+ *
* @author Graham
*/
public final class UpdateSlottedItemsMessage extends Message {
@@ -22,7 +22,7 @@ public final class UpdateSlottedItemsMessage extends Message {
/**
* Creates the update item in interface message.
- *
+ *
* @param interfaceId The interface id.
* @param items The slotted items.
*/
@@ -33,7 +33,7 @@ public final class UpdateSlottedItemsMessage extends Message {
/**
* Gets the interface id.
- *
+ *
* @return The interface id.
*/
public int getInterfaceId() {
@@ -42,7 +42,7 @@ public final class UpdateSlottedItemsMessage extends Message {
/**
* Gets an array of slotted items.
- *
+ *
* @return The slotted items.
*/
public SlottedItem[] getSlottedItems() {
diff --git a/src/org/apollo/game/message/impl/UpdateTileItemMessage.java b/src/org/apollo/game/message/impl/UpdateTileItemMessage.java
index 566d5161..81bc3427 100644
--- a/src/org/apollo/game/message/impl/UpdateTileItemMessage.java
+++ b/src/org/apollo/game/message/impl/UpdateTileItemMessage.java
@@ -5,7 +5,7 @@ import org.apollo.game.model.Item;
/**
* A {@link Message} sent to the client to update the amount of an item display on a tile.
- *
+ *
* @author Major
*/
public final class UpdateTileItemMessage extends RegionUpdateMessage {
@@ -27,7 +27,7 @@ public final class UpdateTileItemMessage extends RegionUpdateMessage {
/**
* Creates a new message that updates the previous amount of the item.
- *
+ *
* @param item The item to be placed.
* @param previousAmount The previous amount of the item.
*/
@@ -37,7 +37,7 @@ public final class UpdateTileItemMessage extends RegionUpdateMessage {
/**
* Creates a new set tile item message.
- *
+ *
* @param item The item to be placed.
* @param previousAmount The previous amount of the item.
* @param positionOffset The offset from the client's base position.
@@ -60,7 +60,7 @@ public final class UpdateTileItemMessage extends RegionUpdateMessage {
/**
* Gets the amount of the item.
- *
+ *
* @return The amount.
*/
public int getAmount() {
@@ -69,7 +69,7 @@ public final class UpdateTileItemMessage extends RegionUpdateMessage {
/**
* Gets the id of the item.
- *
+ *
* @return The item.
*/
public int getId() {
@@ -78,7 +78,7 @@ public final class UpdateTileItemMessage extends RegionUpdateMessage {
/**
* Gets the offset from the client's base position.
- *
+ *
* @return The offset.
*/
public int getPositionOffset() {
@@ -87,7 +87,7 @@ public final class UpdateTileItemMessage extends RegionUpdateMessage {
/**
* Gets the previous amount of the item.
- *
+ *
* @return The previous amount.
*/
public int getPreviousAmount() {
diff --git a/src/org/apollo/game/message/impl/UpdateWeightMessage.java b/src/org/apollo/game/message/impl/UpdateWeightMessage.java
index 551968fe..e7cb5f3e 100644
--- a/src/org/apollo/game/message/impl/UpdateWeightMessage.java
+++ b/src/org/apollo/game/message/impl/UpdateWeightMessage.java
@@ -4,7 +4,7 @@ import org.apollo.game.message.Message;
/**
* A {@link Message} sent to the client to update the player's weight.
- *
+ *
* @author Major
*/
public final class UpdateWeightMessage extends Message {
@@ -16,7 +16,7 @@ public final class UpdateWeightMessage extends Message {
/**
* Creates the update weight message.
- *
+ *
* @param weight The weight of the player.
*/
public UpdateWeightMessage(int weight) {
@@ -25,7 +25,7 @@ public final class UpdateWeightMessage extends Message {
/**
* Gets the weight of the player.
- *
+ *
* @return The weight.
*/
public int getWeight() {
diff --git a/src/org/apollo/game/message/impl/WalkMessage.java b/src/org/apollo/game/message/impl/WalkMessage.java
index fde16843..ac73adde 100644
--- a/src/org/apollo/game/message/impl/WalkMessage.java
+++ b/src/org/apollo/game/message/impl/WalkMessage.java
@@ -7,7 +7,7 @@ import com.google.common.base.Preconditions;
/**
* A {@link Message} sent by the client to request that the player walks somewhere.
- *
+ *
* @author Graham
*/
public final class WalkMessage extends Message {
@@ -15,7 +15,7 @@ public final class WalkMessage extends Message {
/**
* The running flag.
*/
- private boolean run;
+ private final boolean run;
/**
* The steps.
@@ -24,7 +24,7 @@ public final class WalkMessage extends Message {
/**
* Creates the message.
- *
+ *
* @param steps The steps array.
* @param run The run flag.
*/
@@ -36,7 +36,7 @@ public final class WalkMessage extends Message {
/**
* Gets the steps array.
- *
+ *
* @return An array of steps.
*/
public Position[] getSteps() {
@@ -45,7 +45,7 @@ public final class WalkMessage extends Message {
/**
* Checks if the steps should be ran (ctrl+click).
- *
+ *
* @return {@code true} if so, {@code false} otherwise.
*/
public boolean isRunning() {
diff --git a/src/org/apollo/game/model/Animation.java b/src/org/apollo/game/model/Animation.java
index a648d93b..a2dab3c8 100644
--- a/src/org/apollo/game/model/Animation.java
+++ b/src/org/apollo/game/model/Animation.java
@@ -2,7 +2,7 @@ package org.apollo.game.model;
/**
* Represents an animation.
- *
+ *
* @author Graham
*/
public final class Animation {
@@ -164,7 +164,7 @@ public final class Animation {
/**
* Creates a new animation with no delay.
- *
+ *
* @param id The id.
*/
public Animation(int id) {
@@ -173,7 +173,7 @@ public final class Animation {
/**
* Creates a new animation.
- *
+ *
* @param id The id.
* @param delay The delay.
*/
@@ -184,7 +184,7 @@ public final class Animation {
/**
* Gets the animation's delay.
- *
+ *
* @return The animation's delay.
*/
public int getDelay() {
@@ -193,7 +193,7 @@ public final class Animation {
/**
* Gets the animation's id.
- *
+ *
* @return The animation's id.
*/
public int getId() {
diff --git a/src/org/apollo/game/model/Appearance.java b/src/org/apollo/game/model/Appearance.java
index 6bb6a961..12febc75 100644
--- a/src/org/apollo/game/model/Appearance.java
+++ b/src/org/apollo/game/model/Appearance.java
@@ -6,7 +6,7 @@ import com.google.common.base.Preconditions;
/**
* Represents the appearance of a player.
- *
+ *
* @author Graham
*/
public final class Appearance {
@@ -34,7 +34,7 @@ public final class Appearance {
/**
* Creates the appearance with the specified gender, style and colors.
- *
+ *
* @param gender The gender.
* @param style The style.
* @param colors The colors.
@@ -53,7 +53,7 @@ public final class Appearance {
/**
* Gets the player's colors.
- *
+ *
* @return The player's colors.
*/
public int[] getColors() {
@@ -62,7 +62,7 @@ public final class Appearance {
/**
* Gets the gender of the player.
- *
+ *
* @return The gender of the player.
*/
public Gender getGender() {
@@ -71,7 +71,7 @@ public final class Appearance {
/**
* Gets the player's styles.
- *
+ *
* @return The player's styles.
*/
public int[] getStyle() {
@@ -81,7 +81,7 @@ public final class Appearance {
/**
* Checks if the player is female.
- *
+ *
* @return {@code true} if so, {@code false} if not.
*/
public boolean isFemale() {
@@ -90,7 +90,7 @@ public final class Appearance {
/**
* Checks if the player is male.
- *
+ *
* @return {@code true} if so, {@code false} if not.
*/
public boolean isMale() {
diff --git a/src/org/apollo/game/model/Direction.java b/src/org/apollo/game/model/Direction.java
index 61015ca3..e3123e94 100644
--- a/src/org/apollo/game/model/Direction.java
+++ b/src/org/apollo/game/model/Direction.java
@@ -2,7 +2,7 @@ package org.apollo.game.model;
/**
* Represents a single movement direction.
- *
+ *
* @author Graham
*/
public enum Direction {
@@ -59,7 +59,7 @@ public enum Direction {
/**
* Creates a direction from the differences between X and Y.
- *
+ *
* @param deltaX The difference between two X coordinates.
* @param deltaY The difference between two Y coordinates.
* @return The direction.
@@ -93,7 +93,7 @@ public enum Direction {
/**
* Checks if the direction represented by the two delta values can connect two points together in a single
* direction.
- *
+ *
* @param deltaX The difference in X coordinates.
* @param deltaY The difference in X coordinates.
* @return {@code true} if so, {@code false} if not.
@@ -109,7 +109,7 @@ public enum Direction {
/**
* Creates the direction.
- *
+ *
* @param intValue The direction as an integer.
*/
private Direction(int intValue) {
@@ -118,7 +118,7 @@ public enum Direction {
/**
* Gets the direction as an integer which the client can understand.
- *
+ *
* @return The movement as an integer.
*/
public int toInteger() {
diff --git a/src/org/apollo/game/model/Graphic.java b/src/org/apollo/game/model/Graphic.java
index fde393c3..048fe302 100644
--- a/src/org/apollo/game/model/Graphic.java
+++ b/src/org/apollo/game/model/Graphic.java
@@ -2,7 +2,7 @@ package org.apollo.game.model;
/**
* Represents a 'still graphic'.
- *
+ *
* @author Graham
*/
public final class Graphic {
@@ -29,7 +29,7 @@ public final class Graphic {
/**
* Creates a new graphic with no delay and a height of zero.
- *
+ *
* @param id The id.
*/
public Graphic(int id) {
@@ -38,7 +38,7 @@ public final class Graphic {
/**
* Creates a new graphic with a height of zero.
- *
+ *
* @param id The id.
* @param delay The delay.
*/
@@ -48,7 +48,7 @@ public final class Graphic {
/**
* Creates a new graphic.
- *
+ *
* @param id The id.
* @param delay The delay.
* @param height The height.
@@ -61,7 +61,7 @@ public final class Graphic {
/**
* Gets the graphic's delay.
- *
+ *
* @return The delay.
*/
public int getDelay() {
@@ -70,7 +70,7 @@ public final class Graphic {
/**
* Gets the graphic's height.
- *
+ *
* @return The height.
*/
public int getHeight() {
@@ -79,7 +79,7 @@ public final class Graphic {
/**
* Gets the graphic's id.
- *
+ *
* @return The id.
*/
public int getId() {
diff --git a/src/org/apollo/game/model/Item.java b/src/org/apollo/game/model/Item.java
index 9b51fe28..5ecd7506 100644
--- a/src/org/apollo/game/model/Item.java
+++ b/src/org/apollo/game/model/Item.java
@@ -7,7 +7,7 @@ import com.google.common.base.Preconditions;
/**
* Represents a single item.
- *
+ *
* @author Graham
*/
public final class Item {
@@ -29,7 +29,7 @@ public final class Item {
/**
* Creates an item with an amount of {@code 1}.
- *
+ *
* @param id The item's id.
*/
public Item(int id) {
@@ -38,7 +38,7 @@ public final class Item {
/**
* Creates an item with the specified the amount.
- *
+ *
* @param id The item's id.
* @param amount The amount.
* @throws IllegalArgumentException If the amount is negative.
@@ -47,7 +47,7 @@ public final class Item {
Preconditions.checkArgument(amount >= 0, "Amount cannot be negative.");
this.id = id;
this.amount = amount;
- this.definition = ItemDefinition.lookup(id);
+ definition = ItemDefinition.lookup(id);
}
@Override
@@ -62,7 +62,7 @@ public final class Item {
/**
* Gets the amount.
- *
+ *
* @return The amount.
*/
public int getAmount() {
@@ -71,7 +71,7 @@ public final class Item {
/**
* Gets the {@link ItemDefinition} that describes this item.
- *
+ *
* @return The definition.
*/
public ItemDefinition getDefinition() {
@@ -80,7 +80,7 @@ public final class Item {
/**
* Gets the id.
- *
+ *
* @return The id.
*/
public int getId() {
diff --git a/src/org/apollo/game/model/Position.java b/src/org/apollo/game/model/Position.java
index 7e57c5af..4ddbaf1f 100644
--- a/src/org/apollo/game/model/Position.java
+++ b/src/org/apollo/game/model/Position.java
@@ -8,7 +8,7 @@ import com.google.common.base.Preconditions;
/**
* Represents a position in the world.
- *
+ *
* @author Graham
*/
public final class Position {
@@ -30,7 +30,7 @@ public final class Position {
/**
* Creates a position at the default height.
- *
+ *
* @param x The x coordinate.
* @param y The y coordinate.
*/
@@ -40,7 +40,7 @@ public final class Position {
/**
* Creates a position with the specified height.
- *
+ *
* @param x The x coordinate.
* @param y The y coordinate.
* @param height The height.
@@ -63,7 +63,7 @@ public final class Position {
/**
* Gets the x coordinate of the central region.
- *
+ *
* @return The x coordinate of the central region.
*/
public int getCentralRegionX() {
@@ -72,7 +72,7 @@ public final class Position {
/**
* Gets the y coordinate of the central region.
- *
+ *
* @return The y coordinate of the central region.
*/
public int getCentralRegionY() {
@@ -81,7 +81,7 @@ public final class Position {
/**
* Gets the distance between this position and another position. Only x and y are considered (i.e. 2 dimensions).
- *
+ *
* @param other The other position.
* @return The distance.
*/
@@ -93,7 +93,7 @@ public final class Position {
/**
* Gets the height level.
- *
+ *
* @return The height level.
*/
public int getHeight() {
@@ -102,7 +102,7 @@ public final class Position {
/**
* Gets the x coordinate inside the region of this position.
- *
+ *
* @return The local x coordinate.
*/
public int getLocalX() {
@@ -111,7 +111,7 @@ public final class Position {
/**
* Gets the local x coordinate inside the region of the {@code base} position.
- *
+ *
* @param base The base position.
* @return The local x coordinate.
*/
@@ -121,7 +121,7 @@ public final class Position {
/**
* Gets the y coordinate inside the region of this position.
- *
+ *
* @return The local y coordinate.
*/
public int getLocalY() {
@@ -130,7 +130,7 @@ public final class Position {
/**
* Gets the local y coordinate inside the region of the {@code base} position.
- *
+ *
* @param base The base position.
* @return The local y coordinate.
*/
@@ -140,7 +140,7 @@ public final class Position {
/**
* Gets the longest horizontal or vertical delta between the two positions.
- *
+ *
* @param other The other position.
* @return The longest horizontal or vertical delta.
*/
@@ -152,7 +152,7 @@ public final class Position {
/**
* Returns the {@link RegionCoordinates} of the {@link Region} this position is inside.
- *
+ *
* @return The region coordinates.
*/
public RegionCoordinates getRegionCoordinates() {
@@ -161,7 +161,7 @@ public final class Position {
/**
* Gets the x coordinate of the region this position is in.
- *
+ *
* @return The region x coordinate.
*/
public int getTopLeftRegionX() {
@@ -170,7 +170,7 @@ public final class Position {
/**
* Gets the y coordinate of the region this position is in.
- *
+ *
* @return The region y coordinate.
*/
public int getTopLeftRegionY() {
@@ -179,7 +179,7 @@ public final class Position {
/**
* Gets the x coordinate.
- *
+ *
* @return The x coordinate.
*/
public int getX() {
@@ -188,11 +188,11 @@ public final class Position {
/**
* Gets the y coordinate.
- *
+ *
* @return The y coordinate.
*/
public int getY() {
- return (packed >> 15) & 0x7FFF;
+ return packed >> 15 & 0x7FFF;
}
@Override
@@ -202,7 +202,7 @@ public final class Position {
/**
* Returns whether or not this position is inside the specified {@link Region}.
- *
+ *
* @param region The region.
* @return {@code true} if this position is inside the specified region, otherwise {@code false}.
*/
@@ -213,7 +213,7 @@ public final class Position {
/**
* Checks if the position is within distance of another.
- *
+ *
* @param other The other position.
* @param distance The distance.
* @return {@code true} if so, {@code false} if not.
diff --git a/src/org/apollo/game/model/World.java b/src/org/apollo/game/model/World.java
index e74d0fbc..4718a47d 100644
--- a/src/org/apollo/game/model/World.java
+++ b/src/org/apollo/game/model/World.java
@@ -43,14 +43,14 @@ import com.google.common.base.Preconditions;
* The world class is a singleton which contains objects like the {@link MobRepository} for players and NPCs. It should
* only contain things relevant to the in-game world and not classes which deal with I/O and such (these may be better
* off inside some custom {@link Service} or other code, however, the circumstances are rare).
- *
+ *
* @author Graham
*/
public final class World {
/**
* Represents the different status codes for registering a player.
- *
+ *
* @author Graham
*/
public enum RegistrationStatus {
@@ -80,7 +80,7 @@ public final class World {
/**
* The command dispatcher.
*/
- private CommandDispatcher commandDispatcher = new CommandDispatcher();
+ private final CommandDispatcher commandDispatcher = new CommandDispatcher();
/**
* The EventListenerChainSet for this World.
@@ -136,7 +136,7 @@ public final class World {
/**
* Gets the command dispatcher.
- *
+ *
* @return The command dispatcher.
*/
public CommandDispatcher getCommandDispatcher() {
@@ -145,7 +145,7 @@ public final class World {
/**
* Gets the npc repository.
- *
+ *
* @return The npc repository.
*/
public MobRepository getNpcRepository() {
@@ -155,7 +155,7 @@ public final class World {
/**
* Gets the {@link Player} with the specified username. Note that this will return {@code null} if the player is
* offline.
- *
+ *
* @param username The username.
* @return The player.
*/
@@ -165,7 +165,7 @@ public final class World {
/**
* Gets the player repository.
- *
+ *
* @return The player repository.
*/
public MobRepository getPlayerRepository() {
@@ -174,7 +174,7 @@ public final class World {
/**
* Gets the plugin manager.
- *
+ *
* @return The plugin manager.
*/
public PluginManager getPluginManager() {
@@ -183,7 +183,7 @@ public final class World {
/**
* Gets this world's {@link RegionRepository}.
- *
+ *
* @return The RegionRepository.
*/
public RegionRepository getRegionRepository() {
@@ -192,7 +192,7 @@ public final class World {
/**
* Gets the release number of this world.
- *
+ *
* @return The release number.
*/
public int getReleaseNumber() {
@@ -201,14 +201,14 @@ public final class World {
/**
* Initialises the world by loading definitions from the specified file system.
- *
+ *
* @param release The release number.
* @param fs The file system.
* @param manager The plugin manager. TODO move this.
* @throws Exception If any definitions could not be loaded or there was a failure when loading plugins.
*/
public void init(int release, IndexedFileSystem fs, PluginManager manager) throws Exception {
- this.releaseNumber = release;
+ releaseNumber = release;
ItemDefinitionDecoder itemDecoder = new ItemDefinitionDecoder(fs);
ItemDefinition[] items = itemDecoder.decode();
@@ -247,7 +247,7 @@ public final class World {
/**
* Checks if the {@link Player} with the specified name is online.
- *
+ *
* @param username The name.
* @return {@code true} if the player is online, otherwise {@code false}.
*/
@@ -257,7 +257,7 @@ public final class World {
/**
* Adds an {@link EventListener}, listening for an {@link Event} of the specified type.
- *
+ *
* @param type The type of the Event.
* @param listener The EventListener.
*/
@@ -274,7 +274,7 @@ public final class World {
/**
* Registers the specified npc.
- *
+ *
* @param npc The npc.
* @return {@code true} if the npc registered successfully, otherwise {@code false}.
*/
@@ -296,7 +296,7 @@ public final class World {
/**
* Registers the specified player.
- *
+ *
* @param player The player.
* @return A {@link RegistrationStatus}.
*/
@@ -320,7 +320,7 @@ public final class World {
/**
* Schedules a new task.
- *
+ *
* @param task The {@link ScheduledTask}.
* @return {@code true} if the task was added successfully.
*/
@@ -331,7 +331,7 @@ public final class World {
/**
* Spawns the specified {@link Entity}, which must not be a {@link Player} or an {@link Npc}, which have their own
* register methods.
- *
+ *
* @param entity The Entity.
*/
public void spawn(Entity entity) {
@@ -344,7 +344,7 @@ public final class World {
/**
* Submits the specified {@link Event}, passing it to the listeners..
- *
+ *
* @param event The Event.
* @return {@code true} if the Event should proceed, {@code false} if not.
*/
@@ -354,7 +354,7 @@ public final class World {
/**
* Unregisters the specified {@link Npc}.
- *
+ *
* @param npc The npc.
*/
public void unregister(final Npc npc) {
@@ -369,7 +369,7 @@ public final class World {
/**
* Unregisters the specified player.
- *
+ *
* @param player The player.
*/
public void unregister(final Player player) {
@@ -385,12 +385,12 @@ public final class World {
}
/**
- * Adds entities to regions in the {@link RegionRepository}.
- *
+ * Adds entities to regions in the {@link RegionRepository}. By default, we do not notify listeners.
+ *
* @param entities The entities.
*/
private void placeEntities(Entity... entities) {
- Arrays.stream(entities).forEach(entity -> regions.fromPosition(entity.getPosition()).addEntity(entity));
+ Arrays.stream(entities).forEach(entity -> regions.fromPosition(entity.getPosition()).addEntity(entity, false));
}
}
\ No newline at end of file
diff --git a/src/org/apollo/game/model/WorldConstants.java b/src/org/apollo/game/model/WorldConstants.java
index 24388fa5..b76c47e3 100644
--- a/src/org/apollo/game/model/WorldConstants.java
+++ b/src/org/apollo/game/model/WorldConstants.java
@@ -2,7 +2,7 @@ package org.apollo.game.model;
/**
* Holds world-related constants.
- *
+ *
* @author Graham
*/
public final class WorldConstants {
diff --git a/src/org/apollo/game/model/area/EntityUpdateType.java b/src/org/apollo/game/model/area/EntityUpdateType.java
index 4ce50c7c..4f7365fa 100644
--- a/src/org/apollo/game/model/area/EntityUpdateType.java
+++ b/src/org/apollo/game/model/area/EntityUpdateType.java
@@ -2,7 +2,7 @@ package org.apollo.game.model.area;
/**
* A type of update that an Entity in a {@link Region} may have.
- *
+ *
* @author Major
*/
public enum EntityUpdateType {
diff --git a/src/org/apollo/game/model/area/Region.java b/src/org/apollo/game/model/area/Region.java
index e5caff4b..e4a80263 100644
--- a/src/org/apollo/game/model/area/Region.java
+++ b/src/org/apollo/game/model/area/Region.java
@@ -26,285 +26,307 @@ import com.google.common.collect.ImmutableSet;
/**
* An 8x8 area of the map.
- *
+ *
* @author Major
*/
public final class Region {
- /**
- * A {@link RegionListener} for {@link UpdateOperation}s.
- *
- * @author Major
- */
- private static final class UpdateRegionListener implements RegionListener {
+ /**
+ * A {@link RegionListener} for {@link UpdateOperation}s.
+ *
+ * @author Major
+ */
+ private static final class UpdateRegionListener implements RegionListener {
- @Override
- public void execute(Region region, Entity entity, EntityUpdateType update) {
- EntityType type = entity.getEntityType();
- if (type != EntityType.PLAYER && type != EntityType.NPC && (type != EntityType.STATIC_OBJECT || update == EntityUpdateType.REMOVE)) {
- region.record(entity, update);
- }
- }
+ @Override
+ public void execute(Region region, Entity entity, EntityUpdateType update) {
+ EntityType type = entity.getEntityType();
+ if (type != EntityType.PLAYER && type != EntityType.NPC) {
+ region.record(entity, update);
+ }
+ }
- }
+ }
- /**
- * The width and length of a Region, in tiles.
- */
- public static final int SIZE = 8;
+ /**
+ * The width and length of a Region, in tiles.
+ */
+ public static final int SIZE = 8;
- static final long start = System.currentTimeMillis();
+ static final long start = System.currentTimeMillis();
- /**
- * The default size of newly-created sets, to reduce memory usage.
- */
- private static final int DEFAULT_SET_SIZE = 2;
+ /**
+ * The default size of newly-created sets, to reduce memory usage.
+ */
+ private static final int DEFAULT_SET_SIZE = 2;
- /**
- * The RegionCoordinates of this Region.
- */
- private final RegionCoordinates coordinates;
+ /**
+ * The RegionCoordinates of this Region.
+ */
+ private final RegionCoordinates coordinates;
- /**
- * The Map of Positions to Entities in that Position.
- */
- private final Map> entities = new HashMap<>();
+ /**
+ * The Map of Positions to Entities in that Position.
+ */
+ private final Map> entities = new HashMap<>();
- /**
- * A List of RegionListeners registered to this Region.
- */
- private final List listeners = new ArrayList<>();
+ /**
+ * A List of RegionListeners registered to this Region.
+ */
+ private final List listeners = new ArrayList<>();
- /**
- * The CollisionMatrix.
- */
- private final CollisionMatrix[] matrices = CollisionMatrix.createMatrices(Position.HEIGHT_LEVELS, SIZE, SIZE);
+ /**
+ * The CollisionMatrix.
+ */
+ private final CollisionMatrix[] matrices = CollisionMatrix.createMatrices(Position.HEIGHT_LEVELS, SIZE, SIZE);
- /**
- * The Set containing RegionUpdateMessages which can be sent to add every non-Mob Entity in this Region.
- */
- private final List> snapshots = new ArrayList<>(Position.HEIGHT_LEVELS);
+ /**
+ * The Set containing RegionUpdateMessages which can be sent to add every non-Mob Entity in this Region.
+ */
+ private final List