{"id":27774,"date":"2023-05-14T07:34:11","date_gmt":"2023-06-11T09:29:08","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/"},"modified":"2025-08-12T04:33:57","modified_gmt":"2025-08-11T20:33:57","slug":"%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/","title":{"rendered":"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b"},"content":{"rendered":"<h1>\u9996\u5148\u7531\u4e8e\u5173\u4e8eMinecraft\u63d2\u4ef6\u5f00\u53d1\u7684\u6587\u7ae0\u76f8\u5bf9\u8f83\u5c11\uff0c\u5c24\u5176\u662f\u7528Kotlin\u7f16\u5199\u7684\u66f4\u662f\u7a00\u7f3a\uff0c\u56e0\u6b64\u6211\u51b3\u5b9a\u5236\u4f5c\u4e86\u4e00\u7bc7\u6559\u7a0b\u3002<br \/>\n\u5982\u679c\u4f60\u6b63\u6253\u7b97\u5f00\u59cb\u5236\u4f5c\u81ea\u5df1\u7684\u63d2\u4ef6\uff0c\u6211\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528Kotlin\uff0c\u5b83\u6bd4Java\u66f4\u5bb9\u6613\u4e0a\u624b\uff0c\u5e0c\u671b\u8fd9\u7bc7\u6559\u7a0b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee3\u7801\u5728\u8fd9\u91cc\u53ef\u4ee5\u627e\u5230\u3002<br \/>\nSamplePlugin\u3002<\/p>\n<h1>\u9996\u5148\uff0c\u4ec0\u4e48\u662f Kotlin\uff1f\u5728\u4ecb\u7ecd\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u7a0d\u5fae\u8c08\u8c08Kotlin\u3002<br \/>\nKotlin\u662f\u4e0eJava\u5b8c\u5168\u517c\u5bb9\u7684\u8bed\u8a00\u3002<br \/>\n\u81ea2017\u5e745\u6708Google\u9009\u5b9a\u5176\u4e3aAndroid\u5f00\u53d1\u8bed\u8a00\u4ee5\u6765\uff0c\u9010\u6e10\u53d8\u5f97\u6d41\u884c\u8d77\u6765\u3002\uff08\u591a\u4e8f\u4e86\u5b83\uff0c\u73b0\u5728\u51e0\u4e4e\u53ea\u6709\u5173\u4e8eAndroid\u7684\u4fe1\u606f\uff0c\u5f88\u5c11\u6709\u5173\u4e8eMinecraft\u63d2\u4ef6\u7684\u6587\u7ae0\uff09\u3002-\u3010TechCrunch\u3011Google\u9009\u62e9Kotlin\u4f5c\u4e3aAndroid\u5e94\u7528\u5f00\u53d1\u8bed\u8a00\u3002<\/p>\n<p>\u5728\u5f00\u53d1Java\u65f6\uff0cNullPointerException\u5e38\u5e38\u4f1a\u51fa\u73b0&#8230;\u4f46\u662f\u901a\u8fc7Null Safety\u7279\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u7f16\u8bd1\u65f6\u5c31\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u3002\u54ce\u5440\uff0cNull Safety\uff0c\u8fd9\u4e2a\u8bcd\u542c\u8d77\u6765\u591a\u4e48\u4ee4\u4eba\u6109\u60a6\u3002<\/p>\n<p>\u3068\u306f\u3044\u3048\u3001Java\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3084API\u3092\u4f75\u7528\u3059\u308b\u3053\u3068\u3082\u3042\u308b\u306e\u3067\u3001NullException\u3092\u5b8c\u5168\u306b\u9632\u3050\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\nNullable\u306a\u5909\u6570\u3092\u6307\u5b9a\u3059\u308c\u3070\u3001Null\u306e\u4ee3\u5165\u3092\u8a31\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u3042\u304f\u307e\u3067NullException\u304c\u767a\u751f\u3057\u306b\u304f\u304f\u306a\u3063\u305f\u3050\u3089\u3044\u3067\u8003\u3048\u3066\u304a\u304f\u3068\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u5982\u679c\u63d0\u5230\u5176\u4ed6\u4e0eJava\u7684\u4e0d\u540c\u4e4b\u5904\u7684\u8bdd<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30bb\u30df\u30b3\u30ed\u30f3\u304c\u3044\u3089\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u4e09\u9805\u6f14\u7b97\u5b50\u306e\u4ee3\u308f\u308a\u306bif\uff08Kotlin\u3067\u306fif\u306f\u95a2\u6570\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u578b\u63a8\u8ad6\uff08\u578b\u6307\u5b9a\u304c\u7701\u7565\u3067\u304d\u308b\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5909\u6570\u5ba3\u8a00\u306bvar\uff08\u66f8\u304d\u63db\u3048\u53ef\uff09\u3001val\uff08\u66f8\u304d\u63db\u3048\u4e0d\u53ef\uff09\u304c\u3042\u308b<\/ul>\n<p>\u306a\u3069\u306a\u3069\u5b8c\u5168\u4e92\u63db\u3068\u3044\u3048\u3069\u3001Java\u3068\u7570\u306a\u308b\u70b9\u306f\u3044\u304f\u3064\u3082\u3042\u308a\u307e\u3059\u3002\u4f3c\u3066\u975e\u306a\u308b\u8a00\u8a9e\u3067\u3059\u3002<br \/>\nJava\u3068Kotlin\u306e\u9055\u3044\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u306f\u3044\u304f\u3064\u3082\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3053\u3067\u306f\u5272\u611b\u3057\u307e\u3059\u3002<br \/>\n\u2015 \u3010Qiita\u3011\u306f\u3058\u3081\u3066\u306eKotlin\u3002Java\u3068\u6bd4\u8f03\u3057\u3066\u307f\u305f<\/p>\n<p>\u90a3\u4e48\uff0c\u8ba9\u6211\u4eec\u642d\u5efa\u63d2\u4ef6\u5f00\u53d1\u73af\u5883\u5427\u3002<\/p>\n<h1>\u642d\u5efa\u5f00\u53d1\u73af\u5883\u8fd9\u662f\u6211\u7684\u73af\u5883\u3002<\/p>\n<div>\n<div class=\"post-table\">\u9805\u76ee\u5024OSWindows10\u30e1\u30e2\u30ea16GBIntelliJ IDEA Version2019.1 (Ultimate Edition)<\/p>\n<h2>\u5b89\u88c5 IntelliJ IDEA\u9996\u5148\uff0c\u6211\u4eec\u8981\u914d\u7f6eKotlin\u7684\u5f00\u53d1\u73af\u5883\u3002\u6211\u8ba4\u4e3aKotlin\u7684\u5f00\u53d1\u73af\u5883\u5c31\u53ea\u6709IntelliJ IDEA\u4e00\u4e2a\u9009\u62e9\u3002IntelliJ IDEA\u662f\u7531JetBrains\u516c\u53f8\u63d0\u4f9b\u7684Kotlin\u5f00\u53d1\u5de5\u5177\u3002\u9664\u975e\u6709\u5f88\u7279\u6b8a\u7684\u539f\u56e0\uff0c\u6211\u4eec\u5e94\u8be5\u4f7f\u7528IntelliJ IDEA\u8fdb\u884c\u5f00\u53d1\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">IntelliJ IDEA \u516c\u5f0f<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">IntelliJ IDEA \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806<\/ul>\n<p>\u6bcd\u56fd\u8a9e\u306f\u4e2d\u56fd\u8a9e\u3067\u3059\u3002(By the way, the author&#8217;s native language is Chinese.)<\/p>\n<h2>Minecraft\u5f00\u53d1\u7684\u65b0\u589e\u5185\u5bb9\u5728\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u5728\u521b\u5efa\u9879\u76ee\u4e4b\u524d\uff0c\u8bf7\u5c06Minecraft Development\u4f5c\u4e3aIntelliJ IDEA\u7684\u63d2\u4ef6\u6dfb\u52a0\u3002\u901a\u8fc7\u8fd9\u6837\u7684\u5f15\u5165\uff0c\u60a8\u5c06\u80fd\u591f\u521b\u5efa\u9002\u7528\u4e8eSpigot\u548cBukkit\u7684\u6a21\u677f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/20-0.png\" alt=\"install_minecraft_develpment.png\" \/>\u7531\u4e8e\u641c\u7d22\u7ed3\u679c\u4e2d\u6709Minecraft Development\uff0c\u6240\u4ee5\u70b9\u51fb\u5b89\u88c5\u6309\u94ae\u6765\u5e94\u7528\u63d2\u4ef6\uff08\u5728\u56fe\u4e2d\u5df2\u7ecf\u5b89\u88c5\uff0c\u663e\u793a\u4e3aInstalled\uff09\u3002<\/p>\n<p>\u5982\u679c\u6ca1\u6709\u5b89\u88c5Kotlin\u63d2\u4ef6\uff0c\u8bf7\u6309\u7167\u76f8\u540c\u7684\u6b65\u9aa4\u8fdb\u884c\u5b89\u88c5\u3002\u641c\u7d22\u5173\u952e\u8bcd\u4e3akotlin\u5373\u53ef\u3002<br \/>\n\u73b0\u5728\u5f00\u53d1\u73af\u5883\u5df2\u7ecf\u51c6\u5907\u597d\u4e86\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u9879\u76ee\u3002<\/p>\n<h1>\u521b\u5efa\u9879\u76ee<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/24-0.png\" alt=\"select_spigot.png\" \/>\u5982\u679c\u5de6\u4fa7\u83dc\u5355\u4e2d\u6ca1\u6709Minecraft\u9009\u9879\uff0c\u610f\u5473\u7740\u6ca1\u6709\u5b89\u88c5Minecraft\u5f00\u53d1\u63d2\u4ef6\u3002\u8bf7\u786e\u8ba4\u662f\u5426\u5df2\u5b89\u88c5\u63d2\u4ef6\u3002<\/p>\n<h2>\u5efa\u7acb\u8bbe\u7f6e\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u6307\u5b9a\u4e86GroupId\u3001ArtifactId\u548cVersion\u3002\u8fd9\u6b21\u6211\u4eec\u6309\u7167\u4f8b\u5b50\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n<div>\n<div class=\"post-table\">\u9805\u76ee\u8aac\u660e\u4f8bGroupId\u56e3\u4f53\u3084\u30b0\u30eb\u30fc\u30d7\u306e\u30e6\u30cb\u30fc\u30af\u306aIDcom.sampleArtifactId\u751f\u6210\u3055\u308c\u308bjar\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u629c\u304d\u306e\u540d\u524dSampleVersion\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f31.0-SNAPSHOT\u5728\u8fd9\u91cc\uff0c\u8bf7\u6ce8\u610f\uff01<br \/>\n\u9ed8\u8ba4\u662f\u4f7f\u7528Maven\u7684\uff0c\u4f46\u8bf7\u6539\u7528Gradle\u3002<br \/>\n\u5982\u679c\u4f60\u60f3\u4f7f\u7528Maven\uff0c\u4e5f\u6ca1\u6709\u95ee\u9898\uff0c\u4f46\u5982\u679c\u4f60\u5bf9\u5b83\u4e0d\u592a\u4e86\u89e3\uff0c\u6211\u63a8\u8350\u4f7f\u7528Gradle\u3002<br \/>\n\u56e0\u4e3aMaven\u9700\u8981\u901a\u8fc7XML\u8fdb\u884c\u914d\u7f6e\uff0c\u6240\u4ee5\u914d\u7f6e\u4e0d\u6613\u8bfb\u4e5f\u4e0d\u6613\u5199\u3002<br \/>\n\u63a5\u4e0b\u6765\u7684\u89e3\u91ca\u4e5f\u5c06\u57fa\u4e8eGradle\u8fdb\u884c\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/30-0.png\" alt=\"build_settings.png\" \/>\u5b8c\u6210\u8f93\u5165\u540e\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u6309\u94ae\u3002<\/p>\n<h2>\u6c34\u9f99\u5934\u8bbe\u7f6e<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/33-0.png\" alt=\"Spigot_settings.png\" \/>\u5f53\u8f93\u5165\u5b8c\u6210\u540e\uff0c\u8bf7\u70b9\u51fb\u201c\u4e0b\u4e00\u6b65\u201d\u6309\u94ae\u7ee7\u7eed\u64cd\u4f5c\u3002<\/p>\n<h2>\u6307\u5b9a\u76ee\u5f55\u8fd9\u662f\u6700\u540e\u7684\u8bbe\u7f6e\u754c\u9762\u3002<br \/>\n\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u6307\u5b9a\u76ee\u5f55\u540d\u79f0\u3002\u8fd9\u4e0e\u9879\u76ee\u65e0\u76f4\u63a5\u5173\u8054\u3002<br \/>\n\u8bf7\u4f7f\u7528\u6613\u4e8e\u7406\u89e3\u7684\u540d\u79f0\u3002<br \/>\n\u5982\u679c\u60a8\u60f3\u66f4\u6539\u76ee\u5f55\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u4ece\u9879\u76ee\u4f4d\u7f6e\u8fdb\u884c\u6307\u5b9a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/37-0.png\" alt=\"Project directory.png\" \/>\u6309\u4e0b\u201c\u5b8c\u6210\u201d\u6309\u94ae\u540e\uff0c\u9879\u76ee\u521b\u5efa\u5c31\u5b8c\u6210\u4e86\uff01\u53ef\u80fd\u4f1a\u5f39\u51fa\u4e00\u4e2a\u540d\u4e3a\u201c\u4eceGradle\u5bfc\u5165\u6a21\u5757\u201d\u7684\u7a97\u53e3\uff0c\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u5373\u53ef\u3002<\/p>\n<h1>\u8fd8\u53ea\u6709\u4e00\u534a&#8230;\u867d\u7136\u6211\u60f3\u8bf4&#8221;\u8fd9\u6837\u5c31\u80fd\u5f00\u53d1\u4e86\uff01&#8221;\u4f46\u8fd8\u6709\u4e00\u4e9b\u4e8b\u60c5\u9700\u8981\u505a\u3002<br \/>\n\u5176\u4e2d\u4e00\u4e2a\u662f\u5c06Java\u8f6c\u6362\u4e3aKotlin\u3002\u8fd8\u6709\u5176\u4ed6\u9700\u8981\u5b8c\u6210\u7684\u4efb\u52a1\uff0c\u5982Gradle\u7f16\u8f91\u548c\u6700\u57fa\u672c\u7684\u8bbe\u7f6e\u3002<\/p>\n<h1>\u5c06Java\u6587\u4ef6\u8f6c\u6362\u4e3aKotlin\u6587\u4ef6\u7531\u4e8eSpigot\u662f\u7528Java\u7f16\u5199\u7684\uff0c\u6240\u4ee5\u63d2\u4ef6\u6a21\u677f\u4e5f\u662f\u7528Java\u7f16\u5199\u7684\u3002<br \/>\n\u5982\u679c\u8981\u7528Kotlin\u7f16\u5199\uff0c\u5c31\u5fc5\u987b\u5c06\u81ea\u52a8\u751f\u6210\u7684Java\u4ee3\u7801\u8fdb\u884c\u8f6c\u6362\u3002<br \/>\n\u4e0d\u8fc7\uff0c\u5e78\u597d\u53ef\u4ee5\u501f\u52a9IntelliJ IDEA\u7684\u529f\u80fd\u8fdb\u884c\u81ea\u52a8\u8f6c\u6362\uff0c\u800c\u65e0\u9700\u8fdb\u884c\u91cd\u6784\u3002<\/p>\n<p>\u8bf7\u4eceProject\u83dc\u5355\u4e2d\u9009\u62e9\u663e\u793a\u7684\u76ee\u5f55\uff0c\u7136\u540e\u9009\u62e9src -&gt; main -&gt; java\u3002<br \/>\n\u9009\u62e9\u540e\uff0c\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684Code -&gt; Convert Java File to Kotlin File\uff0c\u5c06\u81ea\u52a8\u5c06\u4ee3\u7801\u8f6c\u6362\u4e3aKotlin\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/44-0.png\" alt=\"Convert Java File to Kotlin File.png\" \/><\/p>\n<h1>build.gradle\u306e\u7de8\u96c6\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u6700\u5927\u306e\u5c71\u5834\u3001Gradle\u3067\u3059\u3002<br \/>\nGradle\u3068\u306f\u30d3\u30eb\u30c9\u30b7\u30b9\u30c6\u30e0\u306e\u3053\u3068\u3067\u3001\u4f9d\u5b58\u95a2\u4fc2\u3084\u30d3\u30eb\u30c9\u65b9\u6cd5\u3092\u8a18\u8ff0\u3057\u305f\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nGradle\u306e\u8a18\u8ff0\u3092\u9593\u9055\u3048\u308b\u3068\u3001\u300c\u30b3\u30fc\u30c9\u306f\u6b63\u3057\u3044\u306e\u306b\u52d5\u304b\u306a\u3044\u300d\u306a\u3093\u3066\u3053\u3068\u3082\u3057\u3070\u3057\u3070\u3067\u3059\u306e\u3067\u3001\u9593\u9055\u3044\u306a\u304f\u66f8\u3044\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u5220\u9664\u65e0\u7528\u7684\u6587\u4ef6\u5b9e\u9645\u4e0a\uff0cIntelliJ IDEA\u751f\u6210\u7684\u6587\u4ef6\u4e2d\u6709\u4e00\u4e9b\u4e0d\u5fc5\u8981\u7684\u5185\u5bb9\u3002\u8fd9\u4e9b\u6587\u4ef6\u662f\u4f4d\u4e8e\u6839\u76ee\u5f55\u4e0b\u7684.idea\u76ee\u5f55\u4e2d\u7684iml\u6587\u4ef6\u3002\u8fd9\u4e9b\u662fIntelliJ IDEA\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4f46\u7531\u4e8e\u8fd9\u4e9b\u6587\u4ef6\u7684\u5b58\u5728\uff0c\u5728build.gradle\u4e2d\u4f1a\u51fa\u73b0\u4e0d\u5fc5\u8981\u7684\u8b66\u544a\uff08\u9ec4\u8272\u6807\u8bb0\uff09\u3002\u636e\u8bf4\u8fd9\u4e9b\u6587\u4ef6\u5e76\u4e0d\u662f\u7279\u522b\u5fc5\u9700\uff0c\u6240\u4ee5\u5728\u7f16\u8f91build.gradle\u4e4b\u524d\uff0c\u6700\u597d\u5148\u5220\u9664\u5b83\u4eec\u3002<br \/>\n\u5982\u679c\u4f60\u6709\u62c5\u5fc3\uff0c\u6211\u89c9\u5f97\u6700\u597d\u5148\u5907\u4efd\u4e00\u4e0b\u3002<\/p>\n<p>iml\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u305f\u3089\u3001Build -&gt; Rebuild Project\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30ea\u30d3\u30eb\u30c9\u3057\u307e\u3057\u3087\u3046\u3002\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u306a\u304f\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<h2>buildscript, dependencies, jar\u306e\u5909\u66f4\u30fb\u8ffd\u8a18<br \/>\n\u6211\u5c06\u6dfb\u52a0\u5173\u4e8eKotlin\u548c\u5916\u90e8\u5e93\u7684\u4f9d\u8d56\u5173\u7cfb\u3002<br \/>\n\u8fd9\u6b21\u6211\u5c06\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre class=\"post-pre\"><code>buildscript {\r\n    ext {\r\n        junit_version = '4.12'\r\n        kotlin_version = '1.3.21'\r\n        spigot_version = '1.13.2-R0.1-SNAPSHOT'\r\n    }\r\n    repositories {\r\n        mavenCentral()\r\n    }\r\n    dependencies {\r\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21\"\r\n    }\r\n}\r\n\r\napply plugin: 'java'\r\napply plugin: 'kotlin'\r\n\r\ngroup = pluginGroup\r\nversion = pluginVersion\r\n\r\nsourceCompatibility = 1.8\r\ntargetCompatibility = 1.8\r\n\r\nrepositories {\r\n    mavenCentral()\r\n    maven {\r\n        name = 'spigotmc-repo'\r\n        url = 'https:\/\/hub.spigotmc.org\/nexus\/content\/groups\/public\/'\r\n    }\r\n    maven {\r\n        name = 'sonatype'\r\n        url = 'https:\/\/oss.sonatype.org\/content\/groups\/public\/'\r\n    }\r\n}\r\n\r\ndependencies {\r\n    testImplementation group: 'junit', name: 'junit', version: junit_version\r\n    testRuntimeOnly group: 'junit', name: 'junit', version: junit_version\r\n    compile \"org.spigotmc:spigot-api:$spigot_version\"\r\n    compile \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\r\n}\r\n\r\nimport org.apache.tools.ant.filters.ReplaceTokens\r\n\r\nprocessResources {\r\n    from(sourceSets.main.resources.srcDirs) {\r\n        filter ReplaceTokens, tokens: [version: version]\r\n    }\r\n}\r\n\r\njar {\r\n    from {\r\n        configurations.compile.collect {\r\n            it.isDirectory() ? it : zipTree(it)\r\n        }\r\n    }\r\n}\r\n\r\n<\/code><\/pre>\n<p>\u53ea\u5bf9\u4e3b\u8981\u90e8\u5206\u8fdb\u884c\u89e3\u91ca\u3002<\/p>\n<h2>\u6784\u5efa\u811a\u672c\u5757\u307e\u305a\u306fbuild.gradle\u306e\u5148\u982d\u306bbuildscript\u3092\u8ffd\u8a18\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\nbuildscript\u306f\u30d3\u30eb\u30c9\u30b9\u30af\u30ea\u30d7\u30c8\u81ea\u4f53\u304c\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6307\u5b9a\u3059\u308b\u30d6\u30ed\u30c3\u30af\u306b\u306a\u308a\u307e\u3059\u3002\u4eca\u56de\u306fKotlin\u306eGradle\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u8a18\u8ff0\u3067\u3059\u3002\u4ed6\u306b\u5404\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u3053\u3053\u3067\u6307\u5b9a\u3059\u308b\u3068\u3001\u7ba1\u7406\u304c\u697d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>buildscript {\r\n    ext {\r\n        junit_version = '4.12'\r\n        kotlin_version = '1.3.21'\r\n        spigot_version = '1.13.2-R0.1-SNAPSHOT'\r\n    }\r\n    repositories {\r\n        mavenCentral()\r\n    }\r\n    dependencies {\r\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21\"\r\n    }\r\n}\r\n...\r\n<\/code><\/pre>\n<h2>\u4f9d\u8d56\u56fe\u5757&#8221;dependencies&#8221;\u5757\u5c31\u662f\u7528\u6765\u63cf\u8ff0\u5e93\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\u7684\u5730\u65b9\uff0c\u987e\u540d\u601d\u4e49\u3002<br \/>\n\u7248\u672c\u53f7\u4f1a\u5728buildscript\u7684ext\u5757\u4e2d\u8fdb\u884c\u5b9a\u4e49\uff0c\u6240\u4ee5\u4f1a\u8fdb\u884c\u53c2\u8003\u3002<br \/>\n\u8fd9\u6b21\u9664\u4e86\u4f7f\u7528Spigot\u5e93\u4e4b\u5916\uff0c\u8fd8\u4f1a\u4f7f\u7528Kotlin\u5e93\uff0c\u56e0\u6b64\u9700\u8981\u5c06\u5b83\u4eec\u8fdb\u884c\u63cf\u8ff0\u3002<br \/>\n\u53e6\u5916\uff0c\u4e3a\u4e86\u8fdb\u884c\u6d4b\u8bd5\uff0c\u8fd8\u4f1a\u5c06Junit\u5e93\u4e5f\u52a0\u5165\u5176\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code>...\r\ndependencies {\r\n    testImplementation group: 'junit', name: 'junit', version: junit_version\r\n    testRuntimeOnly group: 'junit', name: 'junit', version: junit_version\r\n    compile \"org.spigotmc:spigot-api:$spigot_version\"\r\n    compile \"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version\"\r\n}\r\n...\r\n<\/code><\/pre>\n<h2>\u7f50\u5b50\u5c01\u9501\u5728jar\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u5c06\u8fdb\u884c\u5173\u4e8e\u8f93\u51fajar\u6587\u4ef6\u7684\u63cf\u8ff0\u3002<br \/>\n\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u7f16\u5199\u5c06\u5916\u90e8\u5e93\u5305\u542b\u5728jar\u6587\u4ef6\u4e2d\u7684\u5904\u7406\u3002<br \/>\n\u5982\u679c\u4e0d\u8fdb\u884c\u8fd9\u4e2a\u63cf\u8ff0\uff0c\u90a3\u4e48jar\u6587\u4ef6\u4e2d\u5c06\u4e0d\u5305\u542b\u5916\u90e8\u5e93\uff0c\u53ef\u80fd\u5f15\u8d77\u8fd0\u884c\u9519\u8bef\u3002<br \/>\n\u8fd9\u4e5f\u662f\u5bfc\u81f4jar\u6587\u4ef6\u53d8\u5927\u7684\u539f\u56e0\u4e4b\u4e00\uff0c\u4f46\u5982\u679c\u4e0d\u60f3\u4f7f\u7528\u4f9d\u8d56\u63d2\u4ef6\uff0c\u8fd9\u4e2a\u63cf\u8ff0\u662f\u5fc5\u9700\u7684\u3002<\/p>\n<pre class=\"post-pre\"><code>...\r\njar {\r\n    from {\r\n        configurations.compile.collect {\r\n            it.isDirectory() ? it : zipTree(it)\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u5982\u679c\u5728\u6700\u540e\u8fdb\u884c\u6784\u5efa\u65f6\u6ca1\u6709\u51fa\u73b0\u4efb\u4f55\u9519\u8bef\uff0c\u90a3\u5c31\u53ef\u4ee5\u4e86\u3002<br \/>\n\u5982\u679c\u51fa\u73b0\u4e86\u4efb\u4f55\u9519\u8bef\uff0c\u8fd9\u610f\u5473\u7740build.gradle\u6709\u95ee\u9898\u3002<br \/>\n\u6211\u4eec\u518d\u6b21\u68c0\u67e5\u4e00\u4e0bbuild.gradle\u5427\u3002<\/p>\n<h1>\u7f16\u8f91plugin.yml\u3053\u308c\u304c\u6700\u5f8c\u306e\u624b\u7d9a\u304d\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u4f5c\u3063\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u66f8\u304b\u308c\u3066\u3044\u308bplugin.yml\u3092\u7de8\u96c6\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\nyml\u30d5\u30a1\u30a4\u30eb\u306b\u3064\u3044\u3066\u306f\u3001\u5225\u8a18\u4e8b\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u2015 \u3010Qiita\u3011YAML \u57fa\u672c\u8a18\u6cd5\u307e\u3068\u3081<\/p>\n<p>plugin.yml\u306fsrc -&gt; resources\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e2d\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>name: Sample\r\nversion: @version@\r\nmain: com.tklcraft.sample.SamplePlugin\r\napi-version: '1.13'\r\nauthor: kanakiyo314\r\n<\/code><\/pre>\n<p>\u307e\u305a\u3001api-version\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3&#8221;\u3067\u56f2\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\nString\u304c\u5b9f\u6570\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u5927\u4e8b\u306a\u306e\u304cauthor\u306e\u8a18\u8ff0\u3067\u3059\u3002<br \/>\n\u8ab0\u304c\u4f5c\u3063\u305f\u306e\u304b\u306f\u5927\u5909\u91cd\u8981\u306a\u60c5\u5831\u306a\u306e\u3067\u6f0f\u308c\u306a\u304f\u66f8\u304d\u8fbc\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4f55\u3088\u308a\u3001\u52d5\u4f5c\u30c6\u30b9\u30c8\u306e\u3068\u304d\u306b\u8868\u793a\u3055\u305b\u308b\u3068\u3068\u3066\u3082\u611f\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>\u5982\u679c\u6709\u591a\u4e2a\u4f5c\u8005\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u65b9\u5f0f\u8868\u793a\uff1a<br \/>\nauthors: [authorA, authorB]<br \/>\n\u8fd9\u6837\u5c31\u53ef\u4ee5\u591a\u6b21\u5217\u4e3e\u4f5c\u8005\u4e86\u3002<\/p>\n<h1>\u52d5\u4f5c\u30c6\u30b9\u30c8\u6700\u540e\u662f\u52a8\u4f5c\u6d4b\u8bd5\u3002<br \/>\n\u56e0\u4e3a\u5373\u4f7f\u80fd\u591f\u6210\u529f\u7f16\u8bd1\uff0c\u4e5f\u6709\u5f88\u591a\u60c5\u51b5\u4e0b\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\uff0c\u6240\u4ee5\u6211\u4eec\u5fc5\u987b\u786e\u4fdd\u8fdb\u884c\u4ed4\u7ec6\u7684\u786e\u8ba4\u3002<\/p>\n<p>\u30d3\u30eb\u30c9\u3067\u751f\u6210\u3055\u308c\u304cjar\u30d5\u30a1\u30a4\u30eb\u306f\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea -&gt; build -&gt; lib\u306b\u3042\u308a\u307e\u3059\u3002<br \/>\n\u305d\u308c\u3092\u901a\u5e38\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u540c\u69d8\u306bplugins\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3059\u308c\u3070\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5982\u679c\u670d\u52a1\u5668\u65e5\u5fd7\u663e\u793a[Sample] Enabling Sample v1.0-SNAPSHOT\uff0c\u5219\u8868\u793a\u6210\u529f\uff08\u63d2\u4ef6\u540d\u79f0\u548c\u7248\u672c\u5df2\u7ecf\u8bbe\u7f6e\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/75-0.png\" alt=\"about command.png\" \/>\u4f60\u89c9\u5f97\u600e\u4e48\u6837\uff1f<br \/>\n\u96be\u9053\u4e0d\u4f1a\u6709\u4e00\u70b9\u611f\u52a8\u5417\uff1f<\/p>\n<p>\u3053\u3053\u307e\u3067\u6765\u308c\u3070\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u958b\u767a\u306e\u6e96\u5099\u306f\u5b8c\u5168\u306b\u6574\u3044\u307e\u3057\u305f\u3002<br \/>\n\u3082\u3046\u3053\u308c\u3067\u3001\u30d0\u30ea\u30d0\u30ea\u30b3\u30fc\u30c9\u304c\u6b20\u3051\u307e\u3059\uff01<\/p>\n<h1>\u6700\u7ec8\uff0c\u6700\u540e\uff0c\u6700\u540e\u4e00\u4e2aMinecraft\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u6210\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u306f\u3068\u3066\u3082\u5c11\u306a\u3044\u3067\u3059\uff08Kotlin\u306a\u3089\u306a\u304a\u3055\u3089\u2026\uff09\u3002<br \/>\n\u4eca\u56de\u306f\u8ab0\u3082\u304c\u82e6\u52b4\u3059\u308b\u3067\u3042\u308d\u3046\u90e8\u5206\u3092\u91cd\u70b9\u7684\u306b\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4e0b\u4e00\u6b21\u6211\u60f3\u5199\u4e00\u4e2a\u5173\u4e8e\u63d2\u4ef6\u5236\u4f5c\u6559\u7a0b\u7684\u4e3b\u9898\u3002<\/p>\n<h1>\u8bf7\u53c2\u8003\u4e0b\u5217\u94fe\u63a5<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3010\u516c\u5f0f\u3011Kotlin<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3010TechCrunch\u3011Google\u3001Kotlin\u3092Android\u30a2\u30d7\u30ea\u958b\u767a\u8a00\u8a9e\u306b\u9078\u5b9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3010\u30d6\u30ed\u30b0\u3011Android\u516c\u5f0f\u8a00\u8a9e Kotlin\u3068\u306f\u3069\u3093\u306a\u8a00\u8a9e\u3067\u3069\u3093\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u306e\u304b\uff1f\uff01<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3010Qiita\u3011\u306f\u3058\u3081\u3066\u306eKotlin\u3002Java\u3068\u6bd4\u8f03\u3057\u3066\u307f\u305f<\/ul>\n<\/li>\n<\/ul>\n<p>\u3010\u30d6\u30ed\u30b0\u3011Kotlin\u306eNull\u5b89\u5168\u3063\u3066\u3069\u3046\u306a\u306e\uff1f\uff01\u691c\u8a3c\u3082\u4ea4\u3048\u3066\u307e\u3068\u3081\u3066\u307f\u305f\uff01<br \/>\n\u3010SlideShgare\u3011Gradle \u5165\u9580<br \/>\n\u3010Spigot\u3011How to use Kotlin in your plugins<br \/>\n\u3010Qiita\u3011Gradle\u3092\u59cb\u3081\u3066\u307f\u3088\u3046<br \/>\n\u3010Qiita\u3011Kotlin\u3067Spigot\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u308b\u305f\u3081\u306ebuild.gradle<br \/>\n\u3010\u516c\u5f0f\u3011Kotlin using Gradle<br \/>\n\u3010stack overflow\u3011IntelliJ IDEA and Gradle &#8211; Cannot be applied to &#8216;(groovy.lang.Closure)&#8217;<br \/>\n\u3010Qiita\u3011YAML \u57fa\u672c\u8a18\u6cd5\u307e\u3068\u3081<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u7531\u4e8e\u5173\u4e8eMinecraft\u63d2\u4ef6\u5f00\u53d1\u7684\u6587\u7ae0\u76f8\u5bf9\u8f83\u5c11\uff0c\u5c24\u5176\u662f\u7528Kotlin\u7f16\u5199\u7684\u66f4\u662f\u7a00\u7f3a\uff0c\u56e0\u6b64\u6211\u51b3\u5b9a\u5236\u4f5c\u4e86\u4e00\u7bc7 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-27774","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010kotlin\u3011spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u3010kotlin\u3011spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-11T09:29:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T20:33:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/20-0.png\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/\",\"name\":\"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-11T09:29:08+00:00\",\"dateModified\":\"2025-08-11T20:33:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"description\":\"\u5173\u4e8e\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b - Blog - Silicon Cloud","description":"\u5173\u4e8e\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010kotlin\u3011spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b","og_description":"\u5173\u4e8e\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u3010kotlin\u3011spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-11T09:29:08+00:00","article_modified_time":"2025-08-11T20:33:57+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657cf89637434c4406bb6384\/20-0.png"}],"author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/","name":"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-11T09:29:08+00:00","dateModified":"2025-08-11T20:33:57+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"description":"\u5173\u4e8e\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Kotlin\u3011Spigot\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e3%80%90kotlin%e3%80%91spigot%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=27774"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27774\/revisions"}],"predecessor-version":[{"id":111197,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27774\/revisions\/111197"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=27774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=27774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=27774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}