[Discontinued] 🛠 ActionControl [v1.1] - Control crafting, mining, combat and more!

  • pixelmon:item.itemFinder is missing a quote.
  • pixelmon:item.King’s_Rock already has a quote in it’s name, you need to escape it with a backslash. It will look like this: pixelmon:item.King’s_Rock

pixelmon:item.King’s_Rock -> pixelmon:item.king/s_Rock ?

So since the most recent update my players can no longer throw items out of their inventory. Im guessing this is because of the update to the drop event?

pixelmon:item.King’s_Rock -> pixelmon:item.King’s_Rock

Yeah I wanted to disable dropping exactly one item of an item stack out of your inventory but disabled dropping items completely. This is fixed in v1.0.7.

If you don’t want any restrictions on dropping items out of your inventory and can live with players having the ability to bypass your crafting rules, you can use v1.0.5.

Hey @Milchshakee Is there a way for me to make it so if you place a block within 2 coordinates it will kick you from the server? Like I know I can do it at 1 coordinate as it did in the example for giving a pickaxe. But could I do it inside a region? Thanks!

Yes, block location matchers can be very versatile. You can match single block locations or a range of block locations. In your case, you just need multiple locations, this rule should work:

    place-block {
        filter {
            block = "{'state': {'type': {'id': '<your block id>'}}, 'location': {'x': 1, 'y': 1, 'z': 1, 'world': {'name': 'world'}} | {'x': 2, 'y': 2, 'z': 2, 'world': {'name': 'world'}}}"
        },
        response {
            match = [
                "deny",
                "command(kick <player>)"
            ]
        }
    }

It kicks you if you place a block at (1,1,1) or (2,2,2).


You can also use block ranges, which is basically the same as a region. Just replace the block matcher above with this:

"{'state': {'type': {'id': '<your block id>'}}, 'location': {'x': >=1 & <=4, 'y': >=1 & <=4, 'z': >=1 & <=4, 'world': {'name': 'world'}}}"

This block matcher matches all blocks with your-block-id in the region x: 1 - 4, y: 1 - 4, z: 1 - 4.


It is also planned to implement support for regions of protection plugins like FoxGuard, so that you can just match a region using region(<region name>)

I tried this it didnt work.

 place-ranchblock {
    filter {
        block = "{'state': {'type': {'id': 'pixelmon:item.Ranch_Block'}}, 'location': {'x': -91, 'y': 0, 'z': -50, 'world': {'name': 'world'}} | {'x': 25, 'y': 255, 'z': -205, 'world': {'name': 'world'}}}"
    },
    response {
        match = [
            "deny",
            "command(msg <player> You can't place that block here!)"
        ]
    }
},

I tried it on my test server and it worked.
Are you sure that you are naming your action rules correctly? place-ranchblock has to be replaced by place-block in your config, since action rule names can’t be altered.

How would I do it if I have 2 place-block rules that are different? Because I need both of these rules but they work differently.

place-block {
    filter {
        # Placing Items
        block = "{'state': {'type': {'id': 'minecraft:tnt'}}}"
    },
    response {
        match = [
            "command(msg <player> Don't place that block!)",
            "deny"
        ]
    }
},
 place-ranchblock {
    filter {
        block = "{'state': {'type': {'id': 'pixelmon:item.Ranch_Block'}}, 'location': {'x': -91, 'y': 0, 'z': -50, 'world': {'name': 'world'}} | {'x': 25, 'y': 255, 'z': -205, 'world': {'name': 'world'}}}"
    },
    response {
        match = [
            "deny",
            "command(msg <player> You can't place that block here!)"
        ]
    }
},

Just create multiple config files. Then put the first place-block rule in one config and the second place-block rule in another config.
The action rules in each config file should be related and since these two place-block rules aren’t, you should split them up, e.g name the first file disable-tnt.hocon and the second file ranchblock-locations.hocon.

Ahhhh Okay thanks. I shall do that.

It’s still acting weird for me. I realize I wasn’t doing the range correctly before I wanted it to block an area but it was just blocking those 2 points. But now When I do this it doesnt work and I get an error in console.

action-rules {

 place-block {
    filter {
        block = "{'state': {'type': {'id': 'pixelmon:item.Ranch_Block'}}, location': {'x': >=-91 & <=25, 'y': >=0 & <=255, 'z': >=-205 & <=-50, 'world': {'name': 'world'}}}"
    },
    response {
        match = [
            "deny",
            "command(msg <player> You can't place that block here!)"
        ]
    }
}

}

Your location entry is missing a quote.

Thanks for the help its working now!

I am a tad confused. Current I have the following to try to stop people from throwing eggs but it does not work.

The use-item action rule is for interactions with items that take some time, for example eating something or stretching your bow.

Since it was not possible to deny throwing eggs, I released a new version of ActionControl (1.1), which adds a new rule called interact which you can use to control instant item interactions, e.g. throwing eggs or using the fishing rod.

Using ActionControl 1.1, you can put this in your config:

interact { filter { item = "{'type': 'minecraft:egg'}" }, response { match = [ "command(msg <player> Don't throw eggs!)", "deny" ] } }

I will update the documentation on Ore to reflect the changes soon.

It works now! Thank you so much.

Hi,
I would like to disable player to place or break any block exept a short white list.
I assume that your plugin can do it, using a rule with ‘!’ i suppose, but can you confirm it to me?

Yes, that is pretty easy. You just have to do something like this:

    break-block {
        filter {
            block = "{'state': {'type': {'id': !('some.block.id' | 'some.other.block')}}}",
        }
        response: {
            match = "deny"
        }
    }