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! Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide 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
request: permissions based: /help , different /helps for different groups? thanks codename_B ps: my bananamap
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.
Nope, that's beyond the scope of this plugin. It's simple a /help from a flatfile. Glad someone else sees the use
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
hmm.. difference with this to HelpCenter(even if it's outdated, it's still 100% functioning fine in 1060) plugin?
Is this you trying to complete your own challenge of writing a plugin in less then then 50 lines or something? xD
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.
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.