Zerthick / ProtectionPerms

A simple player protection and control plugin.

ProtectionPerms

ProtectionPerms is a simple player protection and control plugin inspired by plugins like ModifyWorld or NoItem. It’s aim is to provide an easy, permissions-based way of preventing players from performing certain actions on your server, such as breaking blocks, damaging entities, or using items.

Permissions

At this time, ProtectionPerms is completely based off permissions. Without a given permission, players will not be able to perform the action the permission specifies (unless the inversion flag is set as described below). Currently, permissions come in three flavors:

Block Permissions

Primary Interaction

  • protectionperms.block.interact.<blockID>.primary - Player can primary interact (left-click) on blockID.
    • Example: protectionperms.block.interact.minecraft:stone.primary

Secondary Interaction

  • protectionperms.block.interact.<blockID>.secondary - Player can secondary interact (right-click) on blockID.
    • Example: protectionperms.block.interact.minecraft:dirt.secondary

Breaking

  • protectionperms.block.break.<blockID> - Player can break blockID.
    • Example: protectionperms.block.break.minecraft:stone

Placing

  • protectionperms.block.place.<blockID> - Player can place blockID.
    • Example: protectionperms.block.place.minecraft:stone

Entity Permissions

Primary Interaction

  • protectionperms.entity.interact.<entityID>.primary - Player can primary interact (left-click) on enityName.
    • Example: protectionperms.entity.interact.minecraft:zombie.primary

Secondary Interaction

  • protectionperms.entity.interact.<entityID>.secondary - Player can secondary interact (right-click) on enityName.
    • Example: protectionperms.entity.interact.minecraft:pig.secondary

Taming

  • protectionperms.entity.tame.<entityID> - Player can tame enityName.
    • Example: protectionperms.entity.tame.minecraft:wolf

Breeding

  • Currently preventing entities from breeding is not functioning, in the meantime you can use the item interact event permissions to prevent players from right-clicking on entites with the item that makes them breed

Mounting

  • protectionperms.entity.mount.<entityID> - Player can mount enityName.
    • Example: protectionperms.entity.mount.minecraft:entityhorse

Dealing Damage

  • protectionperms.entity.damage.<entityID>.deal - Player can deal damage to enityName.
    • Example: protectionperms.entity.damage.minecraft:skeleton.deal

Hook (Fishing)

  • protectionperms.entity.hook.<entityID> - Player can hook enityName with a fishing pole.
    • Example: protectionperms.entity.hook.minecraft:sheep

Item Permissions

General Usage

  • protectionperms.item.use.<itemID> - Player can use itemID (Example: casting a fishing rod)
    • Example: protectionperms.item.use.minecraft:fishing_rod

Usage on Self

  • protectionperms.item.use.<itemID>.on.self - Player can use (right-click) with itemID on themselves (Example: eating bread).
    • Example: protectionperms.item.use.minecraft:bread.on.self

Primary Usage on Subject

  • protectionperms.item.use.<itemID>.on.<ID>.primary - Player can primary use (left-click) with itemID on the block or entity ID.
    • Example: protectionperms.item.use.minecraft:diamond_sword.on.minecraft:zombie

Secondary Usage on Subject

  • protectionperms.item.use.<itemID>.on.<ID>.secondary - Player can secondary use (right-click) with itemID on the block or entity ID.
    • Example: protectionperms.item.use.minecraft:iron_hoe.on.minecraft:grass

Equipping

  • protectionperms.item.equip.<itemID> - Player can equip itemID to an armor slot.
    • Example: protectionperms.item.equip.minecraft:iron_chestplate

Picking Up

  • protectionperms.item.pickup.<itemID> - Player can pickup itemID from the ground.
    • Example: protectionperms.item.pickup.minecraft:diamond

Dropping

  • Not Recommended. See issue #13
  • protectionperms.item.drop.<itemID>.dispense - Player can drop itemID on the ground.
    • Example: protectionperms.item.drop.minecraft:diamond_sword.dispense

Drop on Death

  • Not Recommended. See issue #13
  • protectionperms.item.drop.<itemID>.death - Player can drop itemID on death.
    • Example: protectionperms.item.drop.minecraft:diamond.death

Crafting

  • protectionperms.item.craft.<itemID> - Player can craft itemID.
    • Example: protectionperms.item.craft.minecraft:torch

Smelting

  • protectionperms.item.smelt.<itemID> - Player can smelt itemID in a furance.
    • Example: protectionperms.item.smelt.minecraft:iron_ore

Use as Fuel

  • protectionperms.item.fuel.<itemID> - Player can use itemID as fuel in a furance.
    • Example: protectionperms.item.fuel.minecraft:coal

A Note on BlockStates

Whenever a permission requires a blockID you can optionally include BlockState information. For example if I wanted to give the player permission to break Andesite but not regular stone I could give them the permission protectionperms.block.break.minecraft:stone[variant=andesite]. Giving the player the protectionperms.block.break.minecraft:stone permission still allows them to break all variants of stone as normal.

Conflicts

When creating your permission nodes you may run into situations where you have conflicting permissions. For instance, you may not be able to place a block even though you have the place permission because you don’t have the corresponding use permission for the block as an item, in this case pay attention to the message ProtectionPerms gives you when you try to execute an action, it should point you toward the permission node you need. :wink:

Inverting Permissions

As of ProtectionPerms v1.2.0 a config file will be generated at ~/config/ProtectionPerms.conf, the default configuration is shown below:

# Whether permissions nodes should be inverted 
# If inverted granting a permission will DENY an action
invert=false

If invert is set to true, the functionality of the permisison nodes will be reversed such that granting a permission node will deny the player from completing the action it describes.

Support Me

I will never charge money for the use of my plugins, however they do require a significant amount of work to maintain and update. If you’d like to show your support and buy me a cup of tea sometime (I don’t drink that horrid coffee stuff :P) you can do so here

Category: Admin Tools

Published on Jan 02, 2017

1201 views

150 total downloads

Licensed under GNU General Public License (GPL)

Pages

Members