geforkt von Mirrors/Paper
7a73ce03e9
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
3108e64a SPIGOT-4193: API for selecting entities by strings
CraftBukkit Changes:
ad6070df
SPIGOT-4193: API for selecting entities by strings
64 Zeilen
3.1 KiB
Diff
64 Zeilen
3.1 KiB
Diff
From 9cb3962db832174ee0d087d5441333176d112591 Mon Sep 17 00:00:00 2001
|
|
From: Gabriele C <sgdc3.mail@gmail.com>
|
|
Date: Fri, 5 Aug 2016 01:03:08 +0200
|
|
Subject: [PATCH] Add setting for proxy online mode status
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index 879951f24..894501c61 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -22,6 +22,7 @@ import org.bukkit.configuration.InvalidConfigurationException;
|
|
import org.bukkit.configuration.file.YamlConfiguration;
|
|
import co.aikar.timings.Timings;
|
|
import co.aikar.timings.TimingsManager;
|
|
+import org.spigotmc.SpigotConfig;
|
|
|
|
public class PaperConfig {
|
|
|
|
@@ -243,4 +244,13 @@ public class PaperConfig {
|
|
private static void saveEmptyScoreboardTeams() {
|
|
saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false);
|
|
}
|
|
+
|
|
+ public static boolean bungeeOnlineMode = true;
|
|
+ private static void bungeeOnlineMode() {
|
|
+ bungeeOnlineMode = getBoolean("settings.bungee-online-mode", true);
|
|
+ }
|
|
+
|
|
+ public static boolean isProxyOnlineMode() {
|
|
+ return Bukkit.getOnlineMode() || (SpigotConfig.bungee && bungeeOnlineMode);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
|
index bf67dbf54..dcaba3c40 100644
|
|
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
|
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
|
@@ -58,7 +58,8 @@ public class NameReferencingFileConverter {
|
|
return new String[i];
|
|
});
|
|
|
|
- if (minecraftserver.getOnlineMode() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
|
|
+ if (minecraftserver.getOnlineMode()
|
|
+ || (com.destroystokyo.paper.PaperConfig.isProxyOnlineMode())) { // Spigot: bungee = online mode, for now. // Paper - Handle via setting
|
|
minecraftserver.getGameProfileRepository().findProfilesByNames(astring, Agent.MINECRAFT, profilelookupcallback);
|
|
} else {
|
|
String[] astring1 = astring;
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index b64f3594a..c82cca49f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1412,7 +1412,8 @@ public final class CraftServer implements Server {
|
|
// Spigot Start
|
|
GameProfile profile = null;
|
|
// Only fetch an online UUID in online mode
|
|
- if ( MinecraftServer.getServer().getOnlineMode() || org.spigotmc.SpigotConfig.bungee )
|
|
+ if ( MinecraftServer.getServer().getOnlineMode()
|
|
+ || com.destroystokyo.paper.PaperConfig.isProxyOnlineMode()) // Paper - Handle via setting
|
|
{
|
|
profile = console.getUserCache().getProfile( name );
|
|
}
|
|
--
|
|
2.20.1
|
|
|