plugin-schema.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "JSON schema for a Grasscutter Plugin",
  4. "type": "object",
  5. "additionalProperties": true,
  6. "definitions": {
  7. "plugin-name": {
  8. "type": "string",
  9. "pattern": "^[A-Za-z\\d_.-]+$"
  10. }
  11. },
  12. "required": [
  13. "name",
  14. "description",
  15. "mainClass"
  16. ],
  17. "properties": {
  18. "name": {
  19. "description": "The unique name of plugin.",
  20. "$ref": "#/definitions/plugin-name"
  21. },
  22. "mainClass": {
  23. "description": "The plugin's initial class file.",
  24. "type": "string",
  25. "pattern": "^(?!org\\.bukkit\\.)([a-zA-Z_$][a-zA-Z\\d_$]*\\.)*[a-zA-Z_$][a-zA-Z\\d_$]*$"
  26. },
  27. "version": {
  28. "description": "A plugin revision identifier.",
  29. "type": [
  30. "string",
  31. "number"
  32. ]
  33. },
  34. "description": {
  35. "description": "Human readable plugin summary.",
  36. "type": "string"
  37. },
  38. "author": {
  39. "description": "The plugin author.",
  40. "type": "string"
  41. },
  42. "authors": {
  43. "description": "The plugin contributors.",
  44. "type": "array",
  45. "items": {
  46. "type": "string"
  47. }
  48. },
  49. "website": {
  50. "title": "Website",
  51. "description": "The URL to the plugin's site",
  52. "type": "string",
  53. "format": "uri"
  54. },
  55. "loadAfter": {
  56. "description": "Plugins to load before this plugin.",
  57. "type": "array",
  58. "items": {
  59. "type": "string"
  60. }
  61. }
  62. }
  63. }