Skip to content

Commit

Permalink
patch area enter event first-fire duplicating
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 16, 2020
1 parent bdf79da commit 6d7218d
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -240,10 +240,6 @@ public void processSingle(AreaContainmentObject obj, Player player, HashSet<Stri
if (containedNow == wasContained) {
return;
}
if (inAreas == null) {
inAreas = new HashSet<>();
playersInArea.put(player.getUniqueId(), inAreas);
}
if (containedNow) {
inAreas.add(obj.getNoteName());
}
Expand All @@ -262,6 +258,10 @@ public void processNewPosition(Player player, Location pos, Event eventCause) {
return;
}
HashSet<String> inAreas = playersInArea.get(player.getUniqueId());
if (inAreas == null) {
inAreas = new HashSet<>();
playersInArea.put(player.getUniqueId(), inAreas);
}
if (doTrackAll || matchers != null) {
for (CuboidTag cuboid : NotableManager.getAllType(CuboidTag.class)) {
if (anyMatch(cuboid.noteName)) {
Expand Down

0 comments on commit 6d7218d

Please sign in to comment.