mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 05:26:50 +01:00
dafc3dbcd5
--- work/Bukkit Submodule work/Bukkit aba2aaaf..949124e0: > SPIGOT-5121: Method to set PierceLevel of arrows --- work/CraftBukkit Submodule work/CraftBukkit c6997924..bf329334: > SPIGOT-5133: Throwing items into secondary end world portal causes crash > SPIGOT-5121: Method to set PierceLevel of arrows > SPIGOT-5122: Skip world#notify if sign has no world. > SPIGOT-5105: The EntityTag nbt tag disappears from preset armor_stand items. > SPIGOT-5106: Config option to prevent plugins with incompatible API's from loading --- work/Spigot Submodule work/Spigot 595711b0..935adb34: > SPIGOT-5088: Additional growth modifiers
63 lines
3 KiB
Diff
63 lines
3 KiB
Diff
From ebca21a88c026dfa6259040284efd58d1e4f8690 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 cbfe12734..1daa2e453 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 {
|
|
|
|
@@ -233,4 +234,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 21a8ed323..0794aff5b 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 429f821e9..5fbfda21e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1355,7 +1355,8 @@ public final class CraftServer implements Server {
|
|
// Spigot Start
|
|
GameProfile profile = null;
|
|
// Only fetch an online UUID in online mode
|
|
- if ( getOnlineMode() || org.spigotmc.SpigotConfig.bungee )
|
|
+ if ( getOnlineMode()
|
|
+ || com.destroystokyo.paper.PaperConfig.isProxyOnlineMode() ) // Paper - Handle via setting
|
|
{
|
|
profile = console.getUserCache().getProfile( name );
|
|
}
|
|
--
|
|
2.22.0
|
|
|