Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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