2020-02-11 05:35:46 +01:00
|
|
|
From 65130b9f04b275e5bb76f5ef26d24a78fa7a0655 Mon Sep 17 00:00:00 2001
|
2019-08-15 04:32:25 +02:00
|
|
|
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/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
2020-01-22 03:02:07 +01:00
|
|
|
index 68e089a4b..f702619aa 100644
|
2019-08-15 04:32:25 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
2019-12-12 17:20:43 +01:00
|
|
|
@@ -513,8 +513,10 @@ public abstract class PlayerList {
|
2019-08-15 04:32:25 +02:00
|
|
|
Player player = entity.getBukkitEntity();
|
|
|
|
PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress());
|
|
|
|
|
|
|
|
- if (getProfileBans().isBanned(gameprofile) && !getProfileBans().get(gameprofile).hasExpired()) {
|
|
|
|
- GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile);
|
|
|
|
+ // Paper start - Fix MC-158900
|
|
|
|
+ GameProfileBanEntry gameprofilebanentry;
|
|
|
|
+ if (getProfileBans().isBanned(gameprofile) && (gameprofilebanentry = getProfileBans().get(gameprofile)) != null) {
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()});
|
|
|
|
if (gameprofilebanentry.getExpires() != null) {
|
|
|
|
--
|
2020-01-30 10:36:03 +01:00
|
|
|
2.25.0
|
2019-08-15 04:32:25 +02:00
|
|
|
|