Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ object BukkitTemplate {
properties.setProperty("HAS_WEBSITE", "true")
}

// Plugins targeting 1.13 or newer need an explicit api declaration flag
// Unfortunately this flag has no contract to match any specific API version
val mcVer = settings.minecraftVersion.substring(0, 4).toDoubleOrNull()
if (mcVer != null && mcVer >= 1.13) {
properties.setProperty("API_VERSION", "1.13")
properties.setProperty("HAS_API_VERSION", "true")
}

BaseTemplate.applyTemplate(project, file, MinecraftFileTemplateGroupFactory.BUKKIT_PLUGIN_YML_TEMPLATE, properties, true)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: ${NAME}
version: ${VERSION}
main: ${MAIN}
#if (${HAS_API_VERSION})
api-version: ${API_VERSION}
#end
#if (${HAS_PREFIX})
prefix: ${PREFIX}
#end
Expand Down