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

Names and lores of books are being ignored #2900

Closed
DavidVioMC opened this issue Apr 1, 2020 · 5 comments
Closed

Names and lores of books are being ignored #2900

DavidVioMC opened this issue Apr 1, 2020 · 5 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

@DavidVioMC
Copy link

Description

Named books are being ignored when checking for names/lores.

Steps to Reproduce

command /testbook:
	trigger:
		give player book named "Test" with lore "Testing book"
		give player book
		
command /removebook:
	trigger:
		set {_book} to amount of book named "Test" with lore "Testing book" in player's inventory
		broadcast "%{_book}%"
		remove 1 book named "Test" with lore "Testing book" from player

Expected Behavior

After doing /testbook, player will contain one vanilla book and one named "Test with lore "Testing book", when /removebook is executed, the vanilla book should stay in player's inventory and one "testing" book should be removed, but instead, the vanilla book will be removed and the testing one will stay.

Errors / Screenshots

No errors

Server Information

  • Server version/platform: 1.12.2 Paper (git-Paper-1618)
  • Skript version: 2.4.1

Additional Context

@ShaneBeee
Copy link
Contributor

can you try 2.5-alpha3.... I believe this issue has already been resolved.

@ShaneBeee ShaneBeee added the waiting for reply The report needs a response from the reporter to determine course of action. label Apr 1, 2020
@Romitou
Copy link
Member

Romitou commented Apr 1, 2020

Yes, should be resolved in 2.5-alpha2. (#2714)

@DavidVioMC
Copy link
Author

DavidVioMC commented Apr 1, 2020

Seems to be fixed but when checking for an item with multiple lores, it seems to cause internal error. For example when you add this:

command /removebook:
	trigger:
		set {_book} to amount of book named "Test" with lore "Testing book" and "t" in player's inventory

This worked fine in 2.4.1, not sure if this is a problem related to #2714 or I should open another issue.

Console Error: https://pastebin.com/H3xyhp4H

One way to bypass this is to only check for one lore line or not at all, may be an issue if someone needs to check multiple lore lines.

@Romitou
Copy link
Member

Romitou commented Apr 2, 2020

Hello, I can confirm this problem in 2.5-alpha3.
Until this issue is resolved, you can go through this method.

command /givetest:
    trigger:
        give a book named "This is a test." with lore "Hello!" and "Wow!" to player

command /test:
    trigger:
        set {_lore::*} to "Hello!" and "Wow!"
        set {_book} to amount of book named "This is a test." with lore {_lore::*} in player's inventory
        send "%{_book}%"

@ShaneBeee ShaneBeee 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. and removed waiting for reply The report needs a response from the reporter to determine course of action. labels May 12, 2020
@ShaneBeee ShaneBeee added the completed The issue has been fully resolved and the change will be in the next Skript update. label Aug 6, 2020
@ShaneBeee
Copy link
Contributor

I just tested this using 1.12.2 and 1.16.1 with Skript 2.5-beta1 and the issue seems to have been resolved somewhere along the way.

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

3 participants