parent
e400508e99
commit
71c1c824cf
|
@ -61,11 +61,11 @@ public class OreAlertListener implements Listener {
|
|||
@EventHandler
|
||||
public void onBlockPlace(BlockPlaceEvent event) {
|
||||
this.plugin.getServer().getScheduler().runTaskAsynchronously(this.plugin, () -> {
|
||||
if (isMaterialTrcked(event.getBlock().getType())) cache.add(event.getBlock().getLocation());
|
||||
if (isMaterialTracked(event.getBlock().getType())) cache.add(event.getBlock().getLocation());
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isMaterialTrcked(Material material) {
|
||||
private boolean isMaterialTracked(Material material) {
|
||||
for (String s: this.plugin.getConfig().getConfigurationSection("ore.blocks").getKeys(false)) {
|
||||
if (Lang.getMaterialKey(material).equals(s)) {
|
||||
return true;
|
||||
|
@ -80,7 +80,7 @@ public class OreAlertListener implements Listener {
|
|||
if (event != null) {
|
||||
if (cache.contains(event.getLocation())) continue;
|
||||
cache.add(event.getLocation());
|
||||
if (isMaterialTrcked(event.getMaterial())) {
|
||||
if (isMaterialTracked(event.getMaterial())) {
|
||||
addStrike(event);
|
||||
if (event.isParent()) {
|
||||
check(event);
|
||||
|
|
Loading…
Reference in New Issue