blob: 6a4ecbf3e35476e55e088b4dd6117fd1acbb56bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package de.hype.bbsentials.packets;
import java.util.function.Consumer;
public class Packet<T extends AbstractPacket> {
private final Class<T> clazz;
private final Consumer<T> consumer;
public Packet(Class<T> clazz, Consumer<T> consumer) {
this.clazz = clazz;
this.consumer = consumer;
}
public String getName() {
return clazz.getSimpleName();
}
public Class<T> getClazz() {
return clazz;
}
public Consumer<T> getConsumer() {
return consumer;
}
}
|