MagicCobblestoneGenerator#
MagicCobblestoneGenerator は単調な黒曜石ジェネレーターを、設定可能なブロックの素晴らしい安定した供給源に変えます!
作成・メンテナンス: BONNe
Useful links
インストール#
- アドオンの jar を BentoBox プラグインの addons フォルダに配置します
- サーバーを再起動します
/[admincmd] generatorコマンドを実行してアドオンを設定します
設定#
デフォルトでは、アドオンは初回セットアップを簡単にするためにテンプレートファイルからすべてのデータをインポートしようとします。多くのアドオン設定は管理者 GUI で変更できますが、一部はできません。 最新の設定オプションと詳細な説明はこちらで確認できます。
テンプレートファイルは主にゲーム内編集 GUI を使いたくないユーザー向けです。ただし、テンプレートファイルは変更のたびに自動的にインポートされません。コマンドまたは管理者 GUI からインポートする必要があります。
テンプレートファイルの構造
# Start the listing of all generator tiers.
tiers:
# Unique Id for generator. Used in internal storage and accessing to each generator data.
generator_unique_id:
# Display name for users. Supports colour codes.
# Default value: generator_unique_id without _
name: "Something fancy"
# Description in lore message. Supports colour codes.
# Can be defined empty by replacing eveything with [].
# Default value: []
description: -|
First Line Of lore Message
&2Second Line Of lore Message
# Icon used in GUI's. Number at the end allows to specify stack size for item.
# Default value: Paper.
icon: "PAPER:1"
# Generator type: COBBLESTONE, STONE or BASALT. Self explanatory.
# Default value: COBBLESTONE
type: COBBLESTONE
# Indicates if genertor is default generator. Default generators ignores requirement section.
# It is activated for each new island. Can be only one per each generator type.
# Default value: false
default: false
# Users selects active generators.
# Priority indicates which generator will be used
# if multiple of them fulfills requirements.
# Default value: 1
priority: 1
# There are several requirements that can be defined here.
requirements:
# Can define minimal island level for generator to work. Required Level Addon.
# Default value: 0
island-level: 10
# List of required permissions for users to select this generator.
# Default value: []
required-permissions: []
# List of required biomes for generator to work.
# Empty means that there is no limitation in which biome generator works.
# Default value: [].
required-biomes: []
# Cost for purchasing this generator. Requires Vault and any economy plugin.
# Currently implemented by clicking on purchase icon in generator view GUI.
# Default value: 0
purchase-cost: 5.0
# Cost for activating current generator tier. Requires Vault and any economy plugin.
# Will be payed only on active switching between generators.
# Default value: 0.
activation-cost: 0.0
# Materials and their chances. Use actual blocks please.
# Chance supports any positive number, including double value.
# Everything in the end will be normalized.
# Default value: []
blocks:
FIRST_BLOCK_NAME_ID: NUMBER
SECOND_BLOCK_NAME_ID: NUMBER
# Treasure that has a chance to be dropped when block is generated.
# ONLY on generation, not on block break.
# Default value: []
treasure:
# Chance from 0 till 1. 0 - will not be possible to get a treasure.
# Default value: 0
chance: 0.001
# Materials that can be dropped. Applies to the same rules as block section.
# Default value: []
material:
FIRST_BLOCK_NAME_ID: NUMBER
SECOND_BLOCK_NAME_ID: NUMBER
# Maximal amount of items dropped.
# It will be from 1 till defined amount.
# Default value: 1
amount: 1
# Start the listing of all bundles
bundles:
# bundle_id
bundle_unique_id:
# Display name for users
name: "Something fancy"
# Description in lore message. Supports colour codes.
# Can be defined empty by replacing eveything with [].
# Default value: []
description: -|
First Line Of lore Message
&2Second Line Of lore Message
# Icon used in GUI's. Number at the end allows to specify stack size for item.
# Default value: Paper.
icon: "PAPER:1"
# List of generators that bundle will work have access.
generators:
- generator_id_1
- generator_id_2
コマンド#
ヒント
[player_command] と [admin_command] は実行中のゲームモードによって異なるコマンドです。 ゲームモードの config.yml ファイルにはこれらの値を変更するオプションがあります。 例えば BSkyBlock では、デフォルトの [player_command] は island、デフォルトの [admin_command] は bsbadmin です。 このアドオンではアドオンの config.yml でプレイヤーコマンドのエイリアスを変更できることに注意してください。
/[player_command] generator: ジェネレーター選択 GUI にアクセスします。/[player_command] generator view <generator>: 特定のジェネレーターの詳細ビューにアクセスします。/[player_command] generator activate <generator> [false]: 特定のジェネレーターを有効化(または無効化)します。/[player_command] generator buy <generator>: 特定のジェネレーターを購入します。
/[admin_command] generator: アドオン管理者 GUI にアクセスします/[admin_command] generator import: デフォルトのテンプレートファイル/plugins/BentoBox/addons/MagicCobblestoneGenerator/generatorTemplate.ymlをインポートします。/[admin_command] generator database import <file>: エクスポートされたデータベース<file>をインポートします。/[admin_command] generator database export <file>: データベースを/plugins/BentoBox/addons/MagicCobblestoneGenerator/フォルダ内の<file>にエクスポートします。/[admin_command] generator why <player>: 各プレイヤーのジェネレーターの問題を発見するためのデバッグコマンドです。
権限#
ヒント
[gamemode] は実行中のゲームモードによって異なるプレフィックスです。 プレフィックスはゲームモード名の小文字です。例えば BSkyBlock を使用している場合、プレフィックスは bskyblock です。 同様に AcidIsland を使用している場合、プレフィックスは acidisland です。
[gamemode].stone-generator- プレイヤーが '/[player_command] generator' コマンドとそのサブコマンドを使用できます。[gamemode].stone-generator.active-generators.3- アイランドオーナーが持てるアクティブなジェネレーターの最大数を設定します。3 は任意の正の整数に置き換えられます。これは例です。[gamemode].stone-generator.max-range.30- ジェネレーターが動作し続ける最大距離を設定します。30 は任意の正の整数に置き換えられます。これは例です。[gamemode].stone-generator.bundle.[bundle_id]- ユーザー所有アイランドで使用するバンドルを指定します。
[gamemode].admin.stone-generator- プレイヤーが '/[admin_command] generator' コマンドとそのサブコマンドを使用できます。[gamemode].admin.stone-generator.why- プレイヤーがデバッグコマンド '/[admin_command] why generator' を使用できます。 [gamemode].admin.stone-generator.database- プレイヤーが '/[admin_command] generator database' コマンドとそのサブコマンドを使用できます。
何か不足していますか?
このアドオンの addon.yml ファイルで権限の完全なリストを確認できます。
もし本当に不足しているものがあれば、お知らせください!
プレースホルダー#
Tip
[gamemode] is a prefix that differs depending on the gamemode you are running.
The prefix is the lowercased name of the gamemode, i.e. if you are using BSkyBlock, the prefix is bskyblock.
Properly translated placeholders for each gamemode can be found:
Please read the main Placeholders page.
| Placeholder | Description | MagicCobblestoneGenerator version |
|---|---|---|
%[gamemode]_magiccobblestonegenerator_active_generator_count% | Number of currently active generators on player island | 2.2.0 |
%[gamemode]_magiccobblestonegenerator_max_active_generator_count% | Number of maximal allowed active generators on player island | 2.2.0 |
%[gamemode]_magiccobblestonegenerator_active_generator_names% | List of active generator names separated with comma | 2.2.0 |
%[gamemode]_magiccobblestonegenerator_unlocked_generator_names% | List of unlocked generator names separated with comma | 2.2.0 |
%[gamemode]_magiccobblestonegenerator_purchased_generator_names% | List of purchased generator names separated with comma | 2.2.0 |
よくある質問#
機能 X を追加してもらえますか?
こちらのリストに追加してください。
新しいジェネレータートierを追加するにはどうすればいいですか?
現在、アドオンは新しいジェネレーターを追加する 3 つの方法をサポートしています:
/[admin] generatorコマンドで利用できるゲーム内 GUI を使用する。- テンプレートファイルにジェネレーターを追加する。
- エクスポートされたデータベースファイルにジェネレーターを追加する。
テンプレート/データベースファイルにジェネレーターを追加しましたが、ゲーム内に表示されません。
複数のゲームモードでの設定を容易にするため、ジェネレーターは内部データベースに保存されます。テンプレートまたはデータベースファイルを編集した後、それらをそのメモリにインポートする必要があります。管理者 GUI で Import Template または Import Database ボタンをクリックすることで実行できます。

管理者 GUI にジェネレーターが表示されますが、プレイヤーには見えません。
おそらく「デプロイ」ステータスが原因です。管理者がジェネレーターを追加している間にプレイヤーがアクティブ化しようとする問題を避けるため、ジェネレーターはデプロイされておらず誰も使用できません。管理者 GUI でジェネレーターを編集し、ジェネレーター編集 GUI のレバーをクリックすることで有効化できます。 
トレジャーとは何ですか?
トレジャーはブロック生成時にドロップされるものです。各ジェネレーターに追加のカスタマイズを与えることができます。
バンドルとは何ですか?
バンドルは各アイランドのエクスペリエンスをさらにカスタマイズできる機能です。バンドルがアイランドに割り当てられると、そのアイランドのプレイヤーはそのバンドルのジェネレーターのみ使用できます。
ジェネレーターの説明に必要な権限の表示を無効にできますか?
はい、アドオンは各ジェネレーターの表示に多くのカスタマイズオプションを提供しています。ロケールファイルにあります:
# Generator lore message generator. All elements in generator lore is generated
# based on section below.
generator:
# Main lore element content. If you do not want to display treasures at all,
# just remove them from [treasures] section.
# [description] comes from each generator tier.
# Lore does not supports colour codes. Each object separate supports.
lore: |-
[description]
[blocks]
[treasures]
[type]
[requirements]
[status]
# Generates [blocks] section
blocks:
# First line in blocks section. Empty line will not be displayed.
title: "&7&l Blocks:"
# Each block and its value under title. Cannot be empty.
# Supports [number], [#.#], [#.##], [#.###], [#.####], [#.#####]
value: "&8 [material] - [#.##]%"
# Generates [treasures] section
treasures:
# First line in blocks section. Empty line will not be displayed.
title: "&7&l Treasures:"
# Each treasure and its value under title. Cannot be empty.
# Supports [number], [#.#], [#.##], [#.###], [#.####], [#.#####]
value: "&8 [material] - [#.####]%"
# Generates [requirements] section
requirements:
# Allows to change order and content of requirements message.
description: |-
[biomes]
[level]
[missing-permissions]
# Generates [level] message.
level: "&c&l Required Level: &r&c [number]"
# Generates [missing-permission] message title.
permission-title: "&c&l Missing Permissions:"
# Generates [missing-permission] message values.
permission: "&c -[permission]"
# Generates [biomes] message title.
biome-title: "&7&l Operates in:"
# Generates [biomes] message values.
biome: "&8 [biome]"
# Generates [biomes] message for All Biomes.
any: "&7&l Operates in &e&o all &r&7&l biomes"
# Generates [status] section
status:
# Message that is showed for Locked generators.
locked: "&c Locked!"
# Message that is showed for generators that is not deployed.
undeployed: "&c Not Deployed!"
# Message that is showed for Active generators.
active: "&2 Active"
# Message that is showed for generators that required purchasing.
purchase-cost: "&e Purchase Cost: $[number]"
# Message that is showed for generators that has activation cost.
activation-cost: "&e Activation Cost: $[number]"
# Generates [type] section
type:
title: "&7&l Supports:"
cobblestone: "&8 Cobblestone Generators"
stone: "&8 Stone Generators"
basalt: "&8 Basalt Generators"
any: "&7&l Supports &e&o all &r&7&l generators"
翻訳#
翻訳の改善にご協力ください
BentoBoxとその拡張機能のほとんどの翻訳はAIの助けを借りて 生成されているため、作業の大部分はすでに完了しています — ただしAIは完璧ではありません。コミュニティに本当に必要なのは、 エラーの報告と修正です。
- 誤りや不自然な表現を見つけた場合は、 bentobox.world(GitHubオーガニゼーションへの ショートリンク)からissueまたはPRを開くか、 Discordでご連絡ください。
- 新しい言語を追加したい場合は、該当リポジトリの
src/main/resources/locales/に新しいロケールファイルを追加する PRを開くか、Discordでご相談ください。
| 言語 | 言語コード | 進捗 |
|---|---|---|
| 英語(アメリカ) | en-US | 100%(デフォルト) |
| ウクライナ語 | uk | 94% |
| スペイン語 | es | 92% |
| トルコ語 | tr | 94% |
| ドイツ語 | de | 94% |
| フランス語 | fr | 90% |
| ベトナム語 | vi | 94% |
| ポーランド語 | pl | 15% |
| ロシア語 | ru | 94% |
| 中国語(中国) | zh-CN | 90% |
| 中国語(台湾) | zh-TW | 90% |
API#
MagicCobblestoneGenerator 2.4.0 および BentoBox 1.17 以降、他のプラグインは MagicCobblestoneData アドオンのデータに直接アクセスできます。ただし、アドオンリクエストは依存関係を多くしたくないプラグインにとって依然として良い解決策です。
Maven 依存関係#
MagicCobblestoneGenerator は他のプラグイン向けの API を提供しています。これはバージョン 2.5.0 以降に対応しています。
注意
Maven POM.xml に MagicCobblestoneGenerator の依存関係を追加します:
<repositories>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.io/repository/bentoboxworld/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>magiccobblestonegenerator</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
最新の MagicCobblestoneGenerator バージョンを使用してください。
MagicCobblestoneGenerator の JavaDocs はこちらで確認できます。
イベント#
変数
String islandUUID- 対象アイランドの ID。UUID targetPlayer- ジェネレーターの有効化をトリガーしたプレイヤーの ID。String generator- 有効化されたジェネレーターの名前。String generatorID- 有効化されたジェネレーターの ID。boolean activate- ジェネレーターが有効化または無効化されたかを示すブール値。
コード例
@EventHandler(priority = EventPriority.LOW)
public void onGeneratorActivationChange(GeneratorActivationEvent event) {
UUID user = event.getTargetPlayer();
String island = event.getIslandUUID();
String generator = event.getGenerator();
String generatorID = event.getGeneratorID();
boolean activate = event.isActivate();
}
変数
String islandUUID- 対象アイランドの ID。UUID targetPlayer- ジェネレーターのアンロックをトリガーしたプレイヤーの ID。String generator- アンロックされたジェネレーターの名前。String generatorID- アンロックされたジェネレーターの ID。
コード例
@EventHandler(priority = EventPriority.LOW)
public void onGeneratorUnlock(GeneratorUnlockEvent event) {
UUID user = event.getTargetPlayer();
String island = event.getIslandUUID();
String generator = event.getGenerator();
String generatorID = event.getGeneratorID();
}
変数
String islandUUID- 対象アイランドの ID。UUID targetPlayer- ジェネレーターを購入したプレイヤーの ID。String generator- 購入されたジェネレーターの名前。String generatorID- 購入されたジェネレーターの ID。
コード例
@EventHandler(priority = EventPriority.LOW)
public void onGeneratorBuy(GeneratorBuyEvent event) {
UUID user = event.getTargetPlayer();
String island = event.getIslandUUID();
String generator = event.getGenerator();
String generatorID = event.getGeneratorID();
}
アドオンリクエストハンドラー#
BentoBox 1.17 まで、使用していたクラスローダーの問題により BentoBox 環境外からデータにアクセスする際に問題がありました。 そのため、データは他のアドオンからのみアクセス可能でした。しかし BentoBox が PlAddon 機能を実装したため、リクエストハンドラーはもはや必要ありません。
アドオンリクエストハンドラーの詳細はこちらを参照してください。
説明
プレイヤーのアクティブなジェネレーターの名前を返します。
バージョン 2.4.0 以降。
入力
world-name: String - ワールドの名前。player: String - プレイヤーの UUID。
出力
出力はアクティブなジェネレーターの名前を含む List<String> です。
失敗
world-name が指定されていないか存在しない場合、または player が指定されていない場合、このハンドラーは null を返します。
コード例
public List<String> getActiveGeneratorNames(String worldName, UUID playerUUID) {
return (List<String>) new AddonRequestBuilder()
.addon("MagicCobblestoneGenerator")
.label("active-generator-names")
.addMetaData("world-name", worldName)
.addMetaData("player", playerUUID)
.request();
}
説明
リクエストされたジェネレーターオブジェクトに保存された生データを返します。
バージョン 2.4.0 以降。
入力
generator: String - ジェネレーターの UUID。
出力
出力はジェネレーターの生データを含む Map<String, Object> です。
出力マップには以下が含まれます:
uniqueId: String - ジェネレーターの一意の ID。入力と同じ値になります。friendlyName: String - ジェネレーターの表示名(フォーマットなし)。description: List- ロアメッセージの文字列リスト(フォーマットなし)。 -
generatorType: String - ジェネレーターの種類。利用可能な種類:- COBBLESTONE
- STONE
- BASALT
- COBBLESTONE_OR_STONE
- BASALT_OR_COBBLESTONE
- BASALT_OR_STONE
- ANY
-
generatorIcon: ItemStack - ジェネレーターアイコンの ItemStack。 lockedIcon: ItemStack - ロックされたジェネレーターアイコンの ItemStack。defaultGenerator: boolean - ジェネレーターがデフォルトかどうかを示すブール値。priority: int - ジェネレーターの優先度の値。requiredMinIslandLevel: int - ジェネレーターが動作するための最小アイランドレベル。requiredBiomes: Set- ジェネレーターが動作するために必要なバイオームのセット。 requiredPermissions: Set- ジェネレーターを購入できるために必要な権限のセット。 generatorTierCost: double - ジェネレーターの価格。activationCost: double - ジェネレーターの有効化コスト。deployed: boolean - ジェネレーターがプレイヤーが利用可能かどうかを示すブール値。blockChanceMap: TreeMap- ブロックチャンスの生データを含むマップ。 treasureItemChanceMap: TreeMap- トレジャーチャンスの生データを含むマップ。 treasureChance: double - 生成されたブロックからトレジャーがドロップされる確率。maxTreasureAmount: int - 一度にドロップできるトレジャーの最大量。
失敗
generator が指定されていない場合は null を、generator が存在しない場合は空のマップを返します。
コード例
public Map<String, Object> getGeneratorData(String generatorId) {
return (List<String>) new AddonRequestBuilder()
.addon("MagicCobblestoneGenerator")
.label("generator-data")
.addMetaData("generator", generatorId)
.request();
}