Hi I am looking for a plugin for someone to create where you type in /(whatever). What I mean by this is I have donater ranks and such and I want them to have something like this: /Snake <--------------- A buycraft package {Then appears in chat} -----[Snake]------ Fly 5 Set Homes Color Chat So basically I make the command name, and what appears in the chat. Please create a plugin! Thank You
I am starting on this, but to get you a versions really quick, i need to know which commands you want. I will add in functionality to change the commands yourself, but Just to hurry and get started on this, I will hard code them in first.
alexander7567 You should just put the customization feature in at the beginning. Or since the only way to do that is frowned upon, you could just update it every time he wants a new package.
I am working on it now. I will publish it as an actual plugin once I have a first release done. I agree that I should, but just so he can hurry and get him a plugin that will do it, I was going to just hurry and hard code it. But if he does not reply fast enough, then I will go ahead and code it right. I am just fairly new to developing plugins, so it takes me a little time. But I am trying to take this on so I can learn Java and the Bukkit API.
GroundSnake4E this request has already been created. Take a look at Better Alias on bukkit dev. It allows you to alias commands and perform multiple operation from a single command.... Example: /lobbykit --- Commands it runs... /give <player> leather_chestplate /give <player> lether_boots /give <player> leather_chaps /give <player> wooden_sword
timtower That can do it as well... Example: /serverinfo --- "reply This server has been running for 5 months" "reply The owner takes pride in running the server smoothly""reply Please respect all players" that will send this message to the player... Code: This server has been running for 5 months The owner takes pride in running the server smoothly Please respect all players The functionality of Better Alias is quite astonishing. The developer really thought of everything.
I almost have this done.. Even if there is something that does it already out there.. This will do it too! lol. I have it pretty well done and will publish it tommorow. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I wrote up some quick code that would accomplish this Code:java public class Commander extends JavaPlugin{ List<String> commandList = Commander.this.getConfig().getStringList("commands"); String[] commandArray = commandList.toArray(); public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){ for(int a = 0; a < commandArray.length; a++){ if(cmd.getName().equalsIgnoreCase(commandArray[a]){ ChatColor c = ChatColor.YELLOW;ChatColor g = ChatColor.GREEN; String msg = g + Commander.this.getConfig().getString("header.prefix");msg = msg + commandArray[a] + Commander.this.getConfig().getString("header.suffix");msg = msg + "\n" + g + Commander.this.getConfig().getString(commandArray[a] + ".text"); sender.sendMessage(msg); return true; } } return false; } } and the config.yml would just be: Code: header: prefix: ---[ suffix: ]--- #place to add commands for the first time #make sure this isn't omitted or the command won't load! commands: - example #format for commands #<command name>: # text: <command text> #use \n for a newline #example command example: text: This is an example command! also, the plugin.yml would just be: Code: name: Commander main: <package name>.Commander version: 1.0.0 commands: <command>: permission: commander.<command> permissions: commander.<command>: default: true
greatestminer98 GroundSnake4E Ok, I have finished this! GO here to see how to use it and to download it. I am adding it to BukkitDev now, but it may take a while to get approved. Edit: It has been approved! Here is the link: http://dev.bukkit.org/bukkit-plugins/custominfocommands
greatestminer98 GroundSnake4E Considering I spent roughly around 8 hours on this, I would love to hear from the orginal poster weather or not this met their needs.
Thank You alexander7567 !!! I will be using it soon for my server but I can not get my control panel to download plugins at the moment. Thank You again!!! I will use it soon
Hi alexander7567 I am trying to get this plugin through multicraft control panel and it says this "CustomInfoCommands Version" Do you know why?
From (https://dev.alexriggs.com/bukkit/custominfocommands/) and BukkitDev There are no permissions yet. If you make a command, everyone can do it. Which I will change that in the future.
If it works well, I would appreciate a good comment on the BukkitDev page. http://dev.bukkit.org/bukkit-plugins/custominfocommands/ I am glad you like it, and let me know if it works good for you.
Read the todo at the very bottom of the desciption.... https://dev.alexriggs.com/bukkit/custominfocommands/ I have not added color support for it yet.
alexander7567 for color support, (I haven't tested this), you would intercept the config string and replace & with §. Code: String toPrint = getConfig().getString(command + ".text"); toPrint.replace("&", "§"); sender.sendMessage(....); replace the ... with your formatted message and the toPrint variable with the intercepted message variable. Hope this helps
You can also use VariableTriggers Create a Command in the CommandTriggers.yml Then create the command, and use the Player script command to display what ever you want. VariableTriggers bukkit page in my signature