bobmarley12345

advancedbanitem limits.yml

Apr 12th, 2021
952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 15.03 KB | None | 0 0
  1. # https://dev.bukkit.org/projects/advancedbanitem
  2. # :))
  3. # ---------------------------------------------------------------------------------------------------------------------
  4. # the order in which the data is processed:
  5. # Events -> check item ID -> check item MetaData data ->
  6. #         ∟ -> check player doesn't bypass world (then the same with perms) ->
  7. #            ∟ -> check world -> check permissions -> do/dont cancel event
  8. #
  9. #
  10. #  the variable names for easy access:
  11. #
  12. #  [    MetaData (sections of IDs might contain the stuff below)
  13. #  [      ∟ InvertPermissions          ]   - inverts the permissions (true == (no perms = CAN place, perms = CANT place, empty perms = CANT place))
  14. #  [        InvertWorlds               ]   - inverts the worlds (true == disallowed becomes allowed, false == disallowed worlds)
  15. #  [        DisallowedWorlds           ]   - list of worlds that this block is not allowed in
  16. #  [        PlacePermission            ]   - permission required to place this block. if not specified, the block can be placed by anyone
  17. #  [        BreakPermission            ]   - permission required to break this block. if not specified, the block can be broken by anyone
  18. #  [        InteractPermission         ]   - permission required to interact with this block. if not specified, the block can be interacted by anyone
  19. #  [        PickupPermission           ]   - permission required to pick up this item on the ground. if not specified, the item can be picked up by anyone
  20. #  [        InvClickPermission         ]   - permission required to click this item in your inventory. if not specified, the item can be clicked and moved in your inventory
  21. #  [        NoPlaceMessage             ]   - the messages to be sent to the player if they do NOT have permission to place the block
  22. #  [        NoBreakMessage             ]   - the messages to be sent to the player if they do NOT have permission to break the block
  23. #  [        NoInteractMessage          ]   - the messages to be sent to the player if they do NOT have permission to interact with the block
  24. #  [        NoPickupMessage            ]   - the messages to be sent to the player if they do NOT have permission to pick up this item (when on the ground)
  25. #  [        NoInvClickMessage          ]   - the messages to be sent to the player if they do NOT have permission to click/moved this item in their inventory
  26. #  [    DefaultInvertPermissions    ]
  27. #  [    DefaultInvertWorlds         ]
  28. #  [    DefaultDisallowedWorlds     ]
  29. #  [    DefaultPlacePermission      ]
  30. #  [    DefaultBreakPermission      ]
  31. #  [    DefaultInteractPermission   ]  these descriptions are the same as above (only these values are filled in if not
  32. #  [    DefaultPickupPermission     ]  specified above, useful when banning multiple metadatas with the same reasons, etc)
  33. #  [    DefaultInvClickPermission   ]
  34. #  [    DefaultPlaceMessage         ]
  35. #  [    DefaultBreakMessage         ]
  36. #  [    DefaultInteractMessage      ]
  37. #  [    DefaultNoPickupMessage      ]
  38. #  [    DefaultNoInvClickMessage    ]
  39. #
  40. #   ----------------------------------------------------------------------------------------------------------------
  41. #   ------------- EXAMPLE (with tons of description) ---------------------------------------------------------------
  42. #   -- all of the IDs should just go in this config (aka keys). every ID must be a number with no letters,
  43. #   -- and doing 12:-1 (-1 being metadata) wont work. you have to supply the metadata in the ID section (aka below)
  44. #   -----------------------------------------------------------------------------------------------------------------
  45. #
  46. #    # the ID of the block to limit/ban (in game, use '/abi look' or '/abi hand'
  47. #    # to get the block ID and metadata of the block youre looking at/holding in your hand)
  48. #    12:
  49. #      # the metadata that will be checked during events. if the event metadata is equal to any of the metadata below, it goes onto the next checks (permissions and stuff)
  50. #      # -1 means its ignored, aka apply the limit to the entire ID regardless of metadata.
  51. #      # if you dont supply any metadata, it will automatically add -1 for you, which affects the entire ID (regardless of metadata)
  52. #      # this is for advanced control over banning the same ID but differnt metadata
  53. #
  54. #      # be aware with the metadata though. ItemStack metadata (aka items in your hand) and Block metadata (placed in a world)
  55. #      # could be different. this is visible with spawners: a placed cow spawner might have ID 52 data 12, but the
  56. #      # itemstack version in your hand might have the ID 52 data 92
  57. #      MetaData:
  58. #        # you supply the item/block metadata here
  59. #        -1:
  60. #          # a list of worlds that this item/block is NOT allowed in. trying to do anything with the block will not work in these worlds
  61. #          # this is processed BEFORE permissions, so if the world isn't allowed, but the player has permissions, they can't place/break/etc it.
  62. #          DisallowedWorlds:
  63. #            - 'world'
  64. #
  65. #          # Inverts the worlds, meaning "Disallowed" becomes "Allowed".
  66. #          # 'world' is disallowed, all other worlds are allowed. but if InvertWorlds is true,
  67. #          # only 'world' is allowed, all others aren't allowed
  68. #          InvertWorlds: false
  69. #
  70. #          # these permissions can be whatever you want, they could all be the same, or all different names, etc
  71. #
  72. #          # with these... leave it empty to allow it to always be placed/broken/interacted with
  73. #          # otherwise, give the specified permission required to be broken.
  74. #          # the permission required to place the block
  75. #          # this means someone must have the advbanitem.place.sand to place sand blocks
  76. #          PlacePermission: 'advbanitem.perms.limit.place.sand'
  77. #
  78. #          # same as above, but with breaking the block,
  79. #          # this means someone must have the advbanitem.break.sand to break sand blocks
  80. #          BreakPermission: 'advbanitem.perms.limit.break.sand'
  81. #
  82. #          # same above, but with interacting with it (right clicking / left clicking)
  83. #          # this means that someone must have advbanitem.interact.sand to be able to right click or left click on sand
  84. #          # if they dont have the permission, they CAN NOT right/left click on sand
  85. #          # be aware though... interaction events are called first, then block break/place next
  86. #          this isn't something a plugin can change, its a bukkit thing. so the player kinda needs interaction
  87. #          # perms just to be able to place and/or break. to fix that, you could just not specify an interaction permissions, and it will only rely on the break/place permissions
  88. #          # InteractPermission: 'advbanitem.perms.limit.interact.sand'
  89. #
  90. #          # inverts the limit's permissions. if this is false, it means the above comments are the same.
  91. #          # meaning, they require the permissions above to be able to place/break the block. and if no permission is specified, they can place the block anyway
  92. #          # however if this is true, it means someone with the permissions CAN NOT place/break the block, and it means someone without the permission CAN place the blocks,
  93. #          # and it also means if the permission is empty, it means they CAN NOT place/break the block (because an empty permission means the block isn't disabled, but with permission activates the limit)
  94. #          # basically, if this is true, the permission stops players placing/breaking/interacting, same with no permissions specified
  95. #          # whereas if it was false, the permission allows the players to placing/breaking/interact, same with no permissions specified
  96. #          InvertPermissions: false
  97. #
  98. #          # here is where you define the messages to be sent to a player when they try to do stuff with this item/block
  99. #          # and because this is all defined in the metadata section, it lets you have different messages for different metadatas,
  100. #          # instead of the same messages (you can do that with default stuff below though).
  101. #          # if you dont supply a message, a default message will be used (below). if thats missing, it falls back to the config.yml values
  102. #          # There are wildcards you can use in these messages (to get extra info). the available wildcards are:
  103. #          #   (these 3 below are kinda useless you could just specify them yourself... but oh well)
  104. #          #   %p - the place permission string
  105. #          #   %b - the break permission string
  106. #          #   %i - the interact permission string
  107. #          #   %u - the player's username
  108. #          #   %w - the name of the world the player is in
  109. #          # Colours/Formats are also supported using the & symbol (and the other symbol). just make sure the value after the & is a valid colour code... because it'll show if it's not
  110. #          # checking if the value is valid is skipped to increase performance (i mean a few extra microseconds isn't much... but eh)
  111. #          # available colour/format codes are: 0123456789abcdefklmnor
  112. #          NoPlaceMessage: '&6SAND!!! No placing!!'
  113. #          NoBreakMessage: '&6SAND!!! No breaking!!'
  114. #          NoInteractMessage: '&6SAND!!! No Interacting!!'
  115. #
  116. #          # the permission to pick up the block off the ground. these follow the same rules as the above permissions (interaction, etc), inversion will work on this
  117. #          # however if you dont specify this, it will fall back to the interaction permission (aka they require permission to interact with the item to pick it up)
  118. #          # and if the interaction permissions is empty, then this becomes empty and therefore is allowed :)
  119. #          # not sure if that will be more inconvenient... but i'd find it handy so that i dont have to supply the pickup perms and interaction perms every time
  120. #          PickupPermission: 'advbanitem.perms.limit.pickup.sand'
  121. #
  122. #          # the permission to interact with this block in your inventory. if you dont have this... it stops you moving the item
  123. #          # around in your inventoy (clicking numbers wont move it in your hotbar as well). however, if you enable it in config.yml, perssing Q allows
  124. #          # you to drop the item from your inventory (so it doesnt just get stuck requiring an admin with /invsee to remove it or something)
  125. #          # this follows the same rule as PickupPermission, where if you dont specify it, it will instead use the interaction permission
  126. #          InvClickPermission: 'advbanitem.perms.limit.pickup.sand'
  127. #          # ------
  128. #          # the permission fallback for the 2 above is:
  129. #          # PickupPermission/InvClickPermission -> InteractionPermission -> DefaultInteractionPermission -> empty
  130. #          # everything else is: Permission -> DefaultPermission -> empty
  131. #
  132. #          # these values do the same as permissions: they will fallback to the interaction message
  133. #          # these messages can still use the above wildcards and colours/formats
  134. #          # the message to send to the player if they try to pickup banned items off the ground
  135. #          NoPickupMessage: '&4You cannot pickup sand!'
  136. #          # the message to send the player if they try to click banned items in their inventory
  137. #          NoInvClickMessage: '&4You cannot click sand in your inventory!'
  138. #          # ------
  139. #          # the message fallback for the 2 above is:
  140. #          # NoPickupMsg/NoInvClickMsg -> NoInteractionMsg -> DefaultInteractionMsg -> fallback interaction msg
  141. #
  142. #      # if you dont supply the values above (permissions, messages, worlds, etc), they will fall back to these values below, called "default" values
  143. #      # this means, every limited metadata above will have all the default values below, unless you supply values above. even if you use a few values above, it will fill in the rest.
  144. #      # if there's nothing below, the messages will fall back to the ones in config.yml, disallowed worlds will be empty,
  145. #      # invert worlds and permissions will be false, the permissions will be empty so there wont be a limit; anyone can place them
  146. #      # these are handy when banning/limiting multiple metadatas. they can all use the default permissions, but you can add custom messages
  147. #      # so basically, if you supply all of the avaliable stuff above and supply stuff below, none of the stuff below will be used
  148. #      DefaultDisallowedWorlds:
  149. #        - 'world'
  150. #      DefaultInvertWorlds: false
  151. #      DefaultInvertPermissions: false
  152. #      DefaultPlacePermission: 'advbanitem.limits.place.sand'
  153. #      DefaultBreakPermission: 'advbanitem.limits.break.sand'
  154. #      DefaultInteractPermission: 'advbanitem.limits.interact.sand'
  155. #      DefaultPlaceMessage: '&4You dont have permission to place this block!'
  156. #      DefaultBreakMessage: '&4You dont have permission to break sand!'
  157. #      DefaultInteractMessage: '&4You dont have permission to interact with this block!'
  158. #      DefaultPickupPermission: 'advbanitem.limits.pickup.sand'
  159. #      DefaultInvClickPermission: 'advbanitem.limits.pickup.sand'
  160. #      DefaultNoPickupMessage: '&4You dont have permission to pickup sand!'
  161. #      DefaultNoInvClickMessage: '&4You dont have permission to play around with sand in your inventory!'
  162.  
  163. # here's an actual example i use for my server
  164. # this bans the item ID 9065 but only with the metadata 31, 32, 33, 34, 35 and 36 (because these items are laggy)
  165. # you can probably see how useful default values are... having to supply the invert permission and interact messages for
  166. # each metadata section would be a tad bit repetitive, and thats what default values aim to solve :))
  167. 9065:
  168.   MetaData: { 31: { }, 32: { }, 33: { }, 34: { }, 35: { }, 36: { } }
  169.   DefaultInvertPermissions: true
  170.   DefaultInteractMessage: '&6Unfortunately theres a bug with power supplier upgrades which can lag the server'
  171.  
  172. # heres another example. i could've just specified all this below in the metadata section... but oh well lol
  173. # default values are only supplied to the metadatas present, not -1, not 1, only 2
  174.  
  175. 2000:
  176.   MetaData: { 2: { } }
  177.   # i mentioned above about default values aiming to make this non-repetitive............. hmm
  178.   # cant use interaction message because interactions are allowed, placing/breaking/picking up/inventory clicking is not allowed
  179.   DefaultBreakMessage: '&6The autonomous activator is limited. ask staff to place it for you 1'
  180.   DefaultPlaceMessage: '&6The autonomous activator is limited. ask staff to place it for you 2'
  181.   DefaultNoPickupMessage: '&6The autonomous activator is limited. ask staff to place it for you 3'
  182.   DefaultNoInvClickMessage: '&6The autonomous activator is limited. ask staff to place it for you 4'
  183.   # the admin group (in my permission plugin (pex :} )) have these permissions below
  184.   # i could've just stuffed this inside the interaction permissions, but im limiting the block not banning. players still
  185.   # need to be able to access the block itself (right clicking), and the interaction permission would've stopped them
  186.   DefaultPlacePermission: 'advbanitem.limit.staffblocks'
  187.   DefaultBreakPermission: 'advbanitem.limit.staffblocks'
  188.   DefaultPickupPermission: 'advbanitem.limit.staffblocks'
  189.   DefaultInvClickPermission: 'advbanitem.limit.staffblocks'
  190.  
Advertisement
Add Comment
Please, Sign In to add comment