Paper/patches/server/0038-Configurable-end-credits.patch

19 lines
1.1 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
2023-03-14 19:36:39 +01:00
index 531d0b0dcd499adf0d973bf336272aa1966069f3..dac816f64a60988291cba8f1a88fd6e0cd5ea1a7 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
2023-03-14 19:36:39 +01:00
@@ -1022,6 +1022,7 @@ public class ServerPlayer extends Player {
2021-06-11 14:02:28 +02:00
this.unRide();
2021-06-12 00:37:16 +02:00
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
2021-06-11 14:02:28 +02:00
if (!this.wonGame) {
+ if (level.paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits
2021-06-11 14:02:28 +02:00
this.wonGame = true;
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
this.seenCredits = true;