mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00

Ideally all misleading documentation has been removed in the last ~10 years and users should no longer be adding unknown startup flags.
42 lines
2.7 KiB
Diff
42 lines
2.7 KiB
Diff
From e9b7a4f59184fd0f3455473c7e68306464c76ff2 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sat, 12 Apr 2014 21:23:58 +1000
|
|
Subject: [PATCH] Treat Bungee as Online Mode
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
index 8e54082c5f..df923b7a10 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
@@ -223,7 +223,14 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
|
if (!this.usesAuthentication()) {
|
|
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
|
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
|
- DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
|
+ // Spigot start
|
|
+ if (org.spigotmc.SpigotConfig.bungee) {
|
|
+ DedicatedServer.LOGGER.warn("Whilst this makes it possible to use BungeeCord, unless access to your server is properly restricted, it also opens up the ability for hackers to connect with any username they choose.");
|
|
+ DedicatedServer.LOGGER.warn("Please see http://www.spigotmc.org/wiki/firewall-guide/ for further information.");
|
|
+ } else {
|
|
+ DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
|
+ }
|
|
+ // Spigot end
|
|
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/players/NameReferencingFileConverter.java
|
|
index 3bf6d7d2d4..8e95956397 100644
|
|
--- a/src/main/java/net/minecraft/server/players/NameReferencingFileConverter.java
|
|
+++ b/src/main/java/net/minecraft/server/players/NameReferencingFileConverter.java
|
|
@@ -68,7 +68,7 @@ public class NameReferencingFileConverter {
|
|
return new String[i];
|
|
});
|
|
|
|
- if (minecraftserver.usesAuthentication()) {
|
|
+ if (minecraftserver.usesAuthentication() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
|
|
minecraftserver.getProfileRepository().findProfilesByNames(astring, profilelookupcallback);
|
|
} else {
|
|
String[] astring1 = astring;
|
|
--
|
|
2.43.0
|
|
|