Inactive [ADMN/INFO] Help v1.0 - help from a flatfile [1060]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, Aug 24, 2011.

  1. Offline

    codename_B

    Help
    help from a flatfile - 45 lines

    24/08/2011 - codename_B

    Download Help v1

    How to use:
    Drop the plugin into plugins/
    Run once
    Edit the generated help.txt
    /reload
    Type /help - look it works!

    Show Spoiler

    Code:
    package de.bananaco.help;
    import java.io.*;
    import java.util.ArrayList;
    import org.bukkit.ChatColor;
    import org.bukkit.command.*;
    import org.bukkit.plugin.java.JavaPlugin;
    public class Help extends JavaPlugin {
        public ArrayList<String> message = new ArrayList<String>();
        public void log(Object input) {
            System.out.println("[Help] " + String.valueOf(input));
        }
        @Override
        public void onDisable() {
            log("Disabled");
        }
        @Override
        public void onEnable() {
            readHelp();
            log("Enabled.");
        }
        public void readHelp() {
            try {
                File help = new File("help.txt");
                if (!help.exists())
                    help.createNewFile();
                BufferedReader br = new BufferedReader(new InputStreamReader(
                        new DataInputStream(new FileInputStream(help))));
                String strLine;
                while ((strLine = br.readLine()) != null) {
                    message.add(strLine);
                }
                br.close();
                log("help.txt read successfully!");
            } catch (Exception e) {
                log("help.txt could not be read!");
            }
        }
        public boolean onCommand(CommandSender sender, Command cmd,
                String commandLabel, String[] args) {
            sender.sendMessage(ChatColor.AQUA+"--"+ChatColor.GREEN+"Help"+ChatColor.AQUA+"--");
            for(String m : message)
            sender.sendMessage(m);
            return true;
        }
    }
    


    Changelog:
    24/08/2011 - released awesome plugin
     
    Iestyn likes this.
  2. Offline

    Hopium

    request: permissions based: /help , different /helps for different groups? thanks codename_B

    ps: my bananamap
     
  3. Offline

    Jaker232

    Why do you need to post a map of your server, when this is just a general Help plugin, not a mapper?

    On-topic: Nice! I might use this soon.
     
  4. Offline

    codename_B

    Nope, that's beyond the scope of this plugin. It's simple a /help from a flatfile.
    Glad someone else sees the use :D
     
  5. Offline

    Hopium

    um cause codename made the map plugin and i thought maybe he would like to see his work in use? huge fan of his plugins
     
  6. Offline

    codename_B

    :) you need to update to 1.6 just fyi
     
  7. Offline

    morizuki

    hmm.. difference with this to HelpCenter(even if it's outdated, it's still 100% functioning fine in 1060) plugin?
     
  8. Offline

    Orcem12

    Is this you trying to complete your own challenge of writing a plugin in less then then 50 lines or something? xD
     
  9. Offline

    Kane

    support multiple files so you can do /help vip etc etc. Support caching or GTFO <3
     
  10. Offline

    spunkiie

    Doesn't create the 'Help' dir under plugins, nor the help.txt file.

    (btw: Linux)
     
  11. Offline

    codename_B

    help.txt in server root
     
  12. Offline

    jespertheend

    So easy but so usefull.
    I'm going to try it

    Can you add color codes and multiple pages?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  13. Offline

    Kohle

    Yes, needed :)
    Also needed :)

    Would love these features.
     
  14. Offline

    bellettiboy

    if i could request to have it be able to have more than one page.. then i would totally love this plugin i do love it already but that would really helpp...

    this is my help and i really wish i could make it neeter with pages ok i will say this if u make pages i will donate to this plugin this is my help on my server and i need more space so i will donate for pages i really want them thanks :)))))

    View attachment 8548

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  15. Offline

    Themadman

    Can you fix the download link plz
     
  16. Offline

    Iestyn

    Please fix download.
     
  17. codename_B I said..FIX IT! :p Anyway, way to let your domain expire...
     
  18. Offline

    codename_B

    Wasn't my domain, I was just sharing the hosting with a generous person.
     
  19. (Guys, he's lying)
    Still fix it, because it's *so* popular
     
  20. Offline

    codename_B

    Really - *so* popular? :p It's like 36 lines of code and could be made by anyone XD
     
  21. nuu, it got 2 requests to be fixed. That's more than all my plugins combined! ;)
     

Share This Page