mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	@@ -931,10 +931,10 @@ import java.util.regex.Pattern;
 | 
			
		||||
        PlotPlayer plotPlayer = BukkitUtil.getPlayer(event.getPlayer());
 | 
			
		||||
        Location location = plotPlayer.getLocation();
 | 
			
		||||
        PlotArea area = location.getPlotArea();
 | 
			
		||||
        if (location.isPlotArea() || (area.PLOT_CHAT == plotPlayer.getAttribute("chat"))) {
 | 
			
		||||
        if (area == null || (area.PLOT_CHAT == plotPlayer.getAttribute("chat"))) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        Plot plot = location.getPlot();
 | 
			
		||||
        Plot plot = area.getPlot(location);
 | 
			
		||||
        if (plot == null) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,6 @@ import org.bukkit.permissions.PermissionAttachmentInfo;
 | 
			
		||||
import org.bukkit.plugin.RegisteredListener;
 | 
			
		||||
import org.jetbrains.annotations.NotNull;
 | 
			
		||||
 | 
			
		||||
import javax.annotation.Nonnull;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import java.util.UUID;
 | 
			
		||||
@@ -56,7 +55,7 @@ public class BukkitPlayer extends PlotPlayer {
 | 
			
		||||
        super.populatePersistentMetaMap();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override public Location getLocation() {
 | 
			
		||||
    @NotNull @Override public Location getLocation() {
 | 
			
		||||
        final Location location = super.getLocation();
 | 
			
		||||
        return location == null ? BukkitUtil.getLocation(this.player) : location;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -28,8 +28,9 @@ import org.bukkit.entity.Player;
 | 
			
		||||
import org.bukkit.inventory.Inventory;
 | 
			
		||||
import org.bukkit.inventory.InventoryHolder;
 | 
			
		||||
import org.bukkit.inventory.ItemStack;
 | 
			
		||||
 | 
			
		||||
import org.jetbrains.annotations.NotNull;
 | 
			
		||||
import org.jetbrains.annotations.Nullable;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.HashSet;
 | 
			
		||||
@@ -243,7 +244,7 @@ import java.util.Set;
 | 
			
		||||
            location.getBlockZ());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static Location getLocationFull(@NonNull final Entity entity) {
 | 
			
		||||
    @NotNull public static Location getLocationFull(@NonNull final Entity entity) {
 | 
			
		||||
        final org.bukkit.Location location = entity.getLocation();
 | 
			
		||||
        return new Location(location.getWorld().getName(), MathMan.roundInt(location.getX()),
 | 
			
		||||
            MathMan.roundInt(location.getY()), MathMan.roundInt(location.getZ()), location.getYaw(),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user