fix may wrong rail type passed in
All checks were successful
Java CI-CD with Maven / build (push) Successful in 11m55s
All checks were successful
Java CI-CD with Maven / build (push) Successful in 11m55s
This commit is contained in:
parent
3d70612b5b
commit
822b7dd2ee
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>EssentialsD</artifactId>
|
||||
<version>1.2.12</version>
|
||||
<version>1.2.13</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>EssentialsD</name>
|
||||
|
@ -25,6 +25,8 @@ import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.DetectorRail;
|
||||
import org.bukkit.material.PoweredRail;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
|
||||
import java.util.HashSet;
|
||||
@ -170,6 +172,9 @@ public class Events implements Listener {
|
||||
return;
|
||||
}
|
||||
Block block = event.getClickedBlock();
|
||||
if (block.getType() == Material.POWERED_RAIL || block.getType() == Material.DETECTOR_RAIL || block.getType() == Material.ACTIVATOR_RAIL) {
|
||||
return;
|
||||
}
|
||||
BlockData blockData = block.getBlockData();
|
||||
if (!(blockData instanceof Rail)) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user