Shulker Block for use one time ?

Discussion in 'Spigot Plugin Development' started by Owner_jomzaza, Nov 15, 2018.

  1. Hello if I typing "/command shulker" will give a shulker and player can place one time then if they break shulker box, shulker will remove.
    1. Remove the resource tag, this is not a resource
    2. What are you asking here? You are in plugin development so you need help with some code?
    3. If you want spoonfeeding, I won't help.
    4. Add a Lore to the shulker box, Listen for the block place event and check if the item placed is your shulker box with the lore and add the block to a set. Finally, listen for the block break event, if the set contains the block, cancel the event and use BlockBreakEvent#setDropItems(false)
  2. I personally would not use lore, I would use itemmeta or nbt tags on the shulker box, that way if a user is able to change the lore it still work.
    • Optimistic Optimistic x 1
  3. Choco


    Lore is unchangeable in vanilla Minecraft and it's not common for servers to give players access to commands that allow for the changing of lore on any item they desire. That being said, if someone wants to willfully remove the effects of their item, they're more than welcome to do so. Lore is most certainly the better alternative here rather than defining an unnecessary NBT tag which will not be storing any data whatsoever.
  4. in factions, rpg, semi vanilla, and a few survival servers changing lore is common. In my opinion it would just help with playing nice to other plugins so it doesn't break for some reason
  5. if other plugins are breaking because of lore, then they aren't developed properly. also im not aware of faction servers openly allowing users to change lore to whatever they wish..
  6. CosmicPVP is one of the largest faction servers though and they allow lore + item name to be changed.
    • Optimistic Optimistic x 1
  7. Choco


    1 large server != every server available. I highly, HIGHLY doubt large servers are going to be using public plugins such as the ones described in the OP. You're making a mountain out of a mole hill here. Lore is the proper way to handle item identification in this situation. NBT is used to store information mapping them from keys to values. The item described is not holding any more information than what already exists. Lore, display name, anything provided by ItemMeta should be used to identify an item.
    • Agree Agree x 1
    • Optimistic Optimistic x 1
    No, I mean many smaller servers tend to model after larger servers. I can get a list if you would like by request, however take for instance many popular plugins
    Just an example. I can get a larger list/more and different data to represent a larger population if you would like, just message me.
    This is the way larger networks do it as well, f3 + h I believe then look onto servers like hypixel and cosmicpvp. I believe (don't quote me on this, this is not fact checked on cosmicpvp) however on Hypixel they use NBT tags for items on shop guis at least and items in game such as the Pit.
    If the user decides to download a plugin that may handle data with lores, it may break the item and possibly might not work.
    sums up to 40K downloads (As of 11/16/2018) And that is actually alot. These plugins both change the lore and/or display name of items, and will probually not work with this plugin if he decides to release it and a lore is changed.
    To sum it up, I believe NBT tags to be a much better way to store data (from experience). It is compatible with more plugins and is even used on the larger networks.

    Related but not really because you techically suggested lores, but the displayname of items can be changed as well in vanilla minecraft using anvils, so doing that can possibly break this plugin as well if he decides to store the data in the display name.

    With this util it also is probually even easier than item lore and works on 1.8+ (except 1.12 for some reason, but it works on 1.12.2 and 1.12.1)

    #9 FalconSeeker, Nov 17, 2018
    Last edited: Nov 17, 2018
  9. it's not significant enough because majority of those servers never succeed. and if they do, they usually tend to have the funds to develop their own stuff.