Filled renameRestrict

Discussion in 'Plugin Requests' started by madtomic, Aug 4, 2019.

  1. Offline

    madtomic

    Plugin category: Mechnical

    Minecraft version: 1.12.2

    Suggested name:
    renameRestrict

    What I want: I would like a plugin that would restrict renaming for some material or custom named items.

    Player wants to rename a diamond sword in an anvil but it is blacklisted. So, they would be blocked from adding the item to anvil and the no_rename message would be send to player.

    If an item is broken, the no_broken message would be send to player.

    config.yml

    blacklisted_item_names:
    - DIAMOND_SWORD
    blacklisted_item_display_names:
    - Epic Sword
    no_rename: "&cYou cannot rename this item."
    no_broken: '&cYou cannot rename a broken item.'

    Commands/Permissions: /rsreload to reload the config for testing.

    Thank you for reading.
     
  2. Offline

    Kars

    I don't understand the no_broken part.
     
  3. Offline

    madtomic

    In order to rename an allowed item. The item cannot be broken or less than full durability.
     
    Last edited: Aug 5, 2019
  4. Offline

    madtomic

    So, can anyone do this?
     
  5. Offline

    bryansolis13

    Here you go: LINK

    Config is how you want it

    Commands:
    /rrreload - reloads config
    /blacklisteditem- blacklist the item type that is in your hand and adds it to the config
    /blacklisteditemname - blacklist the item name of the item thats in your hand and adds it to the config

    Permissions:
    rr.admin
     
  6. Offline

    madtomic

    @bryansolis13

    Thanks for working on this. I do see if an item material is both blocked and broken. It would fired both messages.

    Maybe update it to send this message instead?

    Code:
    no_renamebroken: "&cYou cannot rename a broken item or this item."
    EDIT: Or can simply choose to send just one of those message and not both. Prefer no_rename to be default

    Also, when rename is attempted. 1 exp level should be refunded. It cost 1 exp level to rename an item in the game.

    Code:
    #when true, it will refund 1 exp level when rename attempt is blocked
    refund: true
     
    Last edited: Aug 16, 2019
  7. Offline

    bryansolis13

    I know exactly what I did wrong there. I updated the file. Just use the same link. It will only give one message now if it is broken and is in the list. And the XP thing was a visual glitch. You did not lose any XP. But i added a update method so it wont glitch out
     
    madtomic likes this.
  8. Offline

    madtomic

    @bryansolis13

    Great, I will let you know when I tested the new build.
     
  9. Offline

    madtomic

    @bryansolis13

    Thanks for the fix but the exp level should still cost the player 1 level when they successful renamed an item. It seems like they are being refunded either way.

    EDIT: It seem like a visual glitch still. I was able to reset the level after doing few other things.
     
    Last edited: Aug 19, 2019
  10. Offline

    bryansolis13

    Refunded? I tested it and it didn't refund me when the item was not on the blacklist. Can you go in more detail on what happened?
     
    Last edited: Aug 20, 2019 at 3:16 AM
  11. Offline

    madtomic

    @bryansolis13

    I was referring to item blacklisted. The exp level deduction is a visual glitch since it don't cost exp level. perhaps improve the anvil result so player won't see this visual glitch.
     

Share This Page