Created
February 27, 2011 20:53
-
-
Save inklesspen/846528 to your computer and use it in GitHub Desktop.
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
@Override | |
public void onPlayerJoin(PlayerEvent event) { | |
Player player = event.getPlayer(); | |
Location home = plugin.getPlayerHome(player); | |
if (home != null) { | |
player.setCompassTarget(home); | |
} | |
} | |
@Override | |
public void onPlayerRespawn(PlayerRespawnEvent event) { | |
Player player = event.getPlayer(); | |
Location home = plugin.getPlayerHome(player); | |
if (home != null) { | |
event.setRespawnLocation(home); | |
player.setCompassTarget(home); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment