Fixed MI blocks not working in MMOCore custom mining

This commit is contained in:
Jules 2024-07-31 14:24:30 -07:00
parent 21cf8b4ea8
commit bd75a6883a

View File

@ -8,6 +8,8 @@ import net.Indyuce.mmoitems.api.block.CustomBlock;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import java.util.Objects;
public class MMOItemsBlockType implements BlockType { public class MMOItemsBlockType implements BlockType {
private final int id; private final int id;
@ -52,4 +54,17 @@ public class MMOItemsBlockType implements BlockType {
public boolean breakRestrictions(Block block) { public boolean breakRestrictions(Block block) {
return true; return true;
} }
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MMOItemsBlockType that = (MMOItemsBlockType) o;
return id == that.id;
}
@Override
public int hashCode() {
return Objects.hash(id);
}
} }