Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.einfachbauen.hubundportalplugin;
- import org.bukkit.Bukkit;
- import org.bukkit.Location;
- import org.bukkit.World;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- public class onJoinEvent implements Listener {
- private Main plugin;
- onJoinEvent(Main instance) {
- plugin = instance;
- }
- @EventHandler
- public void onJoin(PlayerJoinEvent e) {
- Player p = e.getPlayer();
- e.setJoinMessage(null);
- World w = Bukkit.getServer().getWorld(plugin.getConfig().getString("config.spawn.world"));
- double x = plugin.getConfig().getDouble("config.spawn.x");
- double y = plugin.getConfig().getDouble("config.spawn.y");
- double z = plugin.getConfig().getDouble("config.spawn.z");
- float yaw = (float) plugin.getConfig().getDouble("config.spawn.yaw");
- int pitch = (int) plugin.getConfig().getDouble("config.spawn.pitch");
- p.teleport(new Location(w, x, y, z, yaw, pitch));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement