Make it not the player that runs a command.

Started by GustavoLank9236 on

Topic category: Advanced modding

Last seen on 17:53, 20. Sep 2020
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make it not the player that runs a command.

I'm trying to make an item, which when clicked gives only effects to nearby mobs, not to players. But the only way I found it to do this was with a procedure that runs a command:

effect @e [type =! Player, r = 5] slowness 30 255.

And who runs the command is the player, so, if the player does not have permissions and try to use the item, it can not. So, is there any way I can do what I want other than with commands, or make it not the player that runs the command?

 

I used google translate, so sorry for the bad english.

This is not possible as…
Wed, 11/14/2018 - 12:06

This is not possible as command needs a source that executed it. Command blocks act as own source of commands but this is a complex system with server-client communication. So I think this will not be added anytime soon. I think that most of the features can be implemented using the procedure system alone without commands.

Last seen on 17:53, 20. Sep 2020
Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, but how would I make…
Wed, 11/14/2018 - 14:24

Okay, but how would I make all mobs (except players) in a certain distance gain the effect with procedures, without commands? Or is this impossible?

Well, this would not be…
Wed, 11/14/2018 - 16:21

Well, this would not be possible right now, unfortunately. I hope we will manage to improve this in the future though.

Last seen on 17:49, 31. Jan 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You have to use the !player:…
Tue, 04/28/2020 - 17:05

You have to use the !player:

effect give @e[type=!player,distance=0..5] minecraft:speed <time of duration> <strength of the potion> true/false

Last seen on 18:52, 20. Jan 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need something like this,…
Thu, 10/01/2020 - 17:40

I need something like this, I made a nuke, and I want the explosion to give a poison effect if a player is in a radius of 150 blocks from the explosion's epicenter, so I ran the following command with the execute procedure block:

/effect give @a[distance=..150] minecraft:poison 30 1 true

The problem is that the radiaction area is not applied based on the explosion's epicenter, but the player's X Y Z Coordinates.

Is there any way of making a command execute from a specific block location?

Or maybe spawning a command block with the code already in it?

Or literally any way for this to work?