Skip to content

Commit

Permalink
Make dimension lookup not to be case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
NeumimTo committed May 16, 2018
1 parent c147f54 commit 2e29e36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package cz.neumimto.rpg.entities;

import cz.neumimto.core.ioc.PostProcess;
import cz.neumimto.core.ioc.Singleton;
import cz.neumimto.rpg.NtRpgPlugin;
import cz.neumimto.rpg.ResourceLoader;
import ninja.leaping.configurate.SimpleConfigurationNode;
import ninja.leaping.configurate.hocon.HoconConfigurationLoader;
import ninja.leaping.configurate.objectmapping.ObjectMapper;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.entity.EntityType;
import org.spongepowered.api.entity.living.Human;
import org.spongepowered.api.entity.living.Living;
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.game.state.GameStartedServerEvent;
import org.spongepowered.api.world.storage.WorldProperties;

import java.io.File;
Expand All @@ -21,12 +23,13 @@
* Created by NeumimTo on 20.12.2015.
*/
@Singleton
@ResourceLoader.ListenerClass
public class MobSettingsDao {

private RootMobConfig cache;

@PostProcess(priority = 9)
public void load() {
@Listener
public void load(GameStartedServerEvent event) {
cache = createDefaults("MobSettings.conf");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Map<String, MobsConfig> getDimmensions() {
}

public MobsConfig getDimmension(String worldName) {
return dimmensions.get(worldName.toLowerCase());
return dimmensions.get(worldName);
}

public void setDimmensions(Map<String, MobsConfig> dimmensions) {
Expand Down

0 comments on commit 2e29e36

Please sign in to comment.