ReActions
ReActions
ReActions bringing custom event processing system. It allows to check certain conditions and perform certain actions. If required conditions are not met, other actions will be carried out.
What is ReActions
ReActions is a tool that allows you to add new features to items, buttons and... events. You can add new actions that occur when you click the button or open the chest. You can change the state of lever or teleport the player to another location. You can check whether the player in the region and give him an enchanted item as reward for killing a Boss. Oh yeah! You can spawn a Boss-mob too... ReActions can interact with third-party plugins (Vault, Factions, Towny, etc...) to introduce the possibility of non-standard use of their capabilities or give you more flexible and fully customizable settings of the player. For example, you may charge a fee for the entrance to the territory or for opening the chest or pulling the lever. You can perform some actions when player is changing faction (provided by Factions plugin) or force player to join town (Towny plugin).
And... you don't need to learn scripting language. It takes just a few minutes to understand the principle of ReActions to then be limited only with your imagination.
Instructions
Detailed instruction available here: reactions.fromgate.me
Russian instruction (Инструкция на русском) is here: reactions.fromgate.ru
Dev Builds
Latest dev builds available on
Terminology
To understand further description let us clarify the terminology:
Subscription - the binding of the activator to any gaming event (getting damage, pressing a button, donning armor, clicking RMB with a specific item in hand). Thus, if the activator is subscribed to an event, it’s triggered when an event occurs.
Activator - set of "event-condition-action". I.e. the activator is caused by a specific event (which it is subscribed), checks for certain conditions (flags) and performs some actions.
Flag - condition to check.
Action - what makes activator after checking flags. Actions are of two types:
- action - is executed after successful verification flags;
- reaction - is executed after unsuccessful verification flags (at least one flag returns false).
Placeholders - use it to determine dynamically calculated values.
Features
- Ability to check lot of conditions (flags): permissions (or permisision groups), player balance or defined item in inventory, etc.
- Executing variuos actions: you can apply a potion effect to player, teleport player to specified locations, execute command of third-party plugin, etc.
- Subscribing activator to some kind of events: button clicking or walking on plate, entering or leaving WorldGuard regions.
- Built-in scheduler (Timers) that can link an activator to server time (could be repeated or single-time) or to in-game time.
- MySQL support (using ReActions you can access to data of your web-server or any application and plugins)
- Creating inventory-menu (GUI) and linking activators to the slots of virtual inventory.
What can I create using the ReActions?
Here are some examples of usage of ReActions that I find at some servers:
- Teleporting system that can charge money or items and depends on player permissions and in-game time. For example: teleporting only during daytime using one diamond block as payment.
- Simple admin-shop that sells items. For example you can sell a full set of diamond armor by single click of mouse button.
- Radioactive areas - player gets a damage inside the area and some time after leaving this region.
- Bridges and gates.
- Create custom commands (including your native language) without the need to install third-party plugins.
- Creating an additional ways to solve quest or labyrinths. For example, player with the diamond sword in hand will be teleported to a special location, but player without the diamond sword will be teleported for another place.
- Executing third-party plugins commands will bring you a lot of fun.
- I know a server with a kind of strategy game. Players can’t build there, but there are some regions where players can buy buildings that provide resources (buildings are created by ScLoad plugin command executed using ReActions).
- Creating guns and jetpacks.
Video examples
There's no video that shows full features of ReActions. I will create it as soon as I can. But there're some videos that demonstrate some features of ReActions:
1. How to fly using item right-click
2. demonstrates two types of activators: rgenter and rgleave, and such action as potion effects features:
Video tutorials
You can see some tutorials demonstrating how to use ReActions here.
Why ReActions?
Some times I receive a question: why I should use ReActions instead of any scripting plugins that could be found at BukkitDev. I can say some words about it. If you learned any scripting language for any scripting plugins I can not recommend you to change it. Most of scripting plugins allow you to do the same things as ReActions. But there are some particular qualities to which I would like to focus:
- ReActions is really easy to start. After creating your first activator you will know everything about how ReActions works.
- I'm trying to made ReActions closer to user, not to developer: bukkit's built-in events usually are not mirrored in ReActions. For example ReActions contains a REGION_ENTER activator instead of mirror of PlayerMoveEvent where script-writer must check regions around the player.
- I'm trying to made ReActions closer to server owner (again) and going to add support to most popular plugins. Now supported: WorldGuard, Vault, Craftconomy3, Factions, Towny, PlayEffect and RacesAndClasses.
- You can create activators using plugin's command or editing the config files manually (it's even much easier).
- ReActions is not scripting language. And users thank me for this fact, and this is main reason for me to continue working on it.
Commands
<param> - required parameter.
[param] – optional parameter.
[param:<value>] – optional parameter, in which, if used, be sure to specify a value.
[v1 | v2 | v3] – optional parameter, which is substituted one of these three values.
Main command of plugin is "/react". Aliases: /rea, /ra.
- /react help - Somebody help!..
- /react add <ActivatorType> <ActrName> [Param] - Creates a new activator that subscribed to an event of specified type. List of activator types.
- /react add loc <LocName> - Saves your current position as the named location for further use (for example for teleporting to).
- /react add <ActrName> f <Flag> <Param> - Adds a specified condition to the activator. List of flags.
- /react add <ActrName> a <Actn> <Param> - Adds an action to the activator (executes if all checks returned true). All actions are performed in the same sequence in which they were added. List of actions.
- /react add <ActrName> r <Reaction> <Param> - Adds an action to the activator (executes if at least one check returned false). All reactions are performed in the same sequence in which they were added. List of reactions.
- /react copy [flag | actions | reactions] <SrcActr> <DestActr> - Copies flags, actions or reactions of the <SrcActr> to the <DestActr>. Note: If you omit the optional parameter (flag|actions|reactions), it will copy all.
- /react list [loc | group | type] [Page] - Displays the list of locations, groups or types. Note: If you omit the optional parameter then will be displayed the list of all.
- /react info <ActrName> [f | a | r] - Displays information about flags, actions or reactions of the activator. Note: If you omit the optional parameter then will be displayed full information about activator.
- /react group <ActrName> <GroupName> - Changes the group of activator to the specified. Note: If the specified group doesn’t exist then it will be created.
- /react remove <loc|activator> <ActrName|LocName> - Removes the activator or the location.
- /react remove <ActrName> <f | a | r> <num> - Removes from the activator the flag, action or reaction, which have the specified number. Note: you can see the numbers by using command /react info <ActrName> [f | a | r].
- /react clear <ActrName> <f | a | r> - Removes all flags, actions or reactions from the activator.
- /react debug <true|false|off> - Toggles debug mode. Here: true – all checks always return true; false – all checks always return false; off - turn off debug mode.
- /react check [radius] - Displays all geolocated activators in the specified range. Note: If you omit the optional parameter then the radius has it’s default value – 8 meters (blocks).
- /react reload - Reloads plugin (the plugin will reread all of it’s text files).
Permissions
- reactions.config - allows to create and setup activators and locations.
- reactions.debug - allows to use debug mode.
Read more about commands and permissions here
Interaction with third-party plugins
ReActions is compatible with some other plugins. You can feel free to use (or not) any of this plugins.
- Vault — group management and economy.
- WorldGuard — required for using regions-activators.
- Towny — you can change/check the player’s town (Warning! Towny located at external web-site and it not approved by bukkit team. Use it on your own risk).
- Factions — you can catch faction relationship changes, change player’s faction.
- RacesAndClasses — you can change/check player’s class and race.
- PlayEffect — you can play particles effects.
- Craftconomy3 — advanced economy features, multiple currency support.
bStats and update checker
ReActions includes two features that use your server Internet connection. First one is Metrics that is used to collect information about the plugin (versions of plugin, of Java.. etc.) and the second one is update checker that checks new releases of ReActions after plugin startup and every half hour. This feature is using API provided by dev.bukkit.org. If you don't like this features you can easily disable it. To disable update checker you need to set parameter "version-check" to "false" in config.yml. Obtain more information about bStats and learn how to switch it off, you can read here.
Like this plugin?
You can support releasing future versions!
also, I would like to ask you to add the ability to set constant player hit to action "damage" and an parametr to cancellation of action "wait"
hello developer of this plugin, i have an problem, that link now don't work and i can't know all actions that i can do, can you please do anything?
Не работает на 1.12. Пожалуйста обновите плагин для МС 1.12.
Please update for MC 1.12
[16:54:12 INFO]: [ReActions] Enabling ReActions v0.9.11
[16:54:12 ERROR]: Error occurred while enabling ReActions v0.9.11 (Is it up to date?)
java.lang.NoSuchMethodError: org.bukkit.configuration.file.YamlConfiguration.load(Ljava/io/InputStream;)V
at me.fromgate.reactions.FGUtilCore.InitMsgFile(FGUtilCore.java:732) ~[?:?]
at me.fromgate.reactions.FGUtilCore.<init>(FGUtilCore.java:107) ~[?:?]
at me.fromgate.reactions.RAUtil.<init>(RAUtil.java:35) ~[?:?]
at me.fromgate.reactions.ReActions.onEnable(ReActions.java:108) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:402) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:377) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:327) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:421) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:382) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:337) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:544) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
In reply to Fiks75:
https://circleci.com/gh/Redolith/ReActions
In reply to fromgate:
Yes, but I do not see the downloaded jar file.
In reply to Fiks75:
In reply to fromgate:
[13:33:08 ERROR]: Error occurred while enabling ReActions v0.9.11 (Is it up to date?)
java.lang.NoSuchMethodError: org.bukkit.configuration.file.YamlConfiguration.load(Ljava/io/InputStream;)V
at me.fromgate.reactions.util.message.BukkitMessenger.load(BukkitMessenger.java:135) ~[?:?]
at me.fromgate.reactions.util.message.M.initMessages(M.java:716) ~[?:?]
at me.fromgate.reactions.util.message.M.init(M.java:695) ~[?:?]
at me.fromgate.reactions.ReActions.onEnable(ReActions.java:69) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:402) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:377) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:327) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:421) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:382) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:337) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:544) [survival.jar:git-Spigot-cd6ba67-6aa0fa3]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
In reply to Fiks75:
In reply to fromgate:
Does anybody know, how to make activator just when you have a defined item in inventory (not in hand)? Or is there an option for actvators in activators? I want to group of players have regen potion effect, when they have 2 lapis ores in inventory and are in water. Thx. :)
In reply to Forge_User_43144762:
Hey,
in my console I see this: [14:15:04 INFO]: [ReActions] Failed to parse item: type:FEATHER name:{Schub} [14:15:04 INFO]: [ReActions] Failed to parse item: type:BONE name:{Teleport zum letzten Grabstein} [14:15:04 INFO]: [ReActions] Failed to parse item: type:SULPHUR
although these items works..
Complete Activators + Actions:
Not surprised, this is for german Community server.
In reply to K3nniii:
@Nooberooni
TP=Creative? Is it pre-defined locations? Anyway REGION_ENTER with teleporting works fine:
@fromgate
I found out that I was having issues with item formats is actually what led me to want to update. I thought that updating to the latest would fix the item formatting for me while referring to your .chm helpfile.
I'm currently running ReActions v0.9.3
The reactions that fail noticeably first are the region enter activators with a teleport reaction, with the region defined through worldguard. This is what was keeping me from updating, since I need my teleportation system. This is what it looks like in the activators.yml:
Thanks for the help!
@Nooberooni
Regions syntax did not changed. And ReActions is still supports old (5.x) versions of WorldGuard.
But which version of ReActions you use?
I added new item format in ReActions v0.9.5 and this could affect your activators - you must update them. Old format is partially supported but it is not possible to keep full support of both formats.
P.S. Soon I will uploaded updated version of ReActions that will support spigot 0.10 and last versions of PlayEffect and RacesAndClasses.
Hi fromgate,
I've been running a rather old version of ReActions for some time now, and been avoiding updating do to an issue I was having and it's been mostly working for me.
I'm unsure of the version, but when I update to latest everything works except anything to do with regions reactions. I remember reading there was an update to the WorldGuard dependency, but I'm unsure how to transition the update without losing all of my region reactions? What should I do to make all those reactions still work after updating?
:D Favorite plugin btw - Nooberooni
@K3nniii
@requiming
Here is dev.version: https://www.dropbox.com/s/oiog894qphecd07/ReActions.jar?dl=0
It updated to 1.10.2 but I need some time for tests.
@K3nniii
@requiming
It's in my TODO list. But.. I cannot predict when I will release new version.
But you can still use it. As I know there's only one issue that could be fixed by disabling MCStats. Read more here: http://mcstats.org/learn-more/
Pls Update for 1.9 & 1.10