From 06f59f70cc781f5ea32ee0ba4320540dea18fc98 Mon Sep 17 00:00:00 2001 From: Zrips Date: Wed, 15 Sep 2021 13:52:28 +0300 Subject: [PATCH] Block ownership fix #2 --- .../jobs/container/blockOwnerShip/BlockOwnerShip.java | 2 -- .../com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/container/blockOwnerShip/BlockOwnerShip.java b/src/main/java/com/gamingmesh/jobs/container/blockOwnerShip/BlockOwnerShip.java index 10330765..08d2d7c9 100644 --- a/src/main/java/com/gamingmesh/jobs/container/blockOwnerShip/BlockOwnerShip.java +++ b/src/main/java/com/gamingmesh/jobs/container/blockOwnerShip/BlockOwnerShip.java @@ -23,7 +23,6 @@ import com.gamingmesh.jobs.stuff.blockLoc; import net.Zrips.CMILib.Container.CMILocation; import net.Zrips.CMILib.Items.CMIMaterial; -import net.Zrips.CMILib.Logs.CMIDebug; public class BlockOwnerShip { @@ -184,7 +183,6 @@ public class BlockOwnerShip { blockLoc bl = new blockLoc(loc); Map record = ownerMapByLocation.get(bl.getWorldName()); if (record == null) { - CMIDebug.d("first null"); return null; } return record.get(bl.toVectorString()); diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 14ce4842..45d5c108 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -18,7 +18,6 @@ package com.gamingmesh.jobs.listeners; -import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -30,7 +29,6 @@ import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; import org.bukkit.block.BrewingStand; import org.bukkit.block.Furnace; import org.bukkit.block.data.Ageable; @@ -127,7 +125,6 @@ import net.Zrips.CMILib.Container.CMILocation; import net.Zrips.CMILib.Entities.CMIEntityType; import net.Zrips.CMILib.Items.CMIItemStack; import net.Zrips.CMILib.Items.CMIMaterial; -import net.Zrips.CMILib.Logs.CMIDebug; import net.Zrips.CMILib.Version.Version; public final class JobsPaymentListener implements Listener { @@ -1099,7 +1096,9 @@ public final class JobsPaymentListener implements Listener { } catch (IllegalArgumentException e) { return; } - } else + } + + if (uuid == null) return; Player player = Bukkit.getPlayer(uuid);