9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00

Refactor: Change upstream to Gale

This commit is contained in:
Dreeam
2022-12-24 19:17:37 -05:00
parent dc877421c2
commit dcfd51d83f
43 changed files with 306 additions and 666 deletions

View File

@@ -7,10 +7,10 @@ Original license: MIT
Original project: https://github.com/PurpurMC/Purpur
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 564830a1d511716ab977923ba43fa38c475f484f..2c5afab3cc0c66a2e63c1f647a033ca1a58f9e39 100644
index 0e8700ccc884957f08fa382723a3784d94da0f0e..66242833210ae89cbca7448cd4e7cf1fa774bcf0 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -216,6 +216,7 @@ public class Commands {
@@ -215,6 +215,7 @@ public class Commands {
StopCommand.register(this.dispatcher);
WhitelistCommand.register(this.dispatcher);
org.dreeam.leaf.commands.TPSBarCommand.register(this.dispatcher); // Purpur
@@ -19,10 +19,10 @@ index 564830a1d511716ab977923ba43fa38c475f484f..2c5afab3cc0c66a2e63c1f647a033ca1
if (environment.includeIntegrated) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3db273840ecc03e7bf3e1a01f56d5128e4aeea06..5c67d38df288e789597613df99f779c1ddf40712 100644
index 9d3d1714717bf2a301662473416fd5eaa9027266..f04ca69de983d5d6dc5df62c16d1f5caffae43ab 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -271,6 +271,7 @@ public class ServerPlayer extends Player {
@@ -270,6 +270,7 @@ public class ServerPlayer extends Player {
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
private boolean tpsBar = false; // Purpur
@@ -30,7 +30,7 @@ index 3db273840ecc03e7bf3e1a01f56d5128e4aeea06..5c67d38df288e789597613df99f779c1
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
@@ -510,6 +511,7 @@ public class ServerPlayer extends Player {
@@ -509,6 +510,7 @@ public class ServerPlayer extends Player {
}
if (nbt.contains("Purpur.TPSBar")) { this.tpsBar = nbt.getBoolean("Purpur.TPSBar"); } // Purpur
@@ -38,7 +38,7 @@ index 3db273840ecc03e7bf3e1a01f56d5128e4aeea06..5c67d38df288e789597613df99f779c1
}
@Override
@@ -577,6 +579,7 @@ public class ServerPlayer extends Player {
@@ -576,6 +578,7 @@ public class ServerPlayer extends Player {
this.getBukkitEntity().setExtraData(nbt); // CraftBukkit
nbt.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur
@@ -46,7 +46,7 @@ index 3db273840ecc03e7bf3e1a01f56d5128e4aeea06..5c67d38df288e789597613df99f779c1
}
// CraftBukkit start - World fallback code, either respawn location or global spawn
@@ -2562,5 +2565,13 @@ public class ServerPlayer extends Player {
@@ -2557,5 +2560,13 @@ public class ServerPlayer extends Player {
public void tpsBar(boolean tpsBar) {
this.tpsBar = tpsBar;
}
@@ -61,10 +61,10 @@ index 3db273840ecc03e7bf3e1a01f56d5128e4aeea06..5c67d38df288e789597613df99f779c1
// Purpur end
}
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
index a0bd1ec3f09959c7f72b484658c1c94a16818281..e56151fe0dbc0c867dff728a55daa35c7714d3a6 100644
index 9cf4bbde93ad01da842f6b3b5f46f25f442f7d54..22ed437840fd189cc0c26b544b78a66c62ffbf3b 100644
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
@@ -170,6 +170,11 @@ public class LeafConfig {
@@ -165,6 +165,11 @@ public class LeafConfig {
public static String commandTPSBarTextColorMedium = "<gradient:#ffff55:#ffaa00><text></gradient>";
public static String commandTPSBarTextColorLow = "<gradient:#ff5555:#aa0000><text></gradient>";
public static int commandTPSBarTickInterval = 20;
@@ -76,7 +76,7 @@ index a0bd1ec3f09959c7f72b484658c1c94a16818281..e56151fe0dbc0c867dff728a55daa35c
private static void commandSettings() {
commandTPSBarTitle = getString("settings.command.tpsbar.title", commandTPSBarTitle);
@@ -182,5 +187,17 @@ public class LeafConfig {
@@ -177,5 +182,17 @@ public class LeafConfig {
commandTPSBarTextColorMedium = getString("settings.command.tpsbar.text-color.medium", commandTPSBarTextColorMedium);
commandTPSBarTextColorLow = getString("settings.command.tpsbar.text-color.low", commandTPSBarTextColorLow);
commandTPSBarTickInterval = getInt("settings.command.tpsbar.tick-interval", commandTPSBarTickInterval);