can someone who know java help me? :D
Hello, im trying to make plugin where you drop item on black stained glass, the item to be teleported at X: 100, Y: 70, Z: 100, but it doesn't work and i don't know why... can you help me?
7 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by itzerpandx#0
Btw here's the code:
(don't ask why im trying to make that type of plugin :D)
you could ask in the spigot discord server, or helpchat
not much of a developer myself
Isn't the getItemDrop() called for the air as the item is not at the location of the stained glass?
i want it to work with any item dropped on the stained glass
;-;
Two things stick out
1) The event is called when the item is dropped, not when it lands (I think, anyway)
So unless your head is in a glass block when you drop the item, this wont work
to fix that, you could just wait a second or two before running your code (via a bukkit scheduler)
-
2) You are checking the block the item is in, not the block below it
to fix that, just get the block at the items location, and check the material of the block below it
@ItzErpandX
I will try, thanks
It works thanks 😄