This plugin is no longer up to date and probably wonât be updated.
ActionControl allows you to react on almost every action performed by a player on your server.
With ActionControl you can currently react on the following actions:
Crafting items
Breaking blocks
Placing blocks
Interacting with blocks
Interacting with entities
Attacking entities
Using items
When one of the listed actions is performed, you can respond to it in one of the following ways:
You can already create rules that apply only to players in creative mode:
player-filter = "{'gamemode': 'creative'}",
action-rules {
# The following rules only apply to players in creative mode
...
}
However, you canât remove specific items from the creative mode inventory, but you can deny the usage of these items.
For example, if you want to ban the usage of Spawn Eggs in creative mode, just create a rule that blocks players from interacting with a Spawn Egg.
do i need to make a rule for each and every item/block or can it be done in list form or something?, example of a few blocks/items using that please. believe iâm getting an understanding by looking at the config examples found here
and also by interacting with spawn egg; would that mean that they wouldnt be able to take it from the creative menu and putting it in their inventory? I donât exactly mean remove it from creative mode; what Iâm looking for is to block it from being taken out of the creative window and thrown on the ground; or put in the invetory, etc. like it blocks their ability to interact with the item in creative mode alltogether. like creativecontrol did.
Yes, you can shorten the rule by using the or conjunction ( | ) and omitting the quantity property.
craft {
filter {
result = "{'type': 'minecraft:fire_charge' | 'minecraft:firework_charge' | 'minecraft:flint_and_steel'}"
},
response {
match = "deny"
}
}
By interacting I meant right clicking with it to spawn a mob. It is currently not possible to deny moving an item out of your inventory.
I donât think that adding support for this kind of action would be good, since ActionControl is already pretty complex and handling inventory action as well would make it even more complex.
Using a separate plugin for this would be a better solution, although Iâm not sure if there is already one.
I just released version 1.0.3, which fixes some crafting rule bugs.
You can download it on GitHub but not on Ore since it currently doesnât let me upload new versions
As the documentation states, you need a block matcher for the interact-with-block rule. The state property of this block matcher is a block state matcher and differs from item stack matcher that you used.
At first, this is a bit confusing but when you get it, it seems reasonable.
disallowing crafting of something works, but when you spam click the item several times, it will eventually be crafted. Is this avoidable?
Also there seems to be a bug with eating stuff. The default generated example file disallowed eating of fish however players were disallowed to eat anything including steaks, and potions.
I know I should delete the default config lol, but say if I wanted to really disable eating fish, then it would be a problem. Just stating that thereâs a bug XD
I tested eating cooked fish and I couldnât do it as expected. Note that the example denies eating cooked fish, not just raw fish.
I also tested the crafting bug and indeed you can bypass it by clicking madly.
But Iâm pretty sure this is a Sponge related bug and I reported it on the issue tracker
The implementation of the Inventory API in SpongeForge seems a bit buggy right now and will hopefully get fixed soon.
I also stumbled upon a random NPE and I will fix this in a new version.
Yep, there was something wrong, it was the rule in the example configuration. The new version v1.0.5 will now generate a correct example config. You can view the fixed config here.