Fixed proxy-mode profiles not working when forcing class selection

This commit is contained in:
Jules 2025-10-29 17:49:59 +01:00
parent 8711c9ec0f
commit a688ed32ed
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ MMOCore.iml
/MMOCore-Dist/MMOCore-Dist.iml
local_install.bat
proxy_install.bat

View File

@ -69,8 +69,8 @@ public class ForceClassProfileDataModule implements ProfileDataModule {
if (!event.hasProfileEvent()) {
Validate.isTrue(MythicLib.plugin.getProfileMode() == ProfileMode.PROXY, "Listened to a data load event with no profile event attached but proxy-based profiles are disabled");
if (playerData.getProfess().equals(MMOCore.plugin.classManager.getDefaultClass()))
InventoryManager.CLASS_SELECT.newInventory(playerData, () -> {
}).open();
InventoryManager.CLASS_SELECT.newInventory(playerData, () -> event.getHolder().getMMOPlayerData().getProfileSession().markAsReady(this.key)).open();
else event.getHolder().getMMOPlayerData().getProfileSession().markAsReady(this.key);
return;
}