geforkt von Mirrors/Paper
1e7dd72f15
The game uses 0.95d now
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 b6bebb1eee1ee552b18860c8414f4866897c2bbd..68935845e9041706c2e203ff436f50d92c190a8f 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -627,8 +627,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.channel.remoteAddress()).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) {
|