mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 11:36:51 +01:00
Adding a packet handler adapter, for symmetri with PacketAdapter.
This commit is contained in:
parent
e25ab31316
commit
8f30199a22
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user