Commandaliases fabric help

currently I have a json with just this:
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile
children:
- child: a
type: argument
argumentType: minecraft:word
actions:
- command: kill @e[type=#cdp:hostile]
commandType: SERVER
requireSuccess: false
messageIfUnsuccessful: 'FAILED'
messageIfSuccessful: 'WORKED!!!'
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile
children:
- child: a
type: argument
argumentType: minecraft:word
actions:
- command: kill @e[type=#cdp:hostile]
commandType: SERVER
requireSuccess: false
messageIfUnsuccessful: 'FAILED'
messageIfSuccessful: 'WORKED!!!'
The command goes through, but i still get "failed" in the chat. Also, if I make the command kill @e[distance=..50,type=#cdp:hostile] it doesnt run at all. If i make a commandalias thats just a redirect of the command it also does not run. It seems that it is having trouble with selectors. Any help would be appreciated.
7 Replies
Admincraft Meta
Thanks for asking your question!
Once you have finished, please close your thread. Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
command to close
/close !close !solved
Requested by sirjeffersoniii#0
SirJeffersonIII
SirJeffersonIIIOP2y ago
I have changed the code to this :
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile
children:
- child: f
type: argument
argumentType: minecraft:word
permission: 0
actions:
- command: kill @e[distance=..50,type=#cdp:hostile]
commandType: CLIENT
requireSuccess: true
messageIfUnsuccessful: 'FAILED'
messageIfSuccessful: 'WORKED!!!'
- child: a
type: argument
argumentType: minecraft:word
permission: 0
actions:
- command: kill @e[type=#cdp:hostile]
commandType: CLIENT
requireSuccess: true
messageIfUnsuccessful: 'FAILED'
messageIfSuccessful: 'WORKED!!!'
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile
children:
- child: f
type: argument
argumentType: minecraft:word
permission: 0
actions:
- command: kill @e[distance=..50,type=#cdp:hostile]
commandType: CLIENT
requireSuccess: true
messageIfUnsuccessful: 'FAILED'
messageIfSuccessful: 'WORKED!!!'
- child: a
type: argument
argumentType: minecraft:word
permission: 0
actions:
- command: kill @e[type=#cdp:hostile]
commandType: CLIENT
requireSuccess: true
messageIfUnsuccessful: 'FAILED'
messageIfSuccessful: 'WORKED!!!'
Now every command works as long as the user has permissions. the only problem is it says failed unless it kills one mob.
SirJeffersonIII
SirJeffersonIIIOP2y ago
No description
ProGamingDk
ProGamingDk2y ago
Just edit the error message to be like Failed due to there being no valid entities to kill
SirJeffersonIII
SirJeffersonIIIOP2y ago
no, the failed message is along with it completing the command it says failed if there is more than 1 entity killed. right now i just turned the message off However, if i want to actually use actionsIfSuccessful I need this to function right :/ else im stuck doing something like this:
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile
children:
- child: close
type: argument
argumentType: 'minecraft:word'
actions:
- command: 'gamerule doMobLoot false'
commandType: SERVER
actionsIfUnsuccessful:
- startTime: '5'
command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
actionsIfUnsuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- startTime: '5'
command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
actionsIfUnsuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile
children:
- child: close
type: argument
argumentType: 'minecraft:word'
actions:
- command: 'gamerule doMobLoot false'
commandType: SERVER
actionsIfUnsuccessful:
- startTime: '5'
command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
actionsIfUnsuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- startTime: '5'
command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
actionsIfUnsuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
SirJeffersonIII
SirJeffersonIIIOP2y ago
changed it to this. It is completeing all commands showing in the console. Still saying failed:
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile2
children:
- child: close
type: argument
argumentType: 'minecraft:word'
actions:
- command: 'gamerule doMobLoot false'
commandType: SERVER
messageIfUnsuccessful: 'fail'
messageIfSuccessful: 'pass'
actionsIfUnsuccessful:
- command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actions:
- command: 'gamerule doMobLoot false'
commandType: SERVER
messageIfUnsuccessful: 'fail'
messageIfSuccessful: 'pass'
actionsIfUnsuccessful:
- command: 'kill @e[type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'kill @e[type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
schemaVersion: 1
commandMode: COMMAND_CUSTOM
command: killhostile2
children:
- child: close
type: argument
argumentType: 'minecraft:word'
actions:
- command: 'gamerule doMobLoot false'
commandType: SERVER
messageIfUnsuccessful: 'fail'
messageIfSuccessful: 'pass'
actionsIfUnsuccessful:
- command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'kill @e[distance=..50,type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- startTime: '5'
command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actions:
- command: 'gamerule doMobLoot false'
commandType: SERVER
messageIfUnsuccessful: 'fail'
messageIfSuccessful: 'pass'
actionsIfUnsuccessful:
- command: 'kill @e[type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'kill @e[type=#cdp:hostile]'
commandType: CLIENT
messageIfUnsuccessful: 'fail2'
messageIfSuccessful: 'pass2'
actionsIfUnsuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
actionsIfSuccessful:
- command: 'gamerule doMobLoot true'
commandType: SERVER
No description
SirJeffersonIII
SirJeffersonIIIOP2y ago
Realized how bad this looekd for mobile right before bed so i made a pastebin:https://pastebin.com/5B1kTYQ3
Pastebin
schemaVersion: 1commandMode: COMMAND_CUSTOMcommand: killhostile2chi...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Did you find this page helpful?