Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close block windows when player is too far away #6382

Closed
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
af42942
Bump symfony/filesystem from 6.4.7 to 6.4.9
dependabot[bot] Jul 1, 2024
77db7a8
Merge pull request #6381 from pmmp/dependabot/composer/symfony/filesy…
dependabot[bot] Jul 1, 2024
279f9ba
If player is more then 12 blocks from container close container window
CoderJoeW Jul 3, 2024
f24b964
fix code style issues
CoderJoeW Jul 3, 2024
34bcd1c
Merge branch 'minor-next' into 6349-container-window-not-closed
CoderJoeW Jul 3, 2024
c58073c
hopefully fixes issue with composer.lock file being changed
CoderJoeW Jul 3, 2024
1a54372
fixes changes to composer.lock
CoderJoeW Jul 3, 2024
3db4363
change variable name to holder for consistency
CoderJoeW Jul 3, 2024
d28eb74
add max distance to inventory interface
CoderJoeW Jul 3, 2024
ca7c424
add properties and methods to override interface max distance
CoderJoeW Jul 3, 2024
cd9cc82
use max distance modifier from inventory class
CoderJoeW Jul 3, 2024
25dee10
Fix incorrect class check
CoderJoeW Jul 3, 2024
841cc21
code style fixes
CoderJoeW Jul 3, 2024
42dc7da
Create new interface for proximity restrictions
CoderJoeW Jul 5, 2024
214bb72
update code to use ProximityRestricted interface
CoderJoeW Jul 5, 2024
cd9c7da
remove old code
CoderJoeW Jul 5, 2024
de1b7c3
updated based on new interface
CoderJoeW Jul 5, 2024
fccdb19
remove unused code
CoderJoeW Jul 5, 2024
5e33cad
correct function name
CoderJoeW Jul 5, 2024
06ca641
fix typo
CoderJoeW Jul 5, 2024
77e8560
correct errors
CoderJoeW Jul 5, 2024
741f4bf
moove ProximityRestricted into block/inventory
ShockedPlot7560 Nov 18, 2024
271541c
make ProximityRestricted inventory immutable
ShockedPlot7560 Nov 18, 2024
38c99a9
make code more clear
ShockedPlot7560 Nov 18, 2024
f4c020d
improve documentation
ShockedPlot7560 Nov 18, 2024
48e3a8d
remove ProximityRestricted from BaseInventory
ShockedPlot7560 Nov 18, 2024
f6864c2
remove unrelated changes
ShockedPlot7560 Nov 18, 2024
3996449
create ProximityRestrictedTrait and implement it in the block invento…
ShockedPlot7560 Nov 18, 2024
91da21f
change conditions
ShockedPlot7560 Nov 18, 2024
caeeddc
fix PHPstan
ShockedPlot7560 Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code style fixes
CoderJoeW committed Jul 3, 2024
commit 841cc216f0641adb8a520474c164d4dbf0e3bbda
4 changes: 2 additions & 2 deletions src/inventory/BaseInventory.php
Original file line number Diff line number Diff line change
@@ -62,11 +62,11 @@ public function setMaxStackSize(int $size) : void{
$this->maxStackSize = $size;
}

public function getMaxDistanceFromContainer(): int {
public function getMaxDistanceFromContainer() : int {
return $this->maxDistanceFromContainer;
}

public function setMaxDistanceFromContainer(int $maxDistance): void {
public function setMaxDistanceFromContainer(int $maxDistance) : void {
$this->maxDistanceFromContainer = $maxDistance;
}

1 change: 0 additions & 1 deletion src/player/Player.php
Original file line number Diff line number Diff line change
@@ -83,7 +83,6 @@
use pocketmine\form\FormValidationException;
use pocketmine\inventory\CallbackInventoryListener;
use pocketmine\inventory\CreativeInventory;
use pocketmine\inventory\BaseInventory;
use pocketmine\inventory\Inventory;
use pocketmine\inventory\PlayerCraftingInventory;
use pocketmine\inventory\PlayerCursorInventory;