[API 7] TriggerReactor - Powerful Script Engine for your server



Bring dynamic script language to your server! For Bukkit API, there are few dominant scripts like Skript or VariableTriggers, but I couldn’t really find quite similar plugin in Sponge community. Also, Sponge API is relatively harsh for non-experienced developer. And TriggerReactor can be very easy aid for you.

For example, It’s quite common to use Inventory as an menu and use Items in it as buttons to provide easy access for users. Even though the idea is brilliant, the way to get there is not quite easy. If you were to create a dedicated plugin just to create the inventory menu, that’s quite a lot of work honestly. But with the InventoryTrigger provided by this plugin, it can be created in few minutes.

1. First create InentoryTrigger with /trg i <name> create <size> command.
2. You will write the script.

IF trigger == "click"
    IF slot == 0
        #MESSAGE "You clicked item at index 0"
        #CMD "warp myspawn"

3. Now, add Item in index 0 of this menu, so users can interact with it.
/trg i <name> item 0 (you should be holding the item in hand)

Isn’t this much easier than creating jar every single time? Imagine how much time would it take if you had to construct a plugin just for this simple functionality.

Not only the InventoryTrigger, there are few other built-in triggers ready for you. This includes walking on the block, clicking the block, command, enter/exit area. And if you need special trigger such as Events from Sponge API or third party plugins, You may use those as trigger via CustomTrigger.

More details can be found here:


Sponge Specific Examples:


/trg - type it to see more commands

triggerreactor.admin - give access to all of /trg commands and tools.

Still confused after reading Wiki?

Come stop by our discord channel

English: https://discord.gg/Df8vgut

Korean: https://discord.gg/KubaFcd




  • Seems to be stabilized, so now publishing it as release version.
  • Fixed where InventoryTrigger’s ‘open’ trigger section might can fall into infinite loop if infinite WHILE loop is used.
  • now color() method return Text not String
  • Fixed that setting a global variable to null cause error instead of deleting it.
  • #BROADCAST and #MESSAGE now both can accept Text and String.
  • If tab is pressed in in-game editor, now it replaces spaces to ^
  • Added safety feature for WHILE loop if it runs in server thread.
  • Performing arithmetic operation on non-number types now throw appropriate exception, not the ambiguous ClassCastException
  • Fixed that the methods, headForName() and headForValue(), are skeleton skull instead of player skull.
  • Fixed the #CMD doesn’t work properly
  • Fixed where using Executors in InventoryTrigger sometimes couldn’t find ‘player’ instance.
  • Now supports Nucleus.
  • Separated help page into multiple pages
  • InventoryTrigger’s inventory variable is now GridInventory not Container



  • Fixed where the wrong syntax can actually pass the Parser and cause serious impact on server.
  • FOR loop’s iterator now can be complex (For example, using variables or expression for the initial number or limit number)


  • Fixed where TRG doesn’t load if space is included in the path.



  • New internal variable ‘click’ is added to Click Trigger. See wiki for more info.
  • ‘item’ internal variable of Inventory Trigger now uses the clicked item in the actual inventory GUI, not the item saved in the trigger itself.
  • Little bit more clear exception messages
  • /trg sudo command to let console to execute script for specified player (similar to /trg run but you can specify the target)
  • Fixed where some nested IF statement was not correctly parsed
  • Fixed where you couldn’t check global variable via command
  • Fixed where you couldn’t save primitive types(String, Integer, Decimal) into global variable via command
  • Fixed where clicking outside of Inventory Trigger’s GUI caused IndexOutOfBoundException.



+$blockname placeholder
xCouldn’t reproduce the global variable not saving problem
*Support for spigot 1.13.2
*Better global variable saving logic
*Fix for onStart and onStop Custom Trigger for Sponge
*Now in-game script editor will save the code upon ‘save’ regardless of syntax error
*location() of Bukkit now accept decimals
+temporary global variable
*command trigger can be set sync/async
*#WAIT now accept decimal seconds
+$round placeholder
*Adding pitch and yaw to #TP
+#BREAK and #CONTINUE statement
*Some more trials to make error messages more clean to read
*#SETBLOCK now can be used without location info (so that it can use the block in triggering event)
*Fix for non-player related error showing not useful information
+Command Trigger now has dedicated permission support
+Command Trigger now has dedicated alias support
+/trg list command to show all triggers
*Fix for using non-numeric value in /trg help causing exception
*Command Trigger is now case insensitive
xAuto Complete feature cannot be implemented in 1.13 or later. It’s due to client change.
*#CMD and #CMDOP can now execute the command created by Command Trigger
*Addressed backward compatibility issue with version <= 1.12.2
*Removed this plugin’s alias ‘trigger’

+$blockname placeholder
x전역 변수에 null 저장시 삭제되지 않는 문제는 재현 할 수 없었습니다.
*spigot 1.13.2 호환
*전역 변수 저장 방식 개선
*onStart 와 onStop 이 스펀지에서 제대로 작동하지 않는 것 수정
*이제 게임 내 에디터에서 save를 할 때 코드에 문제가 있더라도 무조건 저장합니다
*Bukkit쪽의 location()이 이제 소숫점도 받습니다
+임시 광역 변수 추가
*command trigger 를 동기/비동기 가능하게 하는 명령어 추가
*#WAIT 이 이제 소숫점도 받습니다
+$round placeholder
*pitch yaw 를 #TP 에 추가
*에러 메시지를 조금 더 개선했습니다
*#SETBLOCK 이 이제 좌표를 지정하지 않아도 사용 가능합니다(물론 사용하는 트리거가 블록 관련인경우만)
*플레이어와 관련되지 않은 에러가 발생 시 문제 해결에 유용하지 않은 에러가 뜨는 문제 수정
+Command Trigger 가 이제 독자적인 퍼미션을 지원합니다
+Command Trigger 가 이제 독자적인 동음어를 지원합니다
+/trg list 명령어로 모든 트리거를 볼 수 있게 추가
*숫자가 아닌값을 /trg help 에 넣는 경우 에러가 발생하던 것 수정
*Command Trigger 가 이제 대소문자를 구분하지 않습니다
x탭으로 자동완성 기능이 1.13 혹은 이후부터 지원되지 않습니다. 클라이언트 쪽 변경 입니다.
*#CMD #CMDOP 가 Command Trigger 로 생성된 명령어도 실행 가능해졌습니다
*버전 <= 1.12.2 에서 문제가 발생하던 것 수정
*이 플러그인의 동음어중 하나인 ‘trigger’ 를 삭제 했습니다

Sorry for skipping 2.1.5. Forgot to upload it.


  • Fixed the ‘player’ variable not found error

  • Error message rework. The exceptions will show only if debug mode is on. (/trg debug)

  • Fixed the problem where a number in the IMPORT statement wasn’t properly parsed.

  • Added line break (\n) for String

  • Added carriage return (\r) for String (by Alex4386)

  • Addressed (-1, -1) error message as it’s not useful.


  • Logical comparison with null no longer throw NPE. (EX. x == null is now valid statement even if x is null)

  • The unrecognizable character now will catch it appropriately and throw exception accordingly.

  • Error messages are again revamped for better readability.

  • Fixed where random return decimal value even integer input was used.

  • New custom events (onStart, onStop) check Wiki for details

  • Fixed the problem where using String for the place of enum didn’t work properly

  • [Sponge] Fixed the critical problem where the last player’s reference was reused in other trigger executions.

  • Fixed where some variables were not properly extracted for the Executor/Placeholder to use

  • Fixed where GUI icons were wiped on reload

  • Fixed where AreaTrigger throwing random exceptions


  • Comparing uninitialized value (null) doesn’t throw NullPointerException anymore. Expression such as null == null or null != null works.
  • Fixed where Lexer just stops without any additional information when encountered with unrecognizable character.
  • Some more efforts to make error message more clean to read
  • Fixed where calling the method with same name with different parameter type would result in ambiguous result. For example, random(1,10) would return decimal value when it has to return integer value. TRG now uses most specific method that matches the parameters.
  • Custom Events for TRG start and stop. Check out CustomTrigger Wiki
  • Fixed where enum conversion support for method with enum didn’t work
  • Fixed where extracted variables used in previous ScriptEngine left and could be used in next execution.