Guest User

Untitled

a guest
May 23rd, 2015
234
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.itzxreplay.SuperJoin;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.event.EventHandler;
  6. import org.bukkit.event.Listener;
  7. import org.bukkit.event.player.PlayerJoinEvent;
  8. import org.bukkit.plugin.PluginManager;
  9. import org.bukkit.plugin.java.JavaPlugin;
  10.  
  11. public class Main extends JavaPlugin implements Listener {
  12.  
  13. public void onEnable(){
  14. PluginManager pm = getServer().getPluginManager();
  15. pm.registerEvents(new Main(), this);
  16. }
  17.  
  18. @EventHandler
  19. public void onPlayerJoin(PlayerJoinEvent e){
  20. Player p = e.getPlayer();
  21. e.setJoinMessage(ChatColor.AQUA + p.getPlayerListName() + " Has joined the Example Server");
  22.  
  23. }
  24.  
  25. }
RAW Paste Data