mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 22:16:22 +00:00
fix: ensure restricted worlds setting formats correctly, close #664
This commit is contained in:
1 file changed
+3
-3
@@ -335,10 +335,10 @@ public final class Settings {
|
||||
|
||||
public boolean isWorldRtpRestricted(@NotNull World world) {
|
||||
final String name = world.getName();
|
||||
final String filteredName = name.startsWith("minecraft:") ? name.substring(10) : name;
|
||||
final String formattedName = name.replace("minecraft:", "");
|
||||
return restrictedWorlds.stream()
|
||||
.map(n -> n.startsWith("minecraft:") ? n.substring(10) : n)
|
||||
.anyMatch(n -> n.equalsIgnoreCase(filteredName));
|
||||
.map(n -> n.replace("minecraft:", ""))
|
||||
.anyMatch(n -> n.equalsIgnoreCase(formattedName));
|
||||
}
|
||||
|
||||
@Comment("Whether or not RTP should perform cross-server.")
|
||||
|
||||
Reference in new issue
Block a user