https://github.com/devlrxxh/petsapi
Fully packet based PetsAPI (1.8 - 1.21)
https://github.com/devlrxxh/petsapi
minecraft minecrat packets pet pets
Last synced: 2 months ago
JSON representation
Fully packet based PetsAPI (1.8 - 1.21)
- Host: GitHub
- URL: https://github.com/devlrxxh/petsapi
- Owner: Devlrxxh
- Created: 2025-03-09T18:22:20.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-05-12T10:18:05.000Z (8 months ago)
- Last Synced: 2025-08-02T16:56:47.412Z (5 months ago)
- Topics: minecraft, minecrat, packets, pet, pets
- Language: Java
- Homepage:
- Size: 66.4 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
Fully packet based PetsAPI (1.8 - 1.21) using [PacketEvents](https://github.com/retrooper/packetevents/) and [EntityLib](https://github.com/Tofaa2/EntityLib)
> [!IMPORTANT]
> Project version is required to be Java 16 at least!
# Info
PetsAPI allows you to place floating heads in the world or attach them as pets that follow players — all fully packet-based.
# Events
### PetInteractEvent
Fired when a player interacts with a pet.
**Accessors:**
- `getPlayer()` → The player who clicked the pet
- `getPet()` → The clicked pet
# Setup
1. Clone repo
2. run ```mvn install```
3. Add this to pom.xml
```xml
dev.lrxh
PetsAPI
1.0.0
```
# Example Usage
```java
PetsAPI.init(this);
// Example Player Pet
Player player = ...;
PlayerPet pet = new PlayerPet(SkinData.ofPlayerName(player.getName()));
pet.setLookAtPlayer(true);
pet.spawn(player);
// Example World Pet
Pet pet = new Pet(AnimalSkinData.SHEEP);
Location location = ...;
pet.spawn(location);
// Remove player pets
for (Pet pet : PetsAPI.getPets(player)) {
pet.remove();
}
pet. // See all methods
```