Commandblock change event

Discussion in 'Resources' started by newboyhun, Aug 15, 2013.

Thread Status:
Not open for further replies.
  1. Offline



    I wrote a simple plugin for a custom event, CommandBlockChangeEvent.
    The plugin uses ProtocolLib.

    Now you can simply detect if a player changes a commandblock and/or change the command or even cancel the change.

    public void oncbc(CommandBlockChangeEvent e) {
      String command = e.getCommand();
      if (command.startsWith("tp")) e.setCommand("tp @p @p"); // Trolling =P
      if (command.equals("help")) e.setCancelled(true);
  2. Offline

    turt2live Retired Staff

    This should be on BukkitDev and in Plugin Releases then, as it is a plugin.
Thread Status:
Not open for further replies.

Share This Page