SHARE
TWEET

TeleportSpawn

tmoflash Dec 18th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.tmoflash.teleportspawn;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Location;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.event.EventHandler;
  7. import org.bukkit.event.Listener;
  8. import org.bukkit.event.player.PlayerJoinEvent;
  9. import org.bukkit.plugin.java.JavaPlugin;
  10.  
  11. public class Main extends JavaPlugin implements Listener{
  12.    
  13.  
  14.     @Override
  15.     public void onEnable() {
  16.         Bukkit.getServer().getLogger().info("TeleportSpawn v." + this.getDescription().getVersion() + " has been enabled!");
  17.     }
  18.    
  19.  
  20.     @EventHandler
  21.     public void onPlayerJoin(PlayerJoinEvent event) {
  22.         Player player = event.getPlayer();
  23.         player.teleport(new Location(Bukkit.getServer().getWorld("world"), 795.5, 138.0, 118.5));
  24.            
  25.           }
  26.    
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top