geforkt von Mirrors/Paper
b3b04f2ca1
Upstream has released updates that appear 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: 9a4de097 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of CraftBukkit Changes: f43634ae4 SPIGOT-7170: Cannot set slots in custom smithing inventory 48f3a2258 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of 30e31b4d1 SPIGOT-7177: Certain blocks don't call BlockCanBuildEvent 982364797 SPIGOT-7174: Avoid adding air to CraftMetaBundle Spigot Changes: 6198b5ae PR-122: Add missing parentheses to pumpkin and melon growth modifier 1aec3fc1 Rebuild patches
26 Zeilen
1.6 KiB
Diff
26 Zeilen
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Tue, 13 Aug 2019 06:35:17 -0700
|
|
Subject: [PATCH] Fix MC-158900
|
|
|
|
The problem was we were checking isExpired() on the entry, but if it
|
|
was expired at that point, then it would be null.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index f77bbe5ebd3fd93ec6cf92a049b585178c7583d8..d1da13e361c4898420e9d6ab8a9c48cb29ae65bf 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -612,8 +612,10 @@ public abstract class PlayerList {
|
|
Player player = entity.getBukkitEntity();
|
|
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.getRawAddress()).getAddress());
|
|
|
|
- if (this.getBans().isBanned(gameprofile) && !this.getBans().get(gameprofile).hasExpired()) {
|
|
- UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile);
|
|
+ // Paper start - Fix MC-158900
|
|
+ UserBanListEntry gameprofilebanentry;
|
|
+ if (getBans().isBanned(gameprofile) && (gameprofilebanentry = getBans().get(gameprofile)) != null) {
|
|
+ // Paper end
|
|
|
|
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned.reason", gameprofilebanentry.getReason());
|
|
if (gameprofilebanentry.getExpires() != null) {
|