{"id":26830644,"url":"https://github.com/guichaguri/packetcontrol","last_synced_at":"2025-07-16T12:07:01.419Z","repository":{"id":89786086,"uuid":"112897483","full_name":"Guichaguri/PacketControl","owner":"Guichaguri","description":"A protocol library for Sponge","archived":false,"fork":false,"pushed_at":"2017-12-07T02:06:53.000Z","size":69,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T08:13:44.841Z","etag":null,"topics":["mixins","packets","protocol","sponge","sponge-library"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Guichaguri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-03T03:39:46.000Z","updated_at":"2019-02-24T18:31:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc70ec79-0f14-4bc4-bf65-b1079c12be96","html_url":"https://github.com/Guichaguri/PacketControl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Guichaguri/PacketControl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guichaguri%2FPacketControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guichaguri%2FPacketControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guichaguri%2FPacketControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guichaguri%2FPacketControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Guichaguri","download_url":"https://codeload.github.com/Guichaguri/PacketControl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guichaguri%2FPacketControl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265508324,"owners_count":23779119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mixins","packets","protocol","sponge","sponge-library"],"created_at":"2025-03-30T14:16:53.254Z","updated_at":"2025-07-16T12:07:01.408Z","avatar_url":"https://github.com/Guichaguri.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PacketControl\nA packet/protocol library for SpongeForge and SpongeVanilla\n\n## Features\n* **Modify packets!** Every packet is full of getters and setters for every property. Most of them also are built on top of the Sponge API, making it easier to modify.\n* **Create packets!** Every packet has a default \"constructor\" and a custom one which allows you to create a packet based on an existing object.\n* **Send packets!** You can not only send the packet to a specific player, but you can also send it based on distance or even on a entity tracker.\n* **Intercept packets!** Every packet can be intercepted, modified and cancelled (both serverbound and clientbound packets)\n* **Interfaces everywhere!** You don't need to write MCP-dependent code, we do all of that for you.\n\n## Getting Started\nFirst of all, you'll need to access the service:\n```java\nOptional\u003cPacketService\u003e optional = Sponge.getServiceManager().provide(PacketService.class);\n```\n\nYou can create and send a packet\n```java\n// Create a packet passing a player to its constructor\nPacketUseBed packet = service.createPacket(PacketTypes.USE_BED, player);\n\n// Send the packet to all entities near the player\nservice.sendPacketToTracking(packet, player);\n```\n\nYou can also intercept packets\n```java\n// Registers a packet handler using a lambda function\n// You can also use method references or even whole classes\nservice.registerHandler(PacketTypes.WORLD_TIME, (con, packet) -\u003e {\n    \n    // Change the world time to a random value\n    packet.setWorldTime((long)(Math.random() * 24000));\n    \n    // Whether the packet should not be sent\n    return false;\n    \n});\n```\n\n## Why?\n#### API Limitations\nThis is the main reason why protocol libraries became popular on Bukkit.\n\nUnlike Bukkit, Sponge aims to have every vanilla feature possible on its API, but until those are suggested and implemented, you can use this plugin to do so.\nAlso, some features might not fit into the Sponge API and will never be implemented.\n\nPlease, don't use packets to do anything that the Sponge API already allows you to do.\nThis library is meant to be used in the last case scenario, when it's impossible or not viable to do with Sponge alone.   \n\n#### Bugs\nThere are a lot of bugs that you can explore with packets, and because they can stop working at any update, they will never be added to the Sponge API.\nSome of them are pretty interesting, such as the animated MOTDs bug.\n\n#### Undetectable Modifications\nTo disguise a player on Sponge, you can hide the player and spawn an entity on top, but hacked clients and mods can detect that based on the packet discrepancy.\nThat can be a problem if you're trying to use it as a administration tool.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguichaguri%2Fpacketcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguichaguri%2Fpacketcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguichaguri%2Fpacketcontrol/lists"}