Plugin category: admin tools Suggested name: player join message What I want: i want a plugin that when NEW players join whatever member of the staff is on it will automatically broadcast to the sevrer for the staff member [staff member's prefix] staff member name [staff member's suffix] : Welcome To The Server (new player's name) !!! Enjoy Your Stay it will also act like the staff member actually said it when they didn't the broadcast message should be configurable in the config along with the staff members in game names that will automatically announce for them also should support essentials color codes witch is "&" symbol. here a example : that was said less than a second of the player joining the server so obviously not him typing it him self .... Ideas for commands: No commands needed Ideas for permissions: No Permissions needed When I'd like it by: anytime just as soon as possible
He probably has the Macros mod which allows him to say things with key combos. This could work similarly to essentials' /sudo command perhaps?
the owner of the server is a youtuber and in his video he clearly didn't type a command and when a player joined (while he was recording ) it automatically said it for him and along with all the other oped staff members ZanderMan9
ZanderMan9 i already did he said it was custom and when i asked if maybe i could have it he said no, do you think you could make it...
Let me tell you a little something about trying to code a bukkit plugin... No, on second thought, let me not release my frustrations here. I'm trying to get into making plugins, but it's been an... experience.
Perhaps someone who has everything set up and some more experience could do this. There would need to be a permission for this, or a default to op, I know that much.
ZanderMan9 Yeah i may code this ZanderMan9 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
MCMatters I think using a permission would be better than a list in a config just so its easier to add players who will say the message
GalaxyPrisonMc Here it is. It picks a random online staff member and sends the message for him. Staff members are defined with the permission "welcomemessage.staff", which defaults to ops. If there are no staff members online it will just do nothing. You can change the message in the config I didnt test it, but I'm pretty sure it should work Here you go.. <Edit by Moderator: Redacted mediafire url> ZanderMan9 Here is the code, have a look. Hopefully you can learn something from it: Code:java public class Main extends JavaPlugin implements Listener { public void onEnable() {getConfig().addDefault("message", "&eWelcome to the server <player>! Enjoy your stay =]");getConfig().options().copyDefaults(true);saveConfig();Bukkit.getServer().getPluginManager().registerEvents(this, this);} @EventHandlerpublic void onJoin(PlayerJoinEvent event) {Player newbie = event.getPlayer();if(newbie.hasPlayedBefore()) {return; } List<Player> staff = new ArrayList<Player>();for(Player p : getServer().getOnlinePlayers()){if(p.hasPermission("welcomemessage.staff")) {staff.add(p);}}if(staff.isEmpty()) {return; } int numberOfStaffMembers = staff.size();int random = (int) (Math.random() * numberOfStaffMembers + 1);Player staffMember = staff.get(random); String message = ChatColor.translateAlternateColorCodes('&', getConfig().getString("message")).replaceAll("<player>", newbie.getName());staffMember.chat(message);} }
Geekxboy ill do both features Never Mind EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Flamedek do you think you could make it for anybody that has that permission to do it I'm only gonna give it toe And the other owner and a admin
timtower GalaxyPrisonMc Right now it should pick one staff member (random) and send it for that person. Just because I thought it would look way to fake if two people said the exact same thing at the same time. But I can add a second message to the config to choose from and send it for all online staff members if you want. And put a bit delay between them so its not as obviously fake
GalaxyPrisonMc Looks like you have 2 to choose from now. Here is my new version. It will send a message for every online staff member with a random delay between 1 and 4 seconds. Also in the config you can now add as many messages as you want and it will pick a random one for every staff member. By default there are 2 messages but if you add like 10 the chanse that you will say the same thing is very small. To add more just follow the format of the others, just change the number 1 up. So for an extra message add at the bottom: 3: '&eYour message here <player>' I can't test this by myself properly so if you use it please let me know if there are problems, or not. <Edit by Moderator: Redacted mediafire url>