mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
c0d07c1b67
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: f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround e677c370 Update ECJ version 5058a35d SPIGOT-5860: Item.setItemStack should be NotNull CraftBukkit Changes:d77f4d9b
SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround53c95627
SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent2ab04d24
Update ECJ version7884e079
SPIGOT-5868: Blocks do not tick in custom nether / end2a848286
SPIGOT-5863: Don't check colour in scoreboard length validationf2cbce30
SPIGOT-5866: Beehive unknown TargetReason Spigot Changes: ad703da0 SPIGOT-5870: /plugins "website" field shows "version" 1a27cfd8 #98: Improve output of /plugins command using text components 732d5bab Disable checkstyle in Spigot blocks 0199a9a6 #97: Add Memory Usage to Ticks Per Second Command. 33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension
33 lines
1.7 KiB
Diff
33 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 13fe3fbf589d7528708e9fa7bed65dabde24a9ae..5bed3682af9eb63b355bb24bbee466a05ae7cc34 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -143,7 +143,7 @@ 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();
|
|
@@ -151,7 +151,7 @@ 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
|
|
|