Polda18 / BetterWhitelist

A Minecraft Spigot plugin for better whitelist
GNU General Public License v3.0
6 stars 0 forks source link

[BUG] still checks uuid on /whitelist import and not put players on whitelist #4

Open bulieme opened 9 months ago

bulieme commented 9 months ago

Describe the bug I have a player whitelisted, with geyser players.

the problem was, the plugin never put whitelisted players to the plugin,

[17:21:08 INFO]: There are 4 whitelisted player(s): .bulieme1881, Hypixeljoinpls, .GifariAz08, .Cyberboy9629
whitelist import
[17:21:17 WARN]: java.io.FileNotFoundException: https://api.mojang.com/users/profiles/minecraft/.bulieme1881
[17:21:17 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1989)
[17:21:17 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
[17:21:17 WARN]:        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.getMojangJSON(UUIDGenerator.java:33)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.lookupMojangPlayerName(UUIDGenerator.java:53)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.config.Whitelist.addEntry(Whitelist.java:115)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.commands.WhitelistCommand.onCommand(WhitelistCommand.java:411)
[17:21:17 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[17:21:17 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[17:21:17 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:987)
[17:21:17 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchServerCommand(CraftServer.java:972)
[17:21:17 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.bk(DedicatedServer.java:500)
[17:21:17 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:447)
[17:21:17 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1515)
[17:21:17 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1216)
[17:21:17 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[17:21:17 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[17:21:17 WARN]: java.io.FileNotFoundException: https://api.mojang.com/users/profiles/minecraft/Hypixeljoinpls
[17:21:17 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1989)
[17:21:17 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
[17:21:17 WARN]:        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.getMojangJSON(UUIDGenerator.java:33)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.lookupMojangPlayerName(UUIDGenerator.java:53)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.config.Whitelist.addEntry(Whitelist.java:115)
[17:21:17 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.commands.WhitelistCommand.onCommand(WhitelistCommand.java:411)
[17:21:17 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[17:21:17 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[17:21:17 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:987)
[17:21:17 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchServerCommand(CraftServer.java:972)
[17:21:17 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.bk(DedicatedServer.java:500)
[17:21:17 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:447)
[17:21:17 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1515)
[17:21:17 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1216)
[17:21:17 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[17:21:17 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[17:21:18 WARN]: java.io.FileNotFoundException: https://api.mojang.com/users/profiles/minecraft/.GifariAz08
[17:21:18 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1989)
[17:21:18 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
[17:21:18 WARN]:        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.getMojangJSON(UUIDGenerator.java:33)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.lookupMojangPlayerName(UUIDGenerator.java:53)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.config.Whitelist.addEntry(Whitelist.java:115)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.commands.WhitelistCommand.onCommand(WhitelistCommand.java:411)
[17:21:18 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[17:21:18 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[17:21:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:987)
[17:21:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchServerCommand(CraftServer.java:972)
[17:21:18 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.bk(DedicatedServer.java:500)
[17:21:18 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:447)
[17:21:18 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1515)
[17:21:18 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1216)
[17:21:18 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[17:21:18 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[17:21:18 WARN]: java.io.FileNotFoundException: https://api.mojang.com/users/profiles/minecraft/.Cyberboy9629
[17:21:18 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1989)
[17:21:18 WARN]:        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
[17:21:18 WARN]:        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.getMojangJSON(UUIDGenerator.java:33)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.utils.UUIDGenerator.lookupMojangPlayerName(UUIDGenerator.java:53)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.config.Whitelist.addEntry(Whitelist.java:115)
[17:21:18 WARN]:        at BetterWhitelist-1.0.1.jar//me.polda18.betterwhitelist.commands.WhitelistCommand.onCommand(WhitelistCommand.java:411)
[17:21:18 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[17:21:18 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[17:21:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:987)
[17:21:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchServerCommand(CraftServer.java:972)
[17:21:18 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.bk(DedicatedServer.java:500)
[17:21:18 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:447)
[17:21:18 WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1515)
[17:21:18 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1216)
[17:21:18 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319)
[17:21:18 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1589)
[17:21:18 INFO]: Vanilla whitelist imported. Turn vanilla whitelist off and turn BetterWhitelist on.
whitelist list
[17:24:14 INFO]: Players list in whitelist
[17:24:14 INFO]: ----------------------------------------------
[17:24:14 INFO]: - List is empty
[17:24:14 INFO]: ----------------------------------------------
[17:24:14 INFO]: - Player name >>> Registered Minecraft player

To Reproduce Steps to reproduce the behavior:

  1. /whitelist import
  2. See warnings
  3. /whitelist list
  4. No players being imported from vanilla whitelist..

Expected behavior offline mode / geyser / floodgate players be able to join

Screenshots whitelist.json from mojang no whitelist.yml

Additional context Add any other context about the problem here.

Polda18 commented 9 months ago

I forgot about Floodgate, will have to read through documentation for devs tho. I assume your server is online mode, right? Yeah, if it doesn't find the users in official Mojang database of Java Edition players, it will fail on online mode servers. I'll have to hook it up to Floodgate via soft dependency. Adding it into planned features.

Polda18 commented 9 months ago

On a second notice, I can see there is definitely one player that doesn't seem to be joining via Geysermc (the one without the dot), and it seems like the player is not found in the Java Edition registered accounts, which is true, Hypixeljoinpls is not a legitimate player. Is your server set to online mode by any chance? It's weird that it spits out a warning message and doesn't add the players into the whitelist if the server is in offline mode. I'll have to investigate this, might take some time with university and job on my neck.

bulieme commented 9 months ago

i set my online-mode=false sorry for late reply

piks commented 6 months ago

can confirm, this issue happens if online is set to true and you try to either import a whitelist that contains a floodgate player or add a floodgate player, we just ran into the same issue