Adds /paper command for reloading the paper config. Closes GH-639 Per-world config logging has been removed in favor of all or nothing logging for all paper settings. I don't believe it was used enough to warrant maintaining. If this is not the case it should be possible to re-add it.
57 lines
2.4 KiB
Diff
57 lines
2.4 KiB
Diff
From 2d9ec51993b37973d282f321458d6faaf07bd49e 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 fd606ee14..c00fa83d5 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -149,4 +149,10 @@ public class PaperWorldConfig {
|
|
queueLightUpdates = getBoolean("queue-light-updates", false);
|
|
log("Lighting Queue enabled: " + queueLightUpdates);
|
|
}
|
|
+
|
|
+ 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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
index b311903fb..378057e85 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -513,6 +513,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
return this.world.pvpMode;
|
|
}
|
|
|
|
+
|
|
+ // Paper start - Give "theEnd2" achievement if the player doesn't already have it
|
|
+ private void giveTheEnd2() {
|
|
+ if (!this.a(AchievementList.D)) {
|
|
+ this.b(AchievementList.D);
|
|
+ }
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Nullable
|
|
public Entity c(int i) {
|
|
// this.worldChangeInvuln = true; // CraftBukkit - Moved down and into PlayerList#changeDimension
|
|
@@ -521,7 +530,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
this.world.kill(this);
|
|
if (!this.viewingCredits) {
|
|
this.viewingCredits = true;
|
|
- if (this.a(AchievementList.D)) {
|
|
+ // Paper start - Allow configurable end portal credits
|
|
+ if (world.paperConfig.disableEndCredits || this.a(AchievementList.D)) {
|
|
+ this.giveTheEnd2();
|
|
+ // Paper end
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, 0.0F));
|
|
} else {
|
|
this.b((Statistic) AchievementList.D);
|
|
--
|
|
2.12.0.windows.1
|
|
|