
GunPlugin - 枪械插件
一个功能丰富的Minecraft枪械插件,支持多种枪械类型、自定义配置、真实弹道系统和完整的射击体验。
A feature-rich Minecraft gun plugin with multiple weapon types, custom configuration, realistic ballistics system, and complete shooting experience.
📋 目录 / Table of Contents
- 功能特性 / Features
- 安装指南 / Installation
- 配置说明 / Configuration
- 命令列表 / Commands
- 权限系统 / Permissions
- 枪械目录 / Weapon catalog
- 自定义枪械 / Custom Weapons
- 更新日志 / Changelog
- 常见问题 / FAQ
- 技术支持 / Support
🚀 功能特性 / Features
核心功能 / Core Features
- 多种枪械类型 / Multiple Weapon Types: 手枪、步枪、霰弹枪、狙击枪
- 真实弹道系统 / Realistic Ballistics: 子弹速度、重力下坠、穿透效果
- 弹药管理系统 / Ammunition System: 弹匣容量、换弹机制、弹药显示
- 射击模式 / Firing Modes: 单发、连发、霰弹枪多发
- 后坐力系统 / Recoil System: 视觉反馈和粒子效果
- 爆头检测 / Headshot Detection: 30%额外伤害
- 血雾效果 / Blood Effects: 击中实体的粒子效果
高级功能 / Advanced Features
- 自定义枪械 / Custom Weapons: 通过配置文件创建自定义枪械
- 子弹散步 / Bullet Spread: 移动时增加散步,鼓励静止射击
- 音效系统 / Sound System: 多层次延迟音效,增强沉浸感
- 交互禁用 / Interaction Disable: 持枪时禁用左键攻击和右键交互
- 自动射击 / Auto Fire: 按住右键连续射击,松开停止
- 手动换弹 / Manual Reload: F键手动换弹功能
📦 安装指南 / Installation
系统要求 / Requirements
- Minecraft版本 / Minecraft Version: 1.21.4
- 服务器类型 / Server Type: Spigot/Paper
- Java版本 / Java Version: 8 或更高版本 / 8 or higher
- 内存要求 / Memory: 建议2GB以上 / Recommended 2GB+
安装步骤 / Installation Steps
下载插件 / Download Plugin
# 将GunPlugin.jar放入服务器的plugins文件夹 # Place GunPlugin.jar in your server's plugins folder启动服务器 / Start Server
# 重启服务器以加载插件 # Restart your server to load the plugin配置插件 / Configure Plugin
# 编辑plugins/GunPlugin/config.yml文件 # Edit plugins/GunPlugin/config.yml file设置权限 / Set Permissions
# 给玩家gunplugin.use权限 # Give players gunplugin.use permission
⚙️ 配置说明 / Configuration
配置文件分工 / Config File Roles
| 文件 / File | 路径 / Path | 作用 / Purpose |
|---|---|---|
| guns.yml | plugins/GunPlugin/guns.yml |
枪械目录:每把枪的完整定义(伤害、rate、弹匣、换弹、sounds、recoil、category/behavior 等)。根键名即枪械 ID。 |
| config.yml | plugins/GunPlugin/config.yml |
插件与商店:settings、购买与经济 buy_system、default_guns 单枪覆盖、配件价格等。 |
修改 guns.yml 或 config.yml 后请执行 /gun reload(需权限)或重启服务端。
基础配置示例 / Basic config.yml excerpt
settings:
disable_left_click: true
disable_right_click_interaction: true
debug_mode: false
# 可选:按枪械 ID 覆盖部分属性(材质、名称、射速等),详见 config 内注释
# default_guns:
# ak74:
# fire_rate: 580 # RPM;≤4 的小数可按「秒/发」解析(见配置注释)
枪械本体 不在 config.yml 的 guns: 下列出(旧版示例已废弃);请使用 guns.yml。
📝 命令列表 / Commands
以下为 GunCommand 实际注册的子命令(见源码);整条 /gun … 在执行器中统一校验 gunplugin.admin,控制台给予弹药需使用该权限。
基础命令 / Basic Commands
| 命令 / Command | 描述 / Description |
|---|---|
/gun give <目标> <guns.yml 枪械 ID | 弹药 | 投掷物> [数量] |
给予枪械 / 弹药 / 投掷物(枪械 ID 与 guns.yml 根键一致;别名如 pistol→p250 见帮助) |
/gun ammo |
主手持枪:查看当前弹药 |
/gun ammo reload |
主手持枪:执行换弹 |
/gun reload |
重载插件配置与 guns.yml(不是游戏内换弹) |
/gun help |
显示帮助 |
/gun lang | /gun lang <代码> |
查看或切换语言(可用代码见语言管理器) |
/gun modify | /gun mod |
主手持枪:打开 配件改装 GUI |
/gun buy |
打开购买 GUI(需在 config 中启用购买系统) |
命令示例 / Command Examples
/gun give @p ak74
/gun give @p 9mm 64
/gun give PlayerName grenade 5
/gun ammo
/gun ammo reload
/gun reload
/gun modify
/gun buy
🔐 权限系统 / Permissions
plugin.yml 中仅声明:
| 权限 / Permission | 描述 / Description | 默认 / Default |
|---|---|---|
gunplugin.use |
在游戏内使用枪械(射击、开镜、交互等) | true |
gunplugin.admin |
使用 /gun 全部子命令(默认 OP) |
op |
权限配置示例 / Permission Configuration Example
groups:
default:
permissions:
- gunplugin.use
admin:
permissions:
- gunplugin.admin
- gunplugin.use
🔫 枪械目录 / Weapon catalog
默认及自定义枪械均由 plugins/GunPlugin/guns.yml 定义(根键即枪械 ID)。数值、别名与列表说明见该文件及仓库 CHANGELOG_5.0.0.md,此处不再维护易过期的静态枪械表。
🛠️ 自定义枪械 / Custom Weapons
当前版本枪械 完全由 guns.yml 数据驱动:复制任意现有枪械条目,修改 根键名(=枪械 ID,建议小写)并按需改字段即可新增一枪。
步骤 / Steps
编辑
plugins/GunPlugin/guns.yml- 根键:枪械 ID,用于
/gun give <id>、商店、物品 PDCgun_catalog_id。 - 必填字段(缺一不可):
material、display_name、damage、rate(RPM)、magazine、reload_duration(或reload_speed)、fly_speed、bullet_drop、penetration、movement_spread、ammo、is_automatic、is_shotgun、is_sniper、category、reload_mode、bolt_after_shot、attachments、sounds(含fire/reload/bolt,可为[])、recoil。 - 可选:
behavior(pistol/rifle/…);不写则按category推断。 rate:每分钟发数 RPM;射击间隔(秒) ≈60 / rate。recoil:style: normal(参数式)或style: pattern+points列表(每项[水平, 垂直])。- 文件顶部有 中英文注释,逐项说明各键含义。
- 根键:枪械 ID,用于
(可选)覆盖而不改 guns.yml
在config.yml的default_guns.<枪械ID>下可覆盖材质、显示名、弹匣、fire_rate、射击音效、弹药类型、is_automatic等(详见该文件内注释)。重载
/gun reload发放
/gun give <枪械ID>
注意事项 / Notes
- 同材质多枪:若多把枪共用同一
material,仅靠材质无法区分;请使用插件发放的枪(带 PDC 目录 ID),或为不同枪指定 不同材质。 - 购买价格:在
config.yml的购买相关节配置,不在guns.yml。 - 更细的字段表与音效格式说明见
guns.yml文件头 与仓库内CHANGELOG_5.0.0.md。
极简骨架示例 / Minimal skeleton(省略音效与后坐力细节时请直接复制完整条目改 ID)
# 建议复制 aa12 / ak74 等完整条目后改名修改,下列仅为结构提示
my_custom_rifle:
material: IRON_HORSE_ARMOR
display_name: "自定义步枪"
magazine: 30
damage: 5.0
rate: 600 # RPM
fly_speed: 100
bullet_drop: 0.05
reload_duration: 2.5
penetration: 1
movement_spread: 0.5
ammo: 762
is_automatic: true
is_shotgun: false
is_sniper: false
category: rifle
reload_mode: magazine
bolt_after_shot: false
attachments: []
sounds: { fire: [...], reload: [...], bolt: [] }
recoil: { style: normal, ... }
📊 更新日志 / Changelog
详见插件根目录 CHANGELOG.md(中文累计日志)、CHANGELOG_EN.md(英文)及 CHANGELOG_5.0.0.md(5.0.0 摘要)。
❓ 常见问题 / FAQ
Q: 如何获得枪械? / How to get weapons?
A: 使用命令 /gun give <枪械类型> 或通过配置文件自定义 / Use command /gun give <weapon_type> or customize via config file
Q: 为什么子弹没有伤害? / Why bullets don't deal damage?
A: 检查玩家权限和插件配置,确保子弹更新任务正常运行 / Check player permissions and plugin configuration, ensure bullet update task is running
Q: 如何自定义枪械? / How to customize weapons?
A: 在 plugins/GunPlugin/guns.yml 中新增或复制枪械条目(根键即枪械 ID),必要时用 config.yml 的 default_guns 做覆盖;执行 /gun reload。详见上文 自定义枪械。 / Edit plugins/GunPlugin/guns.yml (root key = gun id); optionally override via default_guns in config.yml; run /gun reload. See Custom Weapons.
Q: 支持哪些Minecraft版本? / Which Minecraft versions are supported?
A: 目前支持Minecraft 1.21.x / Currently supports Minecraft 1.21.x
Q: 如何调整子弹散步? / How to adjust bullet spread?
A: 在 guns.yml 中调整 movement_spread 及 recoil 相关参数 / Tune movement_spread and recoil in guns.yml
🆘 技术支持 / Support
欢迎通过 plugin.yml 中的 website(Modrinth 等发布页)反馈问题。
许可证 / License
若仓库内附有许可证文件则以该文件为准;否则请以插件发布页的授权说明为准。
享受射击的乐趣! / Enjoy the shooting experience! 🎯
Ченджлог
5.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 11 мая 2026 г.
GunPlugin 5.0.0 更新日志 / Release Notes
发布日期 / Release date: 2026-05-11
1. 多语言支持 / Multi-Language Support
中文
- 扩充语言资源文件(
messages/*.yml):商店、配件、命令提示、物品 Lore、调试与日志字符串等与模板键对齐。 - 多套语种并行维护(含简体 / 英文 / 日文 / 韩文 / 繁体中文等);缺失键回退默认语言。
- 统一射速等单位在各语言下的表述(如 RPM)。
English
- Expanded locale packs (
messages/*.yml): shop, attachments, commands, item lore, debug/log strings aligned with keys. - Multiple locales shipped (e.g. zh_CN, en_US, ja_JP, ko_KR, zh_TW); missing keys fall back to default.
- Consistent fire-rate labeling (e.g. RPM) across languages.
2. 配置文件大改与自定义枪械 / Configuration Overhaul & Custom Guns
中文
- guns.yml:枪械完全由数据驱动(伤害、
rate(RPM)、弹匣、换弹、sounds、recoil、behavior/category等),新增枪械仅需添加条目并重载。 - config.yml:
default_guns按枪械 ID 覆盖部分字段;购买与经济选项集中于配置。 - guns.yml 文件头提供中英文配置说明与必填项列表。
English
- guns.yml: Fully data-driven guns (damage, RPM
rate, magazine, reload,sounds,recoil,behavior/category, etc.); add entries and reload. - config.yml: Per-gun overrides via
default_guns.<id>; economy/buy settings in config. - Bilingual header docs in
guns.ymlfor required keys and sections.
3. 后坐力调整 / Recoil Tuning
中文
- recoil:
normal参数式与pattern点列式;points为按发序循环的[水平, 垂直]。 - 区分 movement_spread(移动散布)与 recoil 内 horizontal_spread / vertical_spread(后坐视角散布)。
English
- recoil:
normalvspattern;pointsare cyclic[h, v]pairs per shot. - Clear separation between movement_spread and recoil spread fields.
4. 持枪移速 / Hold Move Speed
中文
- 持枪减速改为 直接调整行走速度(
setWalkSpeed),以进入持枪前速度为基准按倍率计算;开镜、射击/换弹惩罚为额外乘数,不再使用缓慢药水。 - guns.yml 新增
hold_move_speed(可选,默认0.88,取值(0,1]);机枪negev示例为0.62(移动更慢)。
English
- Gun-hold slowdown uses
Player#setWalkSpeedfrom a baseline captured before aiming; scoped / shoot-reload penalties multiply it—no Slowness potions. - guns.yml adds
hold_move_speed(optional, default0.88, range(0,1]); sample LMGnegevuses0.62.
5. 修复已知问题 / Bug Fixes & Improvements
中文
- 全自动射速:按 RPM 使用固定 tick 周期连发并首发即时射击,缓解实际射速低于配置的问题。
default_guns.fire_rate:合并进枪械解析,与 Lore 与实战一致。- 文案:修正部分语言下 Lore 将 RPM 显示为「秒」等问题。
English
- Full-auto cadence: Tick-based scheduling from RPM plus immediate first shot; reduces undershoot vs configured RPM.
default_guns.fire_rate: Applied in resolved gun stats (matches lore and gameplay).- UI copy: Fixed RPM vs seconds in some locales.
4.0.0Релиз1.21.9, 1.21.10, 1.21.11 · 25 декабря 2025 г.
Gun Plugin Changelog Gun 插件变更日志
[4.0.0]
I forgot what I updated🤔 我忘记更新了什么🤔……
3.0.1Релиз1.21.8, 1.21.9, 1.21.10 · 24 ноября 2025 г.
Gun Plugin Changelog Gun 插件变更日志
[3.0.1]
Fixed the bug of material conflict between .50mm ammunition and the firearm "USP" 修复了.50mm弹药和枪械“USP”材质冲突的问题
3.0.0Альфа1.21.8, 1.21.9, 1.21.10 · 9 ноября 2025 г.
GunPlugin 3.0.0 更新日志 / Changelog
中文 / Chinese | English
🎯 重大更新 / Major Updates
全面多语言适配 / Complete Multi-Language Support
中文
完整的多语言支持
- 所有GUI界面完全适配中英文
- 配件系统界面完全本地化
- 购买页面所有内容支持多语言
- 配件槽位名称、配件名称、描述完全本地化
- 修复了语言键缺失导致的警告问题
本地化改进
- 配件改装GUI完全支持多语言切换
- 配件槽位选择界面支持多语言
- 配件效果描述支持多语言
- 所有错误消息和提示信息完全本地化
English
Complete Multi-Language Support
- All GUI interfaces fully support Chinese and English
- Attachment system interface fully localized
- All content in the purchase page supports multiple languages
- Attachment slot names, attachment names, and descriptions fully localized
- Fixed language key missing warnings
Localization Improvements
- Attachment modification GUI fully supports language switching
- Attachment slot selection interface supports multiple languages
- Attachment effect descriptions support multiple languages
- All error messages and prompts fully localized
配件系统全面重构 / Complete Attachment System Overhaul
中文
移除旧升级系统,引入全新配件系统
- 删除了原有的枪械升级系统(弹容量、射速、换弹时间等升级)
- 全新的配件改装系统,更加灵活和真实
配件系统核心特点
5个配件槽位:枪口、枪托、弹匣、侧导轨、下导轨
配件类型丰富:
- 消音器(一级/二级):降低枪声,减少后坐力
- 补偿器(一级/二级):减少后坐力
- 扩容弹匣(一级/二级):增加弹匣容量,提升换弹速度
- 镭指:减少子弹散步
- 垂直握把:减少后坐力
- 枪托(一级/二级):减少后坐力
- 托腮板:减少10%后坐力(适用于霰弹枪、狙击枪、狙击步枪)
配件效果叠加:
- 弹匣容量加成:最高可增加40%
- 换弹速度加成:最高可增加15%
- 枪声减少:最高可降低85%
- 后坐力减少:多种配件可叠加,最高可减少30%+
- 子弹散步减少:最高可减少20%
智能槽位系统:
- 不同枪械类型支持不同的配件槽位组合
- 步枪、Vector、狙击步枪:支持全部5个槽位
- 手枪(P250、沙漠之鹰、USP、AA12):支持弹匣、枪口、下导轨、枪托
- CZ75:支持弹匣、枪口、下导轨
- S686:仅支持枪托
- 狙击枪:支持枪口、枪托
- PP19:仅支持枪口
- 机枪:支持弹匣、枪口
配件兼容性系统:
- 狙击步枪(MK14、SKS)支持步枪配件和狙击枪配件
- 机枪(NEGEV)和AA12支持步枪弹匣
- 托腮板适用于霰弹枪、狙击枪、狙击步枪
- 智能配件分类:步枪配件、冲锋枪配件、霰弹枪配件、手枪配件、狙击枪配件
配件GUI系统:
- 直观的配件改装界面
- 主界面显示所有可用槽位
- 槽位页面显示已安装配件和可用配件
- 配件效果实时显示
- 支持配件安装和卸载
- 配件数据持久化保存
English
Removed Old Upgrade System, Introduced New Attachment System
- Removed the old gun upgrade system (magazine size, fire rate, reload time upgrades)
- Brand new attachment modification system, more flexible and realistic
Attachment System Core Features
5 Attachment Slots: Muzzle, Stock, Magazine, Side Rail, Under Rail
Rich Attachment Types:
- Silencers (Level 1/2): Reduce sound, reduce recoil
- Compensators (Level 1/2): Reduce recoil
- Extended Magazines (Level 1/2): Increase magazine capacity, improve reload speed
- Laser Sights: Reduce bullet spread
- Vertical Grips: Reduce recoil
- Stocks (Level 1/2): Reduce recoil
- Cheek Pads: Reduce 10% recoil (for shotguns, sniper rifles, and DMRs)
Attachment Effect Stacking:
- Magazine Capacity Bonus: Up to 40% increase
- Reload Speed Bonus: Up to 15% increase
- Sound Reduction: Up to 85% reduction
- Recoil Reduction: Multiple attachments can stack, up to 30%+ reduction
- Bullet Spread Reduction: Up to 20% reduction
Smart Slot System:
- Different gun types support different attachment slot combinations
- Rifles, Vector, DMRs: Support all 5 slots
- Pistols (P250, Desert Eagle, USP, AA12): Support Magazine, Muzzle, Under Rail, Stock
- CZ75: Support Magazine, Muzzle, Under Rail
- S686: Only supports Stock
- Sniper Rifles: Support Muzzle, Stock
- PP19: Only supports Muzzle
- LMG: Support Magazine, Muzzle
Attachment Compatibility System:
- DMRs (MK14, SKS) support rifle attachments and sniper attachments
- LMG (NEGEV) and AA12 support rifle magazines
- Cheek pads work with shotguns, sniper rifles, and DMRs
- Smart attachment categories: Rifle, SMG, Shotgun, Pistol, Sniper attachments
Attachment GUI System:
- Intuitive attachment modification interface
- Main interface shows all available slots
- Slot page shows installed and available attachments
- Real-time attachment effect display
- Support for attachment installation and removal
- Attachment data persistence
新增枪械 / New Gun
中文
USP手枪
- 射速:352 RPM(半自动)
- 弹容量:12发
- 伤害:6.7
- 子弹速度:134米/秒
- 换弹时间:2.2秒
- 散步:小
- 材质:粉红色染料
- 价格:1200金币
- 支持配件:弹匣、枪口、下导轨、枪托
新增弹药类型
- .45口径弹药
- 适用于USP手枪
- 材质:下界砖
- 价格:4320金币/组
English
USP Pistol
- Fire Rate: 352 RPM (Semi-automatic)
- Magazine: 12 rounds
- Damage: 6.7
- Bullet Speed: 134 m/s
- Reload Time: 2.2 seconds
- Spread: Small
- Material: Pink Dye
- Price: 1200 coins
- Supported Attachments: Magazine, Muzzle, Under Rail, Stock
New Ammo Type
- .45 Caliber Ammo
- For USP pistol
- Material: Nether Brick
- Price: 4320 coins/stack
音效系统增强 / Enhanced Sound System
中文
丰富的开枪音效
- AK74:
entity.zombie.break_wooden_door+block.comparator.click - HK416:
entity.zombie.attack_wooden_door+entity.zombie.attack_iron_door - AA12:
block.lever.click+entity.zombie.attack_wooden_door - S686:
entity.generic.explode+entity.zombie.attack_wooden_door+block.lever.click - PP19:
entity.zombie.attack_iron_door+block.comparator.click+item.trident.throw - Vector:
item.wolf_armor.damage+entity.zombie.attack_wooden_door - CZ75:
entity.zombie.attack_wooden_door+item.trident.throw - P250:
item.trident.throw+block.comparator.click - AUG:
item.trident.throw+entity.zombie.attack_wooden_door - NEGEV:
entity.dolphin.attack+entity.zombie.attack_iron_door - SKS:自定义音效组合
- 狙击枪(AWM、KAR98K):
entity.generic.explode+entity.warden.sonic_boom,发射后0.7秒播放三次item.armor.unequip_wolf
- AK74:
消音器音效
- 当枪械装配消音器时,开枪音效自动切换为
item.wolf_armor.damage - 支持所有可安装消音器的枪械
- 当枪械装配消音器时,开枪音效自动切换为
English
Rich Shooting Sound Effects
- AK74:
entity.zombie.break_wooden_door+block.comparator.click - HK416:
entity.zombie.attack_wooden_door+entity.zombie.attack_iron_door - AA12:
block.lever.click+entity.zombie.attack_wooden_door - S686:
entity.generic.explode+entity.zombie.attack_wooden_door+block.lever.click - PP19:
entity.zombie.attack_iron_door+block.comparator.click+item.trident.throw - Vector:
item.wolf_armor.damage+entity.zombie.attack_wooden_door - CZ75:
entity.zombie.attack_wooden_door+item.trident.throw - P250:
item.trident.throw+block.comparator.click - AUG:
item.trident.throw+entity.zombie.attack_wooden_door - NEGEV:
entity.dolphin.attack+entity.zombie.attack_iron_door - SKS: Custom sound combination
- Sniper Rifles (AWM, KAR98K):
entity.generic.explode+entity.warden.sonic_boom, plays threeitem.armor.unequip_wolfsounds after 0.7 seconds
- AK74:
Silencer Sound Effects
- When a gun is equipped with a silencer, shooting sound automatically switches to
item.wolf_armor.damage - Supports all guns that can install silencers
- When a gun is equipped with a silencer, shooting sound automatically switches to
枪械数值调整 / Gun Value Adjustments
中文
射速系统重构
- 射速单位从"射击间隔(秒)"改为"RPM(每分钟发射数)"
- 更直观的射速显示
- 精确的射速控制,支持快速射击(fireRate < 0.1)
射速调整
- P250:400 RPM
- TEC9:500 RPM
- CZ75:600 RPM
- 沙漠之鹰:277 RPM(4.6发/秒)
- AK74:600 RPM
- AUG:630 RPM
- PP19:630 RPM
- Vector:1000 RPM
- NEGEV:583 RPM
- MK14:550 RPM
- SKS:600 RPM
- HK416:620 RPM
- AA12:462 RPM
- S686:600 RPM
English
Fire Rate System Overhaul
- Fire rate unit changed from "Shooting Interval (seconds)" to "RPM (Rounds Per Minute)"
- More intuitive fire rate display
- Precise fire rate control, supports fast shooting (fireRate < 0.1)
Fire Rate Adjustments
- P250: 400 RPM
- TEC9: 500 RPM
- CZ75: 600 RPM
- Desert Eagle: 277 RPM (4.6 rounds/second)
- AK74: 600 RPM
- AUG: 630 RPM
- PP19: 630 RPM
- Vector: 1000 RPM
- NEGEV: 583 RPM
- MK14: 550 RPM
- SKS: 600 RPM
- HK416: 620 RPM
- AA12: 462 RPM
- S686: 600 RPM
🔧 功能改进 / Feature Improvements
半自动射击模式优化 / Semi-Automatic Firing Mode Optimization
中文
- 重写半自动射击逻辑
- 按下右键发射一颗子弹
- 必须释放右键后再次按下才能发射下一发
- 更真实的半自动射击体验
- 修复了连续点击无法发射的问题
English
- Rewritten Semi-Automatic Firing Logic
- Press right-click to fire one bullet
- Must release right-click and press again to fire the next shot
- More realistic semi-automatic firing experience
- Fixed issue where continuous clicking couldn't fire
配件系统优化 / Attachment System Optimization
中文
配件GUI锁定
- 配件GUI中的物品完全锁定,无法拖拽
- 防止误操作导致配件丢失
- 返回按钮和关闭按钮正常工作
配件兼容性优化
- 智能配件兼容性检查
- 支持跨类型配件使用(如狙击步枪使用步枪配件)
- 配件效果正确叠加
English
Attachment GUI Locking
- Items in attachment GUI are completely locked, cannot be dragged
- Prevents accidental loss of attachments
- Back button and close button work correctly
Attachment Compatibility Optimization
- Smart attachment compatibility checking
- Supports cross-type attachment usage (e.g., DMRs using rifle attachments)
- Attachment effects correctly stack
🐛 错误修复 / Bug Fixes
配件系统修复 / Attachment System Fixes
中文
- 修复了配件GUI中物品可以被拖拽的问题
- 修复了配件安装和卸载功能不工作的问题
- 修复了返回按钮无效的问题
- 修复了狙击步枪无法装配托腮板的问题
- 修复了配件页面部分内容未适配英文的问题
- 修复了狙击枪配件分类中重复显示托腮板的问题
English
- Fixed issue where items in attachment GUI could be dragged
- Fixed issue where attachment installation and removal didn't work
- Fixed issue where back button was ineffective
- Fixed issue where DMRs couldn't install cheek pads
- Fixed issue where part of attachment page wasn't adapted to English
- Fixed issue where sniper attachment category showed duplicate cheek pads
射击系统修复 / Firing System Fixes
中文
- 修复了半自动武器连续点击无法发射的问题
- 修复了射速计算问题(fireRate < 0.1时射速过快)
- 修复了自动武器射速不准确的问题
English
- Fixed issue where semi-automatic weapons couldn't fire on continuous clicks
- Fixed fire rate calculation issue (fire rate too fast when fireRate < 0.1)
- Fixed issue where automatic weapon fire rate was inaccurate
语言系统修复 / Language System Fixes
中文
- 修复了
command.unknown_command和command.reload_success语言键缺失的警告 - 修复了配件槽位名称未本地化的问题
- 修复了配件GUI标题未本地化的问题
English
- Fixed warnings for missing language keys
command.unknown_commandandcommand.reload_success - Fixed issue where attachment slot names weren't localized
- Fixed issue where attachment GUI titles weren't localized
📋 配置更新 / Configuration Updates
配置文件版本 / Configuration File Version
中文
- 配置文件版本更新至
3.0.0 - 新增配件价格配置
- 新增USP和.45弹药价格配置
English
- Configuration file version updated to
3.0.0 - Added attachment price configuration
- Added USP and .45 ammo price configuration
配件价格配置 / Attachment Price Configuration
中文
- 步枪配件:消音器、补偿器、扩容弹匣、镭指、握把、枪托
- 冲锋枪配件:消音器、扩容弹匣、握把、枪托
- 霰弹枪配件:消音器、枪托、托腮板
- 手枪配件:消音器、扩容弹匣、握把、枪托
- 狙击枪配件:消音器、补偿器、扩容弹匣、镭指、枪托、托腮板
English
- Rifle Attachments: Silencers, Compensators, Extended Magazines, Laser Sights, Grips, Stocks
- SMG Attachments: Silencers, Extended Magazines, Grips, Stocks
- Shotgun Attachments: Silencers, Stocks, Cheek Pads
- Pistol Attachments: Silencers, Extended Magazines, Grips, Stocks
- Sniper Attachments: Silencers, Compensators, Extended Magazines, Laser Sights, Stocks, Cheek Pads
🔄 技术改进 / Technical Improvements
代码结构优化 / Code Structure Optimization
中文
- 新增
ModificationManager类管理配件系统 - 新增
ModificationGUI类处理配件GUI - 新增
AttachmentSlot和AttachmentType枚举 - 优化
GunType枚举,添加槽位支持方法 - 优化射速计算逻辑,使用毫秒级精确控制
English
- Added
ModificationManagerclass to manage attachment system - Added
ModificationGUIclass to handle attachment GUI - Added
AttachmentSlotandAttachmentTypeenums - Optimized
GunTypeenum, added slot support methods - Optimized fire rate calculation logic, using millisecond-level precision control
性能优化 / Performance Optimization
中文
- 配件数据持久化优化
- GUI响应速度优化
- 射速计算性能优化
English
- Attachment data persistence optimization
- GUI response speed optimization
- Fire rate calculation performance optimization
🎯 兼容性 / Compatibility
向后兼容 / Backward Compatibility
中文
- 保持原有枪械系统完全兼容
- 保持原有命令系统完全兼容
- 配置文件自动更新并保留自定义配置
English
- Maintains full compatibility with existing gun system
- Maintains full compatibility with existing command system
- Configuration files automatically update and preserve custom settings
版本兼容 / Version Compatibility
中文
- 支持 Minecraft 1.21.4
- 支持 Spigot API
- 支持 Bukkit API
English
- Supports Minecraft 1.21.4
- Supports Spigot API
- Supports Bukkit API
📊 统计信息 / Statistics
代码统计 / Code Statistics
中文
- 新增代码行数:约 1500+ 行
- 新增类文件:3个
- 修改文件:20+ 个
English
- New code lines: ~1500+ lines
- New class files: 3
- Modified files: 20+
功能统计 / Feature Statistics
中文
- 新增配件类型:30+ 种
- 新增配件槽位:5个
- 新增枪械:1种(USP)
- 新增弹药类型:1种(.45口径)
- 新增音效组合:10+ 种
English
- New attachment types: 30+ types
- New attachment slots: 5
- New guns: 1 (USP)
- New ammo types: 1 (.45 Caliber)
- New sound combinations: 10+ types
📝 升级指南 / Upgrade Guide
从 2.0.0 升级到 3.0.0 / Upgrading from 2.0.0 to 3.0.0
中文
备份数据
- 备份
plugins/GunPlugin/目录 - 备份玩家数据(如果有)
- 备份
更新插件
- 下载
GunPlugin-3.0.0.jar - 替换旧版本插件文件
- 下载
更新配置
- 配置文件会自动更新到 3.0.0 版本
- 自定义配置会被保留
- 检查新配置项并根据需要调整
注意事项
- 旧的升级系统已被移除,改为配件系统
- 玩家原有的升级数据不会自动转换
- 建议通知玩家重新配置配件
English
Backup Data
- Backup
plugins/GunPlugin/directory - Backup player data (if any)
- Backup
Update Plugin
- Download
GunPlugin-3.0.0.jar - Replace old version plugin file
- Download
Update Configuration
- Configuration files will automatically update to version 3.0.0
- Custom settings will be preserved
- Check new configuration items and adjust as needed
Important Notes
- Old upgrade system has been removed, replaced with attachment system
- Player's existing upgrade data will not be automatically converted
- Recommend notifying players to reconfigure attachments
🙏 致谢 / Acknowledgments
中文
- 主要开发者:114514h
- 社区贡献者:感谢所有贡献者
English
- Main Developer: 114514h
- Community Contributors: Thanks to all contributors
版本 3.0.0 - 2025年11月 / Version 3.0.0 - 11 2025
2.0.1Бета1.21.8, 1.21.9, 1.21.10 · 19 октября 2025 г.
Gun Plugin Changelog Gun 插件变更日志
[2.0.1]
Updated bStats 更新了bStats
2.0.0Релиз1.21.7, 1.21.8, 1.21.9 · 29 сентября 2025 г.
Gun Plugin Changelog Gun 插件变更日志
[2.0.0]
Updated a lot of content 更新了非常多的内容
🎯 Major Updates 🎯 主要更新
- Added recoil system 添加了后坐力系统
- Designed individual recoil for each firearm 为每个枪械设计了单独的后坐力
- Added firearm purchase system 添加了枪械购买系统
- You can customize the price of each firearm 可以自定义每个枪械的价格
- Added firearm upgrade system 添加了枪械升级系统
- Support players to upgrade multiple abilities of firearms 支持玩家为枪械的多项能力进行升级
🔧 Feature Improvements 🔧 功能改进
- Improved smoke material 改进了烟雾弹材质
- Improved the 'give' command 改进了give命令
- Improved the stacking logic of firearms 改进了枪械堆叠逻辑
🎮 New Commands 🎮 新命令
/gun buy- 枪械购买命令/gun buy- gun purchase command/gun upgrade- 升级枪械命令/Gun upgrade- Command to upgrade firearms
🐛 Bug Fixes 🐛 错误修复
- Fixed many bugs! 修复了很多漏洞!
1.2.0Релиз1.21.6, 1.21.7, 1.21.8 · 21 сентября 2025 г.
Gun Plugin Changelog
[1.2.0]
🎯 Major Updates
Grenade System
Added High Explosive Grenade
- Explodes after 5 seconds, dealing damage to entities within 5 block radius
- Center explosion damage: 20 points, edge damage: 2 points
- Material: Slime Ball
- Supports left-click low throw and right-click high throw
Added Molotov Cocktail
- Generates fire particles in 3 block radius at impact point
- Deals 4 damage per second to players in contact, lasts 10 seconds
- Fire spreads downward until hitting non-air blocks
- Material: Fire Charge
- Supports left-click low throw and right-click high throw
Added Smoke Grenade
- Generates smoke particles in 3x3x3 area at impact point
- Provides visual cover, lasts 15 seconds
- Material: Egg
- Supports left-click low throw and right-click high throw
Multi-Language System
Complete Multi-Language Support
- Supports Chinese (zh_CN) and English (en_US)
- Language switching via configuration file
- Language switching command
/gun lang
Localized Content
- All in-game messages support multiple languages
- Gun names, ammo names, grenade names localized
- Help information, error messages, console logs localized
- ActionBar messages, item descriptions localized
🔧 Feature Improvements
Grenade System Optimization
Throw Cooldown Mechanism
- 2-second throw interval to prevent spam
- Shows remaining time during cooldown
High Explosive Grenade Optimization
- Countdown starts when thrown, not when landing
- Landing sound effects:
minecraft:block.anvil.placeandminecraft:entity.tnt.primed - Continuous smoke particles during countdown
- Ensures entity cleanup after explosion
Molotov Cocktail Optimization
- Fire sound effect
minecraft:block.fire.ambientin flames - Optimized downward fire spread logic
- Maximum 20 block depth check
- Fire sound effect
Smoke Grenade Optimization
- Uses
minecraft:explosion_emitterparticle effect - Optimized smoke height and radius
- Uses
Language System Optimization
Language Manager Enhancement
- Automatically copies language files from resources folder
- Supports message key fallback mechanism
- Detailed debug logs and error handling
- Parameter replacement system support
Enum Multi-Language Support
GunTypeenum supports localized namesAmmoTypeenum supports localized names and descriptions- Dynamic current language setting retrieval
🎮 New Commands
Language Management Commands
/gun lang- Show current language and available languages/gun lang <language_code>- Switch language (zh_CN/en_US)
Grenade Commands
/gun give grenade [amount]- Get High Explosive Grenade/gun give molotov [amount]- Get Molotov Cocktail/gun give smoke [amount]- Get Smoke Grenade
📋 Configuration Updates
Language Configuration
# Language Settings
# Supported languages: zh_CN (Chinese), en_US (English)
language: "zh_CN"
Grenade Configuration
- Throw distance: High throw max 50 blocks, low throw max 10 blocks
- Throw cooldown: 2 seconds
- Explosion delay: 5 seconds
- Fire duration: 10 seconds
- Smoke duration: 15 seconds
🐛 Bug Fixes
Grenade System Fixes
- Fixed bug where items were consumed during cooldown
- Fixed High Explosive Grenade explosion center position error
- Fixed grenade entity not being cleared after explosion
- Fixed inaccurate countdown timing
Multi-Language System Fixes
- Fixed warnings caused by missing message keys
- Fixed gun item names not being translated
- Fixed ActionBar messages not being translated
- Fixed console logs not being translated
- Fixed help messages not being translated
📁 New Files
Language Files
src/main/resources/messages/zh_CN.yml- Chinese language filesrc/main/resources/messages/en_US.yml- English language file
Documentation Files
- Multi-language system usage guide
- Multi-language system fix guide
- Final fix guide
- Grenade system usage guide
🔄 Technical Improvements
Code Structure Optimization
- Added
LanguageManagerclass for multi-language management - Added
GrenadeManagerclass for grenade management - Added
Grenadeclass for grenade logic - Optimized
GunCommandclass for multi-language support - Optimized
GunListenerclass for multi-language support
Performance Optimization
- Optimized grenade entity management
- Optimized language file loading
- Optimized message retrieval performance
🎯 Compatibility
Backward Compatibility
- Maintains complete compatibility with existing gun system
- Maintains complete compatibility with existing command system
- Maintains complete compatibility with existing configuration format
Version Compatibility
- Supports Minecraft 1.21.4
- Supports Spigot API
- Supports Bukkit API
📊 Statistics
Code Statistics
- New code lines: ~2000+ lines
- New class files: 4
- New language files: 2
- Modified files: 15+
Feature Statistics
- New grenade types: 3
- New language support: 2
- New commands: 3
- New configuration options: 1
枪械插件更新日志
[1.2.0]
🎯 重大更新
投掷物系统
新增高爆手雷
- 投掷后5秒爆炸,对半径5格内的生物造成伤害
- 中心爆炸伤害20点,边缘伤害2点
- 材质:粘液球
- 支持左键低抛、右键高抛投掷
新增燃烧瓶
- 在落点生成半径3格的火焰粒子
- 对接触的玩家造成每秒4点伤害,持续10秒
- 火焰会向下传播直到遇到非空气方块
- 材质:火焰弹
- 支持左键低抛、右键高抛投掷
新增烟雾弹
- 在落点生成半径3格、高3格的烟雾粒子
- 提供视觉掩护,持续15秒
- 材质:鸡蛋
- 支持左键低抛、右键高抛投掷
多语言系统
完整的多语言支持
- 支持中文 (zh_CN) 和英文 (en_US)
- 可通过配置文件切换语言
- 支持语言切换命令
/gun lang
本地化内容
- 所有游戏内消息支持多语言
- 枪械名称、弹药名称、投掷物名称本地化
- 帮助信息、错误消息、控制台日志本地化
- ActionBar消息、物品描述本地化
🔧 功能改进
投掷物系统优化
投掷冷却机制
- 投掷间隔2秒,防止连续投掷
- 冷却期间显示剩余时间提示
高爆手雷优化
- 投掷时开始倒计时,不再等待落地
- 落地时播放音效:
minecraft:block.anvil.place和minecraft:entity.tnt.primed - 倒计时期间持续显示烟雾粒子
- 爆炸后确保实体正确清除
燃烧瓶优化
- 火焰中播放火焰音效
minecraft:block.fire.ambient - 火焰向下传播逻辑优化
- 最多检查20格深度
- 火焰中播放火焰音效
烟雾弹优化
- 使用
minecraft:explosion_emitter粒子效果 - 烟雾高度和半径优化
- 使用
语言系统优化
语言管理器增强
- 自动从资源文件夹复制语言文件
- 支持消息键回退机制
- 详细的调试日志和错误处理
- 参数替换系统支持
枚举多语言支持
GunType枚举支持本地化名称AmmoType枚举支持本地化名称和描述- 动态获取当前语言设置
🎮 新增命令
语言管理命令
/gun lang- 显示当前语言和可用语言/gun lang <语言代码>- 切换语言 (zh_CN/en_US)
投掷物命令
/gun give grenade [数量]- 获得高爆手雷/gun give molotov [数量]- 获得燃烧瓶/gun give smoke [数量]- 获得烟雾弹
📋 配置更新
语言配置
# 语言设置 (Language Settings)
# 支持的语言: zh_CN (中文), en_US (英文)
language: "zh_CN"
投掷物配置
- 投掷距离:高抛最远50格,低抛最远10格
- 投掷冷却:2秒
- 爆炸延迟:5秒
- 火焰持续时间:10秒
- 烟雾持续时间:15秒
🐛 错误修复
投掷物系统修复
- 修复投掷冷却期间仍扣除物品数量的bug
- 修复高爆手雷爆炸中心位置错误的问题
- 修复手雷爆炸后实体不清除的问题
- 修复倒计时时间不准确的问题
多语言系统修复
- 修复消息键不存在导致的警告
- 修复枪械物品名称不翻译的问题
- 修复ActionBar消息不翻译的问题
- 修复控制台日志不翻译的问题
- 修复帮助消息不翻译的问题
📁 新增文件
语言文件
src/main/resources/messages/zh_CN.yml- 中文语言文件src/main/resources/messages/en_US.yml- 英文语言文件
文档文件
多语言系统说明.md- 多语言系统使用说明多语言系统修复说明.md- 多语言系统修复说明多语言系统最终修复说明.md- 最终修复说明投掷物系统说明.md- 投掷物系统使用说明
🔄 技术改进
代码结构优化
- 新增
LanguageManager类管理多语言 - 新增
GrenadeManager类管理投掷物 - 新增
Grenade类处理投掷物逻辑 - 优化
GunCommand类支持多语言 - 优化
GunListener类支持多语言
性能优化
- 投掷物实体管理优化
- 语言文件加载优化
- 消息获取性能优化
🎯 兼容性
向后兼容
- 保持原有枪械系统完全兼容
- 保持原有命令系统完全兼容
- 保持原有配置文件格式兼容
版本兼容
- 支持 Minecraft 1.21.4
- 支持 Spigot API
- 支持 Bukkit API
📊 统计信息
代码统计
- 新增代码行数:约 2000+ 行
- 新增类文件:4个
- 新增语言文件:2个
- 修改文件:15+ 个
功能统计
- 新增投掷物类型:3种
- 新增语言支持:2种
- 新增命令:3个
- 新增配置项:1个
版本: 1.2.0
1.1.0Релиз1.21.6, 1.21.7, 1.21.8 · 21 сентября 2025 г.
v1.1.0 - Major Update
🆕 New Weapon System
- Renamed Original Weapons:
- Pistol → P250 (Leather Horse Armor)
- Rifle → AK-74 (Iron Horse Armor)
- Shotgun → AA-12 (Golden Horse Armor)
- Sniper → AWM (Diamond Horse Armor)
- Added 11 New Weapons:
- HK416 (Black Dye) - Full-auto assault rifle
- PP19 (Brown Dye) - High-rate submachine gun
- AUG (Red Dye) - Precision assault rifle
- MK-14 (Orange Dye) - High-damage automatic rifle
- S686 (Yellow Dye) - Double-barrel shotgun
- 98K (Lime Dye) - Classic sniper rifle
- Vector (Green Dye) - Ultra-high-speed submachine gun
- Negev (Cyan Dye) - Heavy machine gun
- SKS (Light Blue Dye) - Semi-automatic sniper rifle
- Desert Eagle (Blue Dye) - High-caliber pistol
- CZ75 (Purple Dye) - Compact pistol
🎯 Weapon Characteristics
- Firing Mode Classification:
- Full-auto weapons: AK-74, HK416, PP19, AUG, MK-14, Vector, Negev, CZ75
- Semi-auto weapons: 98K, SKS, Desert Eagle
- Single-shot weapons: P250, AWM
- Shotguns: AA-12, S686
- Balanced Design:
- Damage range: 4.0-20.0
- Fire rate range: 0.4-25 rounds/second
- Magazine capacity range: 2-150 rounds
- Penetration power: 0-4 blocks
🎵 Sound System
- Sound Classification:
- Pistol sound group: P250, CZ75, Desert Eagle
- Rifle sound group: AK-74, HK416, PP19, AUG, MK-14, Vector, Negev, SKS
- Shotgun sound group: AA-12, S686
- Sniper sound group: AWM, 98K
- Multi-layered Sounds:
- Each weapon has unique shooting sounds
- Includes main sound and delayed sound
- Volume and pitch carefully tuned
🔧 Command System
- New Command Support:
- Supports
/gun givecommand for all 15 weapons - Complete auto-completion functionality
- Detailed help information
- Supports
- Backward Compatibility:
- Maintains full compatibility with old commands
pistol→ P250,rifle→ AK-74,shotgun→ AA-12,sniper→ AWM
📊 Technical Improvements
- Code Refactoring:
- Updated GunType enum to support 15 weapons
- Refactored sound system with sound classification
- Optimized command processing logic
- Performance Optimization:
- Improved weapon identification algorithms
- Optimized sound playback mechanisms
- Enhanced memory management
v1.1.0 - 重大更新
🆕 新枪械系统 / New Weapon System
- 重命名原枪械 / Renamed Original Weapons:
- 手枪 → P250 (皮革马铠)
- 步枪 → AK-74 (铁马铠)
- 霰弹枪 → AA-12 (金马铠)
- 狙击枪 → AWM (钻石马铠)
- 新增11种枪械 / Added 11 New Weapons:
- HK416 (黑色染料) - 全自动突击步枪
- PP19 (棕色染料) - 高射速冲锋枪
- AUG (红色染料) - 精确突击步枪
- MK-14 (橙色染料) - 高伤害自动步枪
- S686 (黄色染料) - 双管霰弹枪
- 98K (黄绿色染料) - 经典狙击步枪
- Vector (绿色染料) - 超高速冲锋枪
- 内格夫 (青色染料) - 重型机枪
- SKS (淡蓝色染料) - 半自动狙击步枪
- 沙漠之鹰 (蓝色染料) - 大口径手枪
- CZ75 (紫色染料) - 紧凑型手枪
🎯 武器特性 / Weapon Characteristics
- 射击模式分类 / Firing Mode Classification:
- 全自动武器: AK-74, HK416, PP19, AUG, MK-14, Vector, 内格夫, CZ75
- 半自动武器: 98K, SKS, 沙漠之鹰
- 单发武器: P250, AWM
- 霰弹枪: AA-12, S686
- 平衡性设计 / Balanced Design:
- 伤害范围: 4.0-20.0
- 射速范围: 0.4-25发/秒
- 弹容量范围: 2-150发
- 穿透力: 0-4格
🎵 音效系统 / Sound System
- 音效分类 / Sound Classification:
- 手枪音效组: P250, CZ75, 沙漠之鹰
- 步枪音效组: AK-74, HK416, PP19, AUG, MK-14, Vector, 内格夫, SKS
- 霰弹枪音效组: AA-12, S686
- 狙击枪音效组: AWM, 98K
- 多层次音效 / Multi-layered Sounds:
- 每种枪械都有独特的射击音效
- 包含主音效和延迟音效
- 音量和音调经过精心调校
🔧 命令系统 / Command System
- 新命令支持 / New Command Support:
- 支持所有15种枪械的
/gun give命令 - 完整的自动补全功能
- 详细的帮助信息
- 支持所有15种枪械的
- 向后兼容 / Backward Compatibility:
- 保持旧命令的完全兼容性
pistol→ P250,rifle→ AK-74,shotgun→ AA-12,sniper→ AWM
📊 技术改进 / Technical Improvements
- 代码重构 / Code Refactoring:
- 更新了GunType枚举,支持15种枪械
- 重构了音效系统,支持音效分类
- 优化了命令处理逻辑
- 性能优化 / Performance Optimization:
- 改进了枪械识别算法
- 优化了音效播放机制
- 增强了内存管理
🎵 音效调整 / Sound Adjustments
- CZ75音效更新 / CZ75 Sound Update:
- 从步枪音效改为手枪音效
- 与P250使用相同的音效配置
- 更符合其紧凑型手枪的定位
- 沙漠之鹰音效更新 / Desert Eagle Sound Update:
- 从步枪音效改为手枪音效
- 与P250使用相同的音效配置
- 更符合其大口径手枪的特点
🔧 技术实现 / Technical Implementation
- 添加了专门的音效处理逻辑
- 为CZ75和沙漠之鹰配置了与P250相同的手枪音效
- 保持了音效系统的一致性和可维护性
Комментарии
Загружаем…