Plugin category: Administration Suggested name: ExodusReport What I want: When a player executes the command /report <name> <reason> it will notify all online staff members with the permission exodusreport.report.notify. I would also like the messages to be configurable, I want the two messages below the same on separate lines. 1st line of message: 2nd line of message: - The two messages above will be sent to staff with the correct permission. - Also, skim-reading is much easier with paragraphs! Ideas for commands: /report <name> <reason> (With a configurable cool down) Ideas for permissions: exoduspvp.report exoduspvp.report.notify When I'd like it by: ASAP.
@Chromify lets see if this plugin that exist, is what @TheHoboHomeless wants. Edit: @TheHoboHomeless Do you want the player will be able to use chatcolors?
No, @tkuiyeager1. I want the message color to be configurable in the config.yml. And I also forgot to add when the player executes the command it sends them a message saying "&cThanks for your report, all online staff will be notified and will be handled soon."
@TheHoboHomeless Ok. Guys i have a problem, the config is not replacing: <player> with the player name. i know this should be on plugin development but i need help with this plugin. Code: Code: if (label.equalsIgnoreCase("report")) { if (!(sender instanceof Player)) { sender.sendMessage(prefix + "§cOnly Players Can Report!"); return false; } Player p = (Player) sender; if (p.hasPermission("exoduspvp.report")) { if (args.length >= 2) { Player t = Bukkit.getPlayer(args[0]); if (t != null) { StringBuilder str = new StringBuilder(); for (int i = 1; i < args.length; i++) { str.append(args[i]); str.append(" "); } String reason = str.toString(); String reasoncolor = ChatColor .translateAlternateColorCodes('&', reason); p.sendMessage(prefix + "§cThanks for your report, all online staff will be notified and will be handled soon."); for (Player player : Bukkit.getServer() .getOnlinePlayers()) { if (player.hasPermission("exoduspvp.report.notify")) { String reportmessageone = getConfig() .getString("ReportMessageONE"); reportmessageone.replaceAll("<player>", p.getName()); reportmessageone.replaceAll("<reportedplayer>", t.getName()); String reportmessageonecolor = ChatColor .translateAlternateColorCodes('&', reportmessageone); String reportmessagetwo = getConfig() .getString("ReportMessageTWO"); reportmessagetwo.replace("<reason>", reasoncolor); String reportmessagetwocolor = ChatColor .translateAlternateColorCodes('&', reportmessagetwo); player.sendMessage(prefix + reportmessageonecolor); player.sendMessage(prefix + reportmessagetwocolor); } } } else { p.sendMessage(prefix + "§7Player Is Not Online"); return false; } } else { p.sendMessage(prefix + "§7Please Use This Usage: /report <name> <reason>"); return false; } } else { p.sendMessage(prefix + "§7You Don't Have Permission To Use This Command"); return false; } } return true; } Config: Code: ReportMessageONE: "&6<player> &7was reported by &6<reportedplayer>" ReportMessageTWO: "&7Reason&8: &6<reason>" @timtower or @Chromify can you help me with this? EDIT by Timtower: merged posts, please use the edit button instead of double posting.
@tkuiyeager1 You just call the method like Code: somestring.replace But you need to use Code: somestring=somestring.replace
@timtower thank you very much. @TheHoboHomeless here is the link to the plugin. if you need anything to be changed just reply again. EDIT: also only players who have the permission you said can use this commands, op with out this permission cant use this command. Only player who have this permission can use those command. i mean someone who is op cant use this commands if he dont have permission so he cant use it
You can just google "Report plugin bukkit" and browse through them. I'm not a big coder, but I code extremely tiny plugins such as a plugin that when you enter a command, it runs a command from console, which can easily be done in-game anyway.
It's not my plugin request, but could you add a cooldown customization in the config? Like in seconds.
@Skrubzy Do you mean that if player is writing a report, then he can report again in the time that the config says? EDIT: also @TheHoboHomeless why arent you replying to the thread and tell me if you liked the plugin?
@Skrubzy maybe i will start to work on this tommorow. Ok @Skrubzy and @TheHoboHomeless i added cooldown to the report. Link: https://www.dropbox.com/s/oii92jqtpmynhgs/ExodusReport.jar?dl=0 EDIT by Timtower: merged posts, please use the edit button instead of double posting.