Search in sources :

Example 1 with PacketEvent

use of com.comphenix.protocol.events.PacketEvent in project MyPet by xXKeyleXx.

the class ProtocolLibHook method registerEnderDragonRotationFixLegacy.

private void registerEnderDragonRotationFixLegacy() {
    ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(MyPetApi.getPlugin(), getFixedPackets()) {

        @Override
        public void onPacketSending(PacketEvent event) {
            if ((checkTemporaryPlayers && event.isPlayerTemporary()) || event.isCancelled()) {
                return;
            }
            PacketContainer packet = event.getPacket();
            final Entity entity = packet.getEntityModifier(event).readSafely(0);
            if (entity instanceof MyPetBukkitEntity && ((MyPetBukkitEntity) entity).getPetType() == MyPetType.EnderDragon) {
                switch(packet.getType().name()) {
                    case "ENTITY_TELEPORT":
                    case "ENTITY_HEAD_ROTATION":
                        {
                            byte angle = packet.getBytes().read(0);
                            angle += Byte.MAX_VALUE;
                            packet.getBytes().write(0, angle);
                            break;
                        }
                    case "ENTITY_LOOK":
                    case "ENTITY_MOVE_LOOK":
                    case "REL_ENTITY_MOVE_LOOK":
                    case "VEHICLE_MOVE":
                        byte angle = packet.getBytes().read(3);
                        angle += Byte.MAX_VALUE;
                        packet.getBytes().write(3, angle);
                        break;
                }
            }
        }
    });
}
Also used : Entity(org.bukkit.entity.Entity) MyPetBukkitEntity(de.Keyle.MyPet.api.entity.MyPetBukkitEntity) PacketContainer(com.comphenix.protocol.events.PacketContainer) PacketAdapter(com.comphenix.protocol.events.PacketAdapter) PacketEvent(com.comphenix.protocol.events.PacketEvent) MyPetBukkitEntity(de.Keyle.MyPet.api.entity.MyPetBukkitEntity)

Example 2 with PacketEvent

use of com.comphenix.protocol.events.PacketEvent in project MyPet by xXKeyleXx.

the class ProtocolLibHook method registerEnderDragonFix.

private static void registerEnderDragonFix() {
    ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(MyPetApi.getPlugin(), PacketType.Play.Server.ENTITY_LOOK, PacketType.Play.Server.ENTITY_MOVE_LOOK, PacketType.Play.Server.ENTITY_TELEPORT) {

        @Override
        public void onPacketSending(PacketEvent event) {
            PacketContainer packet = event.getPacket();
            final Entity entity = packet.getEntityModifier(event).readSafely(0);
            // Now - are we dealing with an invisible slime?
            if (entity != null && entity instanceof MyPetBukkitEntity && ((MyPetBukkitEntity) entity).getPetType() == MyPetType.EnderDragon) {
                if (packet.getType() == PacketType.Play.Server.ENTITY_LOOK) {
                    // MyPetLogger.write("ENTITY_LOOK: " + packet.getBytes().getValues());
                    byte angle = packet.getBytes().read(3);
                    angle += Byte.MAX_VALUE;
                    packet.getBytes().write(3, angle);
                } else if (packet.getType() == PacketType.Play.Server.ENTITY_MOVE_LOOK) {
                    // MyPetLogger.write("ENTITY_MOVE_LOOK: " + packet.getBytes().getValues());
                    byte angle = packet.getBytes().read(3);
                    angle += Byte.MAX_VALUE;
                    packet.getBytes().write(3, angle);
                } else if (packet.getType() == PacketType.Play.Server.ENTITY_TELEPORT) {
                    // MyPetLogger.write("ENTITY_TELEPORT: " + packet.getBytes().getValues());
                    byte angle = packet.getBytes().read(1);
                    angle += Byte.MAX_VALUE;
                    packet.getBytes().write(1, angle);
                }
            }
        }
    });
}
Also used : Entity(org.bukkit.entity.Entity) MyPetBukkitEntity(de.Keyle.MyPet.api.entity.MyPetBukkitEntity) PacketContainer(com.comphenix.protocol.events.PacketContainer) PacketAdapter(com.comphenix.protocol.events.PacketAdapter) PacketEvent(com.comphenix.protocol.events.PacketEvent) MyPetBukkitEntity(de.Keyle.MyPet.api.entity.MyPetBukkitEntity)

Example 3 with PacketEvent

use of com.comphenix.protocol.events.PacketEvent in project MyPet by xXKeyleXx.

the class ProtocolLibHook method registerEnderDragonFix_post_1_9.

private static void registerEnderDragonFix_post_1_9() {
    ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(MyPetApi.getPlugin(), PacketType.Play.Server.ENTITY_LOOK, PacketType.Play.Server.ENTITY_MOVE_LOOK, PacketType.Play.Server.ENTITY_TELEPORT) {

        @Override
        public void onPacketSending(PacketEvent event) {
            PacketContainer packet = event.getPacket();
            final Entity entity = packet.getEntityModifier(event).readSafely(0);
            if (entity != null && entity instanceof MyPetBukkitEntity && ((MyPetBukkitEntity) entity).getPetType() == MyPetType.EnderDragon) {
                if (packet.getType() == PacketType.Play.Server.ENTITY_LOOK) {
                    // MyPetLogger.write("ENTITY_LOOK: " + packet.getBytes().getValues());
                    byte angle = packet.getBytes().read(0);
                    angle += Byte.MAX_VALUE;
                    packet.getBytes().write(0, angle);
                } else if (packet.getType() == PacketType.Play.Server.ENTITY_MOVE_LOOK) {
                    // MyPetLogger.write("ENTITY_MOVE_LOOK: " + packet.getBytes().getValues());
                    byte angle = packet.getBytes().read(0);
                    angle += Byte.MAX_VALUE;
                    packet.getBytes().write(0, angle);
                } else if (packet.getType() == PacketType.Play.Server.ENTITY_TELEPORT) {
                    // MyPetLogger.write("ENTITY_TELEPORT: " + packet.getBytes().getValues());
                    byte angle = packet.getBytes().read(1);
                    angle += Byte.MAX_VALUE;
                    packet.getBytes().write(1, angle);
                }
            }
        }
    });
}
Also used : Entity(org.bukkit.entity.Entity) MyPetBukkitEntity(de.Keyle.MyPet.api.entity.MyPetBukkitEntity) PacketContainer(com.comphenix.protocol.events.PacketContainer) PacketAdapter(com.comphenix.protocol.events.PacketAdapter) PacketEvent(com.comphenix.protocol.events.PacketEvent) MyPetBukkitEntity(de.Keyle.MyPet.api.entity.MyPetBukkitEntity)

Example 4 with PacketEvent

use of com.comphenix.protocol.events.PacketEvent in project VehiclesPlus2.0 by legofreak107.

the class Main method onEnable.

@Override
public void onEnable() {
    ChunkUnload cu = new ChunkUnload(this);
    EntityDamage ed = new EntityDamage(this);
    EntityDismount edi = new EntityDismount(this);
    InventoryClick ic = new InventoryClick(this);
    InventoryClose icl = new InventoryClose(this, ic);
    PlayerDropItem pdi = new PlayerDropItem(this);
    PlayerInteract pi = new PlayerInteract(this);
    PlayerInteractAtEntity piae = new PlayerInteractAtEntity(this);
    PlayerJoin pj = new PlayerJoin(this);
    PlayerQuit pq = new PlayerQuit(this);
    SignChange sc = new SignChange(this);
    VehicleExit ve = new VehicleExit(this);
    Bukkit.getPluginManager().registerEvents(cu, this);
    Bukkit.getPluginManager().registerEvents(ed, this);
    Bukkit.getPluginManager().registerEvents(edi, this);
    Bukkit.getPluginManager().registerEvents(ic, this);
    Bukkit.getPluginManager().registerEvents(icl, this);
    Bukkit.getPluginManager().registerEvents(pdi, this);
    Bukkit.getPluginManager().registerEvents(pi, this);
    Bukkit.getPluginManager().registerEvents(piae, this);
    Bukkit.getPluginManager().registerEvents(pj, this);
    Bukkit.getPluginManager().registerEvents(pq, this);
    Bukkit.getPluginManager().registerEvents(sc, this);
    Bukkit.getPluginManager().registerEvents(ve, this);
    if (getCustomSettingsConfig().contains("Garage.maxCarsSpawnedPerPlayer")) {
        maxCars = getCustomSettingsConfig().getInt("Garage.maxCarsSpawnedPerPlayer");
    } else {
        getCustomSettingsConfig().set("Garage.maxCarsSpawnedPerPlayer", 3);
        saveCustomSettingsConfig();
    }
    if (getCustomSettingsConfig().contains("Items.upgrades")) {
        repairMenuItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.repairMenuItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.repairMenuItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.repairMenuItem.unbreakable"));
        upgradeMenuItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.upgradeMenuItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.upgradeMenuItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.upgradeMenuItem.unbreakable"));
        engineUpgradeItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.engineUpgradeItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.engineUpgradeItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.engineUpgradeItem.unbreakable"));
        steeringUpgradeItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.steeringUpgradeItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.steeringUpgradeItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.steeringUpgradeItem.unbreakable"));
        gearboxUpgradeItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.gearboxUpgradeItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.gearboxUpgradeItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.gearboxUpgradeItem.unbreakable"));
        fuelUpgradeItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.fuelUpgradeItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.fuelUpgradeItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.fuelUpgradeItem.unbreakable"));
        engineRepairItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.engineRepairItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.engineRepairItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.engineRepairItem.unbreakable"));
        wheelRepairItem = genItem(getCustomSettingsConfig().getInt("Items.upgrades.wheelRepairItem.id"), Short.parseShort(getCustomSettingsConfig().get("Items.upgrades.wheelRepairItem.data").toString()), getCustomSettingsConfig().getBoolean("Items.upgrades.wheelRepairItem.unbreakable"));
    } else {
        getCustomSettingsConfig().set("Items.upgrades.repairMenuItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.repairMenuItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.repairMenuItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.upgradeMenuItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.upgradeMenuItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.upgradeMenuItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.engineUpgradeItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.engineUpgradeItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.engineUpgradeItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.steeringUpgradeItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.steeringUpgradeItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.steeringUpgradeItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.gearboxUpgradeItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.gearboxUpgradeItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.gearboxUpgradeItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.fuelUpgradeItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.fuelUpgradeItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.fuelUpgradeItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.engineRepairItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.engineRepairItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.engineRepairItem.unbreakable", false);
        getCustomSettingsConfig().set("Items.upgrades.wheelRepairItem.id", 1);
        getCustomSettingsConfig().set("Items.upgrades.wheelRepairItem.data", 0);
        getCustomSettingsConfig().set("Items.upgrades.wheelRepairItem.unbreakable", false);
        repairMenuItem = new ItemStack(Material.STONE, 1);
        upgradeMenuItem = new ItemStack(Material.STONE, 1);
        engineUpgradeItem = new ItemStack(Material.STONE, 1);
        steeringUpgradeItem = new ItemStack(Material.STONE, 1);
        gearboxUpgradeItem = new ItemStack(Material.STONE, 1);
        fuelUpgradeItem = new ItemStack(Material.STONE, 1);
        engineRepairItem = new ItemStack(Material.STONE, 1);
        wheelRepairItem = new ItemStack(Material.STONE, 1);
        saveCustomSettingsConfig();
    }
    Bukkit.getPluginManager().registerEvents(this, this);
    if (!setupEconomy()) {
        this.getLogger().severe("Disabled due to no Vault dependency found!");
        Bukkit.getPluginManager().disablePlugin(this);
        return;
    }
    ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
    Bike.plugin = this;
    Plane.plugin = this;
    Car.plugin = this;
    Helicopter.plugin = this;
    Boat.plugin = this;
    sal.plugin = this;
    enable();
    protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.LOWEST, PacketType.Play.Client.STEER_VEHICLE) {

        @Override
        public void onPacketReceiving(PacketEvent event) {
            if (event.getPacketType().equals(PacketType.Play.Client.STEER_VEHICLE)) {
                PacketPlayInSteerVehicle ppisv = (PacketPlayInSteerVehicle) event.getPacket().getHandle();
                for (Seat s2 : seatInfo.values()) {
                    ArmorStand vp = s2.parent;
                    Location locvp = vp.getLocation().clone();
                    Location fbvp = locvp.add(locvp.getDirection().setY(0).normalize().multiply(s2.offset.getX()));
                    float zvp = (float) (fbvp.getZ() + (s2.offset.getZ() * Math.sin(Math.toRadians(fbvp.getYaw() + 90 * 0))));
                    float xvp = (float) (fbvp.getX() + (s2.offset.getZ() * Math.cos(Math.toRadians(fbvp.getYaw() + 90 * 0))));
                    Vehicle v = vehicleInfo.get(vp);
                    EntityArmorStand seat = ((CraftArmorStand) s2.seat).getHandle();
                    seat.setLocation(xvp, vp.getLocation().getY() + s2.offset.getY(), zvp, fbvp.getYaw(), fbvp.getPitch());
                    EntityArmorStand s3 = ((CraftArmorStand) v.skinHolder).getHandle();
                    s3.setLocation(vp.getLocation().getX(), vp.getLocation().getY(), vp.getLocation().getZ(), fbvp.getYaw(), fbvp.getPitch());
                }
                Player p = event.getPlayer();
                if (p.getVehicle() instanceof ArmorStand) {
                    ArmorStand a = (ArmorStand) p.getVehicle();
                    if (seatInfo.containsKey(a)) {
                        Seat s = seatInfo.get(a);
                        if (s.steer) {
                            ArmorStand a2 = s.parent;
                            Vehicle v = vehicleInfo.get(a2);
                            if (v.type == VehicleType.CAR) {
                                Car.Car(ppisv, p);
                            } else if (v.type == VehicleType.PLANE) {
                                Plane.Plane(ppisv, p);
                            } else if (v.type == VehicleType.BIKE) {
                                Bike.Bike(ppisv, p);
                            } else if (v.type == VehicleType.HELICOPTER) {
                                Helicopter.Helicopter(ppisv, p);
                            } else if (v.type == VehicleType.BOAT) {
                                Boat.Boat(ppisv, p);
                            }
                        }
                    }
                }
            }
        }
    });
    Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {

        public void run() {
            for (Vehicle v : vehicleInfo.values()) {
                if (v.type == VehicleType.CAR) {
                    for (Seat s : v.seats) {
                        for (Entity e : s.seat.getPassengers()) {
                            if (e instanceof Player) {
                                return;
                            }
                        }
                    }
                    Car.CarNonDriveable(v);
                }
            }
            for (Seat s2 : seatInfo.values()) {
                ArmorStand vp = s2.parent;
                Location locvp = vp.getLocation().clone();
                Location fbvp = locvp.add(locvp.getDirection().setY(0).normalize().multiply(s2.offset.getX()));
                float zvp = (float) (fbvp.getZ() + (s2.offset.getZ() * Math.sin(Math.toRadians(fbvp.getYaw() + 90 * 0))));
                float xvp = (float) (fbvp.getX() + (s2.offset.getZ() * Math.cos(Math.toRadians(fbvp.getYaw() + 90 * 0))));
                EntityArmorStand seat = ((CraftArmorStand) s2.seat).getHandle();
                seat.setLocation(xvp, vp.getLocation().getY() + s2.offset.getY(), zvp, fbvp.getYaw(), fbvp.getPitch());
                Vehicle v = vehicleInfo.get(vp);
                if (v.holder.getLocation().getBlock().getType() == Material.STATIONARY_WATER && v.type != VehicleType.BOAT) {
                    v.setHealth(0);
                } else if (v.holder.getLocation().getBlock().getType() == Material.STATIONARY_WATER && v.type == VehicleType.BOAT) {
                    v.holder.setGravity(false);
                }
                EntityArmorStand s3 = ((CraftArmorStand) v.skinHolder).getHandle();
                s3.setLocation(vp.getLocation().getX(), vp.getLocation().getY(), vp.getLocation().getZ(), fbvp.getYaw(), fbvp.getPitch());
            }
        }
    }, 0L, 1L);
}
Also used : EntityDismount(me.legofreak107.vehicles.events.EntityDismount) Entity(org.bukkit.entity.Entity) PlayerInteractAtEntity(me.legofreak107.vehicles.events.PlayerInteractAtEntity) Seat(me.legofreak107.vehicles.objects.Seat) PlayerQuit(me.legofreak107.vehicles.events.PlayerQuit) SignChange(me.legofreak107.vehicles.events.SignChange) PacketPlayInSteerVehicle(net.minecraft.server.v1_12_R1.PacketPlayInSteerVehicle) Vehicle(me.legofreak107.vehicles.objects.Vehicle) InventoryClick(me.legofreak107.vehicles.events.InventoryClick) CraftArmorStand(org.bukkit.craftbukkit.v1_12_R1.entity.CraftArmorStand) EntityArmorStand(net.minecraft.server.v1_12_R1.EntityArmorStand) ArmorStand(org.bukkit.entity.ArmorStand) PacketAdapter(com.comphenix.protocol.events.PacketAdapter) PlayerInteract(me.legofreak107.vehicles.events.PlayerInteract) VPPlayer(me.legofreak107.vehicles.objects.VPPlayer) Player(org.bukkit.entity.Player) InventoryClose(me.legofreak107.vehicles.events.InventoryClose) PacketPlayInSteerVehicle(net.minecraft.server.v1_12_R1.PacketPlayInSteerVehicle) EntityArmorStand(net.minecraft.server.v1_12_R1.EntityArmorStand) ChunkUnload(me.legofreak107.vehicles.events.ChunkUnload) VehicleExit(me.legofreak107.vehicles.events.VehicleExit) PlayerJoin(me.legofreak107.vehicles.events.PlayerJoin) PlayerInteractAtEntity(me.legofreak107.vehicles.events.PlayerInteractAtEntity) ProtocolManager(com.comphenix.protocol.ProtocolManager) PacketEvent(com.comphenix.protocol.events.PacketEvent) ItemStack(org.bukkit.inventory.ItemStack) PlayerDropItem(me.legofreak107.vehicles.events.PlayerDropItem) EntityDamage(me.legofreak107.vehicles.events.EntityDamage) Location(org.bukkit.Location)

Example 5 with PacketEvent

use of com.comphenix.protocol.events.PacketEvent in project VoxelGamesLibv2 by VoxelGamesLib.

the class SignPlaceholders method init.

public void init() {
    registerPlaceholders();
    Bukkit.getWorlds().stream().flatMap(w -> Arrays.stream(w.getLoadedChunks())).flatMap(s -> Arrays.stream(s.getTileEntities())).filter(s -> s instanceof Sign).map(s -> (Sign) s).forEach(s -> lastSeenSigns.put(s.getLocation(), s));
    // modify update packets
    protocolManager.addPacketListener(new PacketAdapter(voxelGamesLib, PacketType.Play.Server.TILE_ENTITY_DATA) {

        @Override
        public void onPacketSending(@Nonnull PacketEvent event) {
            int action = event.getPacket().getIntegers().read(0);
            // 9 = set sign text action
            if (action != 9) {
                return;
            }
            NbtCompound data = (NbtCompound) event.getPacket().getNbtModifier().read(0);
            // read data
            Component[] lines = new Component[4];
            String[] rawLines = new String[4];
            for (int i = 0; i < lines.length; i++) {
                lines[i] = ComponentSerializers.JSON.deserialize(data.getString("Text" + (i + 1)));
                rawLines[i] = ChatUtil.toPlainText(lines[i]);
            }
            // sometimes its a double, sometimes its an int...
            double x;
            double y;
            double z;
            try {
                x = data.getDouble("x");
                y = data.getDouble("y");
                z = data.getDouble("z");
            } catch (ClassCastException ex) {
                x = data.getInteger("x");
                y = data.getInteger("y");
                z = data.getInteger("z");
            }
            Location loc = new Location(event.getPlayer().getWorld(), x, y, z);
            if (event.getPlayer().getLocation().distanceSquared(loc) > 200 * 200) {
                return;
            }
            Block b = loc.getBlock();
            if (!(b.getState() instanceof Sign)) {
                return;
            }
            Sign sign = (Sign) b.getState();
            lastSeenSigns.put(loc, sign);
            Optional<User> user = userHandler.getUser(event.getPlayer().getUniqueId());
            if (!user.isPresent()) {
                return;
            }
            // call sign placeholders
            modifySign(user.get(), loc, rawLines, lines);
            // modify packet
            for (int i = 0; i < lines.length; i++) {
                data.put("Text" + (i + 1), ComponentSerializers.JSON.serialize(lines[i]));
            }
        }
    });
    // update task
    new BukkitRunnable() {

        @Override
        public void run() {
            lastSeenSigns.forEach((loc, sign) -> sign.update());
        }
    }.runTaskTimer(voxelGamesLib, 20, 20);
}
Also used : Arrays(java.util.Arrays) ProtocolLibrary(com.comphenix.protocol.ProtocolLibrary) ChunkUnloadEvent(org.bukkit.event.world.ChunkUnloadEvent) UserHandler(com.voxelgameslib.voxelgameslib.user.UserHandler) HashMap(java.util.HashMap) FixedMetadataValue(org.bukkit.metadata.FixedMetadataValue) Singleton(javax.inject.Singleton) Inject(javax.inject.Inject) EventHandler(org.bukkit.event.EventHandler) Block(org.bukkit.block.Block) Location(org.bukkit.Location) PacketAdapter(com.comphenix.protocol.events.PacketAdapter) VoxelGamesLib(com.voxelgameslib.voxelgameslib.VoxelGamesLib) Map(java.util.Map) ChunkLoadEvent(org.bukkit.event.world.ChunkLoadEvent) LocalTime(java.time.LocalTime) PlayerInteractEvent(org.bukkit.event.player.PlayerInteractEvent) Nonnull(javax.annotation.Nonnull) ChatUtil(com.voxelgameslib.voxelgameslib.utils.ChatUtil) Bukkit(org.bukkit.Bukkit) Listener(org.bukkit.event.Listener) ComponentSerializers(net.kyori.text.serializer.ComponentSerializers) Sign(org.bukkit.block.Sign) PacketEvent(com.comphenix.protocol.events.PacketEvent) BukkitRunnable(org.bukkit.scheduler.BukkitRunnable) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) PacketType(com.comphenix.protocol.PacketType) TextComponent(net.kyori.text.TextComponent) Logger(java.util.logging.Logger) Component(net.kyori.text.Component) NbtCompound(com.comphenix.protocol.wrappers.nbt.NbtCompound) DateTimeFormatter(java.time.format.DateTimeFormatter) Optional(java.util.Optional) User(com.voxelgameslib.voxelgameslib.user.User) ProtocolManager(com.comphenix.protocol.ProtocolManager) NbtCompound(com.comphenix.protocol.wrappers.nbt.NbtCompound) Optional(java.util.Optional) PacketAdapter(com.comphenix.protocol.events.PacketAdapter) PacketEvent(com.comphenix.protocol.events.PacketEvent) Block(org.bukkit.block.Block) BukkitRunnable(org.bukkit.scheduler.BukkitRunnable) Sign(org.bukkit.block.Sign) Location(org.bukkit.Location)

Aggregations

PacketAdapter (com.comphenix.protocol.events.PacketAdapter)7 PacketEvent (com.comphenix.protocol.events.PacketEvent)7 Entity (org.bukkit.entity.Entity)6 PacketContainer (com.comphenix.protocol.events.PacketContainer)5 MyPetBukkitEntity (de.Keyle.MyPet.api.entity.MyPetBukkitEntity)5 ProtocolManager (com.comphenix.protocol.ProtocolManager)2 Location (org.bukkit.Location)2 Player (org.bukkit.entity.Player)2 PacketType (com.comphenix.protocol.PacketType)1 ProtocolLibrary (com.comphenix.protocol.ProtocolLibrary)1 WrappedDataWatcher (com.comphenix.protocol.wrappers.WrappedDataWatcher)1 WrappedWatchableObject (com.comphenix.protocol.wrappers.WrappedWatchableObject)1 NbtCompound (com.comphenix.protocol.wrappers.nbt.NbtCompound)1 VoxelGamesLib (com.voxelgameslib.voxelgameslib.VoxelGamesLib)1 User (com.voxelgameslib.voxelgameslib.user.User)1 UserHandler (com.voxelgameslib.voxelgameslib.user.UserHandler)1 ChatUtil (com.voxelgameslib.voxelgameslib.utils.ChatUtil)1 MyPetBaby (de.Keyle.MyPet.api.entity.MyPetBaby)1 MyPetBukkitPart (de.Keyle.MyPet.api.entity.MyPetBukkitPart)1 Method (java.lang.reflect.Method)1