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

There's no way to get location of a double chest inventory #4681

Closed
1 task done
oskarkk opened this issue Mar 21, 2022 · 2 comments
Closed
1 task done

There's no way to get location of a double chest inventory #4681

oskarkk opened this issue Mar 21, 2022 · 2 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@oskarkk
Copy link
Contributor

oskarkk commented Mar 21, 2022

Skript/Server Version

[15:33:09 Server thread/INFO] [Skript] Server Version: git-Paper-"aab1f8a" (MC: 1.18.2)
[15:33:09 Server thread/INFO] [Skript] Skript Version: 2.6.1
[15:33:09 Server thread/INFO] [Skript] Installed Skript Addons:
[15:33:09 Server thread/INFO] [Skript]  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[15:33:09 Server thread/INFO] [Skript]  - skript-yaml v1.4
[15:33:09 Server thread/INFO] [Skript]  - skDragon v0.18
[15:33:09 Server thread/INFO] [Skript]  - SkBee v1.15.1 (https://github.com/ShaneBeee/SkBee)
[15:33:09 Server thread/INFO] [Skript]  - FunkySk v1.0.2
[15:33:09 Server thread/INFO] [Skript] Installed dependencies:
[15:33:09 Server thread/INFO] [Skript]  - Vault v1.7.3-b131
[15:33:09 Server thread/INFO] [Skript]  - WorldGuard v7.0.7+216b061

Bug Description

You can't get location of double chest inventory holder. It seems that double chest is handled differently from other inventories in spigot API.

Expected Behavior

I think that maybe the block of double chest inventory should depend on which half of the inventory was clicked in on inventory click event, or that it could just default to the left half (certainly easier to implement).

Steps to Reproduce

on inventory click:
  message holder of event-inventory
  message location of event-inventory's holder

Go click on something in a single chest, and then in a double chest.

Errors or Screenshots

image

First two white lines - single chest. Last line - double chest.

Other

Some insight into the API I found: https://www.spigotmc.org/threads/get-inventory-holder-of-a-double-chest.422072/

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@AyhamAl-Ali
Copy link
Member

InventoryHolder doesn't have a location, you need to use event-location

@AyhamAl-Ali AyhamAl-Ali added the invalid Not a Skript issue, already implemented, does not apply, etc. label Mar 21, 2022
@oskarkk
Copy link
Contributor Author

oskarkk commented Mar 22, 2022

Have you tried steps to reproduce? InventoryHolder clearly has a location, as long as it's not double chest. Event-location in on inventory click gives me location of player, and what I need is the location of the opened chest.

@AyhamAl-Ali AyhamAl-Ali reopened this Mar 22, 2022
@AyhamAl-Ali AyhamAl-Ali removed the invalid Not a Skript issue, already implemented, does not apply, etc. label Mar 22, 2022
@AyhamAl-Ali AyhamAl-Ali self-assigned this Mar 22, 2022
@AyhamAl-Ali AyhamAl-Ali added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Mar 22, 2022
@AyhamAl-Ali AyhamAl-Ali added the PR available Issues which have a yet-to-be merged PR resolving it label Mar 22, 2022
@TPGamesNL TPGamesNL added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

4 participants