mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-26 10:29:10 +00:00
3.3.1.3
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
package net.momirealms.customcrops.api.object.world;
|
||||
|
||||
import net.momirealms.customcrops.api.event.CropBreakEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.world.ChunkLoadEvent;
|
||||
|
||||
@@ -574,7 +574,7 @@ public class PlatformManager extends Function {
|
||||
if (item_in_hand_id.equals("AIR")) {
|
||||
InteractCrop interactCrop = stageConfig.getInteractByHand();
|
||||
if (interactCrop != null) {
|
||||
if (interactCrop.canInteract(player, location))
|
||||
if (!interactCrop.canInteract(player, location))
|
||||
return true;
|
||||
for (Action action : interactCrop.getActions())
|
||||
action.doOn(player, SimpleLocation.getByBukkitLocation(location), cropConfig.getCropMode());
|
||||
@@ -659,7 +659,7 @@ public class PlatformManager extends Function {
|
||||
if (interactActions != null) {
|
||||
for (InteractCrop interactCrop : interactActions) {
|
||||
if (interactCrop.isRightItem(item_in_hand_id)) {
|
||||
if (interactCrop.canInteract(player, location))
|
||||
if (!interactCrop.canInteract(player, location))
|
||||
continue;
|
||||
if (player.getGameMode() != GameMode.CREATIVE) {
|
||||
if (interactCrop.isConsumed())
|
||||
|
||||
Reference in New Issue
Block a user