Overview
The core Canvas team has done extensive research and dived deep into Folia’s internals in an attempt to understand the API Folia has broken, why it’s broken, and how to fix it. This has lead to the documented API fixes provided in this page. Here you will learn the API changes Canvas has made to the dedicated server to provide further support for region threading in existing and new plugins.
Adding the API
Section titled “Adding the API”To get started, you need to add the Canvas API to your build script, like so:
repositories { maven { name = "canvasmc-repo" url = uri("https://maven.canvasmc.io/snapshots") }}dependencies { compileOnly("io.canvasmc.canvas:canvas-api:1.21.11-R0.1-SNAPSHOT")}repositories { maven { name = "canvasmc-repo" url = "https://maven.canvasmc.io/snapshots" }}dependencies { compileOnly "io.canvasmc.canvas:canvas-api:1.21.11-R0.1-SNAPSHOT"}<repositories> <repository> <id>canvasmc-repo</id> <url>https://maven.canvasmc.io/snapshots</url> </repository></repositories><dependencies> <dependency> <groupId>io.canvasmc.canvas</groupId> <artifactId>canvas-api</artifactId> <version>1.21.11-R0.1-SNAPSHOT</version> </dependency></dependencies>Adding Canvas Support
Section titled “Adding Canvas Support”Canvas is a fork of Folia, as such we require plugins to explicitly declare themselves as supporting Folia.
Canvas will only attempt to load plugins that have the folia-supported or canvas-supported keys marked as true
in their plugin.yml or paper-plugin.yml.
If your plugin uses API that is exclusive to Canvas and cannot function properly on base Folia,
you are encouraged to use the canvas-supported tag instead of the folia-supported tag.
name: ExamplePluginversion: 1.0.0main: io.canvasmc.testplugin.ExamplePlugindescription: An example pluginauthor: CanvasMCwebsite: https://canvasmc.ioapi-version: '1.21.11'# Although Canvas will read both tags just fine, you should only ever use one at a time as they serve different purposes!folia-supported: true # If your plugin supports both Canvas & Foliacanvas-supported: true # If your plugin only supports Canvas due to Canvas-specific APIname: Paper-Test-Pluginversion: '1.0'main: io.canvasmc.testplugin.TestPlugindescription: Paper Test Pluginapi-version: '1.21.11'bootstrapper: io.canvasmc.testplugin.TestPluginBootstraploader: io.canvasmc.testplugin.TestPluginLoader# Although Canvas will read both tags just fine, you should only ever use one at a time as they serve different purposes!folia-supported: true # If your plugin supports both Canvas & Foliacanvas-supported: true # If your plugin only supports Canvas due to Canvas-specific API