Skip to content
Permalink
Browse files

Prevent duplicate enabled entries from breaking mechanics.

  • Loading branch information...
me4502 committed Jul 19, 2019
1 parent 31369f6 commit 3ac3c2d678cef1fe1c8f9367e894fa17cbc4b8ed
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/com/sk89q/craftbook/bukkit/CraftBookPlugin.java
@@ -1,5 +1,6 @@
package com.sk89q.craftbook.bukkit;

import com.google.common.collect.Sets;
import com.sk89q.bukkit.util.CommandsManagerRegistration;
import com.sk89q.craftbook.CraftBookMechanic;
import com.sk89q.craftbook.CraftBookPlayer;
@@ -554,7 +555,7 @@ public void setupCraftBook() {
"# NOTE! MAKE SURE TO ENABLE FEATURES IN THE config.yml FILE!",
"");

for(String enabled : config.enabledMechanics) {
for(String enabled : Sets.newHashSet(config.enabledMechanics)) {

Class<? extends CraftBookMechanic> mechClass = availableMechanics.get(enabled);
try {

0 comments on commit 3ac3c2d

Please sign in to comment.
You can’t perform that action at this time.