mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Fix potential NPE with claiming
This commit is contained in:
parent
9ad45750ee
commit
d554dab8c8
@ -21,6 +21,7 @@ import com.intellectualcrafters.plot.util.block.LocalBlockQueue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@ -464,11 +465,14 @@ public abstract class PlotArea {
|
||||
}
|
||||
|
||||
public Set<Plot> getPlotsAbs(final UUID uuid) {
|
||||
if (uuid == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
final HashSet<Plot> myPlots = new HashSet<>();
|
||||
foreachPlotAbs(new RunnableVal<Plot>() {
|
||||
@Override
|
||||
public void run(Plot value) {
|
||||
if (value.owner.equals(uuid)) {
|
||||
if (uuid.equals(value.owner)) {
|
||||
myPlots.add(value);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user