No Offhand v1.0.3

Prevent players from holding specific items in offhand. | Lore & Material limition

  1. starchier
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    • 1.17
    Source Code:
    https://github.com/StarchierOrb/NoOffhand
    This plugin can prevent players from holding blacklisted items in offhand.


    Supports material / lore check.

    Features:
    • Free switching between blacklist and whitelist
    • Item lore support
    • Item sub id support
    • Simple to use.

    Commands & Permissions:

    Admin commands:

    /nof reload - Reload config.

    Permission: nooffhand.admin

    Default OP can use the commands.

    nooffhand.bypass - Players with this permission can bypass offhand items check.(Default: OP)
    nooffhand.bypass.<Item id> - Now players with this permission can bypass a specific item check.(Item id should be a spigot material name.)(Default: OP)


    Screenshots:

    [​IMG]



    Configuration:
    Code (YAML):
    NoOffhand:
      settings
    :
        limit-type
    : allowlist
        #Material detection list type
        # Available types:
        # allowlist - Whitelist mode - Only the items in the following list can be placed in offhand
        # denylist - Blacklist mode - Only the items in the following list cannot be placed in offhand
        list
    :
         - SHIELD
          - TORCH
          - TOTEM_OF_UNDYING
        #Material detection list
        #For 1.12 and lower:
        #Support items with sub-id. If sub-id is not specificed, all sub-items are applied by default.
        #To use sub id, numeral id is recommended and quotation marks are required.
        #Example:
        #  - '349:3'
        #To disable material check, just set it to 'list: []'
        ###
        lore-limit-type
    : denylist
        #Lore detection list type
        # Available types:
        # allowlist - Whitelist mode - Item LORE containing any line of text in the following list can be placed in offhand.
        # denylist - Blacklist mode - Item LORE containing any line of text in the following list can NOT be placed in offhand.
        lore-list
    :
         - 'NO OFFHAND'
          - 'Main hand only'
          - '&c&lNo Offhand!'
        #There is no need to match exactly, as long as a line of lore contains the text above.
        #It can be used together with material detection. You can set a lore to allow a blacklisted item to be placed in offhand and vice versa
      messages
    :
        help
    :
         - '&7---&aNoOffhand Help&7----'
          - ' &b/nof reload  &7- &6Reload config'
          - '&7--------------------------------'
        command-usage
    : '&cUse /nof for help.'
        reload-completed
    : '&aConfiguration file reloaded!'
        reload-failed
    : '&cError(s) detected, pls check configuration file.'
        no-permission
    : '&cYou don''t have permission to perform this command!'
        item-not-exist
    : 'Item %s is not exist! Check config!'

    To disable material or lore check, just leave the list empty and set it to blacklist mode.
    Example:
    Code (YAML):
       limit-type: denylist
        list
    : []
    To disable offhand, you can set limit-type to allowlist, and leave the list empty.

    Lore check can be used together with material check. You can set a lore to allow a blacklisted item to be placed in offhand and vice versa.


    Bugs:

    For issues and suggestions, create a comment here!



    Donation:
    Welcome to donate us if you think this plugin is good to use!

Recent Updates

  1. Bug fixes
  2. v1.0.2 - Bug fixes
  3. v1.0.1 - New features.

Recent Reviews

  1. 3M_RAN_QI
    3M_RAN_QI
    5/5,
    Version: v1.0.3
    Hello, your plugin is very wonderful. I hope to move it to www.mcbbss.net Let more Chinese see your wonderful plugins
  2. Ogoo
    Ogoo
    5/5,
    Version: v1.0.2
    it's great to block player put item on off-hand , but I find an issue that player still can put item on off-hand when player open bag and press " F " on the blocklist item
    1. starchier
      Author's Response
      Thanks for your review! This issue fixed in the latest version. :)