mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-24 16:58:50 +01:00
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking
This commit is contained in:
commit
7b788c07b8
@ -1769,7 +1769,13 @@ import java.util.regex.Pattern;
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Material type = player.getInventory().getItemInMainHand().getType();
|
ItemStack hand = player.getInventory().getItemInMainHand();
|
||||||
|
ItemStack offHand = player.getInventory().getItemInOffHand();
|
||||||
|
Material type = (hand == null) ? Material.AIR : hand.getType();
|
||||||
|
Material offType = (offHand == null) ? Material.AIR : offHand.getType();
|
||||||
|
if (type == Material.AIR) {
|
||||||
|
type = offType;
|
||||||
|
}
|
||||||
if (type.toString().toLowerCase().endsWith("egg")) {
|
if (type.toString().toLowerCase().endsWith("egg")) {
|
||||||
Block block = player.getTargetBlockExact(5, FluidCollisionMode.SOURCE_ONLY);
|
Block block = player.getTargetBlockExact(5, FluidCollisionMode.SOURCE_ONLY);
|
||||||
if (block != null && block.getType() != Material.AIR) {
|
if (block != null && block.getType() != Material.AIR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user