mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-25 21:40:08 +00:00
rename main parameters/fields to platform
This commit is contained in:
1 parent
8f51707505
commit
4945a3bbfa
117 files changed
+535
-516
No files matched your search
+7
-7
@@ -17,17 +17,17 @@ import com.dfsek.terra.api.inject.annotations.Inject;
|
||||
@Author("Terra")
|
||||
public class YamlAddon extends TerraAddon {
|
||||
@Inject
|
||||
private Platform main;
|
||||
private Platform platform;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
main.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigurationDiscoveryEvent.class)
|
||||
.then(event -> event.getLoader().open("", ".yml").thenEntries(entries -> entries.forEach(entry -> {
|
||||
main.getDebugLogger().info("Discovered config " + entry.getKey());
|
||||
platform.getEventManager()
|
||||
.getHandler(FunctionalEventHandler.class)
|
||||
.register(this, ConfigurationDiscoveryEvent.class)
|
||||
.then(event -> event.getLoader().open("", ".yml").thenEntries(entries -> entries.forEach(entry -> {
|
||||
platform.getDebugLogger().info("Discovered config " + entry.getKey());
|
||||
event.register(entry.getKey(), new YamlConfiguration(entry.getValue(), entry.getKey()));
|
||||
})))
|
||||
.failThrough();
|
||||
.failThrough();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user