• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Updated /fix (with /fix all)

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.
#1
Code:
cmd add fix i#Command made by: CosmicGhast, You can edit line 12 and line 43 for permissions
cmd add fix let %tools% = array(256,257,258,259,261,269,270,271,273,274,275,277,278,279,284,285,286,291,292,293,294,346,359)
cmd add fix let %weapons% = array(267,268,272,276,283)
cmd add fix let %armor% = array(298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,443)
cmd add fix if varset(%args%[1]) = %false% then goto 9
cmd add fix if %args%[1] = \"all\" then goto 40
cmd add fix message %p% §cUsage: /fix or /fix all
cmd add fix exit
cmd add fix let %status% = playerstatus(%p%)
cmd add fix if %status%["op"] = %true% then goto 17
cmd add fix let %group% = playergroup(%p%)
cmd add fix let %allowed% = array(\"all\")
cmd add fix if %allowed%[0] = \"all\" then goto 17
cmd add fix if %group% in %allowed% then goto 17
cmd add fix message %p% §cYou do not have permission to run this command!
cmd add fix exit
cmd add fix let %hand% = playerhand(%p%)
cmd add fix let %id% = %hand%["id"]
cmd add fix if (%id% in %tools%) or (%id% in %weapons%) or (%id% in %armor%) then goto 22
cmd add fix message %p% §cThe item you are holding is not repairable!
cmd add fix exit
cmd add fix let %variant% = %hand%["variant"]
cmd add fix if %variant% = 0 then goto 38
cmd add fix let %inv% = playerinventory(%p%)
cmd add fix let %hand%["invslot"] =
cmd add fix async
cmd add fix let %slot% = size(%inv%)
cmd add fix let %slot% = %slot% - 1
cmd add fix if %slot% = -1 then exit
cmd add fix if %inv%[%slot%] != %hand% then goto 28
cmd add fix sync
cmd add fix let %hand%["variant"] = 0
cmd add fix let %inv%[%slot%] = %hand%
cmd add fix carry %p% %inv%
cmd add fix let %name% = %hand%["name"]
cmd add fix message %p% §a%name%§r§7 (%id%:0) §arepaired!
cmd add fix exit
cmd add fix message %p% §aThis tool is already repaired!
cmd add fix exit
cmd add fix let %status% = playerstatus(%p%)
cmd add fix if %status%["op"] = %true% then goto 48
cmd add fix let %group% = playergroup(%p%)
cmd add fix let %allowed% = array(\"all\")
cmd add fix if %allowed%[0] = \"all\" then goto 48
cmd add fix if %group% in %allowed% then goto 48
cmd add fix message %p% §cYou do not have permission to run this command!
cmd add fix exit
cmd add fix let %inv% = playerinventory(%p%)
cmd add fix let %armors% = playerarmor(%p%)
cmd add fix let %size1% = size(%armors%)
cmd add fix let %size1% = %size1% - 1
cmd add fix if %size1% <= -1 then goto 58
cmd add fix let %item% = %armors%[%size1%]
cmd add fix if %item%["id"] notin %armor% then goto 51
cmd add fix let %item%["variant"] = 0
cmd add fix let %newarmor%[%size1%] = %item%
cmd add fix goto 51
cmd add fix let %changes% = 0
cmd add fix let %size% = size(%inv%)
cmd add fix let %size% = %size% - 1
cmd add fix if %size% <= -1 then goto 69
cmd add fix let %item% = %inv%[%size%]
cmd add fix if (%item%["id"] notin %armor%) and (%item%["id"] notin %weapons%) and (%item%["id"] notin %tools%) then goto 60
cmd add fix if %item%["variant"] = 0 then goto 60
cmd add fix let %changes% = %changes% + 1
cmd add fix let %item%["variant"] = 0
cmd add fix let %inv%[%size%] = %item%
cmd add fix goto 60
cmd add fix if %changes% != 0 then goto 72
cmd add fix message %p% §cYou had nothing to repair!
cmd add fix exit
cmd add fix carry %p% %inv%
cmd add fix message %p% §a%changes% items has been repaired!
cmd add fix exit
You can edit line 12 and line 43 to edit groups. If you want everyone to use it then leave it alone or change it back to let %allowed% = array(\"all\")

For /fix all it also fixes the armor you are wearing. :D

nvm it doesnt fix armor your armor you are wearing lol i tried

just use cmd insert fix 73 wear %p% %newarmor%.If you want armor to repair
 
#3
For first line i accidently added an i in front of the comment. You can delete this first line if you want but you must replace it with a placeholder (Use commands) (EG. cmd edit fix 1 #placeholder)