DropRateController
Plugin to change item drop rate アイテムのドロップ率を変えるプラグイン
16
0
DropRateController
A Minecraft Spigot plugin that allows server administrators to control the drop rate of items from mobs and blocks.
Features
- Mob Drop Control: Control the drop rate of items when mobs are killed by players
- Block Drop Control: Control the drop rate of items when blocks are broken by players
- Configurable Drop Rate: Set drop rates from 0% to 100% via command or config file
- Permission-Based: Uses permissions to control who can use the plugin features
- Easy Configuration: Simple YAML configuration file
Requirements
- Minecraft Server: 1.13+ (Spigot/Paper)
- Java: 17 or higher
Installation
- Download the latest
DropRateController-1.0-shaded.jarfrom the releases - Place the JAR file in your server's
pluginsfolder - Restart your server or use
/reloadcommand - The plugin will create a
config.ymlfile in theplugins/DropRateControllerfolder
Configuration
The default configuration file (config.yml) looks like this:
dropRate: 1.0
messages:
usage: "Usage: /dropchance <get|set <value>>"
get: "Current drop rate: %.2f%%"
set: "Drop rate updated to %.2f%%"
invalid: "Invalid value. Please provide a number between 0 and 100."
range_error: "Please enter a number between 0 and 100."
no_permission: "You do not have permission to use this command."
Configuration Options
dropRate: The drop rate percentage (0.0 to 100.0). Default is 1.0%messages.*: Customizable messages for various plugin responses
Commands
/dropchance get
Displays the current drop rate percentage.
Permission: dropratecontroller.use
/dropchance set <value>
Sets the drop rate to the specified percentage (0-100).
Permission: dropratecontroller.use
Examples:
/dropchance set 50- Sets drop rate to 50%/dropchance set 0.5- Sets drop rate to 0.5%
Permissions
| Permission | Description | Default |
|---|---|---|
dropratecontroller.use | Allows access to the dropchance command | op |
How It Works
- Mob Drops: When a player kills a mob, the plugin checks if the drop condition is met based on the configured drop rate. If not met, all drops are cleared.
- Block Drops: When a player breaks a block (with permission), the plugin controls whether items drop based on the configured drop rate.
Building from Source
- Clone this repository
- Make sure you have Maven installed
- Run
mvn clean package - The compiled JAR will be in the
targetfolder
License
This project is open source. Please check the license file for more details.
Author
koirdsuzu
DropRateController
Mobやブロックからアイテムがドロップする確率を制御できるMinecraft Spigotプラグインです。
機能
- Mobドロップ制御: プレイヤーがMobを倒した際のアイテムドロップ率を制御
- ブロックドロップ制御: プレイヤーがブロックを破壊した際のアイテムドロップ率を制御
- 設定可能なドロップ率: コマンドまたは設定ファイルで0%から100%のドロップ率を設定可能
- 権限ベース: プラグイン機能の使用を権限で制御
- 簡単な設定: シンプルなYAML設定ファイル
必要要件
- Minecraftサーバー: 1.13以上 (Spigot/Paper)
- Java: 17以上
インストール
- 最新の
DropRateController-1.0-shaded.jarをリリースからダウンロード - JARファイルをサーバーの
pluginsフォルダに配置 - サーバーを再起動するか
/reloadコマンドを使用 - プラグインは
plugins/DropRateControllerフォルダにconfig.ymlファイルを作成します
設定
デフォルトの設定ファイル (config.yml) は以下のようになっています:
dropRate: 1.0
messages:
usage: "Usage: /dropchance <get|set <value>>"
get: "Current drop rate: %.2f%%"
set: "Drop rate updated to %.2f%%"
invalid: "Invalid value. Please provide a number between 0 and 100."
range_error: "Please enter a number between 0 and 100."
no_permission: "You do not have permission to use this command."
設定オプション
dropRate: ドロップ率のパーセンテージ (0.0 から 100.0)。デフォルトは 1.0%messages.*: 各種プラグイン応答のカスタマイズ可能なメッセージ
コマンド
/dropchance get
現在のドロップ率を表示します。
権限: dropratecontroller.use
/dropchance set <value>
ドロップ率を指定したパーセンテージ (0-100) に設定します。
権限: dropratecontroller.use
例:
/dropchance set 50- ドロップ率を50%に設定/dropchance set 0.5- ドロップ率を0.5%に設定
権限
| 権限 | 説明 | デフォルト |
|---|---|---|
dropratecontroller.use | dropchanceコマンドへのアクセスを許可 | op |
動作の仕組み
- Mobドロップ: プレイヤーがMobを倒した際、プラグインは設定されたドロップ率に基づいてドロップ条件が満たされているかチェックします。条件が満たされない場合、すべてのドロップがクリアされます。
- ブロックドロップ: プレイヤーがブロックを破壊した際(権限がある場合)、プラグインは設定されたドロップ率に基づいてアイテムがドロップするかどうかを制御します。
ソースからビルド
- このリポジトリをクローン
- Mavenがインストールされていることを確認
mvn clean packageを実行- コンパイルされたJARは
targetフォルダにあります
ライセンス
このプロジェクトはオープンソースです。詳細についてはライセンスファイルを確認してください。
作者
koirdsuzu
Совместимость
Создатели
Детали
Лицензия:MIT
Опубликован:8 месяцев назад
Обновлён:8 месяцев назад
