このページは、Bukkitプラグインを開発したい人、開発中の人に向けた開発支援情報を『個人的』に発信しているサイトです。
Bukkitの情報
プラグインの開発
Bukkitのプラグインは、BukkitのプラグインマネージャーにListenerインターフェースをインプリメントしたクラスを登録することで機能します。~
Bukkitからプラグインへの呼び出しはCIにより動的にロードされ呼び出されます。リスナーが該当するイベントを処理するメソッドを定義していない場合はBukkitはそのプラグインへのリスナーメソッドの呼び出しをおこないません。
Bukkitからプラグインへの呼び出しはCIにより動的にロードされ呼び出されます。リスナーが該当するイベントを処理するメソッドを定義していない場合はBukkitはそのプラグインへのリスナーメソッドの呼び出しをおこないません。
ビルド方法
mavenを使っているためコマンドの実行により簡単にコンパイル・ビルドを行う事ができます。
「mvn compile」でアーティファクトのコンパイルを行う事ができます。
「mvn package」でアーティファクトのビルドを行います。packageを指定した場合のビルドは、コンパイル・テスト・パッケージングまでを行います。
& mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Bukkit 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ BukkitStudyKit ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ BukkitStudyKit ---
[INFO] Compiling 2 source files to /home/atachimiko/bukkit/BukkitStudyKit/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.297s
[INFO] Finished at: Mon Feb 01 18:03:23 JST 2013
[INFO] Final Memory: 8M/21M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Bukkit 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ BukkitStudyKit ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ BukkitStudyKit ---
[INFO] Compiling 2 source files to /home/atachimiko/bukkit/BukkitStudyKit/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.297s
[INFO] Finished at: Mon Feb 01 18:03:23 JST 2013
[INFO] Final Memory: 8M/21M
[INFO] ------------------------------------------------------------------------
& mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building BukkitStudyKit 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ BukkitStudyKit ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ BukkitStudyKit ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ BukkitStudyKit ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/atachimiko/bukkit/BukkitStudyKit/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ BukkitStudyKit ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ BukkitStudyKit ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/atachimiko/bukkit/BukkitStudyKit/target/surefire-reports
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building BukkitStudyKit 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ BukkitStudyKit ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ BukkitStudyKit ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ BukkitStudyKit ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/atachimiko/bukkit/BukkitStudyKit/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ BukkitStudyKit ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ BukkitStudyKit ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/atachimiko/bukkit/BukkitStudyKit/target/surefire-reports
T E S T S
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ BukkitStudyKit ---
[INFO] Building jar: /home/atachimiko/bukkit/BukkitStudyKit/target/BukkitStudyKit-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.637s
[INFO] Finished at: Mon Feb 11 19:01:10 JST 2013
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ BukkitStudyKit ---
[INFO] Building jar: /home/atachimiko/bukkit/BukkitStudyKit/target/BukkitStudyKit-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.637s
[INFO] Finished at: Mon Feb 11 19:01:10 JST 2013
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------