Home›Java›Mods›[API] CommandBlockEvents
ModsJava

[API] CommandBlockEvents

Minecraft Java mod. Download on the author's site.

⬇ Download on Spigot
This API adds an Event which is called when a player edits a Command block.

[​IMG]
I enjoy making all of my plugins for free, but I need your help to keep them for free.​


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>
Links


Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.
​
Quick facts

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.

Explore more