
GunPlugin
A feature rich Minecraft Java version firearm plugin一个功能丰富的Minecraft Java版枪械插件
GunPlugin 详细使用教程 / Detailed Tutorial
中文 / Chinese | English
📋 目录 / Table of Contents
- [快速开始 / Quick Start]
- [安装配置 / Installation & Configuration]
- [基础使用 / Basic Usage]
- [枪械系统 / Gun System]
- [配件系统 / Attachment System]
- [购买系统 / Purchase System]
- [命令详解 / Commands]
- [权限设置 / Permissions]
- [高级功能 / Advanced Features]
- [常见问题 / FAQ]
🚀 快速开始 / Quick Start
中文
欢迎使用 GunPlugin!本教程将帮助您快速上手这个强大的枪械插件。
5分钟快速入门:
- 将插件放入
plugins文件夹 - 重启服务器
- 使用
/gun give p250获得一把手枪 - 使用
/gun give 9mm 64获得弹药 - 手持手枪,右键射击!
English
Welcome to GunPlugin! This tutorial will help you quickly get started with this powerful gun plugin.
5-Minute Quick Start:
- Place the plugin in the
pluginsfolder - Restart the server
- Use
/gun give p250to get a pistol - Use
/gun give 9mm 64to get ammo - Hold the pistol and right-click to shoot!
📦 安装配置 / Installation & Configuration
中文
系统要求
- Minecraft版本:1.21.4
- 服务器类型:Spigot 或 Paper
- Java版本:21 或更高版本
- 内存要求:建议 2GB 以上
安装步骤
-
下载插件
- 从发布页面下载
GunPlugin-3.0.0.jar - 确保文件名正确
- 从发布页面下载
-
安装插件
# 将 jar 文件放入服务器的 plugins 文件夹 plugins/ └── GunPlugin-3.0.0.jar -
启动服务器
- 启动服务器,插件会自动加载
- 检查控制台是否有错误信息
-
首次配置
- 插件会在
plugins/GunPlugin/目录下生成配置文件 - 主要配置文件:
config.yml- 主配置文件config_zh_CN.yml- 中文配置(如果使用中文)config_en_US.yml- 英文配置(如果使用英文)messages/zh_CN.yml- 中文语言文件messages/en_US.yml- 英文语言文件
- 插件会在
基础配置
编辑 config.yml 文件:
# 插件设置
settings:
# 是否禁用手持枪械时的左键攻击
disable_left_click: true
# 是否禁用手持枪械时的右键交互
disable_right_click_interaction: true
# 语言设置 (zh_CN 或 en_US)
language: "zh_CN"
# 是否启用购买系统
buy_system_enabled: true
# 是否启用升级系统(已废弃,使用配件系统)
upgrade_system_enabled: false
语言配置
插件支持两种语言:
-
中文(zh_CN)
- 使用
config_zh_CN.yml配置文件 - 所有界面和消息显示为中文
- 使用
-
英文(en_US)
- 使用
config_en_US.yml配置文件 - 所有界面和消息显示为英文
- 使用
切换语言:
# 方法1:使用命令
/gun lang zh_CN
/gun lang en_US
# 方法2:修改配置文件
# 编辑 config.yml,修改 language 设置
English
Requirements
- Minecraft Version: 1.21.4
- Server Type: Spigot or Paper
- Java Version: 21 or higher
- Memory: Recommended 2GB+
Installation Steps
-
Download Plugin
- Download
GunPlugin-3.0.0.jarfrom the release page - Ensure the filename is correct
- Download
-
Install Plugin
# Place the jar file in your server's plugins folder plugins/ └── GunPlugin-3.0.0.jar -
Start Server
- Start the server, the plugin will load automatically
- Check the console for any error messages
-
Initial Configuration
- The plugin will generate configuration files in
plugins/GunPlugin/directory - Main configuration files:
config.yml- Main configuration fileconfig_zh_CN.yml- Chinese configuration (if using Chinese)config_en_US.yml- English configuration (if using English)messages/zh_CN.yml- Chinese language filemessages/en_US.yml- English language file
- The plugin will generate configuration files in
Basic Configuration
Edit the config.yml file:
# Plugin Settings
settings:
# Disable left-click attacks when holding guns
disable_left_click: true
# Disable right-click interactions when holding guns
disable_right_click_interaction: true
# Language setting (zh_CN or en_US)
language: "en_US"
# Enable purchase system
buy_system_enabled: true
# Enable upgrade system (deprecated, use attachment system)
upgrade_system_enabled: false
Language Configuration
The plugin supports two languages:
-
Chinese (zh_CN)
- Use
config_zh_CN.ymlconfiguration file - All interfaces and messages display in Chinese
- Use
-
English (en_US)
- Use
config_en_US.ymlconfiguration file - All interfaces and messages display in English
- Use
Switch Language:
# Method 1: Use command
/gun lang zh_CN
/gun lang en_US
# Method 2: Edit configuration file
# Edit config.yml, modify language setting
🎮 基础使用 / Basic Usage
中文
获得枪械
方法1:使用命令
# 给予自己一把手枪
/gun give p250
# 给予其他玩家
/gun give @p p250
/gun give 玩家名 p250
/gun give @a p250 # 给所有玩家
方法2:通过商店购买
# 打开商店界面
/gun buy
# 在商店中选择枪械分类,点击购买
获得弹药
# 获得9mm弹药(64发一组)
/gun give 9mm 64
# 其他弹药类型
/gun give 762 64 # 7.62mm弹药
/gun give 556 64 # 5.56mm弹药
/gun give 12mm 64 # 12mm弹药
/gun give 50mm 64 # .50mm弹药
/gun give 45 64 # .45口径弹药(USP专用)
射击操作
-
手持枪械
- 将枪械物品放在主手(第一格)
-
瞄准目标
- 使用鼠标瞄准
-
射击
- 自动武器:按住右键连续射击
- 半自动武器:每次右键发射一发,需要释放右键后再次点击
- 单发武器:每次右键发射一发
-
换弹
- 弹匣打空后自动换弹
- 或使用
/gun ammo reload手动换弹 - 或按 F 键手动换弹
查看弹药
# 查看当前枪械的弹药信息
/gun ammo
显示信息:
- 当前弹匣剩余弹药
- 弹匣最大容量
- 背包中对应弹药数量
English
Getting Weapons
Method 1: Use Command
# Give yourself a pistol
/gun give p250
# Give to other players
/gun give @p p250
/gun give playername p250
/gun give @a p250 # Give to all players
Method 2: Purchase from Shop
# Open shop interface
/gun buy
# Select weapon category in shop, click to purchase
Getting Ammo
# Get 9mm ammo (64 rounds per stack)
/gun give 9mm 64
# Other ammo types
/gun give 762 64 # 7.62mm ammo
/gun give 556 64 # 5.56mm ammo
/gun give 12mm 64 # 12mm ammo
/gun give 50mm 64 # .50mm ammo
/gun give 45 64 # .45 caliber ammo (USP only)
Shooting Operations
-
Hold Weapon
- Place the weapon item in main hand (first slot)
-
Aim at Target
- Use mouse to aim
-
Shoot
- Automatic Weapons: Hold right-click for continuous shooting
- Semi-Automatic Weapons: Right-click once per shot, must release and click again
- Single Shot Weapons: Right-click once per shot
-
Reload
- Auto-reload when magazine is empty
- Or use
/gun ammo reloadfor manual reload - Or press F key for manual reload
View Ammo
# View current weapon's ammo information
/gun ammo
Displays:
- Current magazine remaining ammo
- Magazine maximum capacity
- Corresponding ammo count in inventory
🔫 枪械系统 / Gun System
中文
枪械类型
插件包含多种枪械类型:
手枪(Pistols)
- P250:射速 400 RPM,弹容量 13发,使用 9mm 弹药
- CZ75:射速 600 RPM,弹容量 12发,使用 9mm 弹药
- 沙漠之鹰:射速 277 RPM,弹容量 7发,使用 .50mm 弹药
- USP:射速 352 RPM,弹容量 12发,使用 .45 口径弹药
步枪(Rifles)
- AK74:射速 600 RPM,弹容量 30发,使用 7.62mm 弹药
- HK416:射速 620 RPM,弹容量 30发,使用 5.56mm 弹药
- AUG:射速 630 RPM,弹容量 30发,使用 5.56mm 弹药
冲锋枪(SMGs)
- PP19:射速 630 RPM,弹容量 64发,使用 9mm 弹药
- Vector:射速 1000 RPM,弹容量 25发,使用 9mm 弹药
霰弹枪(Shotguns)
- AA12:射速 462 RPM,弹容量 8发,使用 12mm 弹药
- S686:射速 600 RPM,弹容量 2发,使用 12mm 弹药
狙击枪(Sniper Rifles)
- AWM:高伤害,弹容量 5发,使用 .50mm 弹药
- KAR98K:高伤害,弹容量 5发,使用 7.62mm 弹药
狙击步枪(DMRs)
- MK14:射速 550 RPM,弹容量 20发,使用 7.62mm 弹药
- SKS:射速 600 RPM,弹容量 10发,使用 7.62mm 弹药
机枪(LMGs)
- NEGEV:射速 583 RPM,弹容量 150发,使用 5.56mm 弹药
射击模式
-
自动模式(Automatic)
- 按住右键连续射击
- 适用于:步枪、冲锋枪、机枪
-
半自动模式(Semi-Automatic)
- 每次右键发射一发
- 必须释放右键后再次点击才能发射下一发
- 适用于:部分手枪、狙击步枪
-
单发模式(Single Shot)
- 每次右键发射一发
- 适用于:部分手枪、狙击枪
开镜系统
部分枪械支持开镜功能:
-
开镜
- 左键开镜
- 视野放大,提高精度
-
关镜
- 再次左键关镜
- 恢复正常视野
持枪效果
- 手持枪械时,玩家会获得缓慢效果
- 射击或换弹时,缓慢效果增强
- 不同枪械的缓慢效果不同
English
Weapon Types
The plugin includes various weapon types:
Pistols
- P250: 400 RPM, 13 rounds, uses 9mm ammo
- CZ75: 600 RPM, 12 rounds, uses 9mm ammo
- Desert Eagle: 277 RPM, 7 rounds, uses .50mm ammo
- USP: 352 RPM, 12 rounds, uses .45 caliber ammo
Rifles
- AK74: 600 RPM, 30 rounds, uses 7.62mm ammo
- HK416: 620 RPM, 30 rounds, uses 5.56mm ammo
- AUG: 630 RPM, 30 rounds, uses 5.56mm ammo
SMGs
- PP19: 630 RPM, 64 rounds, uses 9mm ammo
- Vector: 1000 RPM, 25 rounds, uses 9mm ammo
Shotguns
- AA12: 462 RPM, 8 rounds, uses 12mm ammo
- S686: 600 RPM, 2 rounds, uses 12mm ammo
Sniper Rifles
- AWM: High damage, 5 rounds, uses .50mm ammo
- KAR98K: High damage, 5 rounds, uses 7.62mm ammo
DMRs
- MK14: 550 RPM, 20 rounds, uses 7.62mm ammo
- SKS: 600 RPM, 10 rounds, uses 7.62mm ammo
LMGs
- NEGEV: 583 RPM, 150 rounds, uses 5.56mm ammo
Firing Modes
-
Automatic Mode
- Hold right-click for continuous shooting
- For: Rifles, SMGs, LMGs
-
Semi-Automatic Mode
- Right-click once per shot
- Must release right-click and click again for next shot
- For: Some pistols, DMRs
-
Single Shot Mode
- Right-click once per shot
- For: Some pistols, sniper rifles
Scope System
Some weapons support scoping:
-
Scope In
- Left-click to scope
- Field of view zooms in, improves accuracy
-
Scope Out
- Left-click again to unscope
- Returns to normal field of view
Gun Holding Effects
- When holding a weapon, player receives slow effect
- Slow effect increases when shooting or reloading
- Different weapons have different slow effects
🔧 配件系统 / Attachment System
中文
打开配件界面
# 手持枪械后使用此命令
/gun upgrade
配件槽位
每个枪械有5个配件槽位:
-
枪口(Muzzle)
- 可安装:消音器、补偿器
-
枪托(Stock)
- 可安装:枪托、托腮板
-
弹匣(Magazine)
- 可安装:扩容弹匣
-
侧导轨(Side Rail)
- 可安装:镭指
-
下导轨(Under Rail)
- 可安装:镭指、垂直握把
配件类型
消音器(Silencers)
- 一级消音器:降低50%枪声,减少1%后坐力
- 二级消音器:降低75%枪声,减少5%后坐力
- 安装消音器后,开枪音效会变为消音音效
补偿器(Compensators)
- 一级补偿器:减少3-5%后坐力
- 二级补偿器:减少13-15%后坐力
扩容弹匣(Extended Magazines)
- 一级扩容弹匣:增加5-20%弹匣容量,增加3-10%换弹速度
- 二级扩容弹匣:增加10-40%弹匣容量,增加9-15%换弹速度
其他配件
- 镭指(Laser Sight):减少20%子弹散步
- 垂直握把(Vertical Grip):减少8%后坐力
- 枪托(Stock):减少2-20%后坐力
- 托腮板(Cheek Pad):减少10%后坐力(适用于霰弹枪、狙击枪、狙击步枪)
配件兼容性
不同枪械支持不同的配件槽位:
支持全部5个槽位:
- 步枪(AK74、HK416、AUG)
- Vector
- 狙击步枪(MK14、SKS)
支持部分槽位:
- 手枪(P250、沙漠之鹰、USP、AA12):弹匣、枪口、下导轨、枪托
- CZ75:弹匣、枪口、下导轨
- S686:仅支持枪托
- 狙击枪(AWM、KAR98K):枪口、枪托
- PP19:仅支持枪口
- 机枪(NEGEV):弹匣、枪口
特殊兼容性
- 狙击步枪(MK14、SKS):支持步枪配件和狙击枪配件
- 机枪(NEGEV)和AA12:支持步枪弹匣
- 托腮板:适用于霰弹枪、狙击枪、狙击步枪
安装配件
- 手持枪械
- 使用
/gun upgrade打开配件界面 - 点击要安装配件的槽位
- 在槽位页面中选择要安装的配件
- 点击配件即可安装
卸载配件
- 打开配件界面
- 点击已安装配件的槽位
- 在槽位页面中点击已安装的配件
- 配件会被卸载并返回背包
配件效果叠加
多个配件的效果会自动叠加:
- 后坐力减少:多个减少后坐力的配件可以叠加
- 弹匣容量:多个扩容弹匣效果叠加
- 换弹速度:多个换弹速度加成叠加
- 子弹散步:多个减少散步的配件叠加
English
Open Attachment Interface
# Use this command while holding a weapon
/gun upgrade
Attachment Slots
Each weapon has 5 attachment slots:
-
Muzzle
- Can install: Silencers, Compensators
-
Stock
- Can install: Stocks, Cheek Pads
-
Magazine
- Can install: Extended Magazines
-
Side Rail
- Can install: Laser Sights
-
Under Rail
- Can install: Laser Sights, Vertical Grips
Attachment Types
Silencers
- Level 1 Silencer: Reduce 50% sound, reduce 1% recoil
- Level 2 Silencer: Reduce 75% sound, reduce 5% recoil
- After installing silencer, shooting sound changes to suppressed sound
Compensators
- Level 1 Compensator: Reduce 3-5% recoil
- Level 2 Compensator: Reduce 13-15% recoil
Extended Magazines
- Level 1 Extended Magazine: Increase 5-20% magazine capacity, increase 3-10% reload speed
- Level 2 Extended Magazine: Increase 10-40% magazine capacity, increase 9-15% reload speed
Other Attachments
- Laser Sight: Reduce 20% bullet spread
- Vertical Grip: Reduce 8% recoil
- Stock: Reduce 2-20% recoil
- Cheek Pad: Reduce 10% recoil (for shotguns, sniper rifles, and DMRs)
Attachment Compatibility
Different weapons support different attachment slots:
Support all 5 slots:
- Rifles (AK74, HK416, AUG)
- Vector
- DMRs (MK14, SKS)
Support partial slots:
- Pistols (P250, Desert Eagle, USP, AA12): Magazine, Muzzle, Under Rail, Stock
- CZ75: Magazine, Muzzle, Under Rail
- S686: Only Stock
- Sniper Rifles (AWM, KAR98K): Muzzle, Stock
- PP19: Only Muzzle
- LMG (NEGEV): Magazine, Muzzle
Special Compatibility
- DMRs (MK14, SKS): Support rifle attachments and sniper attachments
- LMG (NEGEV) and AA12: Support rifle magazines
- Cheek Pad: Works with shotguns, sniper rifles, and DMRs
Install Attachments
- Hold a weapon
- Use
/gun upgradeto open attachment interface - Click on the slot where you want to install attachment
- Select the attachment in the slot page
- Click the attachment to install
Uninstall Attachments
- Open attachment interface
- Click on the slot with installed attachment
- Click the installed attachment in the slot page
- Attachment will be uninstalled and returned to inventory
Attachment Effect Stacking
Multiple attachment effects automatically stack:
- Recoil Reduction: Multiple recoil reduction attachments stack
- Magazine Capacity: Multiple extended magazine effects stack
- Reload Speed: Multiple reload speed bonuses stack
- Bullet Spread: Multiple spread reduction attachments stack
💰 购买系统 / Purchase System
中文
打开商店
/gun buy
商店分类
商店包含以下分类:
-
手枪(Pistols)
- P250、CZ75、沙漠之鹰、USP
-
步枪(Rifles)
- AK74、HK416、AUG
-
冲锋枪(SMGs)
- PP19、Vector
-
霰弹枪(Shotguns)
- AA12、S686
-
狙击枪(Sniper Rifles)
- AWM、KAR98K
-
狙击步枪(DMRs)
- MK14、SKS
-
机枪(LMGs)
- NEGEV
-
子弹(Ammo)
- 各种弹药类型
-
投掷物(Grenades)
- 高爆手雷、燃烧瓶、烟雾弹
-
步枪配件(Rifle Attachments)
- 消音器、补偿器、扩容弹匣等
-
冲锋枪配件(SMG Attachments)
- 消音器、扩容弹匣等
-
霰弹枪配件(Shotgun Attachments)
- 消音器、枪托、托腮板
-
手枪配件(Pistol Attachments)
- 消音器、扩容弹匣等
-
狙击枪配件(Sniper Attachments)
- 消音器、补偿器、扩容弹匣等
购买流程
- 打开商店界面
- 选择分类(点击分类按钮)
- 浏览商品
- 点击商品查看详情
- 确认购买(需要足够的金币)
- 商品会直接添加到背包
价格配置
所有商品价格可在配置文件中设置:
# 枪械价格
gun_prices:
p250: 800
ak74: 2000
# ...
# 弹药价格
ammo_prices:
ammo_9mm: 4320
ammo_762: 4320
# ...
# 配件价格
attachment_prices:
rifle_silencer_level1: 30000
rifle_silencer_level2: 80000
# ...
English
Open Shop
/gun buy
Shop Categories
The shop includes the following categories:
-
Pistols
- P250, CZ75, Desert Eagle, USP
-
Rifles
- AK74, HK416, AUG
-
SMGs
- PP19, Vector
-
Shotguns
- AA12, S686
-
Sniper Rifles
- AWM, KAR98K
-
DMRs
- MK14, SKS
-
LMGs
- NEGEV
-
Ammo
- Various ammo types
-
Grenades
- High Explosive Grenade, Molotov, Smoke Grenade
-
Rifle Attachments
- Silencers, Compensators, Extended Magazines, etc.
-
SMG Attachments
- Silencers, Extended Magazines, etc.
-
Shotgun Attachments
- Silencers, Stocks, Cheek Pads
-
Pistol Attachments
- Silencers, Extended Magazines, etc.
-
Sniper Attachments
- Silencers, Compensators, Extended Magazines, etc.
Purchase Process
- Open shop interface
- Select category (click category button)
- Browse products
- Click product to view details
- Confirm purchase (requires sufficient coins)
- Product will be added directly to inventory
Price Configuration
All product prices can be set in configuration file:
# Gun prices
gun_prices:
p250: 800
ak74: 2000
# ...
# Ammo prices
ammo_prices:
ammo_9mm: 4320
ammo_762: 4320
# ...
# Attachment prices
attachment_prices:
rifle_silencer_level1: 30000
rifle_silencer_level2: 80000
# ...
📝 命令详解 / Commands
中文
基础命令
| 命令 | 权限 | 描述 | 示例 |
|---|---|---|---|
/gun give <类型> [数量] | gunplugin.admin | 给予枪械/弹药/投掷物 | /gun give p250 |
/gun ammo | gunplugin.use | 查看弹药信息 | /gun ammo |
/gun ammo reload | gunplugin.use | 手动换弹 | /gun ammo reload |
/gun reload | gunplugin.admin | 重载插件配置 | /gun reload |
/gun help | gunplugin.use | 显示帮助信息 | /gun help |
/gun buy | gunplugin.use | 打开枪械商店 | /gun buy |
/gun upgrade | gunplugin.use | 打开配件改装界面 | /gun upgrade |
/gun lang | gunplugin.use | 显示当前语言 | /gun lang |
/gun lang <语言> | gunplugin.use | 切换语言 | /gun lang en_US |
命令详细说明
给予命令 /gun give
# 给予枪械
/gun give p250
/gun give ak74
/gun give awm
# 给予弹药(数量可选,默认64)
/gun give 9mm
/gun give 9mm 64
/gun give 762 128
# 给予投掷物
/gun give grenade
/gun give grenade 5
/gun give molotov 3
# 给其他玩家
/gun give @p p250 # 最近的玩家
/gun give @a ak74 # 所有玩家
/gun give 玩家名 p250 # 指定玩家
弹药命令 /gun ammo
# 查看当前枪械的弹药信息
/gun ammo
# 手动换弹(需要背包中有对应弹药)
/gun ammo reload
语言命令 /gun lang
# 查看当前语言
/gun lang
# 切换为中文
/gun lang zh_CN
# 切换为英文
/gun lang en_US
English
Basic Commands
| Command | Permission | Description | Example |
|---|---|---|---|
/gun give <type> [amount] | gunplugin.admin | Give weapon/ammo/grenade | /gun give p250 |
/gun ammo | gunplugin.use | View ammo information | /gun ammo |
/gun ammo reload | gunplugin.use | Manual reload | /gun ammo reload |
/gun reload | gunplugin.admin | Reload plugin configuration | /gun reload |
/gun help | gunplugin.use | Show help information | /gun help |
/gun buy | gunplugin.use | Open gun shop | /gun buy |
/gun upgrade | gunplugin.use | Open attachment modification interface | /gun upgrade |
/gun lang | gunplugin.use | Show current language | /gun lang |
/gun lang <language> | gunplugin.use | Switch language | /gun lang en_US |
Command Details
Give Command /gun give
# Give weapon
/gun give p250
/gun give ak74
/gun give awm
# Give ammo (amount optional, default 64)
/gun give 9mm
/gun give 9mm 64
/gun give 762 128
# Give grenade
/gun give grenade
/gun give grenade 5
/gun give molotov 3
# Give to other players
/gun give @p p250 # Closest player
/gun give @a ak74 # All players
/gun give playername p250 # Specified player
Ammo Command /gun ammo
# View current weapon's ammo information
/gun ammo
# Manual reload (requires corresponding ammo in inventory)
/gun ammo reload
Language Command /gun lang
# View current language
/gun lang
# Switch to Chinese
/gun lang zh_CN
# Switch to English
/gun lang en_US
🔐 权限设置 / Permissions
中文
权限列表
| 权限 | 描述 | 默认 |
|---|---|---|
gunplugin.use | 使用枪械插件的基础权限 | op |
gunplugin.admin | 管理员权限(所有功能) | op |
gunplugin.give | 使用给予命令的权限 | op |
gunplugin.ammo | 使用弹药命令的权限 | op |
gunplugin.buy | 使用购买系统的权限 | op |
gunplugin.upgrade | 使用配件系统的权限 | op |
权限配置示例
LuckPerms 配置:
groups:
default:
permissions:
- gunplugin.use
- gunplugin.buy
- gunplugin.upgrade
vip:
permissions:
- gunplugin.use
- gunplugin.buy
- gunplugin.upgrade
- gunplugin.give
admin:
permissions:
- gunplugin.*
权限说明:
gunplugin.use:基础权限,允许玩家使用枪械gunplugin.buy:允许玩家使用商店购买功能gunplugin.upgrade:允许玩家使用配件系统gunplugin.give:允许玩家使用给予命令(通常只给管理员)gunplugin.admin:管理员权限,包含所有功能
English
Permission List
| Permission | Description | Default |
|---|---|---|
gunplugin.use | Basic permission to use gun plugin | op |
gunplugin.admin | Admin permission (all features) | op |
gunplugin.give | Permission to use give command | op |
gunplugin.ammo | Permission to use ammo command | op |
gunplugin.buy | Permission to use purchase system | op |
gunplugin.upgrade | Permission to use attachment system | op |
Permission Configuration Example
LuckPerms Configuration:
groups:
default:
permissions:
- gunplugin.use
- gunplugin.buy
- gunplugin.upgrade
vip:
permissions:
- gunplugin.use
- gunplugin.buy
- gunplugin.upgrade
- gunplugin.give
admin:
permissions:
- gunplugin.*
Permission Descriptions:
gunplugin.use: Basic permission, allows players to use weaponsgunplugin.buy: Allows players to use shop purchase functiongunplugin.upgrade: Allows players to use attachment systemgunplugin.give: Allows players to use give command (usually only for admins)gunplugin.admin: Admin permission, includes all features
⚙️ 高级功能 / Advanced Features
中文
自定义枪械
您可以在配置文件中创建自定义枪械:
guns:
my_custom_gun:
name: "我的自定义枪械"
material: "BOW"
magazine_size: 25
damage: 8.0
fire_rate: 600 # RPM
bullet_speed: 70
bullet_drop: 0.06
shoot_sound: "ENTITY_ARROW_SHOOT"
reload_time: 3.0
penetration_power: 1
recoil: 2.5
is_automatic: true
is_shotgun: false
shotgun_pellets: 1
ammo_type: "AMMO_9MM"
投掷物系统
插件支持三种投掷物:
-
高爆手雷(Grenade)
- 投掷后5秒爆炸
- 对半径内的生物造成伤害
- 左键低抛,右键高抛
-
燃烧瓶(Molotov)
- 在落点生成火焰
- 对接触的玩家造成持续伤害
- 左键低抛,右键高抛
-
烟雾弹(Smoke)
- 在落点生成烟雾
- 提供视觉掩护
- 左键低抛,右键高抛
使用投掷物:
# 获得投掷物
/gun give grenade 5
/gun give molotov 3
/gun give smoke 2
# 投掷
# 左键:低抛(近距离)
# 右键:高抛(远距离)
后坐力系统
- 不同枪械有不同的后坐力模式
- 配件可以减少后坐力
- 开镜时后坐力会降低
- 连续射击时后坐力会累积
子弹散步系统
- 移动时子弹散步增加
- 静止时子弹散步最小
- 配件可以减少子弹散步
- 开镜时子弹散步降低
English
Custom Weapons
You can create custom weapons in the configuration file:
guns:
my_custom_gun:
name: "My Custom Weapon"
material: "BOW"
magazine_size: 25
damage: 8.0
fire_rate: 600 # RPM
bullet_speed: 70
bullet_drop: 0.06
shoot_sound: "ENTITY_ARROW_SHOOT"
reload_time: 3.0
penetration_power: 1
recoil: 2.5
is_automatic: true
is_shotgun: false
shotgun_pellets: 1
ammo_type: "AMMO_9MM"
Grenade System
The plugin supports three types of grenades:
-
High Explosive Grenade
- Explodes after 5 seconds
- Deals damage to entities within radius
- Left-click low throw, right-click high throw
-
Molotov Cocktail
- Generates fire at impact point
- Deals continuous damage to players in contact
- Left-click low throw, right-click high throw
-
Smoke Grenade
- Generates smoke at impact point
- Provides visual cover
- Left-click low throw, right-click high throw
Using Grenades:
# Get grenades
/gun give grenade 5
/gun give molotov 3
/gun give smoke 2
# Throw
# Left-click: Low throw (close range)
# Right-click: High throw (long range)
Recoil System
- Different weapons have different recoil patterns
- Attachments can reduce recoil
- Recoil decreases when scoped
- Recoil accumulates during continuous shooting
Bullet Spread System
- Bullet spread increases when moving
- Bullet spread is minimum when stationary
- Attachments can reduce bullet spread
- Bullet spread decreases when scoped
❓ 常见问题 / FAQ
中文
Q: 如何获得枪械?
A: 有两种方法:
- 使用命令
/gun give <枪械类型> - 使用
/gun buy打开商店购买
Q: 为什么无法射击?
A: 检查以下几点:
- 是否手持枪械
- 是否有弹药(使用
/gun ammo查看) - 是否有使用权限(
gunplugin.use) - 是否在冷却时间内
Q: 如何安装配件?
A:
- 手持枪械
- 使用
/gun upgrade打开配件界面 - 点击要安装配件的槽位
- 选择配件并点击安装
Q: 配件效果如何叠加?
A: 多个配件的效果会自动叠加。例如:
- 安装多个减少后坐力的配件,后坐力减少效果会叠加
- 扩容弹匣和换弹速度加成会叠加
Q: 如何切换语言?
A:
- 使用命令
/gun lang <语言代码> - 或修改配置文件中的
language设置
Q: 支持哪些Minecraft版本?
A: 目前支持 Minecraft 1.21.4
Q: 如何自定义枪械价格?
A: 编辑配置文件中的 gun_prices 部分:
gun_prices:
p250: 800
ak74: 2000
# ...
Q: 子弹没有伤害怎么办?
A: 检查:
- 玩家权限
- 插件配置
- 服务器日志是否有错误
- 确保子弹更新任务正常运行
English
Q: How to get weapons?
A: There are two methods:
- Use command
/gun give <gun_type> - Use
/gun buyto open shop and purchase
Q: Why can't I shoot?
A: Check the following:
- Are you holding a weapon?
- Do you have ammo? (Use
/gun ammoto check) - Do you have use permission? (
gunplugin.use) - Are you in cooldown?
Q: How to install attachments?
A:
- Hold a weapon
- Use
/gun upgradeto open attachment interface - Click on the slot where you want to install attachment
- Select attachment and click to install
Q: How do attachment effects stack?
A: Multiple attachment effects automatically stack. For example:
- Installing multiple recoil reduction attachments, recoil reduction effects stack
- Extended magazine and reload speed bonuses stack
Q: How to switch language?
A:
- Use command
/gun lang <language_code> - Or modify
languagesetting in configuration file
Q: Which Minecraft versions are supported?
A: Currently supports Minecraft 1.21.4
Q: How to customize weapon prices?
A: Edit the gun_prices section in configuration file:
gun_prices:
p250: 800
ak74: 2000
# ...
Q: Bullets don't deal damage, what to do?
A: Check:
- Player permissions
- Plugin configuration
- Server logs for errors
- Ensure bullet update task is running normally
📞 获取帮助 / Getting Help
中文
如果您遇到问题或需要帮助:
- 查看文档:阅读本教程和 README 文件
- 检查日志:查看服务器日志中的错误信息
- 社区支持:在 GitHub Issues 或 Discord 服务器寻求帮助
- 报告Bug:在 GitHub 上提交问题报告
English
If you encounter problems or need help:
- Check Documentation: Read this tutorial and README files
- Check Logs: Check error messages in server logs
- Community Support: Seek help on GitHub Issues or Discord server
- Report Bugs: Submit issue reports on GitHub
祝您使用愉快!/ Enjoy using the plugin! 🎯
