+ TPacket
+ TJson
This commit is contained in:
@@ -5,6 +5,8 @@ import com.ilummc.tlib.logger.TLogger;
|
||||
import me.skymc.taboolib.TabooLibLoader;
|
||||
import me.skymc.taboolib.commands.builder.SimpleCommandBuilder;
|
||||
import me.skymc.taboolib.common.configuration.TConfiguration;
|
||||
import me.skymc.taboolib.common.packet.TPacketHandler;
|
||||
import me.skymc.taboolib.common.packet.TPacketListener;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -28,6 +30,14 @@ public class TInjectLoader implements TabooLibLoader.Loader {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
// TPacketListener Inject
|
||||
injectTypes.put(TPacketListener.class, (plugin, field, args) -> {
|
||||
try {
|
||||
TPacketHandler.addListener(plugin, ((TPacketListener) field.get(null)));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
// TConfiguration Inject
|
||||
injectTypes.put(TConfiguration.class, (plugin, field, args) -> {
|
||||
if (args.length == 0) {
|
||||
|
||||
Reference in New Issue
Block a user