Skip to content

Minecraft 1.20.1, 1.21.1용 HamsterAPI 플러그인

개발자에게 유틸리티 메서드, 성능 중심 추상화, 공유 시스템을 제공하여 플러그인 개발 속도를 높이는 경량 Spigot/Bukkit API 라이브러리입니다.

부터 LinsaFTW · Modrinth
조회수
38 조회수
업데이트됨
업데이트됨 30.09.2026
HamsterAPI logo

HamsterAPI: Your Ultimate Minecraft Packet Manipulation Toolkit

Effortlessly intercept, modify, and send packets without ever touching NMS or Reflection.

What is HamsterAPI?

HamsterAPI is a powerful, high-performance library designed to give developers complete control over Minecraft's network protocol. It provides a clean, event-driven abstraction layer, allowing you to manipulate incoming and outgoing packets with ease and stability across multiple server versions.

Forget the hassle of maintaining complex NMS code. With HamsterAPI, you get a simple, elegant, and future-proof solution for everything from creating custom cosmetics to patching exploits at the packet level.

Key Features

  • 🚀 Powerful Packet Interception: Listen, modify, and cancel any packet with a flexible, priority-based event system.
  • 📦 NMS-Free Packet Sending: Effortlessly send Titles, ActionBars, and other packets to players without the headache of Reflection or version-specific code.
  • 🛡️ Advanced Player Control: Safely disconnect players with a custom message or instantly close their connecti: Your Ultimate Minecraft Packet Manipulation Toolkiton channel.
  • 🌐 Seamless BungeeCord Integration: Easily switch players between servers, use plugin messaging channels, and manage your network.
  • 🛠️ Optimized Utilities: Access our streamlined reflection and byte buffer utilities to build advanced, version-independent features.

Getting Started

Step 1: Add HamsterAPI as a Dependency

First, ensure HamsterAPI is included as a dependency in your plugin's plugin.yml file. This is a crucial step for your plugin to load correctly.

name: YourPlugin version: 1.0 main: com.yourdomain.yourplugin.Main depend: [HamsterAPI]

Step 2: Access the API Instance

The entry point to all of HamsterAPI's features is the singleton instance. You can get it anywhere in your code with a static call:

HamsterAPI api = HamsterAPI.getInstance();

From this instance, you can access all the core managers and utilities:

  • getHamsterPlayerManager() - Manage player-specific actions like sending packets or disconnecting.
  • getBungeeMessenger() - Communicate with your BungeeCord proxy.
  • getPacketInjector() - Manually inject or remove the API from a player's network pipeline.
  • getBufferIO() - A utility for decoding raw byte buffers into readable packets.

Core Concepts & Usage Examples

How to Listen to Packets

HamsterAPI offers a robust event system for intercepting packets at different stages of the network pipeline.

The Pipeline Flow: Client -> [Splitter & Decompress] -> PacketDecodeEvent -> [Decoder] -> PacketReceiveEvent -> Server

  • PacketDecodeEvent
  • When: Fires after the raw bytes are decompressed but before they are decoded into a full packet object.
  • What you get: A raw ByteBuf object.
  • Ideal for: Low-level security, fixing exploits, and analyzing raw network data.
  • PacketReceiveEvent / PacketSendEvent
  • When: Fires after the packet has been fully decoded into a PacketWrapper object.
  • What you get: A user-friendly PacketWrapper object.
  • Ideal for: Most common use-cases like creating cosmetics, canceling game events, or modifying game behavior.

To listen for events, register a listener class just as you would with Bukkit events. For more details, see the Spigot Event API Guide.

Example: Listening for a Packet

public class MyPacketListener implements Listener {

@EventHandler public void onPacketSend(PacketSendEvent event) { // Get the packet's name String packetName = event.getPacket().getName();

if (packetName.equals("PacketPlayOutChat")) { Player player = event.getPlayer(); player.sendMessage("The server tried to send you a chat message!");

// You can even cancel the packet // event.setCancelled(true); } } }

Send a Title and Subtitle

// Get the HamsterPlayer instance for a specific player HamsterPlayer hamsterPlayer = HamsterAPI.getInstance().getHamsterPlayerManager().get(player);

// Send a title that fades in over 1s, stays for 3s, and fades out over 1s. // Times are in ticks (20 ticks = 1 second) hamsterPlayer.sendTitle("§aWelcome!", "§7Enjoy your stay.", 20, 60, 20);

Send an ActionBar Message

HamsterPlayer hamsterPlayer = HamsterAPI.getInstance().getHamsterPlayerManager().get(player);

hamsterPlayer.sendActionbar("§eYou have §c5§e new messages.");

Safely Disconnect a Player (Packet Kick)

This sends a formal disconnect packet, allowing the client to gracefully handle the kick and display your custom reason.

HamsterPlayer hamsterPlayer = HamsterAPI.getInstance().getHamsterPlayerManager().get(player);

hamsterPlayer.disconnect("§cYou have been kicked for being awesome.");

Instantly Close a Player's Connection

This immediately terminates the channel without sending a formal packet. Use this for anti-cheat or emergency situations where an instant disconnect is required.

HamsterPlayer hamsterPlayer = HamsterAPI.getInstance().getHamsterPlayerManager().get(player);

hamsterPlayer.closeChannel();

Send a Player to another BungeeCord Server

HamsterPlayer hamsterPlayer = HamsterAPI.getInstance().getHamsterPlayerManager().get(player);

// The server name must match the name in your BungeeCord config.yml hamsterPlayer.sendServer("lobby-1");

Roadmap: The Future of HamsterAPI

We are constantly working to expand the API's capabilities. Here’s what’s on the horizon:

  • BossBar API: A simple, version-independent way to create and manage custom BossBars.
  • Custom Plugin Channels: Enable direct communication between your server-side plugin and client-side mods.
  • BungeeCord Listener: A dedicated listener for receiving plugin messages from the BungeeCord proxy.

HamsterAPI 설치 방법

  1. A server on Paper, Purpur, Spigot, Bukkit or Folia

    The plugin runs on the server core for Minecraft 1.8–26.3; players do not need to install anything.

  2. File goes into the plugins folder

    Download the file HamsterAPI.jar (58 KB) and put it into the server’s plugins folder.

  3. Restart the server

    On startup the plugin creates its own settings folder in plugins.

  4. Use the “To server” button

    On Millida Hosting, the button at the top of the page uploads the file to your server and restarts it for you.

버전

의존성 포함

Minecraft로더파일날짜작업
26.3Bukkit, Folia, Paper, Purpur, Spigot26.357.9 KB
1.12.2Bukkit, Folia, Paper, Purpur, Spigot1.12.254.2 KB—

FAQ

Which Minecraft versions does HamsterAPI work on?

There are files for 1.8–26.3, 75 versions in total. The newest is 26.3.

Do players need to install HamsterAPI?

No, the plugin goes only on the server Paper, Purpur, Spigot, Bukkit or Folia, into the plugins folder: players do not need to download anything.

Where can I download HamsterAPI safely?

On this page: the file HamsterAPI.jar (58 KB) is stored on Millida’s server, with no link shorteners. SHA-1 checksum: ba49fcc66882a35ffe81c4a11a900607cd90519f.

리뷰

HamsterAPI의 첫 평가를 남겨 보세요

댓글 0

댓글을 작성하려면 로그인하세요로그인

비슷한 플러그인

모든 플러그인

이 항목 더 보기

작성자: LinsaFTW라이선스: MIT

작성자이신가요? 문의하기 — 48시간 이내에 삭제해 드립니다.