dont allow extraction on tempblocks

This commit is contained in:
PhanaticD 2019-01-06 09:29:06 -05:00
parent 38ddefeb5a
commit 1f72980dc8

View file

@ -1,17 +1,17 @@
package com.projectkorra.projectkorra.earthbending.metal;
import java.util.HashSet;
import java.util.Random;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.MetalAbility;
import com.projectkorra.projectkorra.attribute.Attribute;
import com.projectkorra.projectkorra.util.TempBlock;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import com.projectkorra.projectkorra.GeneralMethods;
import com.projectkorra.projectkorra.ability.MetalAbility;
import com.projectkorra.projectkorra.attribute.Attribute;
import java.util.HashSet;
import java.util.Random;
public class Extraction extends MetalAbility {
@ -42,7 +42,7 @@ public class Extraction extends MetalAbility {
return;
}
if (!GeneralMethods.isRegionProtectedFromBuild(this, this.originBlock.getLocation())) {
if (!GeneralMethods.isRegionProtectedFromBuild(this, this.originBlock.getLocation()) && !TempBlock.isTempBlock(this.originBlock)) {
final Material material = this.originBlock.getType();
Material type = null;