Skip to content

Instantly share code, notes, and snippets.

View PedroMPagani's full-sized avatar
💀
I may be slow to respond.

Pedro Paulo Monte Pagani PedroMPagani

💀
I may be slow to respond.
View GitHub Profile
@PedroMPagani
PedroMPagani / MobSpawner.java
Created June 12, 2021 14:48 — forked from aadnk/MobSpawner.java
Spawn a fake mob using ProtocolLib
package com.comphenix.example;
import java.lang.reflect.InvocationTargetException;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
@PedroMPagani
PedroMPagani / RedisAPI.java
Last active July 19, 2022 14:00
Redis util class - clean - fast - reliable - high volume of traffic
import com.github.luben.zstd.Zstd;
import io.lettuce.core.RedisClient;
import io.lettuce.core.RedisURI;
import io.lettuce.core.api.StatefulRedisConnection;
import io.lettuce.core.codec.ByteArrayCodec;
import io.lettuce.core.pubsub.RedisPubSubAdapter;
import io.lettuce.core.pubsub.StatefulRedisPubSubConnection;
import io.lettuce.core.pubsub.api.async.RedisPubSubAsyncCommands;
import io.netty.util.concurrent.DefaultThreadFactory;
import org.bukkit.Bukkit;
This is a packet system that can be used with the RedisAPI in my gist located at:
https://gist.github.com/PedroMPagani/b6fb2a5d54dd2912f98126fff4126051