mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-11-28 16:55:07 +00:00
config harsher verification + send world names to editor api
This commit is contained in:
1 parent
aeeffc9e1b
commit
b878c992f9
20 files changed
+527
-6
No files matched your search
@@ -61,6 +61,20 @@ public class EditorConfigTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
@Test public void validatesCollectionFixtures() throws Exception {
|
||||
Path root = Paths.get("src/test/resources/collections");
|
||||
String baseline = new String(Files.readAllBytes(root.resolve("baseline.yml")), StandardCharsets.UTF_8);
|
||||
try (java.util.stream.Stream<Path> files = Files.list(root)) {
|
||||
for (Path file : (Iterable<Path>) files::iterator) {
|
||||
String value = new String(Files.readAllBytes(file), StandardCharsets.UTF_8);
|
||||
if (file.getFileName().toString().startsWith("invalid-")) {
|
||||
try { EditorConfig.validate(baseline, value); fail("Expected rejection: " + file); }
|
||||
catch (java.io.IOException expected) { }
|
||||
} else EditorConfig.validate(baseline, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test public void replacesAtomicallyAndBoundsReads() throws Exception {
|
||||
Path dir = Files.createTempDirectory("betterrtp-editor-test"); Path file = dir.resolve("config.yml");
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: [false]
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,26 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
- lobby: nether
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,23 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip: false
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MinRadius: 3000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: other.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Cooldown: -1
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
Injected: true
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: false
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: END
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,24 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: false
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,28 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
- resource:
|
||||
Shape: circle
|
||||
MaxRadius: 5000
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,25 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: []
|
||||
DisabledWorlds: [prison]
|
||||
Overrides: []
|
||||
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
@@ -0,0 +1,29 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- hub: survival
|
||||
- resource: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
MaxRadius: 2000
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- staff:
|
||||
- survival:
|
||||
Priority: 2
|
||||
Biomes: [forest]
|
||||
Cooldown: 30
|
||||
- member: []
|
||||
@@ -0,0 +1,24 @@
|
||||
Language-File: en.yml
|
||||
Settings:
|
||||
MaxAttempts: 32
|
||||
Default:
|
||||
MinRadius: 10
|
||||
MaxRadius: 1000
|
||||
MinY: 0
|
||||
MaxY: 320
|
||||
Biomes: []
|
||||
BlacklistedBlocks: [water]
|
||||
DisabledWorlds: [prison]
|
||||
Overrides:
|
||||
- lobby: world
|
||||
WorldType:
|
||||
- world: NORMAL
|
||||
CustomWorlds:
|
||||
- world:
|
||||
Future: unchanged
|
||||
PermissionGroup:
|
||||
Enabled: true
|
||||
Groups:
|
||||
- vip:
|
||||
- world:
|
||||
Priority: 0
|
||||
Reference in new issue
Block a user