🔔Notify
Tired of constantly creating mixins for the same events in every new project? In the Paper era, it was much simpler. That's exactly why we developed this amazing library/mod, where all events are added once and can be used in any other project!
To implement this functionality, we use alert — a lightning-fast utility for listening to events. Check out the alert documentation to learn how to subscribe to events.
How to Use
Add the following lines to your mod's build.gradle.kts file:
repositories {
mavenCentral()
}
dependencies {
// ...
modImplementation("de.hglabor:notify:1.1.3")
}
Then place the compiled notify jar file in the mods folder. Now you can subscribe to events as follows:
// (On the server)
subscribeToEvent<PlayerJoinEvent> {
logger.info("Player ${it.player.name.string} joined")
}
Implemented Events
Subscribing to events on the client has not been tested! (server/common events should work on the server)
Common Events
PlayerAttackEntityEventPlayerHungerChangeEventPlayerItemPickupEventPlayerPlaceBlockEventPlayerSlotClickEvent
Server Events
PlayerBreakBlockEventPlayerDeathEventPlayerInteractItemEventPlayerInteractBlockEventPlayerItemDropEvent: called when a player attempts to drop an itemPlayerItemDroppedEvent: called after an item was droppedPrePlayerJoinEvent: called before a player joins the serverPlayerJoinEvent: called when a player joins the server. Allows modification of the join messagePostPlayerJoinEvent: called after a player joins the serverPlayerRemoveEvent: called after a player got removed from the player listPlayerQuitEvent: called when a player quits the server. Allows modification of the quit messagePlayerSwapHandItemsEventPlayerTickEventPlayerSetSettingsEvent: called e.g. when player changes client languageEntitySpawnEventProjectileHitEvent: called when a projectile hits another entity
Client Events
soon™