mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 20:55:30 +01:00
109 lines
4.7 KiB
Diff
109 lines
4.7 KiB
Diff
From 3a1474389ab7e60e6bed23665fe726a82b261da4 Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Wed, 26 Feb 2020 18:37:34 +0100
|
|
Subject: [PATCH] Brandings
|
|
|
|
---
|
|
.../paper/console/PaperConsole.java | 2 +-
|
|
.../paper/util/misc/AreaMap.java | 1 +
|
|
.../de/tr7zw/yapfa/YapfaVersionFetcher.java | 20 +++++++++++++++++++
|
|
.../net/minecraft/server/MinecraftServer.java | 2 +-
|
|
.../org/bukkit/craftbukkit/CraftServer.java | 2 +-
|
|
.../craftbukkit/util/CraftMagicNumbers.java | 2 +-
|
|
6 files changed, 25 insertions(+), 4 deletions(-)
|
|
create mode 100644 src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
index cd6e2592..24e852eb 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
|
@Override
|
|
protected LineReader buildReader(LineReaderBuilder builder) {
|
|
return super.buildReader(builder
|
|
- .appName("Paper")
|
|
+ .appName("YAPFA")
|
|
.completer(new ConsoleCommandCompleter(this.server))
|
|
);
|
|
}
|
|
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
|
index 5a44bc64..4bd88e5b 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
|
@@ -1,6 +1,7 @@
|
|
package com.destroystokyo.paper.util.misc;
|
|
|
|
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
|
+import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
|
|
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
|
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
|
import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
|
|
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java b/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
|
new file mode 100644
|
|
index 00000000..4ca5fd33
|
|
--- /dev/null
|
|
+++ b/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
|
@@ -0,0 +1,20 @@
|
|
+package de.tr7zw.yapfa;
|
|
+
|
|
+import javax.annotation.Nonnull;
|
|
+
|
|
+import com.destroystokyo.paper.util.VersionFetcher;
|
|
+
|
|
+public class YapfaVersionFetcher implements VersionFetcher {
|
|
+
|
|
+ @Override
|
|
+ public long getCacheTime() {
|
|
+ return Long.MAX_VALUE;
|
|
+ }
|
|
+
|
|
+ @Nonnull
|
|
+ @Override
|
|
+ public String getVersionMessage(@Nonnull String serverVersion) {
|
|
+ return "\u00AF\\_(\u30C4)_/\u00AF";
|
|
+ }
|
|
+
|
|
+}
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index c9deaffc..b5bed470 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1484,7 +1484,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
}
|
|
|
|
public String getServerModName() {
|
|
- return "Paper"; //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
+ return "YAPFA"; //YAPFA - YAPFA > //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
}
|
|
|
|
public CrashReport b(CrashReport crashreport) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index b7dfda26..d6b06c06 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -203,7 +203,7 @@ import javax.annotation.Nullable; // Paper
|
|
import javax.annotation.Nonnull; // Paper
|
|
|
|
public final class CraftServer implements Server {
|
|
- private final String serverName = "Paper"; // Paper
|
|
+ private final String serverName = "YAPFA"; // YAPFA
|
|
private final String serverVersion;
|
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
|
private final Logger logger = Logger.getLogger("Minecraft");
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
index 770375ed..d88cc338 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -306,7 +306,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
|
|
@Override
|
|
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
|
- return new com.destroystokyo.paper.PaperVersionFetcher();
|
|
+ return new de.tr7zw.yapfa.YapfaVersionFetcher();//YAPFA
|
|
}
|
|
|
|
@Override
|
|
--
|
|
2.25.1.windows.1
|
|
|