Skip to content

Commit

Permalink
add debug to updatePlayerView
Browse files Browse the repository at this point in the history
  • Loading branch information
Ste3et committed Sep 21, 2023
1 parent 3e9b84a commit d203a8a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 3 deletions.
Binary file modified .gradle/7.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/checksums/checksums.lock
Binary file not shown.
Binary file modified .gradle/checksums/md5-checksums.bin
Binary file not shown.
Binary file modified .gradle/checksums/sha1-checksums.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,8 @@ public void setFurnitureObject(Furniture furniture) {
public Furniture getFurnitureObject() {
return this.functionObject;
}

public Optional<Furniture> getFurnitureObjectOpt() {
return Optional.ofNullable(this.functionObject);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,18 @@ public void updatePlayerViewWithRange(Player player, Location location) {
if (players.contains(player)) {
return;
}
this.packetList.forEach(stand -> stand.send(player));
this.getFurnitureObject().receive(player);
players.add(player);

if(this.getFurnitureObjectOpt().isPresent() == false) {
FurnitureLib.debug(this.getID() + " have no function object", 100);
FurnitureLib.debug("Project: " + this.getProject(), 100);
}

this.getFurnitureObjectOpt().ifPresent(entry -> {
this.packetList.forEach(stand -> stand.send(player));
entry.receive(player);
players.add(player);
});

} else {
if (!players.contains(player))
return;
Expand Down
Binary file modified buildSrc/.gradle/7.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.

0 comments on commit d203a8a

Please sign in to comment.