LoginCommand
LoginCommand allows you to execute commands when players join your server.
Concept
The plugin uses command groups. Each group can have a number of commands. If a player has the corresponding permission node for a command group, those commands will be executed when he/she joins the server.
The commands are executed from the console. You can also execute player commands by adding the "sudo %name_of_player%" prefix to a command.
You can set a delay.
You can set a cooldown.
If you want some players to be ignored (regardless of other permissions), you can do that by giving them a permission node.
Setup instructions
1. Download the plugin.
2. Copy the plugin into your server's plugin folder.
3. Start the server.
4. Create a command group and add commands to it.
Let's say that we want to give Helpers a diamond pickaxe as an award when they join the server. We come up with a group name, "helpergifts" to store these commands.
The generalized command to add a command is:
/logincommand add <new group name> <command>
In this case:
/logincommand add helpergifts give %name_of_player% diamond_pickaxe
5. Give somebody the permission of the command group.
Now we have to give the permission group "Helpers" a certain permission node.
In case you use PermissionEx, the command might look like this:
/pex group Helper add logincommand.group.helpergifts
6. Further configuration:
You can find some more settings (command delay, cooldown, whether op's are exempt) in the configuration file. After making changes, issue the /logincommand reload command.
Troubleshooting
If the plugin doesn't work:
- Make sure that the player doesn't have the exempt permission node. See the Permissions section.
- On default settings, operators are exempt. If you want the plugin to affect them, set the value of "ops exempt" to "false" in the configuration file, then issue the /logincommand reload command.
Commands
Root command and aliases:
/logincommand
/lic
/lc
Reload the configuration file:
/lc reload
Add a command to a command group; (also auto-creates the group):
/lc add <group> <command>
Remove a command from a command group:
/lc remove <group> <command>
Placeholders
When you add a command and specify a placeholder, the placeholder will be replaced on every execution with its corresponding value.
Valid placeholders are:
The name of the player who joins the server:
%name_of_player%
Permissions
logincommand.admin
description: Allows you to edit and reload the config.
default: operators
logincommand.exempt
description: The plugin will ignore your login.
default: Nobody, but if you have the * permission node (for example, your Admin group has it), Bukkit will report that you have this permission as well. Use negative permission nodes to counteract this.
logincommand.group.<group>
description: Group specific permission for command execution.
default: nobody
Example config
execution delay (sec): 1
login cooldown (min): 60
configversion (don't change): 2
ops exempt: true
# when the above is true, operators will be ignored
config:
group1:
- sudo <name> warp woods
helper:
- eco give <name> 10
timestamps (auto generated): []
The effects:
Players who have the logincommand.group.group1 permission will be teleported to warp woods after 1 second of their joining, if their last login was more than 60 minutes ago.
Players with the logincommand.group.helper permission will be given 10 units of money (the same delay and cooldown applies).
-
View User Profile
-
Send Message
Posted Jul 4, 2013@adventuretc
yes, but the plugin is most likely crashing my server. Ill pm you.
-
View User Profile
-
Send Message
Posted Jun 27, 2013@fungreenfox
Did you turn on the mentioned feature? :P
-
View User Profile
-
Send Message
Posted Jun 26, 2013@adventuretc
I am using the update now, but saw a few days ago. I havent noticed anything ingame yet.
-
View User Profile
-
Send Message
Posted Jun 10, 2013@2Andri
@fungreenfox
I've released an update with an 'ops exempt' feature, it will be available soon.
-
View User Profile
-
Send Message
Posted Jun 7, 2013@Bl0c
Um, please read the linked comment and my reply, thanks. http://dev.bukkit.org/bukkit-mods/logincommand/#c24
-
View User Profile
-
Send Message
Posted Jun 7, 2013You can create or edit this plugin to allow to execute orders for new players please?
-
View User Profile
-
Send Message
Posted May 23, 2013@adventuretc
Andri is an admin at my server. He has this permission through the operator subgroup.
Ppl are still being sent to spawn if they are op. Is this fixset? you promised to fix this in next update, its a month ago now.
-
View User Profile
-
Send Message
Posted May 20, 2013@Enkcraft
Try updating to JRE 7
-
View User Profile
-
Send Message
Posted May 19, 2013Don't work for my :( This is my error :
19.05 21:03:43 [Server] INFO ... 9 more 19.05 21:03:43 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) 19.05 21:03:43 [Server] INFO at java.lang.Class.forName(Class.java:266) 19.05 21:03:43 [Server] INFO at java.lang.Class.forName0(Native Method) 19.05 21:03:43 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:266) 19.05 21:03:43 [Server] INFO at java.lang.ClassLoader.loadClass(ClassLoader.java:321) 19.05 21:03:43 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) 19.05 21:03:43 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) 19.05 21:03:43 [Server] INFO at java.net.URLClassLoader.findClass(URLClassLoader.java:205) 19.05 21:03:43 [Server] INFO at java.security.AccessController.doPrivileged(Native Method) 19.05 21:03:43 [Server] INFO at java.net.URLClassLoader$1.run(URLClassLoader.java:212) 19.05 21:03:43 [Server] INFO at java.net.URLClassLoader.access$000(URLClassLoader.java:73) 19.05 21:03:43 [Server] INFO at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) 19.05 21:03:43 [Server] INFO at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 19.05 21:03:43 [Server] INFO at java.lang.ClassLoader.defineClass(ClassLoader.java:634) 19.05 21:03:43 [Server] INFO at java.lang.ClassLoader.defineClass1(Native Method) 19.05 21:03:43 [Server] INFO Caused by: java.lang.UnsupportedClassVersionError: me/speed/LoginCommand/LoginCommand : Unsupported major.minor version 51.0 19.05 21:03:43 [Server] INFO at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) 19.05 21:03:43 [Server] INFO at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382) 19.05 21:03:43 [Server] INFO at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:106) 19.05 21:03:43 [Server] INFO at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11) 19.05 21:03:43 [Server] INFO at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55) 19.05 21:03:43 [Server] INFO at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:217) 19.05 21:03:43 [Server] INFO at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.java:239) 19.05 21:03:43 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) 19.05 21:03:43 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) 19.05 21:03:43 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184) 19.05 21:03:43 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/speed/LoginCommand/LoginCommand : Unsupported major.minor version 51.0 19.05 21:03:43 [Server] SEVERE Could not load 'plugins/LoginCommand-0.4 (1).jar' in folder 'plugins'
-
View User Profile
-
Send Message
Posted May 18, 2013Anyone there can help me with seting up so when you join you vil use the command "hub"?? :-)
-
View User Profile
-
Send Message
Posted May 8, 2013@adventuretc
k thx anyways :P
-
View User Profile
-
Send Message
Posted May 8, 2013@Zarkiel7
Yes, possibly. I could add a function for that, but that wouln't be more efficient than the way of doing you described.
-
View User Profile
-
Send Message
Posted May 8, 2013If i wanted to run a command as soon as the player joins for the first time, and only then, could i just set the cooldown to like 999999999 or something?
-
View User Profile
-
Send Message
Posted May 5, 2013@adventuretc
It is working perfectly now, thanks!! :)
-
View User Profile
-
Send Message
Posted May 5, 2013@bjonness98
I see, I've made a new version for you. Please check if this works or not:
Link Removed: http://www.mediafire.com/download.php?hqi8dkua54ji1pz
-
View User Profile
-
Send Message
Posted May 5, 2013@adventuretc
Yes, but I will have the "spawn <name>" there it is working fine, but then I join so exit and join again fast the command is not running. Here is a example
-
View User Profile
-
Send Message
Posted May 5, 2013@bjonness98
Replace "spawn <name>" with any command that you would like to run (the commands are run from the console).
-
View User Profile
-
Send Message
Posted May 5, 2013@adventuretc
Thanks, but how can I do so every time people login a command will run. My config:
-
View User Profile
-
Send Message
Posted May 5, 2013@bjonness98
It is used to measure the time between the last and the current login of a user.
-
View User Profile
-
Send Message
Posted May 5, 2013What is the timestamps?