Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
34 Zeilen
1.8 KiB
Diff
34 Zeilen
1.8 KiB
Diff
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/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 0ba54e24944c9e30bc06dc2556e9c856d2b335bc..cb6add86fadcb4684ed917a8b05ada84a75c0a27 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -200,4 +200,10 @@ public class PaperWorldConfig {
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ public boolean disableEndCredits;
|
|
+ private void disableEndCredits() {
|
|
+ disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false);
|
|
+ log("End credits disabled: " + disableEndCredits);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index a29450df13bc32d5bc700a944541793a696a94d2..58943b2c2cb416753c60ca5cd4445911ab98eeb6 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -980,6 +980,7 @@ public class ServerPlayer extends Player {
|
|
this.unRide();
|
|
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
|
|
if (!this.wonGame) {
|
|
+ if (level.paperConfig.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits
|
|
this.wonGame = true;
|
|
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
|
|
this.seenCredits = true;
|