mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
ce8c91600b
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3284612a SPIGOT-5853: Add DragonBattle#generateEndPortal() e4db04ae SPIGOT-5841: New map colours broken CraftBukkit Changes:d4243510
SPIGOT-5853: DragonBattle#getEndPortalLocation() throws NPE on new world1601ec31
SPIGOT-5845: ChatColor.RESET does not work in ItemMeta to reset italics4d92db6f
CraftChatMessageTest does not need AbstractTestingBase71045d3d
SPIGOT-5828: Unlock worlds on unloaddbc347b9
SPIGOT-5841: New map colours broken14053c70
SPIGOT-5847: BlockFadeEvent cannot be triggered asynchronously from another thread Spigot Changes: 6f4ff1b6 SPIGOT-5851: ChatColor (HEX) doesn't appear correctly in the ActionBar d94a518a SPIGOT-5848: PlayerSpawnLocationEvent throws NPE when setting a location of another world
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Steve Anton <anxuiz.nx@gmail.com>
|
|
Date: Thu, 3 Mar 2016 00:09:38 -0600
|
|
Subject: [PATCH] Add PlayerInitialSpawnEvent
|
|
|
|
For modifying a player's initial spawn location as they join the server
|
|
|
|
This is a duplicate API from spigot, so use our duplicate subclass and
|
|
improve setPosition to use raw
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
|
|
// Spigot start - spawn location event
|
|
Player bukkitPlayer = entityplayer.getBukkitEntity();
|
|
- PlayerSpawnLocationEvent ev = new PlayerSpawnLocationEvent(bukkitPlayer, bukkitPlayer.getLocation());
|
|
+ PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(bukkitPlayer, bukkitPlayer.getLocation()); // Paper use our duplicate event
|
|
Bukkit.getPluginManager().callEvent(ev);
|
|
|
|
Location loc = ev.getSpawnLocation();
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
|
|
entityplayer.spawnIn(worldserver1);
|
|
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
|
|
- entityplayer.setPosition(loc.getX(), loc.getY(), loc.getZ());
|
|
+ entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world)
|
|
entityplayer.setYawPitch(loc.getYaw(), loc.getPitch());
|
|
// Spigot end
|
|
|