mirror of
https://github.com/Zrips/Jobs.git
synced 2025-02-18 05:11:32 +01:00
Not check for explorer by the ground, but check flying, #357
This commit is contained in:
parent
62f5718eb1
commit
1f2219b3cb
@ -23,6 +23,7 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.logging.Level;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -184,9 +185,9 @@ public class JobsPaymentListener implements Listener {
|
|||||||
ItemStack toStore = event.getCursor();
|
ItemStack toStore = event.getCursor();
|
||||||
// Make sure we are actually traded anything
|
// Make sure we are actually traded anything
|
||||||
if (hasItems(toCraft))
|
if (hasItems(toCraft))
|
||||||
if (event.isShiftClick()) {
|
if (event.isShiftClick())
|
||||||
schedulePostDetection(player, toCraft.clone(), jPlayer, resultStack.clone(), ActionType.VTRADE);
|
schedulePostDetection(player, toCraft.clone(), jPlayer, resultStack.clone(), ActionType.VTRADE);
|
||||||
} else {
|
else {
|
||||||
// The items are stored in the cursor. Make sure there's enough space.
|
// The items are stored in the cursor. Make sure there's enough space.
|
||||||
if (isStackSumLegal(toCraft, toStore)) {
|
if (isStackSumLegal(toCraft, toStore)) {
|
||||||
int newItemsCount = toCraft.getAmount();
|
int newItemsCount = toCraft.getAmount();
|
||||||
@ -367,14 +368,14 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (!payIfCreative(player))
|
if (!payIfCreative(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (CMIMaterial.get(block).equals(CMIMaterial.FURNACE) && block.hasMetadata(furnaceOwnerMetadata))
|
||||||
|
FurnaceBrewingHandling.removeFurnace(block);
|
||||||
|
if (CMIMaterial.get(block).equals(CMIMaterial.BREWING_STAND) && block.hasMetadata(brewingOwnerMetadata))
|
||||||
|
FurnaceBrewingHandling.removeBrewing(block);
|
||||||
|
|
||||||
if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
|
if (!Jobs.getPermissionHandler().hasWorldPermission(player, player.getLocation().getWorld().getName()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Jobs.getGCManager().isFurnacesReassign() && CMIMaterial.get(block).equals(CMIMaterial.FURNACE) && block.hasMetadata(furnaceOwnerMetadata))
|
|
||||||
FurnaceBrewingHandling.removeFurnace(block);
|
|
||||||
if (Jobs.getGCManager().isBrewingStandsReassign() && CMIMaterial.get(block).equals(CMIMaterial.BREWING_STAND) && block.hasMetadata(brewingOwnerMetadata))
|
|
||||||
FurnaceBrewingHandling.removeBrewing(block);
|
|
||||||
|
|
||||||
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
||||||
|
|
||||||
FastPayment fp = Jobs.FastPayment.get(player.getUniqueId());
|
FastPayment fp = Jobs.FastPayment.get(player.getUniqueId());
|
||||||
@ -1526,9 +1527,8 @@ public class JobsPaymentListener implements Listener {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Block b = loc.getBlock();
|
Block b = loc.getBlock();
|
||||||
if (b.getType().toString().startsWith("STRIPPED_")) {
|
if (b.getType().toString().startsWith("STRIPPED_"))
|
||||||
Jobs.action(jPlayer, new BlockActionInfo(b, ActionType.STRIPLOGS), b);
|
Jobs.action(jPlayer, new BlockActionInfo(b, ActionType.STRIPLOGS), b);
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
@ -1590,7 +1590,7 @@ public class JobsPaymentListener implements Listener {
|
|||||||
if (player.getGameMode().toString().equals("SPECTATOR"))
|
if (player.getGameMode().toString().equals("SPECTATOR"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Jobs.getGCManager().payExploringWhenFlying() && player.isOnGround())
|
if (!Jobs.getGCManager().payExploringWhenFlying() && player.isFlying())
|
||||||
return;
|
return;
|
||||||
ExploreRespond respond = Jobs.getExplore().ChunkRespond(player, event.getNewChunk());
|
ExploreRespond respond = Jobs.getExplore().ChunkRespond(player, event.getNewChunk());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user