DenizenScript / Denizen

NPC and general Spigot scripting, using the Denizen Scripting Language!
https://denizenscript.com/
MIT License
215 stars 107 forks source link

Problems about "- give item:[custom item script]" #272

Closed TigerHix closed 11 years ago

TigerHix commented 11 years ago

Here's an example.

First, a custom item script:

"Madness diamond": type: item material: diamond display name: Madness Trophy lore:

And then, create a command which give player this item:

on madnessdiamond command:

Problems come.

If your inventory bar focus first place, then you can get diamond. 2013-07-08_16 57 39

If your inventory bar focus other places (2,3,4,5,6,7,8,9), you "can't" get diamond. 2013-07-08_16 57 45

Why I add quotes? Because if you switch back to first place, and right click any block, diamond magically appears. 2013-07-08_16 57 54

I don't know this is the problem of Denizen, or Minecraft. But it's so strange..

spaceemotion commented 11 years ago

replace the give 'script:Madness diamond' qty:1 with give 'item:Madness diamond' qty:1

TigerHix commented 11 years ago

Changed, but the same issue. :(

spaceemotion commented 11 years ago

Well, that's strange then. Denizen uses the addItem function of Bukkit (scriptEntry.getPlayer().getPlayerEntity().getInventory().addItem(is);). Needs more investigating ...

TigerHix commented 11 years ago

Maybe it's Bukkit problem then. Thanks a lot spaceemotion, u help me every issue I post.. :P

TigerHix commented 11 years ago

Yes. Bukkit problem. Try another plugin, CustomItems. It also use function below. And same issue happens.

spaceemotion commented 11 years ago

Okay thank you for that report. We would have to write our own method then ;)

davidcernat commented 11 years ago

SpaceEmotion, please actually test people's bugs before you agree with them. :P I for one cannot replicate this issue and I'm pretty sure it has nothing to do with Denizen.