9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 00:19:20 +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 2c5afab3cc0c66a2e63c1f647a033ca1a58f9e39..8ee8ff15f4511684261ff7a9417baa2ccd313b69 100644
index 66242833210ae89cbca7448cd4e7cf1fa774bcf0..ff19fcd83295c6936dd83c7780d5757071ca44a5 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -217,6 +217,8 @@ public class Commands {
@@ -216,6 +216,8 @@ public class Commands {
WhitelistCommand.register(this.dispatcher);
org.dreeam.leaf.commands.TPSBarCommand.register(this.dispatcher); // Purpur
org.dreeam.leaf.commands.CompassCommand.register(this.dispatcher); // Purpur
@@ -20,10 +20,10 @@ index 2c5afab3cc0c66a2e63c1f647a033ca1a58f9e39..8ee8ff15f4511684261ff7a9417baa2c
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 5c67d38df288e789597613df99f779c1ddf40712..95db6657cd65b71f994f0221b0c46be4a1f8e10b 100644
index f04ca69de983d5d6dc5df62c16d1f5caffae43ab..f262a9c0d48eaeaf463fde03992c65ca03a8a0c6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -272,6 +272,7 @@ public class ServerPlayer extends Player {
@@ -271,6 +271,7 @@ public class ServerPlayer extends Player {
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
private boolean compassBar = false; // Purpur
@@ -31,7 +31,7 @@ index 5c67d38df288e789597613df99f779c1ddf40712..95db6657cd65b71f994f0221b0c46be4
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 {
}
}
@@ -39,7 +39,7 @@ index 5c67d38df288e789597613df99f779c1ddf40712..95db6657cd65b71f994f0221b0c46be4
if (nbt.contains("Purpur.TPSBar")) { this.tpsBar = nbt.getBoolean("Purpur.TPSBar"); } // Purpur
if (nbt.contains("Purpur.CompassBar")) { this.compassBar = nbt.getBoolean("Purpur.CompassBar"); } // Purpur
}
@@ -578,6 +580,7 @@ public class ServerPlayer extends Player {
@@ -577,6 +579,7 @@ public class ServerPlayer extends Player {
}
this.getBukkitEntity().setExtraData(nbt); // CraftBukkit
@@ -47,7 +47,7 @@ index 5c67d38df288e789597613df99f779c1ddf40712..95db6657cd65b71f994f0221b0c46be4
nbt.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur
nbt.putBoolean("Purpur.CompassBar", this.compassBar); // Purpur
}
@@ -2573,5 +2576,14 @@ public class ServerPlayer extends Player {
@@ -2568,5 +2571,14 @@ public class ServerPlayer extends Player {
public void compassBar(boolean compassBar) {
this.compassBar = compassBar;
}
@@ -63,10 +63,10 @@ index 5c67d38df288e789597613df99f779c1ddf40712..95db6657cd65b71f994f0221b0c46be4
// Purpur end
}
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
index e56151fe0dbc0c867dff728a55daa35c7714d3a6..afdee99c7d5ecedf8d2f6856f0aa9271c6bbb23d 100644
index 22ed437840fd189cc0c26b544b78a66c62ffbf3b..84dfe93de52d81e8eef8fc6b9778e081c9abe899 100644
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
@@ -175,6 +175,17 @@ public class LeafConfig {
@@ -170,6 +170,17 @@ public class LeafConfig {
public static BossBar.Color commandCompassBarProgressColor = BossBar.Color.BLUE;
public static float commandCompassBarProgressPercent = 1.0F;
public static int commandCompassBarTickInterval = 5;
@@ -84,7 +84,7 @@ index e56151fe0dbc0c867dff728a55daa35c7714d3a6..afdee99c7d5ecedf8d2f6856f0aa9271
private static void commandSettings() {
commandTPSBarTitle = getString("settings.command.tpsbar.title", commandTPSBarTitle);
@@ -194,6 +205,17 @@ public class LeafConfig {
@@ -189,6 +200,17 @@ public class LeafConfig {
commandCompassBarProgressPercent = (float) getDouble("settings.command.compass.percent", commandCompassBarProgressPercent);
commandCompassBarTickInterval = getInt("settings.command.compass.tick-interval", commandCompassBarTickInterval);