diff --git a/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/Warp.java b/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/Warp.java index c1cc16f45..93227722c 100644 --- a/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/Warp.java +++ b/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/Warp.java @@ -12,4 +12,6 @@ public interface Warp { List getPermissions(); + boolean hasPermission(String permission); + } diff --git a/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/WarpService.java b/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/WarpService.java index b5e73bed0..52f583897 100644 --- a/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/WarpService.java +++ b/eternalcore-api/src/main/java/com/eternalcode/core/feature/warp/WarpService.java @@ -4,24 +4,22 @@ import java.util.Collection; import java.util.Optional; +import org.jetbrains.annotations.ApiStatus.Experimental; public interface WarpService { - Warp create(String name, Location location); + Warp createWarp(String name, Location location); - void delete(String warp); + void removeWarp(String warp); void addPermissions(String warp, String... permissions); + @Experimental void removePermission(String warp, String permission); - boolean exists(String name); - - boolean hasPermission(String warp, String permission); + boolean isExist(String name); Optional findWarp(String name); - Collection getAllNames(); - - boolean isEmpty(); + Collection getWarps(); } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpImpl.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpImpl.java index a948e6100..483d85e3d 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpImpl.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpImpl.java @@ -36,6 +36,11 @@ public List getPermissions() { return Collections.unmodifiableList(this.permissions); } + @Override + public boolean hasPermission(String permission) { + return this.permissions.contains(permission); + } + public void setPermissions(List permissions) { this.permissions = permissions; } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java index 184caa653..297718c1e 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java @@ -198,7 +198,7 @@ public void openInventory(Player player, Language language) { } public void addWarp(Warp warp) { - if (!this.warpManager.exists(warp.getName())) { + if (!this.warpManager.isExist(warp.getName())) { return; } @@ -243,7 +243,7 @@ public void addWarp(Warp warp) { public boolean removeWarp(String warpName) { - if (!this.warpManager.exists(warpName)) { + if (!this.warpManager.isExist(warpName)) { return false; } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpServiceImpl.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpServiceImpl.java index b5503eb87..3a2e955cf 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpServiceImpl.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpServiceImpl.java @@ -2,7 +2,7 @@ import com.eternalcode.annotations.scan.feature.FeatureDocs; import com.eternalcode.commons.bukkit.position.PositionAdapter; -import com.eternalcode.core.feature.warp.data.WarpDataRepository; +import com.eternalcode.core.feature.warp.repository.WarpRepository; import com.eternalcode.core.injector.annotations.Inject; import com.eternalcode.core.injector.annotations.component.Service; import java.util.ArrayList; @@ -23,10 +23,10 @@ class WarpServiceImpl implements WarpService { private final Map warps = new ConcurrentHashMap<>(); - private final WarpDataRepository warpRepository; + private final WarpRepository warpRepository; @Inject - private WarpServiceImpl(WarpDataRepository warpRepository) { + private WarpServiceImpl(WarpRepository warpRepository) { this.warpRepository = warpRepository; warpRepository.getWarps().thenAcceptAsync(warps -> { @@ -37,7 +37,7 @@ private WarpServiceImpl(WarpDataRepository warpRepository) { } @Override - public Warp create(String name, Location location) { + public Warp createWarp(String name, Location location) { Warp warp = new WarpImpl(name, PositionAdapter.convert(location), new ArrayList<>()); this.warps.put(name, warp); @@ -47,7 +47,7 @@ public Warp create(String name, Location location) { } @Override - public void delete(String warp) { + public void removeWarp(String warp) { Warp remove = this.warps.remove(warp); if (remove == null) { @@ -108,33 +108,17 @@ private void modifyPermissions(String warpName, Consumer> modifier) } @Override - public boolean exists(String name) { + public boolean isExist(String name) { return this.warps.containsKey(name); } - @Override - public boolean hasPermission(String warpName, String permission) { - Warp warp = this.warps.get(warpName); - - if (warp == null) { - return false; - } - - return warp.getPermissions().contains(permission); - } - @Override public Optional findWarp(String name) { return Optional.ofNullable(this.warps.get(name)); } @Override - public Collection getAllNames() { - return Collections.unmodifiableCollection(this.warps.keySet()); - } - - @Override - public boolean isEmpty() { - return this.warps.isEmpty(); + public Collection getWarps() { + return Collections.unmodifiableCollection(this.warps.values()); } } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/DelWarpCommand.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/DelWarpCommand.java index 816d68aa9..d266bd9a0 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/DelWarpCommand.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/DelWarpCommand.java @@ -37,7 +37,7 @@ void remove(@Context Player player, @Arg Warp warp) { } private void removeWarp(Player player, String name) { - if (!this.warpService.exists(name)) { + if (!this.warpService.isExist(name)) { this.noticeService.create() .player(player.getUniqueId()) .notice(translation -> translation.warp().notExist()) @@ -47,7 +47,7 @@ private void removeWarp(Player player, String name) { return; } - this.warpService.delete(name); + this.warpService.removeWarp(name); this.warpInventory.removeWarp(name); this.noticeService.create() diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/SetWarpCommand.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/SetWarpCommand.java index a11db47a4..1bf3171d7 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/SetWarpCommand.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/SetWarpCommand.java @@ -44,7 +44,7 @@ void add(@Context Player player, @Arg String warpName) { } private void createWarp(Player player, String warp, UUID uniqueId) { - if (this.warpService.exists(warp)) { + if (this.warpService.isExist(warp)) { this.noticeService.create() .player(uniqueId) .notice(translation -> translation.warp().warpAlreadyExists()) @@ -54,7 +54,7 @@ private void createWarp(Player player, String warp, UUID uniqueId) { return; } - Warp createdWarp = this.warpService.create(warp, player.getLocation()); + Warp createdWarp = this.warpService.createWarp(warp, player.getLocation()); this.noticeService.create() .player(uniqueId) @@ -63,7 +63,7 @@ private void createWarp(Player player, String warp, UUID uniqueId) { .send(); if (this.config.warp.autoAddNewWarps) { - if (this.warpService.getAllNames().size() <= MAX_WARPS_IN_GUI) { + if (this.warpService.getWarps().size() <= MAX_WARPS_IN_GUI) { this.warpInventory.addWarp(createdWarp); this.noticeService.create() diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpArgument.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpArgument.java index 40526f207..51fe1f3fd 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpArgument.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpArgument.java @@ -17,6 +17,7 @@ import dev.rollczi.litecommands.suggestion.SuggestionContext; import dev.rollczi.litecommands.suggestion.SuggestionResult; import java.util.Optional; +import java.util.stream.Collectors; import org.bukkit.command.CommandSender; @LiteArgument(type = Warp.class) @@ -58,8 +59,11 @@ public SuggestionResult suggest( Argument argument, SuggestionContext context ) { - return this.warpService.getAllNames().stream() - .collect(SuggestionResult.collector()); + return SuggestionResult.of( + this.warpService.getWarps().stream() + .map(Warp::getName) + .collect(Collectors.toList()) + ); } } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpCommand.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpCommand.java index bf5c480c5..bc8c860cf 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpCommand.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/WarpCommand.java @@ -14,6 +14,7 @@ import dev.rollczi.litecommands.annotations.context.Context; import dev.rollczi.litecommands.annotations.execute.Execute; import dev.rollczi.litecommands.annotations.permission.Permission; +import java.util.List; import org.bukkit.entity.Player; @RootCommand @@ -45,16 +46,18 @@ class WarpCommand { @DescriptionDocs(description = "Open warp inventory, optionally you can disable this feature in config, if feature is disabled eternalcore will show all available warps") void warp(@Context Player player, @Context User user) { if (!this.config.warp.inventoryEnabled) { + List list = this.warpService.getWarps().stream().map(Warp::getName).toList(); + this.noticeService.create() .player(player.getUniqueId()) .notice(translation -> translation.warp().available()) - .placeholder("{WARPS}", String.join(", ", this.warpService.getAllNames())) + .placeholder("{WARPS}", String.join(this.config.format.separator, list)) .send(); return; } - if (!this.warpService.isEmpty()) { + if (this.warpService.getWarps().isEmpty()) { this.noticeService.create() .player(player.getUniqueId()) .notice(translation -> translation.warp().noWarps()) diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/WarpRemovePermissionCommand.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/WarpRemovePermissionCommand.java index 852c87be7..6fb43e466 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/WarpRemovePermissionCommand.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/WarpRemovePermissionCommand.java @@ -2,7 +2,7 @@ import com.eternalcode.core.feature.warp.Warp; import com.eternalcode.core.feature.warp.WarpService; -import com.eternalcode.core.feature.warp.command.permission.argument.WarpPermissionMultipleResolverEntry; +import com.eternalcode.core.feature.warp.command.permission.argument.WarpPermissionEntry; import com.eternalcode.core.injector.annotations.Inject; import com.eternalcode.core.notice.NoticeService; import dev.rollczi.litecommands.annotations.argument.Arg; @@ -28,7 +28,7 @@ public WarpRemovePermissionCommand(WarpService warpService, NoticeService notice @Execute void removePermission( @Context Player player, - @Arg WarpPermissionMultipleResolverEntry entry + @Arg WarpPermissionEntry entry ) { Warp warp = entry.warp(); String permission = entry.permission(); diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultipleResolverEntry.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionEntry.java similarity index 59% rename from eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultipleResolverEntry.java rename to eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionEntry.java index a0e3beb6d..46e26fef8 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultipleResolverEntry.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionEntry.java @@ -2,5 +2,5 @@ import com.eternalcode.core.feature.warp.Warp; -public record WarpPermissionMultipleResolverEntry(Warp warp, String permission) { +public record WarpPermissionEntry(Warp warp, String permission) { } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultiArgumentResolver.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultiArgumentResolver.java index f2eab3979..dea278e96 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultiArgumentResolver.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/command/permission/argument/WarpPermissionMultiArgumentResolver.java @@ -21,9 +21,9 @@ import java.util.Optional; import org.bukkit.command.CommandSender; -@LiteArgument(type = WarpPermissionMultipleResolverEntry.class) +@LiteArgument(type = WarpPermissionEntry.class) public class WarpPermissionMultiArgumentResolver - implements MultipleArgumentResolver { + implements MultipleArgumentResolver { private static final String WARP_PLACEHOLDER_PREFIX = "{WARP}"; private static final String PERMISSION_PLACEHOLDER_PREFIX = "{PERMISSION}"; @@ -47,9 +47,9 @@ public WarpPermissionMultiArgumentResolver( } @Override - public ParseResult parse( + public ParseResult parse( Invocation invocation, - Argument argument, + Argument argument, RawInput rawInput ) { Viewer viewer = this.viewerService.any(invocation.sender()); @@ -94,25 +94,29 @@ public ParseResult parse( String permission = rawInput.next(); - return ParseResult.success(new WarpPermissionMultipleResolverEntry(warp.get(), permission)); + return ParseResult.success(new WarpPermissionEntry(warp.get(), permission)); } @Override - public Range getRange(Argument argument) { + public Range getRange(Argument argument) { return Range.of(2); } @Override public SuggestionResult suggest( Invocation invocation, - Argument argument, + Argument argument, SuggestionContext context ) { Suggestion current = context.getCurrent(); int index = current.lengthMultilevel(); if (index == 1) { - return SuggestionResult.of(this.warpService.getAllNames()); + return SuggestionResult.of( + this.warpService.getWarps().stream() + .map(Warp::getName) + .toList() + ); } if (index == 2) { diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataConfigRepresenter.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpConfigRepresenter.java similarity index 57% rename from eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataConfigRepresenter.java rename to eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpConfigRepresenter.java index c37ae603c..2b7fc666f 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataConfigRepresenter.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpConfigRepresenter.java @@ -1,18 +1,19 @@ -package com.eternalcode.core.feature.warp.data; +package com.eternalcode.core.feature.warp.repository; import com.eternalcode.commons.bukkit.position.Position; import java.util.List; import net.dzikoysk.cdn.entity.Contextual; @Contextual -public class WarpDataConfigRepresenter { +class WarpConfigRepresenter { + public Position position; public List permissions; - public WarpDataConfigRepresenter() { + WarpConfigRepresenter() { } - public WarpDataConfigRepresenter(Position position, List permissions) { + public WarpConfigRepresenter(Position position, List permissions) { this.position = position; this.permissions = permissions; } diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataConfig.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpDataConfig.java similarity index 80% rename from eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataConfig.java rename to eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpDataConfig.java index 5e13c12c0..366ebd8dd 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataConfig.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpDataConfig.java @@ -1,4 +1,4 @@ -package com.eternalcode.core.feature.warp.data; +package com.eternalcode.core.feature.warp.repository; import com.eternalcode.core.configuration.ReloadableConfig; import com.eternalcode.core.injector.annotations.component.ConfigurationFile; @@ -11,13 +11,13 @@ import net.dzikoysk.cdn.source.Source; @ConfigurationFile -public class WarpDataConfig implements ReloadableConfig { +class WarpDataConfig implements ReloadableConfig { @Exclude public static final String WARP_DATA_FILE_PATH = "data" + File.separator + "warps.yml"; @Description({"# Warps data", "# These are warp locations, for your own safety, please don't touch it."}) - public Map warps = new HashMap<>(); + public Map warps = new HashMap<>(); @Override public Resource resource(File folder) { diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataRepository.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpRepository.java similarity index 85% rename from eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataRepository.java rename to eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpRepository.java index 11a6bb8a4..67f39ce9c 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataRepository.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpRepository.java @@ -1,11 +1,11 @@ -package com.eternalcode.core.feature.warp.data; +package com.eternalcode.core.feature.warp.repository; import com.eternalcode.core.feature.warp.Warp; import java.util.List; import java.util.Optional; import java.util.concurrent.CompletableFuture; -public interface WarpDataRepository { +public interface WarpRepository { CompletableFuture addWarp(Warp warp); diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataRepositoryImpl.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpRepositoryImpl.java similarity index 71% rename from eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataRepositoryImpl.java rename to eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpRepositoryImpl.java index 854af27ee..53f2e3fc2 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/data/WarpDataRepositoryImpl.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/repository/WarpRepositoryImpl.java @@ -1,4 +1,4 @@ -package com.eternalcode.core.feature.warp.data; +package com.eternalcode.core.feature.warp.repository; import com.eternalcode.commons.bukkit.position.PositionAdapter; import com.eternalcode.core.configuration.ConfigurationManager; @@ -6,7 +6,7 @@ import com.eternalcode.core.feature.warp.Warp; import com.eternalcode.core.feature.warp.WarpImpl; import com.eternalcode.core.injector.annotations.Inject; -import com.eternalcode.core.injector.annotations.component.Service; +import com.eternalcode.core.injector.annotations.component.Repository; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -16,15 +16,15 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -@Service -public class WarpDataRepositoryImpl implements WarpDataRepository { +@Repository +class WarpRepositoryImpl implements WarpRepository { private final LocationsConfiguration locationsConfiguration; private final WarpDataConfig warpDataConfig; private final ConfigurationManager configurationManager; @Inject - WarpDataRepositoryImpl( + WarpRepositoryImpl( ConfigurationManager configurationManager, LocationsConfiguration locationsConfiguration, WarpDataConfig warpDataConfig @@ -39,12 +39,12 @@ public class WarpDataRepositoryImpl implements WarpDataRepository { @Override public CompletableFuture addWarp(Warp warp) { return CompletableFuture.runAsync(() -> { - WarpDataConfigRepresenter warpDataConfigRepresenter = new WarpDataConfigRepresenter( + WarpConfigRepresenter warpConfigRepresenter = new WarpConfigRepresenter( PositionAdapter.convert(warp.getLocation()), warp.getPermissions() ); - this.edit(warps -> warps.put(warp.getName(), warpDataConfigRepresenter)); + this.edit(warps -> warps.put(warp.getName(), warpConfigRepresenter)); }); } @@ -56,31 +56,31 @@ public CompletableFuture removeWarp(String warp) { @Override public CompletableFuture addPermissions(String warp, String... permissions) { return CompletableFuture.runAsync(() -> this.edit(warps -> { - WarpDataConfigRepresenter warpDataConfigRepresenter = warps.get(warp); - if (warpDataConfigRepresenter == null) { + WarpConfigRepresenter warpConfigRepresenter = warps.get(warp); + if (warpConfigRepresenter == null) { return; } - warpDataConfigRepresenter.permissions.addAll(List.of(permissions)); + warpConfigRepresenter.permissions.addAll(List.of(permissions)); })); } @Override public CompletableFuture removePermission(String warp, String permission) { return CompletableFuture.runAsync(() -> this.edit(warps -> { - WarpDataConfigRepresenter warpDataConfigRepresenter = warps.get(warp); + WarpConfigRepresenter warpConfigRepresenter = warps.get(warp); - if (warpDataConfigRepresenter == null) { + if (warpConfigRepresenter == null) { return; } - warpDataConfigRepresenter.permissions.remove(permission); + warpConfigRepresenter.permissions.remove(permission); })); } - private void edit(Consumer> editor) { + private void edit(Consumer> editor) { synchronized (warpDataConfig.warps) { - Map warps = new HashMap<>(this.warpDataConfig.warps); + Map warps = new HashMap<>(this.warpDataConfig.warps); editor.accept(warps); this.warpDataConfig.warps.putAll(warps); this.configurationManager.save(this.warpDataConfig); @@ -90,17 +90,17 @@ private void edit(Consumer> editor) { @Override public CompletableFuture> getWarp(String name) { return CompletableFuture.completedFuture(Optional.ofNullable(this.warpDataConfig.warps.get(name)) - .map(warpDataConfigRepresenter -> new WarpImpl( + .map(warpConfigRepresenter -> new WarpImpl( name, - warpDataConfigRepresenter.position, - warpDataConfigRepresenter.permissions))); + warpConfigRepresenter.position, + warpConfigRepresenter.permissions))); } @Override public CompletableFuture> getWarps() { return CompletableFuture.completedFuture(this.warpDataConfig.warps.entrySet().stream() .map(warpConfigEntry -> { - WarpDataConfigRepresenter warpContextual = warpConfigEntry.getValue(); + WarpConfigRepresenter warpContextual = warpConfigEntry.getValue(); return new WarpImpl(warpConfigEntry.getKey(), warpContextual.position, warpContextual.permissions); }) .collect(Collectors.toList())); @@ -116,7 +116,7 @@ private void migrateWarps() { .stream() .collect(Collectors.toMap( Map.Entry::getKey, entry -> - new WarpDataConfigRepresenter(entry.getValue(), new ArrayList<>())) + new WarpConfigRepresenter(entry.getValue(), new ArrayList<>())) ) ));