mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +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) {
|
public boolean isWorldRtpRestricted(@NotNull World world) {
|
||||||
final String name = world.getName();
|
final String name = world.getName();
|
||||||
final String filteredName = name.startsWith("minecraft:") ? name.substring(10) : name;
|
final String formattedName = name.replace("minecraft:", "");
|
||||||
return restrictedWorlds.stream()
|
return restrictedWorlds.stream()
|
||||||
.map(n -> n.startsWith("minecraft:") ? n.substring(10) : n)
|
.map(n -> n.replace("minecraft:", ""))
|
||||||
.anyMatch(n -> n.equalsIgnoreCase(filteredName));
|
.anyMatch(n -> n.equalsIgnoreCase(formattedName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Comment("Whether or not RTP should perform cross-server.")
|
@Comment("Whether or not RTP should perform cross-server.")
|
||||||
|
|||||||
Reference in new issue
Block a user