Fixed placeholders with proxy-based profiles

This commit is contained in:
Jules 2023-10-22 02:11:45 +02:00
parent f79a66df80
commit 71d0f7219f
3 changed files with 8 additions and 9 deletions

View File

@ -142,7 +142,7 @@
<dependency>
<groupId>fr.phoenixdevt</groupId>
<artifactId>Profile-API</artifactId>
<version>1.1</version>
<version>1.1-SNAPSHOT</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

View File

@ -15,10 +15,9 @@ import net.Indyuce.mmocore.manager.InventoryManager;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
public class ForceClassProfileDataModule implements ProfileDataModule, Listener {
public class ForceClassProfileDataModule implements ProfileDataModule {
public ForceClassProfileDataModule() {
final ProfileProvider<?> provider = Bukkit.getServicesManager().getRegistration(ProfileProvider.class).getProvider();
provider.registerModule(this);

View File

@ -3,6 +3,7 @@ package net.Indyuce.mmocore.comp.profile;
import fr.phoenixdevt.profiles.ProfileDataModule;
import fr.phoenixdevt.profiles.event.ProfileCreateEvent;
import fr.phoenixdevt.profiles.event.ProfileRemoveEvent;
import fr.phoenixdevt.profiles.placeholder.PlaceholderProcessor;
import fr.phoenixdevt.profiles.placeholder.PlaceholderRequest;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.api.player.MMOPlayerData;
@ -11,10 +12,9 @@ import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.attribute.PlayerAttribute;
import net.Indyuce.mmocore.experience.Profession;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
public class MMOCoreProfileDataModule implements ProfileDataModule, Listener {
public class MMOCoreProfileDataModule implements ProfileDataModule, PlaceholderProcessor {
@Override
public JavaPlugin getOwningPlugin() {
@ -22,13 +22,13 @@ public class MMOCoreProfileDataModule implements ProfileDataModule, Listener {
}
@Override
public boolean hasPlaceholders() {
return true;
public String getIdentifier() {
return "mmocore";
}
@Override
public String getIdentifier() {
return "mmocore";
public ProfileDataModule getDataModule() {
return this;
}
@Override