ModsJava
[API] CommandBlockEvents
Minecraft Java mod. Download on the author's site.
⬇ Download on SpigotThis API adds an Event which is called when a player edits a Command block.
Examples
@EventHandler
public void onCommandBlockEdit (CommandBlockEditEvent event ) {
Player player = event. getPlayer ( ) ; //Player editing the CommandBlock
String command = event. getCommand ( ) ; //Command of the CommandBlock
String name = event. getName ( ) ; //Name of the CommandBlock
boolean hasFeedback = event. hasFeedback ( ) ; //true if a feedback message is shown
String feedback = event. getFeedbackMessage ( ) ; //Feedback message
Location location = event. getLocation ( ) ; //Location of the CommandBlock
}
Depends on PacketListenerAPI
Maven
Links
Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.
Examples
Code (Java):
@EventHandler
public void onCommandBlockEdit (CommandBlockEditEvent event ) {
Player player = event. getPlayer ( ) ; //Player editing the CommandBlock
String command = event. getCommand ( ) ; //Command of the CommandBlock
String name = event. getName ( ) ; //Name of the CommandBlock
boolean hasFeedback = event. hasFeedback ( ) ; //true if a feedback message is shown
String feedback = event. getFeedbackMessage ( ) ; //Feedback message
Location location = event. getLocation ( ) ; //Location of the CommandBlock
}
Depends on PacketListenerAPI
Maven
Code (Text):
<repositories>
<repository>
<id>inventive-repo</id>
<url>https://repo.inventivetalent.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.inventivetalent</groupId>
<artifactId>commandblockevents</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
<repository>
<id>inventive-repo</id>
<url>https://repo.inventivetalent.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.inventivetalent</groupId>
<artifactId>commandblockevents</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- 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.
[API] CommandBlockEvents is a free Minecraft Java mod. Downloaded 314 times (via Spigot). Download it and open it directly in the game.
![[IMG]](http://proxy.spigotmc.org/03b89c2282b33ef720a7e5ca8cfbbb31681bc8b8?url=https%3A%2F%2Fstatic.spigotmc.org%2Fimg%2Fbtn_donate.gif)