Disabled Peripherals¶
Peripherals can be disabled in the configuration file of AP in {minecraft_folder}/config/Advancedperipherals/peripherals.toml.
When disabled, these peripherals can still be wrapped but all the functions throw a LuaException. Besides that, you can now find a new function called peripheralDisabled.
You can simply check in your script if a connected peripheral is disabled via the following example.
1 2 3 4 5 | |
- Can be any peripheral, as long as it is from AP.
- We just check if the function exists, we don't run it since the function does not exist when the peripheral is not disabled.