Skip to content

Instantly share code, notes, and snippets.

@Dinnerbone
Created February 1, 2012 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dinnerbone/1714514 to your computer and use it in GitHub Desktop.
Save Dinnerbone/1714514 to your computer and use it in GitHub Desktop.
Might we have made plugins a little too easy? :(
package com.dinnerbone.plugins.greetings;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class GreetingPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
event.getPlayer().sendMessage("Welcome, " + event.getPlayer().getDisplayName() + "!");
}
}
Copy link

ghost commented Jul 29, 2014

This still looks like working in 1.7 :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment