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

Picking up lava or water with a bucket sends a huge error to console and acts as an "on break" event. #2645

Closed
Jayderp opened this issue Nov 11, 2019 · 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: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@Jayderp
Copy link

Jayderp commented Nov 11, 2019

Description
This error occurs when a script is listening for an "on break" event and a player picks up water or lava.

Steps to Reproduce
Skript Version: 2.4-beta9

  1. Set an on break event to "send "hello" to player
  2. Pick up water or lava with a bucket
  3. It will send "hello" to you even though water can't be broken.

Expected Behavior
Nothing should be sent to the player, however since Skript thinks that picking up lava of water is a "block break" event, it does.

Errors / Screenshots
image
image

image

Console Error: https://gist.github.com/Jayderp/4ec7cd917a89aa567371498ec5c09067

Server Information

  • Server version/platform: Spigot 1.14.4 (BuildTools Build Logs spam #103 --rev latest)
  • Skript version: 2.4-beta9

Additional Context
on break: if event-block is not dirt, lava, or water: send "&c&lYOU ARE BLIND! &6Unfortunately, this is not dirt." to player cancel the drops drop dirt at location of event-block else: set {_c} to random integer between 1 and 3 add all items to {_i::*} set {_item} to {_c} of random element out of {_i::*} wait 1 tick if {_item} contains "floor", "ender portal block", "attached", "powered", "air", "command", "structure block", "structure void", or "barrier": send "&c&lYOU GOT UNLUCKY! &6Unfortunately, this block would've dropped an illegal item. Sorry." to player stop else: wait 1 tick send "&a&lITEM FOUND! &a%{_item}%" drop {_item} at location of event-block

@Jayderp
Copy link
Author

Jayderp commented Nov 11, 2019

It seems that github has completely messed up my skript code, but trust me, every thing is indented correctly and there are no errors on reload.

sk reload test
[09:11:50] [Server thread/INFO]: [Skript] Reloading test.sk...
[09:11:51] [Server thread/INFO]: [Skript] Successfully reloaded test.sk.

@ShaneBeee ShaneBeee added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Nov 11, 2019
@ShaneBeee
Copy link
Contributor

Can confirm.

@Jayderp
Copy link
Author

Jayderp commented Nov 11, 2019

Breaking a painting:
java.lang.ClassCastException: org.bukkit.event.hanging.HangingBreakByEntityEvent cannot be cast to org.bukkit.event.block.BlockBreakEvent

Also the random drops sometimes attempts to drop air, and logs a bunch of errors to the console.

@bensku bensku added the completed The issue has been fully resolved and the change will be in the next Skript update. label Nov 30, 2019
@bensku bensku closed this as completed Nov 30, 2019
@FranKusmiruk FranKusmiruk reopened this Nov 30, 2019
@FranKusmiruk
Copy link
Member

Sorry, accidentally reopened it.

@Jayderp
Copy link
Author

Jayderp commented Dec 5, 2019

Fixed in 2.4.

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: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

4 participants