提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
− | {{warning}} 本ページの原文は | + | {{warning}} 本ページの原文は http://wiki.bukkit.org/Plugin_YAML にあります。原文は、https://github.com/Bukkit/Bukkit/blob/master/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java のJavadocをwikiに書き直したドキュメントです。本ページは、訳者独自の記述が含まれることをご了承ください。<br /> |
{{warning}} plugin.ymlにマルチバイトコード(日本語)を使用したい場合は、UTF8N (BOM無し) で保存してください。windows のメモ帳ではBOM無しで保存できないため、日本語を使いたい場合はメモ帳を使用しないでください。また、BukkitDevへの登録など、海外圏での利用を視野に入れている場合は、全て英語で書くようにしてください。<br /> | {{warning}} plugin.ymlにマルチバイトコード(日本語)を使用したい場合は、UTF8N (BOM無し) で保存してください。windows のメモ帳ではBOM無しで保存できないため、日本語を使いたい場合はメモ帳を使用しないでください。また、BukkitDevへの登録など、海外圏での利用を視野に入れている場合は、全て英語で書くようにしてください。<br /> | ||
{{warning}} 本項目は、"YAMLの表記方法" までは、深く言及しません。リストやハッシュ、複数行文字列の記載方法は、http://ja.wikipedia.org/wiki/YAML などをご参照ください。 | {{warning}} 本項目は、"YAMLの表記方法" までは、深く言及しません。リストやハッシュ、複数行文字列の記載方法は、http://ja.wikipedia.org/wiki/YAML などをご参照ください。 | ||
20行目: | 20行目: | ||
|- style="font-weight: bold;" | |- style="font-weight: bold;" | ||
| name | | name | ||
− | | | + | | ○ |
| プラグイン名。 | | プラグイン名。 | ||
| <code>name: MyPlugin</code> | | <code>name: MyPlugin</code> | ||
30行目: | 30行目: | ||
|- style="font-weight: bold;" | |- style="font-weight: bold;" | ||
| version | | version | ||
− | | | + | | ○ |
| プラグインのバージョン。 | | プラグインのバージョン。 | ||
| <code>version: 1.4.1</code> | | <code>version: 1.4.1</code> | ||
36行目: | 36行目: | ||
*version設定には、任意の文字列が設定可能です。一般的なバージョン標記 MajorRelease.MinorRelease.Build (例:1.4.1) のように設定するといいでしょう。 | *version設定には、任意の文字列が設定可能です。一般的なバージョン標記 MajorRelease.MinorRelease.Build (例:1.4.1) のように設定するといいでしょう。 | ||
*新機能を追加したり、バグを修正したら、バージョン番号を上げてください。 | *新機能を追加したり、バグを修正したら、バージョン番号を上げてください。 | ||
− | * | + | *バージョン情報は、<code>/version プラグイン名</code> のコマンドを実行したときに表示されます。 |
|- | |- | ||
| description | | description | ||
− | | | + | | × |
| プラグインの説明。 | | プラグインの説明。 | ||
| <code>description: This plugin is so 31337. You can set yourself on fire.</code> | | <code>description: This plugin is so 31337. You can set yourself on fire.</code> | ||
46行目: | 46行目: | ||
*プラグインが提供している機能の概要を書いてください。 | *プラグインが提供している機能の概要を書いてください。 | ||
*複数行文字列で記載することが可能です。 | *複数行文字列で記載することが可能です。 | ||
− | * | + | *説明の情報は、<code>/version プラグイン名</code> のコマンドを実行したときに表示されます。 |
|- | |- | ||
| load | | load | ||
− | | | + | | × |
| プラグインの起動タイミング設定。 | | プラグインの起動タイミング設定。 | ||
| <code> load: STARTUP </code> | | <code> load: STARTUP </code> | ||
60行目: | 60行目: | ||
|- | |- | ||
| author | | author | ||
− | | | + | | × |
| 開発者名。 | | 開発者名。 | ||
| <code>author: CaptainInflamo</code> | | <code>author: CaptainInflamo</code> | ||
| | | | ||
*開発者名を書いてください。 | *開発者名を書いてください。 | ||
− | * | + | *エラーが発生したときのフィードバック先として表示されます(訳者注:要検証)。 |
− | * | + | *フォーラムのハンドル名や、メールアドレスなど、連絡が付くような内容で記載することが望ましいです。 |
+ | *開発者名の情報は、<code>/version プラグイン名</code> のコマンドを実行したときに表示されます。 | ||
|- | |- | ||
| authors | | authors | ||
− | | | + | | × |
| 開発者名(複数用)。 | | 開発者名(複数用)。 | ||
| <code>authors: [Cogito, verrier, EvilSeph]</code> | | <code>authors: [Cogito, verrier, EvilSeph]</code> | ||
80行目: | 81行目: | ||
|- | |- | ||
| website | | website | ||
− | | | + | | × |
| プラグイン開発者のウェブサイト。 | | プラグイン開発者のウェブサイト。 | ||
| <code>website: http://forums.bukkit.org/threads/MyPlugin.31337/</code> | | <code>website: http://forums.bukkit.org/threads/MyPlugin.31337/</code> | ||
89行目: | 90行目: | ||
|- style="font-weight: bold;" | |- style="font-weight: bold;" | ||
| main | | main | ||
− | | | + | | ○ |
| プラグインのメインクラス。 | | プラグインのメインクラス。 | ||
| <code>main: org.bukkit.plugin.MyPlugin</code> | | <code>main: org.bukkit.plugin.MyPlugin</code> | ||
99行目: | 100行目: | ||
|- | |- | ||
| database | | database | ||
− | | | + | | × |
| データベースを使用するかどうか。 | | データベースを使用するかどうか。 | ||
| <code>database: false</code> | | <code>database: false</code> | ||
| | | | ||
− | *プラグインがデータベースを使用する場合は、trueを指定してください。 | + | *プラグインがデータベースを使用する場合は、trueを指定してください。 See [[Plugin_Databases]] |
− | |||
− | |||
|- | |- | ||
| prefix | | prefix | ||
− | | | + | | × |
| ログの接頭辞 | | ログの接頭辞 | ||
| <code>prefix: ex-why-zee</code> | | <code>prefix: ex-why-zee</code> | ||
118行目: | 117行目: | ||
|- | |- | ||
| depend | | depend | ||
− | | | + | | × |
| 依存先プラグインの一覧。 | | 依存先プラグインの一覧。 | ||
| <code>depend: [OnePlugin, AnotherPlugin]</code> | | <code>depend: [OnePlugin, AnotherPlugin]</code> | ||
131行目: | 130行目: | ||
|- | |- | ||
| softdepend | | softdepend | ||
− | | | + | | × |
| 先に起動すべきプラグインの一覧。 | | 先に起動すべきプラグインの一覧。 | ||
| <code>softdepend: [OnePlugin, AnotherPlugin]</code> | | <code>softdepend: [OnePlugin, AnotherPlugin]</code> | ||
145行目: | 144行目: | ||
|- | |- | ||
| loadbefore | | loadbefore | ||
− | | | + | | × |
| 後に起動すべきプラグインの一覧。 | | 後に起動すべきプラグインの一覧。 | ||
| <code>loadbefore: [OnePlugin, AnotherPlugin]</code> | | <code>loadbefore: [OnePlugin, AnotherPlugin]</code> | ||
158行目: | 157行目: | ||
|- | |- | ||
| commands | | commands | ||
− | | | + | | × |
| プラグインのコマンド一覧。 | | プラグインのコマンド一覧。 | ||
| | | | ||
175行目: | 174行目: | ||
|- | |- | ||
| permissions | | permissions | ||
− | | | + | | × |
| プラグインの権限設定一覧。 | | プラグインの権限設定一覧。 | ||
| | | | ||
196行目: | 195行目: | ||
|- | |- | ||
| default-permission | | default-permission | ||
− | | | + | | × |
| デフォルト権限設定。 | | デフォルト権限設定。 | ||
| <code>default-permission: NOT_OP</code> | | <code>default-permission: NOT_OP</code> | ||
218行目: | 217行目: | ||
|- | |- | ||
| description | | description | ||
− | | | + | | × |
| コマンドの説明文。 | | コマンドの説明文。 | ||
| <code>description: Set yourself on fire</code> | | <code>description: Set yourself on fire</code> | ||
227行目: | 226行目: | ||
|- | |- | ||
| aliases | | aliases | ||
− | | | + | | × |
| 代替コマンド名。 | | 代替コマンド名。 | ||
| | | | ||
240行目: | 239行目: | ||
|- | |- | ||
| permission | | permission | ||
− | | | + | | × |
| コマンドのパーミッションノード | | コマンドのパーミッションノード | ||
| <code>permission: inferno.flagrate</code> | | <code>permission: inferno.flagrate</code> | ||
249行目: | 248行目: | ||
|- | |- | ||
| permission-message | | permission-message | ||
− | | | + | | × |
| 権限不足時に表示されるメッセージ | | 権限不足時に表示されるメッセージ | ||
| <code>permission-message: You do not have <permission>.</code> | | <code>permission-message: You do not have <permission>.</code> | ||
255行目: | 254行目: | ||
*コマンドを実行しようとした人が、"permission"設定の権限を持っていない場合に、表示されるメッセージです。 | *コマンドを実行しようとした人が、"permission"設定の権限を持っていない場合に、表示されるメッセージです。 | ||
*"<permission>" はマクロで、実際にメッセージが表示されるときに、該当のパーミッションノードに置き換えされます。 | *"<permission>" はマクロで、実際にメッセージが表示されるときに、該当のパーミッションノードに置き換えされます。 | ||
− | * | + | *からの文字列を指定する(<code>permission-message: ''</code>)ことで、本メッセージを非表示にすることが可能です。 |
|- | |- | ||
| usage | | usage | ||
− | | | + | | × |
| コマンドの使用方法説明文。 | | コマンドの使用方法説明文。 | ||
| <code>usage: Syntax error! Perhaps you meant /<command> PlayerName?</code> | | <code>usage: Syntax error! Perhaps you meant /<command> PlayerName?</code> | ||
| | | | ||
*このコマンドのCommandExecutorのonCommandメソッドがfalseを返すときに、表示されるメッセージです。 | *このコマンドのCommandExecutorのonCommandメソッドがfalseを返すときに、表示されるメッセージです。 | ||
− | *"<command>" | + | *"<command>" はマクロで、実際にメッセージが表示されるときに、指定されたコマンドラベルで置き換えされます。 |
− | * | + | *"Usage:" という文字列を使用したい場合(例 <code>usage: Usage: /god [player]</code>)(訳注:"usage:" がyamlのキー重複とみなされて正しく解析されません)、ダブルクオートで文字列を囲うようにしてください。<code>usage: "Usage: /god [player]"</code> |
|} | |} | ||
+ | |||
+ | |||
=== 権限のオプション設定 === | === 権限のオプション設定 === | ||
281行目: | 282行目: | ||
|- | |- | ||
| description | | description | ||
− | | | + | | × |
| 権限の説明文。 | | 権限の説明文。 | ||
| <pre>description: Allows you to set yourself on fire</pre> | | <pre>description: Allows you to set yourself on fire</pre> | ||
290行目: | 291行目: | ||
|- | |- | ||
| default | | default | ||
− | | | + | | × |
| 権限のデフォルト設定。 | | 権限のデフォルト設定。 | ||
| <pre>default: true</pre> | | <pre>default: true</pre> | ||
300行目: | 301行目: | ||
|- | |- | ||
| children | | children | ||
− | | | + | | × |
| 子権限の設定。 | | 子権限の設定。 | ||
| | | | ||
319行目: | 320行目: | ||
=== plugin.yml の記載例 === | === plugin.yml の記載例 === | ||
+ | 本ページの一番上でも説明したように、plugin.ymlで日本語を使用することは推奨されないため、この記載例の中のコメントは翻訳しておりません。ご了承ください。 | ||
<blockquote><source lang="yaml" style="border: 1px #aaa solid;"> | <blockquote><source lang="yaml" style="border: 1px #aaa solid;"> | ||
340行目: | 342行目: | ||
aliases: [combust_me, combustMe] | aliases: [combust_me, combustMe] | ||
permission: inferno.flagrate | permission: inferno.flagrate | ||
− | usage: Syntax error! Simply type / | + | usage: Syntax error! Simply type /<command> to ignite yourself. |
burningdeaths: | burningdeaths: | ||
description: List how many times you have died by fire. | description: List how many times you have died by fire. | ||
aliases: [burning_deaths, burningDeaths] | aliases: [burning_deaths, burningDeaths] | ||
permission: inferno.burningdeaths | permission: inferno.burningdeaths | ||
− | |||
usage: | | usage: | | ||
− | / | + | /<command> [player] |
− | Example: / | + | Example: /<command> - see how many times you have burned to death |
− | Example: / | + | Example: /<command> CaptainIce - see how many times CaptainIce has burned to death |
# The next command has no description, aliases, etc. defined, but is still valid | # The next command has no description, aliases, etc. defined, but is still valid | ||
# Having an empty declaration is useful for defining the description, permission, and messages from a configuration dynamically | # Having an empty declaration is useful for defining the description, permission, and messages from a configuration dynamically |