ModsJava
jEvents
Java mod listed for Minecraft 1.8–1.18. Download on the author's site.
⬇ Download on SpigotLight weight and simple library to create spigot events in the go. I created this api since I find the spigot APIs incredible tedious to use and also leads to a lot of boilerplate code...
Usage
First, to use the api, you need to register your plugin
jEvents provides a very simple event creation abstraction. Here is an example:
As you can see, the creation of a listener is way easier than spigot's API, you just need specify the Event class, and
you are good to go
More examples of the api usage:
Usage
First, to use the api, you need to register your plugin
Code (Java):
@Override
public void onEnable ( ) {
JEvents. register ( this ) ;
}
public void onEnable ( ) {
JEvents. register ( this ) ;
}
Code (Java):
JEvents.
subscribe
(InventoryClickEvent.
class
)
// The class of the event you want to listen
. handler (event -> {
event. setCancelled ( true ) ;
// Do something here
} ) ;
. handler (event -> {
event. setCancelled ( true ) ;
// Do something here
} ) ;
you are good to go
More examples of the api usage:
Code (Java):
JEvents.
subscribe
(InventoryClickEvent.
class
)
. filter (event -> event. getInventory ( ). equals (myInv ) ) // Only apply the action inside the handler
. filter (event -> event. getSlot ( ) == 3 ) // if the filters are met
. handler (event -> {
event. setCancelled ( true ) ;
// Do something here
} ) ;
. filter (event -> event. getInventory ( ). equals (myInv ) ) // Only apply the action inside the handler
. filter (event -> event. getSlot ( ) == 3 ) // if the filters are met
. handler (event -> {
event. setCancelled ( true ) ;
// Do something here
} ) ;
Code (Java):
JEvents.
subscribe
(PlayerDeathEvent.
class
)
. biHandler ( (subscription, playerDeathEvent ) -> {
playerDeathEvent. setDeathMessage ( "Ha you died loser" ) ;
subscription. unregister ( ) ; // Unregisters the listener
} ) ;
. biHandler ( (subscription, playerDeathEvent ) -> {
playerDeathEvent. setDeathMessage ( "Ha you died loser" ) ;
subscription. unregister ( ) ; // Unregisters the listener
} ) ;
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
jEvents is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 123 times (via Spigot). Download it and open it directly in the game.