mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 05:40:00 +03:00
20 lines
1.0 KiB
Diff
20 lines
1.0 KiB
Diff
--- ../src-base/minecraft/net/minecraft/command/server/CommandWhitelist.java
|
|
+++ ../src-work/minecraft/net/minecraft/command/server/CommandWhitelist.java
|
|
@@ -8,6 +8,7 @@
|
|
import net.minecraft.command.CommandException;
|
|
import net.minecraft.command.ICommandSender;
|
|
import net.minecraft.command.WrongUsageException;
|
|
+import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.util.text.TextComponentString;
|
|
@@ -61,7 +62,7 @@
|
|
throw new WrongUsageException("commands.whitelist.add.usage", new Object[0]);
|
|
}
|
|
|
|
- GameProfile gameprofile = server.getPlayerProfileCache().getGameProfileForUsername(args[1]);
|
|
+ GameProfile gameprofile = server.isServerInOnlineMode() ? server.getPlayerProfileCache().getGameProfileForUsername(args[1]) : new GameProfile(EntityPlayer.getOfflineUUID(args[1]), args[1]); // CatServer - offline mode support
|
|
|
|
if (gameprofile == null)
|
|
{
|