Created
February 1, 2012 01:59
-
-
Save Dinnerbone/1714514 to your computer and use it in GitHub Desktop.
Might we have made plugins a little too easy? :(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() + "!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This still looks like working in 1.7 :P