Skip to content

Commit 8e69391

Browse files
committed
Fixes
1 parent da42d29 commit 8e69391

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/main/java/com/volmit/rift/Rift.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,22 @@ public void onEnable()
5656

5757
private void checkForBukkitWorlds() {
5858
FileConfiguration fc = new YamlConfiguration();
59+
Set<String> hit = new HashSet<>();
5960
try {
6061
fc.load(new File("bukkit.yml"));
6162
searching: for(String i : fc.getKeys(true))
6263
{
6364
if(i.startsWith("worlds.")) {
6465
String worldName = i.split("\\Q.\\E")[1];
65-
String generator = i.endsWith(".generator") ? fc.getString(i) : null;
66+
67+
68+
if(hit.contains(worldName))
69+
{
70+
continue;
71+
}
72+
73+
hit.add(worldName);
74+
String generator = i.endsWith(".generator") ? fc.getString(i) : fc.getString("worlds." + worldName + ".generator");
6675

6776
if(generator != null && generator.startsWith("Iris"))
6877
{

0 commit comments

Comments
 (0)