How to edit the /help message?

Discussion in 'Plugin Development' started by 32BitTricks, Sep 6, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    32BitTricks

  2. Offline

    jay275475

    Code
    I could Make this for you if you like

    And Possibly Give you source code if you want to code something of of it

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  3. Offline

    StevenMG

    You would just use player.sendMessage("insert text here"); for each line of text you would like to send.

    Also, in the future give more details about what you need help with rather than a general question like this one.
     
  4. Offline

    jay275475

    But I couldnt do it anytime soon because Im busy working on a plugin

    Here's What You need
    Main Class
    Code:java
    1. package me.jay275475.HelpPlugin
    2.  
    3.  
    4. import org.bukkit.Bukkit;
    5. import org.bukkit.ChatColor;
    6. import org.bukkit.command.Command;
    7. import org.bukkit.command.CommandSender;
    8. import org.bukkit.entity.Player;
    9. import org.bukkit.plugin.java.JavaPlugin;
    10.  
    11. public class Main extends JavaPlugin {
    12.  
    13. public static Bukkit plugin;
    14.  
    15. public void onEnable(){
    16. getLogger().info("Enabled!");
    17. }
    18.  
    19.  
    20. public void onDisable(){
    21. getLogger().info("Disabled!");
    22. }
    23. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    24. Player player = (Player) sender;
    25. if(cmd.getName().equalsIgnoreCase("help")){
    26. player.sendMessage(ChatColor.GOLD + "Your Text Here"
    27. player.sendMessage(ChatColor.GOLD + "Your Text Here"
    28. player.sendMessage(ChatColor.GOLD + "Your Text Here"
    29. player.sendMessage(ChatColor.GOLD + "Your Text Here"
    30. return false;
    31. }
    32. }
    33. }


    This is plugin.yml
    Code:java
    1. name: HelpPlugin
    2. author: You
    3. version: 1
    4. main: me.(YourBukkitName).HelpPlugin
    5. version:
    6. commands:
    7. help:
    8. description: Shows you Help!

    Hopefully this Helps!

    Please tell me if you need anymore help

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  5. Offline

    32BitTricks

    Im pretty new to all this, i see this code and wonder where i put it? :D do i use eclipse or is it a new java package?

    Ok got it and done it thank you very much!!!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  6. 32BitTricks
    For the future, creating any new command, such as /op or /help will override the default command :)
     
Thread Status:
Not open for further replies.

Share This Page