mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-26 00:35:17 +01:00
Fixed NoClassDefFound
This commit is contained in:
parent
27d5c93ba7
commit
a09c23ecf5
@ -1,7 +1,6 @@
|
||||
package net.Indyuce.mmocore.manager.data;
|
||||
|
||||
import io.lumine.mythic.lib.api.player.MMOPlayerData;
|
||||
import io.lumine.mythic.lib.comp.profile.ProfileDataModuleImpl;
|
||||
import io.lumine.mythic.lib.data.SynchronizedDataManager;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
@ -23,7 +22,7 @@ public class PlayerDataManager extends SynchronizedDataManager<PlayerData, Offli
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProfileDataModuleImpl newProfileDataModule() {
|
||||
public Object newProfileDataModule() {
|
||||
return new MMOCoreProfileDataModule();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.Indyuce.mmocore.listener;
|
||||
package net.Indyuce.mmocore.listener.option;
|
||||
|
||||
import io.lumine.mythic.lib.api.event.SynchronizedDataLoadEvent;
|
||||
import io.lumine.mythic.lib.api.util.TemporaryListener;
|
||||
@ -16,30 +16,22 @@ public class ForceChooseClassListener implements Listener {
|
||||
if (event.getManager().getOwningPlugin().equals(MMOCore.plugin)) {
|
||||
PlayerData playerData = PlayerData.get(event.getHolder().getProfileId());
|
||||
if (playerData.isProfessNull()) {
|
||||
|
||||
// Open GUI
|
||||
InventoryManager.CLASS_SELECT.newInventory(playerData).open();
|
||||
//Give 1 class point to make sure the player can choose a class.
|
||||
playerData.setClassPoints(1);
|
||||
TemporaryListener closeGUIListener = new TemporaryListener(InventoryCloseEvent.getHandlerList()) {
|
||||
|
||||
// Re-open GUI till the player
|
||||
new TemporaryListener(PlayerChangeClassEvent.getHandlerList(), InventoryCloseEvent.getHandlerList()) {
|
||||
|
||||
@EventHandler
|
||||
public void whenClosed(InventoryCloseEvent e) {
|
||||
if (e.getPlayer().equals(playerData.getPlayer()))
|
||||
public void whenClosed(InventoryCloseEvent event) {
|
||||
if (event.getPlayer().equals(playerData.getPlayer()))
|
||||
InventoryManager.CLASS_SELECT.newInventory(playerData).open();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void whenClosed() {
|
||||
|
||||
}
|
||||
};
|
||||
new TemporaryListener(PlayerChangeClassEvent.getHandlerList()) {
|
||||
@EventHandler
|
||||
public void whenChoose(PlayerChangeClassEvent e) {
|
||||
if (e.getPlayer().equals(playerData.getPlayer())) {
|
||||
closeGUIListener.close();
|
||||
close();
|
||||
}
|
||||
|
||||
public void whenChoose(PlayerChangeClassEvent event) {
|
||||
if (event.getPlayer().equals(playerData.getPlayer())) close();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -47,6 +39,7 @@ public class ForceChooseClassListener implements Listener {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -193,7 +193,7 @@ vanilla-exp-redirection:
|
||||
# Requires a SERVER reload when changed.
|
||||
override-vanilla-exp: true
|
||||
|
||||
#Forces the player to choose a class at first join.
|
||||
# Forces the player to choose a class at first join.
|
||||
force-class-choose-on-first-login: false
|
||||
|
||||
# Check the target player's RPG profile when shift when shift right clicking.
|
||||
|
Loading…
Reference in New Issue
Block a user