rTriggers
MotD, Tips, Obituaries, Macros, Customization Trigger messages on login, disconnect, timers, commands, death and more.
Personalize messages with tag replacements.
Features
- Trigger messages or commands on login, disconnect, timers, or even player death and command uses.
- Decide exactly who can set off a message, and who gets it. Name players individually or by group (via Permissions).
- Line breaks on words, colour continuations (thanks to modified vMinecraft code!)
- Personalized, fill-in-the-blanks style messages (insert the triggerer or recipient's name/IP/whatever here.)
Messages format
Example properties file is in the section 4.0. rTriggers will make a properties file at plugins/rTriggers/rTriggers.properties, where plugins is in your server's folder.
The properties file consists of a list of your messages. Each message is formatted like this:
triggerers=recipients:options:message
The triggerers tell rTriggers which groups or psuedogroups can set this message off. Recipients are the ones who actually see the message when a triggerer sets it off. Options tell when and in what manner a triggerer can set off a message (like when logging in, dying, or using a certain command). The message is the actual thing that gets sent.
One can specify multiple things in the triggerers, recipients, and options fields by using commas (no spaces). What each field does is described in a section below.
Legend
If it has <<>> around it, you need to include those! bold: The name of the option/group/whatever italics: An optional part of the tag. You can leave this out (leave out any | in front of it, too). underlined: You replace this with something (like a number, or a group name). Necessary, unless it's italics.
Triggerers and Recipients
Triggerers tell rTriggers who can set this message off. Recipients tell who sees this message whenever a triggerer sets it off. Leaving the recipients field blank will default the recipient to just the triggerer. groupname: Members in this group will trigger the message (or receive it, if they're in the recipients field).
<<everyone>>
: Everyone!<<hasperm|permissionnode>>
: People with the stated permission trigger/receive this message.<<player|playername>>
: Replace playername with the name of the player you want to be a triggerer (or a recipient).<<command-triggerer>>
and <<command-recipient>: Makes the player use the message as if it were a command.<<command-console>>
: Makes the server console use the message as if it were a command.<<say-triggerer>>
and<<say-triggerer>>
: Makes the player say the message.<<timer|interval>>
: (Triggerer only) Will repeat this message (replace 'interval' with how often you want to repeat the message in seconds). Use with lists to make tips!<<t|minutes>>
: This message will repeat every hour at this minute (<<t|30>>
happens at 1:30, 2:30, etc.)<<server>>
: (Recipient only)Message is sent to the server.<<triggerer>>
: (Recipient only) The person who triggered the message.<<twitter>>
: (Recipient only) Sends the message to Twitter (ServerEvents required!!!)<<near-triggerer|dist>>
: (Recipient only) Everyone inside a dist x dist square around the triggerer gets the message. Replace 'distance' with the active area of this.- not|groupname and not|
<<player|playername>>
and not|<<triggerer>>
and not|<<hasperm|permission>>
: (Recipient only, except for hasperm) Works like the versions without 'not|' in front of them, except it makes sure that the message WON'T get sent to that person/those persons. <<craftirc|tagname>>
: (Recipient only) Replace 'tagname' with the name of the tag you want CraftIRC to send the message to.
Options
Options tell rTriggers when the message should trigger, and how. Leaving this blank is the same as using the onlogin option.
- onlogin|override - Triggers when a triggerer logs in. Override will replace the default message with a blank line.
- ondisconnect|override - Triggers when a triggerer logs out. Override will replace the original disconnect message with a blank line.
- oncommand|commandname|override|number - Triggers when a triggerer uses the specified command. Override doesn't let the command move to other plugins (removes the 'unknown command!' prompts). The number specifies the number of required arguments.
- onconsole works like the oncommand event, except you can't override these. :( Not yet, anyway.
- onload|pluginname - Whenever the plugin called pluginname is loaded by CraftBukkit. Use with
<<customtrigger>>
as the triggerer. - onkick - Triggers when a triggerer gets booted from the server.
- ondeath|natural|deathcause - Triggers when a triggerer dies. If deathcause is specified, will only trigger on that manner of death. Possible death causes are: "contact", "entity_attack", "fall", "fire", "fire_tick", "lava", "drowning", "block_explosion", "entity_explosion", "suffocation", "custom", "lightning", and "something." If the natural option is used, then it will not trigger if the player died by playerkilling, or from a mob.
- ondeath|playerkill - Triggers when a triggerer is killed by a fellow player.
- delay|seconds - Makes the message wait a few seconds after being triggered before happening
- limit|seconds|pertrigger - Keeps a message from triggering faster than specified. If pertrigger is specified, then this limit is done on a per-player basis, rather than being for everyone.
Messages and Replacement Tags
This is what you want rTriggers to say or do. You can customize it with replacement tags, which rTriggers will find and replace with the appropriate information. Here's a list of replacement tags:
<<triggerer>>
- The name of person who triggered the message (by logging in, getting kicked, etc).<<recipient>>
- The name of the person who the message is being sent to (may be the same as triggerer in many cases).<<recipient-displayname>>
and<<triggerer-displayname>>
- The display name (as opposed to the raw name).<<player-list>>
- A list of all the players online.<<color>>
- Replaced with §. Follow up with a hexadecimal number to get a color! (0-9 or A-F)<<triggerer-balance>>
and<<recipient-balance>>
- The player's iConomy balance.<<death-cause>>
- (ondeath only!) The cause of death.<<killer>>
- (ondeath only!) The killer (player name, creature name, etc.)<<kick-reason>>
- (onkick only!) The reason given for kicking the player. oncommand only!<<param#>>
- Replace the # with parameter number, like<<param1>>
, etc. It's replaced by what the player puts into the command.<<param#+>>
and<<param#->>
- is replaced by all the parameters up to and including that number/starting with and following that number.<<params>>
- Is replaced by all the parameters put into the command<<list|listname|rand>>
- Will be replaced by an item in the list called "listname." If rand is specified, it will give a random one from the list. If not, it will go down the list sequentially. IP Address/Location related:<<triggerer-ip>>
and<<recipient-ip>>
- The player's IP Address.<<triggerer-locale>>
and<<recipient-locale>>
- The player's location.<<triggerer-country>>
and<<recipient-country>>
- The player's country.<<time>>
,<<hour>>
, and<<minute>>
: These do what you probably think they do.<<everyone>>
and<<hasperm|permission>>
the message will be repeated once for each player online/with that permission, with this tag replacement- You can use them multiple times in a message, and use different ones in a message.
- If you use the same tag multiple times, it will only trigger once for each player that it applies to. That is, making someone execute "/tell
<<everyone>>
Hello there,<<everyone>>
!" will only make them say hello to everyone by their name. It won't make them list off every player to every player. - If you use different ones, it'll go through every valid combination that satisfies those tags.
List Format
These go in the same file as the messages.
<<list|Bob>>=This text goes in the 'Bob' list. <<list|Bob>>=This is also in the 'Bob' list. <<list|haha>>=This is in a separate list called 'haha'
You replace "listname" with whatever name you want. You can use replacement tags here, if you like.
If you use either the replacement tag <<list|listname|rand>>
or <<list|listname>>
will be replaced by an item in the list called "listname." If 'rand' is specified, this item will be randomly selected from the list. If not, it will just pick the 'next' item on the list. Order is determined by the order you put it in the file.
Example
################# # MOTD Example: # Basic MotD for humans group humans=::§b Hey <<triggerer>>!@ Type /rules for a list of rules. # News that shows when players log in. # Also shows up when players type /news. # Use $ to continue on the next line, and @ to insert a linebreak. <<everyone>>=:onlogin,oncommand|/news|override:<<color>>b Here's our latest events:$ @Nothing at all, really! # Tells anyone in the 'humans' or 'gods' group who's online when they log in. humans,gods=::<<player-list>> #Displays rules when people use the /rules command <<everyone>>=<<triggerer>>:oncommand|/rules|override:1) Don't break things.$ @2) Have fun.$ @3) RESPECT MAH AUTHORATAH! # Announces the login and disconnect of anyone in the 'gods' group to the server gods=<<everyone>>:onlogin,ondisconnect:<<recipient>> pay heed, and hail <<triggerer>>, your god! #################### # Tips/Timer Example # This one does it sequentially <<timer|300>>=<<everyone>>::<<list|TipList>> # This version will pick a random tip <<timer|300>>=<<everyone>>::<<list|Burn|rand>> # Here are your tips <<list|TipList>>=This tip comes first. <<list|TipList>>=You see this tip 5 minutes (300 seconds) later. <<list|TipList>>=This one comes 5 minutes after the one above! # This timer makes the server use the backup command every 10 minutes! <<timer|600>>=<<command-console>>::backup ############## # Commands/Aliases example # Will announce whenever someone /tps to someone. <<everyone>>=<<everyone>>:oncommand|/tp:<<triggerer>> tp'd to <<param1>>! # Map multiple commands to one! # /suitup <target> # Gives the target player a full suit of iron armor and then teleports you to the target. gods=<<command-triggerer>>:oncommand|/suitup:give <<param1>> ironchestplate 1$ @give <<param1>> ironpants 1$ @give <<param1>> ironboots 1$ @give <<param1>> ironhelmet 1$ @tp <<param1>> ############## #Death Related stuff # Will announce the weakness of a god when he or she dies. god=<<everyone>>:ondeath:Even a god like <<triggerer>> can die... # Will randomly select something in the list "Burn" whenever someone burns to death. <<everyone>>=<<everyone>>:ondeath|fire:<<list|Burn|rand>> <<list|Burn>>=Let it burn! Just like <<triggerer>>. <<list|Burn>>=Would you like your <<triggerer>> medium or well done?
Hope this plugin doesn't die with 1.4.6. It's critical and an amazing plugin.
Will not load at all with 1.4.6 :-(
Well, I tried updating it myself, and I failed miserably. Part of the issue was that I wasn't sure which APIs to import, another was that the source for the rParser class was missing, and part was just that I had no idea what to do for some of the new errors.
This is one of the best plugin i ever seen. Wish my server was already rewarding me to donate some amount to get this plugin updated again...
@dogbig
I have the same issue every time a players get killed. I have no rtriggers event configured with ondeath options. Using Craftbukkit build #2488.
Someone should take over the development of this great plugin.
Not sure what's going on. I'm guessing MC 1.4.4 Bukkit broke it.
If I list certain groups that is allowed to use a command, only the first group can use it.
Before MC 1.4.4, it worked just fine.
McDenPatrol,admin,moderator=
<<everyone>>
:oncommand|/agecheck|override:@ @&cHey &a<<param1>>
,@ &cMay I Ask How Old You Are?@Fixed. After a few restarts to update/fix a couple other plugins, the commands began to work again.
I have a few requests for you:
First request: I dont know how difficult this would be for you, but is there any way that you could add a trigger for mysql queries? This could be used to check if a user is found in a database. For exmaple, you could check if a user is registered on a forum then change their permission group if they are.
Second request: This one is an addition to the
<<t>>
trigger, I feel as though it needs to also include the hour of the day. This could be useful for restarting a server at precisely 00:00 or 12:00. This would either be written in the following format<<t|hour|min>>
or<<t|hour:min>>
. To make a command run on the minute once every hour you would do it like either of these:<<t|*|min>>
,<<t|*:min>>
or simply<<t|min>>
depending on which you choose.Third request: A replacement message for a random number. For example, you put
<<random|5>>
in, and it will generate a random number 5 digits long. This could be useful for automatically deleting mining worlds at the end of the day (when used with the<<t|hour|min>>
suggsted prior) and regenerating a them with a random seed.Fourth request: Add a way so I could run a command against all players on my server at a certain interval. Example use : Kicking every player on the server or giving every player on the server 1 diamond.
If this is too hard, or you just aren't up for it, that is fine. It is just a useful suggestion. I know I personally would use them, but it probably would not be anywhere near as popular as the other triggers. Thanks for your consideration :)
@austindkelly
try the eco give
<<killer>>
<br> sorry, not sure about the timer issue@austindkelly
ironically all you have to do is have two entries for the command and it'll do both (most people think it'll just see the first entry and ignore the others)
@xclucky
you have it set to command-triggerer for "you must accept..." when "You" is not a command.. it's making the triggerer run /You must accept.. You should try changing it to just
<<triggerer>>
What am i doing wrong?
/accept works correctly, however, /deny does nothing. Both of them also say "unknown command"
Any help would be greatly apreciated
Is it possible to have two list execute on a command?
I want a <<command-console>> and a <<triggerer>> trigger to happen when performing one the same command.
Is there a way to make an on death trigger happen to the player that killed someone.
I want a player to get $1 each time he/she kills another player
this is what I have, but that gives the player that dies the $1, I want to give it to the victor.
<<everyone>>=<<command-console>>:ondeath|playerkill:<<list|onPlayerKill>>
<<list|onPlayerKill>>=$
@eco give <<triggerer>> 1\
also is it possible to have two timers setup? It seems like when I have these two timers, they go off much more frequently than they should
<<timer|3600>>=<<hasperm|triggers.use>>::<<list|Ads>>
<<timer|1800>>=<<hasperm|triggers.use>>::<<list|TipList|rand>>
Little error there on /kill player command:
2012-08-30 13:33:28 [SEVERE] Could not pass event PlayerDeathEvent to rTriggers
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:335)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:322)
at net.minecraft.server.EntityPlayer.die(EntityPlayer.java:307)
at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:663)
at net.minecraft.server.EntityHuman.damageEntity(EntityHuman.java:595)
at net.minecraft.server.EntityPlayer.damageEntity(EntityPlayer.java:349)
at org.bukkit.craftbukkit.entity.CraftLivingEntity.damage(CraftLivingEntity.java:166)
at org.bukkit.craftbukkit.entity.CraftLivingEntity.damage(CraftLivingEntity.java:151)
at com.earth2me.essentials.commands.Commandkill.run(Commandkill.java:34)
at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:102)
at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:96)
at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:383)
at com.earth2me.essentials.Essentials.onCommand(Essentials.java:301)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:492)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:880)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:826)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:808)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:276)
at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109)
at net.minecraft.server.ServerConnection.b(SourceFile:35)
at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:578)
at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Caused by: java.lang.NullPointerException
at com.reil.bukkit.rTriggers.listener.EventListener.onEntityDeath(EventListener.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:333)
... 31 more
The plguin doesn't recognize capital characters. Example: /go does its intended rtrigger function, but /gO runs the unknown command message.
Recently updated to CraftBukkit 1.3.1 RB and happen to get this error -=- http://pastebin.com/NEhLd8JJ -=- when a player committed suicide. although i have nothing setup with rtriggers for death events.
@x3chaos
as I use deathtp plus, I have it override the death messages, while keeping it's meassages disabled in the progreess. I honestly still cleaning up some of the trigger features for hit and such to state how instead of showing
<<code>>
in the death messages lol.I might just break down and ask what I'm doing wrong here later. Until then, I need to reorganize my properties file first. It's large and mostly mixed up. Even my 10 min tips are a bit out of date lol.
I'll work on it as soon as we move to a new host. Hopefully by then the server will run smoothly enough I can pay attention to my new apartment better. Just got it and after 4 days, it still looks like I just moved in last night....
Is it possible to override the vanilla onDeath message? I'm trying to replace it altogether.
For example, when someone dies from fall damage, the server will broadcast this:
when I only want it to broadcast the first line.
(The properties line is as follows)
@austindkelly
I can't think of any way to accomplish this off the top of my head, sorry. I might add in a |rand modifier to the player list.
@jjacobson
Thankye!
@jaggy80
Hrm. I'll look into this; thanks for reporting the bug!