diff --git a/plugin/src/main/java/net/thenextlvl/service/command/ServiceConvertCommand.java b/plugin/src/main/java/net/thenextlvl/service/command/ServiceConvertCommand.java index 71644f8..48d1009 100644 --- a/plugin/src/main/java/net/thenextlvl/service/command/ServiceConvertCommand.java +++ b/plugin/src/main/java/net/thenextlvl/service/command/ServiceConvertCommand.java @@ -110,11 +110,11 @@ public void convert(OfflinePlayer player, BankController source, BankController private final class ChatConverter extends PlayerConverter { @Override public void convert(OfflinePlayer player, ChatController source, ChatController target) { - source.tryGetProfile(player).thenAccept(sourceProfile -> target.tryGetProfile(player) + source.tryGetProfile(player).thenAccept(profile -> target.tryGetProfile(player) .thenAccept(targetProfile -> { - sourceProfile.getPrefix().ifPresent(targetProfile::setPrefix); - sourceProfile.getSuffix().ifPresent(targetProfile::setSuffix); - sourceProfile.getDisplayName().ifPresent(targetProfile::setDisplayName); + profile.getPrefixes().forEach((priority, prefix) -> targetProfile.setPrefix(prefix, priority)); + profile.getSuffixes().forEach((priority, suffix) -> targetProfile.setSuffix(suffix, priority)); + profile.getDisplayName().ifPresent(targetProfile::setDisplayName); })); } } @@ -153,8 +153,8 @@ public void convert(GroupController source, GroupController target) { .thenAccept(targetGroup -> { group.getDisplayName().ifPresent(targetGroup::setDisplayName); group.getPermissions().forEach(targetGroup::setPermission); - group.getPrefix().ifPresent(targetGroup::setPrefix); - group.getSuffix().ifPresent(targetGroup::setSuffix); + group.getPrefixes().forEach((priority, prefix) -> targetGroup.setPrefix(prefix, priority)); + group.getSuffixes().forEach((priority, suffix) -> targetGroup.setSuffix(suffix, priority)); group.getWeight().ifPresent(targetGroup::setWeight); }))); super.convert(source, target);