Download Notify — Minecraft Mods — ModStock

Downloads

14

Last update

1 year ago

Versions

1.19 — 1.20.4
Client
Fabric
Quilt
Decor
Libraries
Control
Utils

🔔Notify

You don't want to create mixins for each project over and over again for the same events you could just use in the good old paper days. This is why we created this spectacular library/mod, where we just have to add the events once and can use them in every other project!

For this we use alert, a blazing fast event listening utility. See alert's documentation on how to listen to events.

### How to use Add the following to your mod's `build.gradle.kts` file: ```gradle repositories { mavenCentral() } dependencies { // ... modImplementation("de.hglabor:notify:1.1.3") } ``` Then put the built jar file of notify into your mods folder. You should be able to subscribe to the events like this: ```kotlin // (On the server) subscribeToEvent { logger.info("Player ${it.player.name.string} joined") } ```

Events currently implemented

Subscribing to events on the client is not tested! (server/common events should work on the server)

Common - `PlayerAttackEntityEvent` - `PlayerHungerChangeEvent` - `PlayerItemPickupEvent` - `PlayerPlaceBlockEvent` - `PlayerSlotClickEvent`
Server - `PlayerBreakBlockEvent` - `PlayerDeathEvent` - `PlayerInteractItemEvent` - `PlayerInteractBlockEvent` - `PlayerItemDropEvent`: called _when_ a player attempts to drop an item - `PlayerItemDroppedEvent`: called _after_ an item was dropped - `PrePlayerJoinEvent`: called _before_ a player joins the server - `PlayerJoinEvent`: called _when_ a player joins the server. Allows modification of the join message - `PostPlayerJoinEvent`: called _after_ a player joins the server - `PlayerRemoveEvent`: called _after_ a player got removed from the player list - `PlayerQuitEvent`: called _when_ a player quits the server. Allows modification of the quit message - `PlayerSwapHandItemsEvent` - `PlayerTickEvent` - `PlayerSetSettingsEvent`: called e.g. when player changes client language - `EntitySpawnEvent` - `ProjectileHitEvent`: called when a projectile hits another entity
Client soon™

For more, read our github readme