[API] CommandBlockEvents 1.0.1

Events called when CommandBlocks are edited

  1. inventivetalent
    This API adds an Event which is called when a player edits a Command block.



    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.

Recent Updates

  1. API Update | Minor fix | Plugin metrics

Recent Reviews

  1. Indra_55
    Indra_55
    5/5,
    Version: 1.0.1
    This is an nice api, But I have a question. Can you cancel the event? Like if the command is "Kill" it cancels
  2. MrCleverTrevor
    MrCleverTrevor
    5/5,
    Version: 1.0.0
    Cool! I think I am actually going to use this API! This should make a cool door lock passcode for a minigame!

    ~Trevor