Skip to content

Commit

Permalink
Fix Drilling + Power interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo56958 committed Oct 31, 2020
1 parent 04b8ea1 commit 8093512
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/flo56958/minetinker/data/Lists.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import org.bukkit.entity.Player;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

public class Lists {

public static final HashMap<Player, BlockFace> BLOCKFACE = new HashMap<>();
public static final ConcurrentHashMap<Player, BlockFace> BLOCKFACE = new ConcurrentHashMap<>();
private static final FileConfiguration config = MineTinker.getPlugin().getConfig();
public static final List<String> DROPLOOT = config.getStringList("LevelUpEvents.DropLoot.Items");
public static List<String> WORLDS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import de.flo56958.minetinker.utils.ChatWriter;
import de.flo56958.minetinker.utils.LanguageManager;
import de.flo56958.minetinker.utils.Updater;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.BlockFace;
Expand Down Expand Up @@ -242,7 +243,7 @@ public void onInteract(@NotNull final PlayerInteractEvent event) {
}

if (!event.getBlockFace().equals(BlockFace.SELF)) {
Lists.BLOCKFACE.replace(event.getPlayer(), event.getBlockFace());
Bukkit.getScheduler().runTaskLaterAsynchronously(MineTinker.getPlugin(), () -> Lists.BLOCKFACE.replace(event.getPlayer(), event.getBlockFace()), 2);
}

if (!modManager.allowBookToModifier()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class ModManager {
incompatibilityList.add(MultiShot.instance().getKey() + ":" + Piercing.instance().getKey());
incompatibilityList.add(Power.instance().getKey() + ":" + Timber.instance().getKey());
incompatibilityList.add(Drilling.instance().getKey() + ":" + Timber.instance().getKey());
//incompatibilityList.add(Drilling.instance().getKey() + ":" + Power.instance().getKey());
incompatibilityList.add(SelfRepair.instance().getKey() + ":" + Photosynthesis.instance().getKey());
incompatibilityList.add(MultiShot.instance().getKey() + ":" + Magical.instance().getKey());
incompatibilityList.add(Magical.instance().getKey() + ":" + Ender.instance().getKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public void reload() {
config.addDefault("Allowed", true);
config.addDefault("Color", "%GRAY%");
config.addDefault("MaxLevel", 1);
config.addDefault("SlotCost", 1);
config.addDefault("SlotCost", 3);

config.addDefault("EnchantCost", 10);
config.addDefault("EnchantCost", 50);
config.addDefault("Enchantable", false);

config.addDefault("Recipe.Enabled", true);
Expand Down

0 comments on commit 8093512

Please sign in to comment.