Download Notify — Minecraft Mods — MetaMods

Notify

Active

Downloads

14

Last update

1 year ago

Versions

1.19 — 1.20.4
Client
Fabric
Quilt
Decor
Libraries
Control
Utils

🔔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

  • PlayerAttackEntityEvent
  • PlayerHungerChangeEvent
  • PlayerItemPickupEvent
  • PlayerPlaceBlockEvent
  • PlayerSlotClickEvent

Server Events

  • 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 Events

soon™

Project members
Krxwallo

Krxwallo

Developer

jamalam360

jamalam360

Created: 7 Apr 2023

ID: 12100