Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Modules.NameModule;
import com.Acrobot.Breeze.Config.BreezeConfiguration;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.ChestShop.Events.SignInformationEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import java.io.File;
/... | 286 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Modules.Prefix;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.ChestShop.Events.MessageEvent;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
/**
* @author Acrobot
*/
public class Prefix extends BreezePl... | 196 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Modules.Language;
import com.Acrobot.Breeze.Config.BreezeConfiguration;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.ChestShop.Events.MessageEvent;
import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
... | 229 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Modules.ShopModule;
import com.Acrobot.Breeze.Config.BreezeConfiguration;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.ChestShop.Events.ShopSignClickEvent;
import com.Acrobot.ChestShop.Events.SignInformationEvent;
import com.Acrobot.ChestShop.Events.Tran... | 389 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Modules.Debug;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.ChestShop.Events.SignInformationEvent;
import com.Acrobot.ChestShop.Events.TransactionEvent;
import org.bukkit.Bukkit;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import org.b... | 465 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop;
import org.bukkit.entity.Player;
/**
* @author Acrobot
*/
public enum Permission {
SHOP_CREATION_BUY("ChestShop.shop.create.buy"),
SHOP_CREATION_SELL("ChestShop.shop.create.sell"),
SHOP_CREATION_ID("ChestShop.shop.create."),
BUY("ChestShop.shop.buy"),
BUY_ID("Che... | 219 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop;
import com.Acrobot.Breeze.Breeze;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.ChestShop.Commands.ItemInfo;
import com.Acrobot.ChestShop.Modules.Debug.DebugModule;
import com.Acrobot.ChestShop.Modules.Language.Language;
import com.Acrobot.ChestShop.Modu... | 457 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Events;
import com.Acrobot.Breeze.Events.Cancelables.CancellableEvent;
import org.bukkit.event.HandlerList;
import java.util.HashMap;
import java.util.Map;
/**
* @author Acrobot
*/
public class TransactionEvent extends CancellableEvent {
private static final HandlerList handlers =... | 332 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Events;
import org.bukkit.block.Sign;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* @author Acrobot
*/
public class SignInformationEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private Sign sign;
private do... | 276 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Events;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* @author Acrobot
*/
public class MessageEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private final String codeName;
private String message;
public ... | 153 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Events;
import com.Acrobot.Breeze.Events.Cancelables.CancellableEvent;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.block.Action;
/**
* @author Acrobot
*/
public class ShopSignClickEvent extends CancellableE... | 206 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Commands;
import com.Acrobot.Breeze.Breeze;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import org.bukkit.command.CommandSender;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.craftbukkit.CraftServer;
import java.lang.reflect.Field;
import java.lang.reflect.I... | 892 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Commands;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Acrobot
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface Command {... | 130 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Config;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* @... | 536 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Config;
/**
* @author Acrobot
*/
public class ConfigValue {
public Object value;
public String comment;
public ConfigValue(Object value, String comment) {
this.value = value;
this.comment = comment;
}
public ConfigValue(Object value) {
this.val... | 168 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Utilities;
import org.bukkit.CoalType;
import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.TreeSpecies;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.*;
import java.util.HashMap;
import java.util.Map;
impo... | 1,847 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Utilities;
/**
* @author Acrobot
*/
public class NumberUtil {
/**
* Checks if the string is a integer
*
* @param string string to check
* @return Is the string integer?
*/
public static boolean isInteger(String string) {
try {
Integer.pa... | 431 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Utilities;
/**
* @author Acrobot
*/
public class StringUtil {
/**
* Capitalizes every first letter of a word
*
* @param string String to reformat
* @param separator Word separator
* @return Reformatted string
*/
public static String capitalizeFirst... | 293 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Utilities;
import com.Acrobot.ChestShop.Events.MessageEvent;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
/**
* @author Acrobot
*/
public class EventUtils {
/**
* Sends a message from the given MessageEvent
*
* @param event Event that contains the... | 137 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze;
import com.Acrobot.Breeze.Commands.CommandManager;
import com.Acrobot.Breeze.Config.BreezeConfiguration;
import com.Acrobot.Breeze.Config.ConfigValue;
import com.Acrobot.Breeze.Events.EventManager;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.Breeze.Plugin... | 926 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Events.Cancelables;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
/**
* @author Acrobot
*/
public abstract class CancellableEvent extends Event implements Cancellable {
protected boolean cancelled;
/**
* @return Is the event cancelled?
*/
publi... | 117 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Events.Cancelables;
/**
* @author Acrobot
*/
public abstract class CancellableMessageEvent extends CancellableEvent {
protected String message;
/**
* Sets the cancel message
*
* @param msg The message
*/
public void setCancelMessage(String msg) {
me... | 128 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Events;
import com.Acrobot.Breeze.Breeze;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import org.bukkit.Bukkit;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.... | 414 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Plugins;
import com.Acrobot.Breeze.Breeze;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import com.Acrobot.Breeze.Plugins.Loader.JavaPluginLoader;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
/**
* Manager loaded Breeze plugins
*
* @author Acrobot... | 716 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Plugins.BreezePlugin;
/**
* @author Acrobot
*/
public interface NamedPlugin {
/**
* The plugin's name should be returned here
*
* @return Plugin's name
*/
public String getName();
}
| 56 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Plugins.BreezePlugin;
/**
* @author Acrobot
*/
public interface EnablingPlugin {
/**
* Called when the plugin is enabled
*/
public void onEnable();
/**
* Called when the plugin is disabled
* Usually events should be unregistered here (if possible) and stati... | 84 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Plugins.BreezePlugin;
import com.Acrobot.Breeze.Breeze;
import java.io.File;
import java.util.logging.Logger;
/**
* @author Acrobot
*/
public abstract class BreezePlugin implements EnablingPlugin, NamedPlugin {
private File dataFolder;
private Breeze breeze;
public BreezePlu... | 357 |
github-java-corpus | 2,012 | package com.Acrobot.Breeze.Plugins.Loader;
import com.Acrobot.Breeze.Plugins.BreezePlugin.BreezePlugin;
import org.bukkit.configuration.Configuration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.InvalidDescriptionException;
import java.io.File;
import java.io.FileNotFoundException... | 829 |
github-java-corpus | 2,012 | package com.Acrobot.ChestShop.Tests;
import com.Acrobot.Breeze.Utilities.MaterialUtil;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @a... | 430 |
github-java-corpus | 2,012 | package org.hyperion.util;
import static org.junit.Assert.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.junit.Test;
public class TestStreams {
@Test
public void testWriteString() throws IOException {
ByteArrayOutputStream os =... | 428 |
github-java-corpus | 2,012 | package org.hyperion.rs2.util;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.hyperion.rs2.model.Entity;
import org.hyperion.rs2.model.Damage.HitType;
import org.hyperion.rs2.model.region.Region;
import org.hyperion.rs2.util.Entit... | 1,332 |
github-java-corpus | 2,012 | package org.hyperion.rs2.model.container;
import static org.junit.Assert.*;
import java.util.Collection;
import org.hyperion.rs2.model.Item;
import org.hyperion.rs2.model.ItemDefinition;
import org.hyperion.rs2.model.container.Container;
import org.hyperion.rs2.model.container.ContainerListener;
import org... | 1,344 |
github-java-corpus | 2,012 | package org.hyperion.data;
import org.apache.mina.core.buffer.IoBuffer;
/**
* Represents a type that can be converted to and from an <code>IoBuffer</code>
* allowing it to be transferred between the login and world server.
* @author Graham Edgecombe
*
*/
public interface Persistable {
/**
* Ser... | 132 |
github-java-corpus | 2,012 | package org.hyperion.util;
import java.nio.ByteBuffer;
/**
* Buffer utility class.
* @author Graham Edgecombe
*
*/
public class Buffers {
/**
* Reads a null terminated string from a byte buffer.
* @param buffer The buffer.
* @return The string.
*/
public static String readString(ByteBuf... | 131 |
github-java-corpus | 2,012 | package org.hyperion.util;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.conc... | 799 |
github-java-corpus | 2,012 | package org.hyperion.util;
/**
* Common constants.
* @author Graham Edgecombe
*
*/
public class CommonConstants {
/**
* Login server port.
*/
public static final int LOGIN_PORT = 43596;
}
| 49 |
github-java-corpus | 2,012 | package org.hyperion.util;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
/**
* A utility class that assists in dealing with <code>InputStream</code> and
* <code>OutputStream</code> classes.
* @author Graham Edgecombe
*
*/
public class Streams {
/**
* Writ... | 628 |
github-java-corpus | 2,012 | package org.hyperion.util.login;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.mina.filter.codec.ProtocolEncoderOutput;
/**
* Login protocol encoding class.
* @author Graham Edgecombe
*
... | 190 |
github-java-corpus | 2,012 | package org.hyperion.util.login;
import org.apache.mina.core.buffer.IoBuffer;
/**
* Represents a packet between the login server and world server.
* @author Graham Edgecombe
*
*/
public class LoginPacket {
/**
* Authentication request opcode.
*/
public static final int AUTH = 0;
/**
... | 430 |
github-java-corpus | 2,012 | package org.hyperion.util.login;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;
/**
* A factory which produces codecs for the login server protoc... | 175 |
github-java-corpus | 2,012 | package org.hyperion.util.login;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
/**
* Login protocol decoding class.
* @author Graham Edgeco... | 307 |
github-java-corpus | 2,012 | package org.hyperion.ls;
import java.util.LinkedList;
import java.util.List;
import org.hyperion.rs2.util.NameUtils;
/**
* Represents a single player in the login server.
* @author Graham Edgecombe
*
*/
public class PlayerData {
/**
* The player name.
*/
private String name;
/**
... | 324 |
github-java-corpus | 2,012 | package org.hyperion.ls;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Logger;
import org.apache.mina.core.service.IoAcceptor;
import org.apache.mina.transport.socket.nio.NioS... | 526 |
github-java-corpus | 2,012 | package org.hyperion.ls;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.hyperion.rs2.WorldLoader.LoginResult;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.mod... | 1,180 |
github-java-corpus | 2,012 | package org.hyperion.ls;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.hyperion.rs2.util.IoBufferUtils;
import org.hyperion.util.login.LoginCode... | 581 |
github-java-corpus | 2,012 | package org.hyperion.ls;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;
import org.hyperion.rs2.util.NameUtils;
/**
* Manages all of the nodes in the login server.
* @author Graham Edgecombe
*
*/
public class NodeManager {
/**
*... | 749 |
github-java-corpus | 2,012 | package org.hyperion;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.hyperion.fileserver.FileServer;
import org.hyperion.rs2.RS2Server;
import org.hyperion.rs2.model.World;
/**
* A class to start both the file and game servers.
* @author Graham Edgecombe
*
*/
public cla... | 232 |
github-java-corpus | 2,012 | package org.hyperion.cache.obj;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.hyperion.cache.Archive;
import org.hyperion.cache.Cache;
import org.hyperion.cache.index.impl.StandardIndex;
import org.hyperion.cache.util.ByteBufferUtils;
import org.hyperion.rs2.model.GameObjectDefinition;
... | 1,132 |
github-java-corpus | 2,012 | package org.hyperion.cache.obj;
import org.hyperion.rs2.model.GameObjectDefinition;
/**
* An object definition listener, which is notified when object definitions
* have been parsed.
* @author Graham Edgecombe
*
*/
public interface ObjectDefinitionListener {
/**
* Called when an object definiti... | 90 |
github-java-corpus | 2,012 | package org.hyperion.cache;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInput... | 1,139 |
github-java-corpus | 2,012 | package org.hyperion.cache;
import java.nio.ByteBuffer;
/**
* Represents a single cache file.
* @author Graham Edgecombe
*
*/
public class CacheFile {
/**
* The cache id.
*/
private int cache;
/**
* The file id.
*/
private int file;
/**
* The file data.
*/
private B... | 303 |
github-java-corpus | 2,012 | package org.hyperion.cache.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.zip.GZIPInputStream;
import org.hyperion.cache.CacheFile;
/**
* A utility class for GZIP.
* @... | 305 |
github-java-corpus | 2,012 | package org.hyperion.cache.util;
import java.nio.ByteBuffer;
/**
* A utility class for byte buffers.
* @author Graham Edgecombe
*
*/
public class ByteBufferUtils {
/**
* Gets a smart.
* @param buf The buffer.
* @return The smart.
*/
public static int getSmart(ByteBuffer buf) {
int p... | 220 |
github-java-corpus | 2,012 | package org.hyperion.cache;
/**
* Holds information about a single file in the archived cache.
* @author Graham Edgecombe
*
*/
public class ArchiveFile {
/**
* The name hash.
*/
private int hash;
/**
* The uncompressed size.
*/
private int uncompressedSize;
/**
* The compre... | 346 |
github-java-corpus | 2,012 | package org.hyperion.cache.index;
/**
* An index points to a file in the cache.
* @author Graham Edgecombe
*
*/
public abstract class Index {
/**
* The identifier.
*/
private int identifier;
/**
* Creates the index.
* @param identifier The identifier.
*/
public Index(int identif... | 112 |
github-java-corpus | 2,012 | package org.hyperion.cache.index.impl;
import org.hyperion.cache.index.Index;
/**
* A standard index where each index maps to a single file.
* @author Graham Edgecombe
*
*/
public class StandardIndex extends Index {
/**
* The file.
*/
private int file;
/**
* Creates the index.
* @p... | 141 |
github-java-corpus | 2,012 | package org.hyperion.cache.index.impl;
import org.hyperion.cache.index.Index;
/**
* A map index maps a single area to a map file and landscape file.
* @author Graham Edgecombe
*
*/
public class MapIndex extends Index {
/**
* The map file.
*/
private int mapFile;
/**
* The landscape f... | 312 |
github-java-corpus | 2,012 | package org.hyperion.cache.index;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.hyperion.cache.Archive;
import org.hyperion.cache.Cache;
import org.hyperion.cache.index.impl.MapIndex;
import org.hyperion.cache.index.impl.StandardIndex;
/**
* The <code>IndexTable</code> class manages ... | 794 |
github-java-corpus | 2,012 | package org.hyperion.cache.map;
import org.hyperion.rs2.model.Tile;
/**
* A map listener is notified when a tile is parsed by a
* <code>MapParser</code>.
* @author Graham Edgecombe
*
*/
public interface MapListener {
/**
* Handles action when a tile is parsed.
* @param tile The tile.
*/
... | 88 |
github-java-corpus | 2,012 | package org.hyperion.cache.map;
import org.hyperion.rs2.model.GameObject;
/**
* A landscape listener is notified when an object is parsed by a
* <code>LandscapeParser</code>.
* @author Graham Edgecombe
*
*/
public interface LandscapeListener {
/**
* Handles actions when an object is parsed.
... | 92 |
github-java-corpus | 2,012 | package org.hyperion.cache.map;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.hyperion.cache.Cache;
import org.hyperion.cache.index.impl.MapIndex;
import org.hyperion.cache.util.ByteBufferUtils;
import org.hyperion.cache.util.ZipUtils;
import org.hyperion.rs2.model.GameObject;
import or... | 587 |
github-java-corpus | 2,012 | package org.hyperion.cache.map;
import org.hyperion.cache.Cache;
/**
* A class which parses map files in the game cache.
* @author Graham Edgecombe
*
*/
public class MapParser {
/**
* The cache.
*/
private Cache cache;
/**
* The area id.
*/
private int area;
/**
* The ma... | 181 |
github-java-corpus | 2,012 | package org.hyperion.cache;
/**
* An exception which is thrown when a cache is invalid
* (i.e. corrupt or not a cache).
* @author Graham Edgecombe
*
*/
public class InvalidCacheException extends Exception {
/**
* The serial version unique id.
*/
private static final long serialVersionUID = 623... | 148 |
github-java-corpus | 2,012 | package org.hyperion.cache;
import java.io.Closeable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel.MapMode;
import org.hyperion.cache.Cache;
import org.hyperion.cache.... | 1,455 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import java.util.Queue;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.ChatMessage;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.UpdateFlags.UpdateFlag;
import org.hyperion.rs2.task.Task;
/**
* A task which is executed before a... | 297 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import java.net.SocketAddress;
import java.util.logging.Logger;
import org.apache.mina.core.session.IoSession;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.World;
import org.hyperion.rs2.task.Task;
/**
* A tas... | 255 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.task.Task;
/**
* A task which stops the game engine.
* @author Graham Edgecombe
*
*/
public class DeathTask implements Task {
@Override
public void execute(GameEngine context) {
if(context.isRunning(... | 84 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.task.Task;
/**
* Performs garbage collection and finalization.
* @author Graham Edgecombe
*
*/
public class CleanupTask implements Task {
@Override
public void execute(GameEngine context) {
context.s... | 99 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.World;
import org.hyperion.rs2.task.Task;
/**
* A task that is executed when a player has logged in.
* @author Graham Edgecombe
*
*/
public class SessionLoginTask... | 156 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.NPC;
import org.hyperion.rs2.task.Task;
/**
* A task which resets an NPC after an update cycle.
* @author Graham Edgecombe
*
*/
public class NPCResetTask implements Task {
/**
* The npc to rese... | 164 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import java.util.logging.Logger;
import org.apache.mina.core.session.IoSession;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.task.Task;
/**
* A task that is executed when a session is opened.
* @author Graham Edgecombe
*
*/
public class SessionOpene... | 184 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.task.Task;
/**
* A task which resets a player after an update cycle.
* @author Graham Edgecombe
*
*/
public class PlayerResetTask implements Task {
/**
* The pla... | 180 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Logger;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.task.Task;
/**
* A utility class that wraps around another, benchmarking it.
* @author Graham Edgecombe
*
*/
public cl... | 316 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.NPC;
import org.hyperion.rs2.task.Task;
/**
* A task which performs pre-update tasks for an NPC.
* @author Graham Edgecombe
*
*/
public class NPCTickTask implements Task {
/**
* The npc who we ... | 219 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import java.util.Iterator;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.Entity;
import org.hyperion.rs2.model.Location;
import org.hyperion.rs2.model.NPC;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.UpdateFlags;
import org.hype... | 2,284 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import org.apache.mina.core.session.IoSession;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.net.Packet;
import org.hyperion.rs2.net.PacketManager;
import org.hyperion.rs2.task.Task;
/**
* A task that is executed when a session receives a message.
* @autho... | 204 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task.impl;
import java.util.Iterator;
import org.hyperion.rs2.GameEngine;
import org.hyperion.rs2.model.Appearance;
import org.hyperion.rs2.model.ChatMessage;
import org.hyperion.rs2.model.Entity;
import org.hyperion.rs2.model.Item;
import org.hyperion.rs2.model.Location;
import org... | 5,198 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task;
import org.hyperion.rs2.GameEngine;
/**
* A task is a class which carries out a unit of work.
* @author Graham Edgecombe
*
*/
public interface Task {
/**
* Executes the task. The general contract of the execute method is that it
* may take any action whatsoever.
... | 100 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutionException;
import org.hyperion.rs2.GameEngine;
/**
* A task which can execute multiple child tasks simultaneously.
* @author ... | 247 |
github-java-corpus | 2,012 | package org.hyperion.rs2.task;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.hyperion.rs2.GameEngine;
/**
* A task which executes a group of tasks in a guaranteed sequence.
* @author Graham Edgecombe
*
*/
public class Consec... | 190 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event;
/**
* Represents a task that is executed in the future, once or periodically.
* @author Graham Edgecombe
*
*/
public abstract class Event {
/**
* The delay, in milliseconds.
*/
private long delay;
/**
* The running flag.
*/
private boolean running = ... | 338 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event.impl;
import org.hyperion.rs2.event.Event;
import org.hyperion.rs2.model.Entity;
import org.hyperion.rs2.model.EntityCooldowns;
import org.hyperion.rs2.model.EntityCooldowns.CooldownFlags;
/**
* This event handles the expiry of a cooldown.
* @author Brett Russell
*
*/
@S... | 206 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event.impl;
import org.hyperion.rs2.event.Event;
/**
* Handles all events related to combat.
* @author Brett
*
*/
public class CombatEvent extends Event {
/**
* The cycle time, in milliseconds.
*/
public static final int CYCLE_TIME = 600;
/**
* Creates the updat... | 119 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event.impl;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.hyperion.rs2.event.Event;
import org.hyperion.rs2.model.NPC;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.World;
import org.hyperion.rs2.task.ConsecutiveTask;
... | 536 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event.impl;
import org.hyperion.rs2.event.Event;
import org.hyperion.rs2.model.Entity;
import org.hyperion.rs2.model.NPC;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.Skills;
import org.hyperion.rs2.model.World;
/**
* The death event handles player and npc de... | 259 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event.impl;
import org.hyperion.rs2.event.Event;
import org.hyperion.rs2.model.World;
import org.hyperion.rs2.task.impl.CleanupTask;
/**
* An event which runs periodically and performs tasks such as garbage
* collection.
* @author Graham Edgecombe
*
*/
public class CleanupEve... | 158 |
github-java-corpus | 2,012 | package org.hyperion.rs2.event;
import java.util.concurrent.TimeUnit;
import org.hyperion.rs2.GameEngine;
/**
* A class that manages <code>Event</code>s for a specific
* <code>GameEngine</code>.
* @author Graham Edgecombe
*
*/
public class EventManager {
/**
* The <code>GameEngine</code> to ... | 358 |
github-java-corpus | 2,012 | package org.hyperion.rs2;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ScheduledExecutorService;
import ... | 1,098 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import org.hyperion.rs2.Constants;
import org.hyperion.rs2.model.Item;
import org.hyperion.rs2.model.Palette;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.model.Skills;
import org.hyperion.rs2.model.Palette.PaletteTile;
import org.hyperion.rs2.model.container.Equi... | 2,507 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;
/**
* A factory which produces codecs for the RuneScape protocol.
... | 335 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net.ondemand;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.concurrent.BlockingQueue;
import org.hyperion.cache.Cache;
import org.hyperion.cache.InvalidCacheException;
/**
* <p>A class which waits for ondemand requests to queue up and then processes
... | 328 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net.ondemand;
import java.io.IOException;
import org.apache.mina.core.session.IoSession;
import org.hyperion.cache.Cache;
import org.hyperion.rs2.net.PacketBuilder;
/**
* <p>Represents a single 'ondemand' request. Ondemand requests are created
* when the client requests a file fr... | 539 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net.ondemand;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
/**
* <p>The ondemand pool manages an executor service with various
* ondemand workers and r... | 481 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
/**
* <p>An implementation of an ISAAC cipher. See
* <a href="http://en.wikipedia.org/wiki/ISAAC_(cipher)">
* http://en.wikipedia.org/wiki/ISAAC_(cipher)</a> for more information.</p>
*
* <p>This implementation is based on the one written by Bob Jenkins, which is
* availabl... | 1,997 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import org.apache.mina.core.buffer.IoBuffer;
import org.hyperion.rs2.util.IoBufferUtils;
/**
* Represents a single packet.
* @author Graham Edgecombe
*
*/
public class Packet {
/**
* The type of packet.
* @author Graham Edgecombe
*
*/
public enum Type {
... | 1,883 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
import org.hyperion.rs2.Constants;
import org.hyperion.rs2.model.Pla... | 695 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.mina.core.session.IoSession;
import org.hyperion.rs2.model.Player;
import org.hyperion.rs2.packet.*;
/**
* Managers <code>PacketHandler</code>s.
* @author Graham Edgecombe
*
*/
public cl... | 412 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.mina.filter.codec.ProtocolEncoderOutput;
import org.hyperion.rs2.model.Player;
/**
* Game protocol encoding class.
... | 481 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import java.security.SecureRandom;
import java.util.logging.Logger;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
... | 2,409 |
github-java-corpus | 2,012 | package org.hyperion.rs2.net;
import org.apache.mina.core.buffer.IoBuffer;
import org.hyperion.rs2.net.Packet.Type;
/**
* A utility class for building packets.
* @author Graham Edgecombe
*
*/
public class PacketBuilder {
/**
* Bit mask array.
*/
public static final int[] BIT_MASK_OUT = new ... | 2,623 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.