私はいくつかの基本的な Bukkit プラグインをテストしているだけで、テストできるようにそれらを機能させようとしています。プラグインで同じエラーが発生し続けます ( Bukkit wikiから実際にコピーしました)
エラーメッセージは次のとおりです。
15:25:18 [INFO] Starting minecraft server version 1.6.2
15:25:18 [INFO] Loading properties
15:25:18 [INFO] Default game type: SURVIVAL
15:25:18 [INFO] Generating keypair
15:25:18 [INFO] Starting Minecraft server on *:25565
15:25:19 [INFO] This server is running CraftBukkit version git-Bukkit-1.6.2-R1.0
-b2879jnks (MC: 1.6.2) (Implementing API version 1.6.2-R1.0)
15:25:19 [SEVERE] Could not load 'plugins\Test-Plugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
inLoader.java:257)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:132)
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugins(CraftServer.ja
va:239)
at org.bukkit.craftbukkit.v1_6_R2.CraftServer.<init>(CraftServer.java:21
7)
at net.minecraft.server.v1_6_R2.PlayerList.<init>(PlayerList.java:56)
at net.minecraft.server.v1_6_R2.DedicatedPlayerList.<init>(SourceFile:11
)
at net.minecraft.server.v1_6_R2.DedicatedServer.init(DedicatedServer.jav
a:106)
at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java
:391)
at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:5
82)
Caused by: while scanning for the next token
found character '\t' that cannot start any token
in "<reader>", line 7, column 1:
usage: /ignite [player]
^
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
va:358)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:17
9)
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(Par
serImpl.java:563)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
:230)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
:237)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
:237)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
3)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
tructor.java:121)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:411)
at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.
java:188)
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
inLoader.java:252)
... 8 more
現在、私がやろうとしているのは、このプラグインをサーバーにロードすることだけです。ここでの主なエラーはInvalid plugin.yml
. 私の plugin.yml ファイルは次のとおりです。
name: Test
main: com.hasherr.bukkit.test.Main
version: 1.0
commands:
ignite:
description: Sets the designated player on fire.
usage: /ignite [player]
permissions: Test.ignite
permission-message: You can't use that command.
プラグインの実際のコードは次のとおりです。
public final class Main extends JavaPlugin
{
@Override
public void onEnable()
{
getLogger().info("Test plugin has been enabled.");
}
@Override
public void onDisable()
{
getLogger().info("Test plugin has been disabled.");
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
// Uses equalsIgnoreCase() over equals() to accept "ignite" and "IgNiTe."
if (cmd.getName().equalsIgnoreCase("ignite")) {
// Make sure that the player specified exactly one argument (the name of the player to ignite).
if (args.length != 1) {
// When onCommand() returns false, the help message associated with that command is displayed.
return false;
}
// Make sure the sender is a player.
if (!(sender instanceof Player)) {
sender.sendMessage("Only players can set other players on fire.");
sender.sendMessage("This is an arbitrary requirement for demonstration purposes only.");
return true;
}
// Get the player who should be set on fire. Remember that indecies start with 0, not 1.
Player target = Bukkit.getServer().getPlayer(args[0]);
// Make sure the player is online.
if (target == null) {
sender.sendMessage(args[0] + " is not currently online.");
return true;
}
// Sets the player on fire for 1,000 ticks (there are ~20 ticks in second, so 50 seconds total).
target.setFireTicks(1000);
return true;
}
return false;
}
}
Invalid plugin.yml
プラグインの実行を許可しないというメッセージが表示される理由を教えてください。詳細/情報が必要な場合はお知らせください。編集させていただきます。