Adding a packet handler adapter, for symmetri with PacketAdapter.

This commit is contained in:
Kristian S. Stangeland 2013-07-17 05:51:22 +02:00
parent e25ab31316
commit 8f30199a22

View File

@ -0,0 +1,33 @@
package com.comphenix.protocol.events;
import org.bukkit.plugin.Plugin;
/**
* Represents an adapter version of the output handler interface.
*
* @author Kristian
*/
public abstract class PacketOutputAdapter implements PacketOutputHandler {
private final Plugin plugin;
private final ListenerPriority priority;
/**
* Construct a new packet output adapter with the given values.
* @param priority - the output handler priority.
* @param plugin - the owner plugin.
*/
public PacketOutputAdapter(Plugin plugin, ListenerPriority priority) {
this.priority = priority;
this.plugin = plugin;
}
@Override
public Plugin getPlugin() {
return plugin;
}
@Override
public ListenerPriority getPriority() {
return priority;
}
}