3 posts
Posted 19 August 2015 - 11:46 AM
Well, I know that the autocomplete feature is great, and to people that are learning it's very helpful, but I want to disable this feature in my server, I tried to find a way, but I can't. So, do somebody knows how to disable?
Thanks, and sorry for english mistakes.
2427 posts
Location
UK
Posted 19 August 2015 - 08:54 PM
From my understanding, the read function provides the auto complete. If you overwrite the read function you can have it filter out the auto complete arguments.
You will need to put your change in a resource pack and put this resource pack on the server.
1023 posts
Posted 19 August 2015 - 10:00 PM
The way I have seen/used to disable the autocomplete feature is as follows:
_G.completion = {}
local oldfscomplete = fs.complete
local oldshellcomplete = shell.complete
local oldtextutilscomplete = textutils.complete
local function overwrite()
return {}
end
function _G.completion.overwrite()
fs.complete = overwrite
shell.complete = overwrite
textutils.complete = overwrite
end
function _G.completion.restore()
fs.complete = oldfscomplete
shell.complete = oldshellcomplete
textutils.complete = oldtextutilscomplete
end
_G.completion.overwrite()
You would put that code in the autorun folder in a resource pack. What this does is add two new functions "overwrite" and "restore" the first removes completion and the second restores its functionality. This code should work assuming I did not make any typos while writing it. Either way you should get the general idea of what it does.
Edited on 19 August 2015 - 08:27 PM