Add setting for proxy online mode status

TODO: Add isProxyOnlineMode check to Metrics
This commit is contained in:
Gabriele C
2016-08-05 01:03:08 +02:00
parent a55727ff06
commit f7ae11f984
4 changed files with 53 additions and 27 deletions

View File

@@ -10,16 +10,17 @@
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
import net.minecraft.util.StringUtil;
@@ -62,7 +65,7 @@
@@ -62,7 +65,8 @@
return new String[i];
});
- if (server.usesAuthentication()) {
+ if (server.usesAuthentication() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
+ if (server.usesAuthentication() ||
+ (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode())) { // Spigot: bungee = online mode, for now. // Paper - Add setting for proxy online mode status
server.getProfileRepository().findProfilesByNames(astring, callback);
} else {
String[] astring1 = astring;
@@ -85,7 +88,7 @@
@@ -85,7 +89,7 @@
try {
gameprofilebanlist.load();
} catch (IOException ioexception) {
@@ -28,7 +29,7 @@
}
}
@@ -143,7 +146,7 @@
@@ -143,7 +147,7 @@
try {
ipbanlist.load();
} catch (IOException ioexception) {
@@ -37,7 +38,7 @@
}
}
@@ -184,7 +187,7 @@
@@ -184,7 +188,7 @@
try {
oplist.load();
} catch (IOException ioexception) {
@@ -46,7 +47,7 @@
}
}
@@ -228,7 +231,7 @@
@@ -228,7 +232,7 @@
try {
whitelist.load();
} catch (IOException ioexception) {
@@ -55,10 +56,11 @@
}
}
@@ -347,6 +350,38 @@
@@ -346,7 +350,39 @@
private void movePlayerFile(File playerDataFolder, String fileName, String uuid) {
File file5 = new File(file, fileName + ".dat");
File file6 = new File(playerDataFolder, uuid + ".dat");
+
+ // CraftBukkit start - Use old file name to seed lastKnownName
+ CompoundTag root = null;
+
@@ -71,7 +73,7 @@
+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception);
+ // Paper end
+ }
+
+ if (root != null) {
+ if (!root.contains("bukkit")) {
+ root.put("bukkit", new CompoundTag());