GeyserMC / Floodgate

Hybrid mode plugin to allow for connections from Geyser to join online mode servers.
https://geysermc.org
MIT License
575 stars 170 forks source link

hotfix(database/mongo): fix floodgate not loading with mongo when collection already exists #300

Closed HookWoods closed 2 years ago

HookWoods commented 2 years ago

Hello, I just tested today's code for personal use and just discovered I introduce a big bug when I make the MongoDB addons. Actually, the function collectionNotExists wasn't working, and it was causing the plugin not to load when the collections already exist. This fix just adds an empty try-catch, catching the MongoCommandException thrown by Mongo.

Tested the fix, and it's working.