SMP PVP MODE

SMP PVP MODE

This project adds a /duel command to your SMP server, allowing players to start 1v1 arena duels instantly. ——为你的 SMP 服务器添加 /duel 指令,让玩家随时开启 1v1 竞技场决斗。

by
10 Downloads
neoforgepaperminigamesocialutility
Rent Server with this Mod

About this Mod

SMP PVP MODE

[英文版本在下方 | The English version is below]

PVP Mod 是一个为 Minecraft SMP 服务器设计的竞技场地 PVP 模组。该模组通过自动化场地管理、装备发放和战斗规则,为服务器管理员提供了完整的竞技场解决方案。

场地管理

模组支持两种场地模式:

生成模式 (Generate)
自动生成临时竞技场地,战斗结束后自动清理,不污染主世界。场地结构固定为三层:基岩层(Y=317)、草方块层(Y=318)、光源层(Y=319),可配置场地尺寸和生成坐标范围。玩家传送位置在光源层上方(Y=319)。

传送模式 (TP)
使用预先建造的竞技场,通过配置传送点实现玩家快速传送。支持多场地并发,自动检测场地占用状态,避免冲突。

装备系统

战斗前自动保存玩家原有装备、生命值和饥饿值,战斗期间发放临时装备,战斗结束后恢复原状态。

支持配置的装备类型:

  • hotbar - 快捷栏(9个格子)
  • inventory - 背包(27个格子)
  • armor - 盔甲(头盔、胸甲、护腿、靴子)
  • offhand - 副手(手持盾牌等)

所有装备都支持附魔配置。

生命饥饿值恢复

传送至竞技场后可自动回满生命值和饥饿值,战斗结束后恢复传送前的状态。此功能可在配置中开启或关闭。

安全机制

  • 战斗期间禁止丢弃装备,防止刷物资
  • 世界边界限制,防止玩家逃跑
  • 玩家数据持久化到磁盘,支持服务器重启后恢复

玩家体验

  • 纯服务端运行,玩家无需安装客户端模组
  • 聊天按钮交互,操作便捷
  • 同意决斗后进入旁观模式,倒计时期间禁止移动
  • 倒计时结束自动切换到战斗模式,可正常移动和攻击
  • 夜视效果,确保场地可见

内置玩法

经典剑斗 (classic)

  • 显示名称: 经典剑斗
  • 描述: 高版本剑斗PVP
  • 场地模式: 生成模式
  • 装备: 钻石剑、铁剑(锋利1)、钻石盔甲全套
  • 游戏模式: 冒险模式
  • 夜视效果: 开启
  • 倒计时: 5秒
  • 回满生命: 开启

配置说明

配置文件位置

服务器根目录/config/pvpmod-config.json

配置结构

每个玩法独立配置,包含以下核心部分:

{
  "玩法ID": {
    "display-name": "显示名称",
    "description": "玩法描述",
    "arena-mode": "场地模式",
    "game-mode": "游戏模式",
    "equipment": { ... },
    "countdown-seconds": 5,
    "give-night-vision": true,
    "refill-health-hunger": true
  }
}

中文配置字段支持

从 v1.0.2 开始,配置文件支持中文字段名,中英文可以混用。以下是支持的中文别名:

中文字段 英文字段 说明
显示名称 display-name 玩法显示名称
描述 description 玩法描述
场地模式 arena-mode 场地模式(tp/generate)
游戏模式 game-mode 游戏模式
夜视效果 give-night-vision 是否开启夜视效果
倒计时 countdown-seconds 倒计时秒数
回满生命 refill-health-hunger 是否回满生命和饥饿
装备 equipment 装备配置
快捷栏 hotbar 快捷栏(9个格子)
背包 inventory 背包(27个格子)
盔甲 armor 盔甲配置
副手 offhand 副手物品
头盔 helmet 头盔
胸甲 chestplate 胸甲
护腿 leggings 护腿
靴子 boots 靴子
生成配置 generate-config 生成模式配置
传送配置 tp-config 传送模式配置
传送点 spawn-points 传送点列表
尺寸 size 场地尺寸
最小坐标 min-coordinate 最小生成坐标
最大坐标 max-coordinate 最大生成坐标
物品 item 物品ID
数量 count 物品数量
附魔 enchantments 附魔配置
世界边界 world-border 世界边界配置
中心X center-x 世界边界中心X
中心Z center-z 世界边界中心Z

注意:物品ID(如 diamond_swordiron_sword)、附魔ID(如 sharpnessprotection)和游戏模式值(如 adventuresurvival)必须使用英文。

中文配置示例

{
  "chinese-example": {
    "显示名称": "中文配置演示",
    "描述": "使用中文配置字段的示例玩法",
    "场地模式": "generate",
    "生成配置": {
      "尺寸": 32,
      "最小坐标": 1000,
      "最大坐标": 5000
    },
    "装备": {
      "快捷栏": {
        "0": { "物品": "iron_sword", "数量": 1, "附魔": { "sharpness": 3 } }
      },
      "盔甲": {
        "头盔": { "物品": "iron_helmet" },
        "胸甲": { "物品": "iron_chestplate" }
      },
      "副手": { "物品": "shield", "数量": 1 }
    },
    "游戏模式": "adventure",
    "夜视效果": true,
    "倒计时": 3,
    "回满生命": true
  }
}

场地模式配置

生成模式

"arena-mode": "generate",
"generate-config": {
  "size": 64,
  "min-coordinate": 1000,
  "max-coordinate": 5000
}

参数说明:

  • size: 场地尺寸,例如64表示64x64的场地
  • min-coordinate: 场地生成的最小坐标
  • max-coordinate: 场地生成的最大坐标

传送模式

"arena-mode": "tp",
"tp-config": {
  "spawn-points": [
    {
      "player1": { "x": 100, "y": 64, "z": 100 },
      "player2": { "x": 150, "y": 64, "z": 100 }
    }
  ]
}

参数说明:

  • spawn-points: 传送点列表,每个传送点包含两个玩家的位置
  • player1: 挑战者的传送位置
  • player2: 目标玩家的传送位置

可选配置世界边界:

"world-border": {
  "center-x": 125,
  "center-z": 100,
  "size": 64
}

装备配置

装备配置包含四个部分:hotbar(快捷栏)、inventory(背包)、armor(盔甲)、offhand(副手)。

每个物品可以是简单字符串格式或详细对象格式。

简单格式(仅物品名):

"helmet": "diamond_helmet"

详细格式(带数量和附魔):

"0": {
  "item": "diamond_sword",
  "count": 1,
  "enchantments": {
    "sharpness": 5,
    "knockback": 2
  }
}

完整装备配置示例:

"equipment": {
  "hotbar": {
    "0": {
      "item": "diamond_sword",
      "count": 1,
      "enchantments": {
        "sharpness": 5
      }
    },
    "1": {
      "item": "bow",
      "count": 1,
      "enchantments": {
        "power": 5,
        "flame": 1,
        "infinity": 1
      }
    },
    "8": {
      "item": "arrow",
      "count": 64
    }
  },
  "inventory": {
    "0": { "item": "golden_apple", "count": 64 },
    "1": { "item": "golden_apple", "count": 64 }
  },
  "armor": {
    "helmet": {
      "item": "diamond_helmet",
      "enchantments": {
        "protection": 4,
        "unbreaking": 3
      }
    },
    "chestplate": "diamond_chestplate",
    "leggings": "diamond_leggings",
    "boots": "diamond_boots"
  },
  "offhand": {
    "item": "shield",
    "count": 1,
    "enchantments": {
      "unbreaking": 3
    }
  }
}

生命饥饿值恢复配置

"refill-health-hunger": true

参数说明:

  • true: 传送至竞技场后自动回满生命值和饥饿值,战斗结束后恢复原状态
  • false: 保持玩家原有生命值和饥饿值不变

游戏模式配置

"game-mode": "adventure"

可用值:

  • survival: 生存模式
  • creative: 创造模式
  • adventure: 冒险模式(推荐,不能破坏方块)
  • spectator: 旁观模式

其他配置

"give-night-vision": true,
"countdown-seconds": 5

参数说明:

  • give-night-vision: 是否给玩家夜视效果
  • countdown-seconds: 倒计时秒数

常用物品ID

武器

物品名 物品ID
钻石剑 diamond_sword
铁剑 iron_sword
下届合金剑 netherite_sword
石剑 stone_sword
木剑 wooden_sword
bow
crossbow
三叉戟 trident

工具

物品名 物品ID
钻石斧 diamond_axe
钻石镐 diamond_pickaxe
钻石铲 diamond_shovel
钻石锄 diamond_hoe
下届合金斧 netherite_axe
下届合金镐 netherite_pickaxe
下届合金铲 netherite_shovel
下届合金锄 netherite_hoe

盔甲

物品名 物品ID
钻石头盔 diamond_helmet
钻石胸甲 diamond_chestplate
钻石护腿 diamond_leggings
钻石靴子 diamond_boots
铁头盔 iron_helmet
铁胸甲 iron_chestplate
铁护腿 iron_leggings
铁靴子 iron_boots
下届合金头盔 netherite_helmet
下届合金胸甲 netherite_chestplate
下届合金护腿 netherite_leggings
下届合金靴子 netherite_boots

其他

物品名 物品ID
盾牌 shield
金苹果 golden_apple
箭矢 arrow

常用附魔ID

武器附魔

附魔名 效果 最大等级
sharpness 锋利 5
smite 亡灵杀手 5
bane_of_arthropods 节肢杀手 5
knockback 击退 2
fire_aspect 火焰附加 2
looting 抢夺 3
sweeping_edge 横扫之刃 3

弓/弩附魔

附魔名 效果 最大等级
power 力量 5
punch 冲击 2
flame 火矢 1
infinity 无限 1
quick_charge 快速装填 3
multishot 多重射击 1

盔甲附魔

附魔名 效果 最大等级
protection 保护 4
fire_protection 火焰保护 4
blast_protection 爆炸保护 4
projectile_protection 弹射物保护 4
feather_falling 摔落保护 4
thorns 荆棘 3
unbreaking 耐久 3
mending 经验修补 1
respiration 水下呼吸 3
aqua_affinity 水下速掘 1
depth_strider 深海探索者 3
frost_walker 冰霜行者 2

工具附魔

附魔名 效果 最大等级
efficiency 效率 5
silk_touch 精准采集 1
fortune 时运 3
unbreaking 耐久 3
mending 经验修补 1

三叉戟附魔

附魔名 效果 最大等级
impaling 穿刺 5
loyalty 忠诚 3
riptide 激流 3
channeling 引雷 1

命令系统

玩家命令

命令 说明
/duel <玩家> 向指定玩家发起决斗挑战,显示玩法选择菜单
/duel <玩家> <玩法ID> 直接发起指定玩法的决斗
/duel list 查看所有可用玩法列表
/duel accept 接受当前决斗邀请
/duel decline 拒绝当前决斗邀请

管理员命令

命令 说明
/pvp reload 重新加载配置文件(需要管理员权限)

使用流程

发起挑战

  1. 玩家A使用 /duel <玩家B> 命令
  2. 系统显示玩法选择菜单(列出所有可用玩法)
  3. 玩家A点击选择想要的玩法
  4. 系统向玩家B发送决斗邀请

接受挑战

  1. 玩家B收到聊天消息形式的决斗邀请
  2. 点击消息中的"接受"按钮(或使用 /duel accept 命令)
  3. 系统保存双方玩家的原始数据(装备、生命值、饥饿值、位置、游戏模式)
  4. 双方玩家切换到旁观模式
  5. 系统生成或分配竞技场地
  6. 传送双方玩家到场地
  7. 开始倒计时

战斗进行

  1. 倒计时结束后,双方玩家切换到配置的游戏模式(默认冒险模式)
  2. 玩家可以正常移动和攻击
  3. 世界边界限制玩家移动范围
  4. 禁止丢弃装备

战斗结束

  1. 一方玩家阵亡后,战斗结束
  2. 胜利者立即恢复原始装备、生命值、饥饿值并传送回原位置
  3. 失败者点击重生后恢复原始装备、生命值、饥饿值并传送回原位置
  4. 场地被清理(生成模式)或释放(传送模式)

性能优化

生成模式优化

  • 采用异步分批次生成,每批次处理2048个方块
  • 区块预加载在异步线程执行
  • 方块数据准备在异步线程完成
  • 推荐场地尺寸为64x64

传送模式优化

  • 预加载场地区块
  • 配置足够的场地数量
  • 合理设置世界边界

数据持久化

玩家数据(装备、生命值、饥饿值、位置、游戏模式)在战斗开始时保存到内存和磁盘。服务器重启后,系统自动恢复离线玩家的数据。

数据文件位置:

世界目录/data/pvpmod_pending_restore.dat

注意事项

配置热重载

使用 /pvp reload 命令可以在不重启服务器的情况下重载配置,但不会影响正在进行的决斗。

更新配置文件

当模组版本更新后,如果配置文件没有更新,可以删除旧配置文件,服务器重启后会自动生成新的配置文件。

版本兼容性

模组理论上支持 Minecraft 1.21.1,但编译时使用的是 1.21.1 的 API。新版本如有重大 API 变更,可能需要重新编译。

故障排查

配置错误

检查配置文件格式是否正确,使用 JSON 验证工具确保语法无误。配置文件必须包含 display-namearena-mode 字段。

场地问题

生成模式场地未生成时,检查区块加载状态和内存使用。传送模式场地问题时,检查传送点坐标是否有效。

装备问题

装备未发放或未恢复时,检查物品ID是否正确,检查数据文件是否完整。

玩家卡住

如果玩家在战斗结束后卡住,可能是因为玩家数据未正确恢复。可以尝试使用 /duel list 命令查看是否有进行中的决斗,或重启服务器。

性能问题

TPS下降时,检查是否有大量场地同时生成,考虑使用传送模式或增加服务器资源。

扩展指南

添加新玩法

在配置文件中添加新的玩法配置块,设置场地模式、装备配置和游戏规则,使用 /pvp reload 命令重载配置即可生效。

修改现有玩法

编辑配置文件中的玩法配置,保存后使用 /pvp reload 命令使修改生效。

自定义场地设计

传送模式支持任意设计的场地,只需配置玩家传送位置和视角方向即可。


English Version

Overview

PVP Mod is a competitive arena PVP mod designed for Minecraft SMP servers. This mod provides a complete arena solution for server administrators through automated arena management, equipment distribution, and battle rules.

Core Features

Arena Management

The mod supports two arena modes:

Generate Mode
Automatically generates temporary arenas that are cleaned up after battles, keeping the main world unpolluted. Arena structure has three fixed layers: bedrock layer (Y=317), grass block layer (Y=318), light layer (Y=319). Player teleport position is above the light layer (Y=319).

TP Mode
Uses pre-built arenas, enabling fast player teleportation through configured spawn points. Supports multiple concurrent arenas with automatic arena occupancy detection to avoid conflicts.

Equipment System

Automatically saves player's original equipment, health, and hunger before battle, distributes temporary equipment during battle, and restores original state after battle ends.

Supported equipment types:

  • hotbar - 9 slots
  • inventory - 27 slots
  • armor - helmet, chestplate, leggings, boots
  • offhand - shield, etc.

All equipment supports enchantment configuration.

Health & Hunger Restoration

Can automatically restore health and hunger to max when teleporting to arena, and restore original values after battle ends. This feature can be enabled or disabled in config.

Security

  • Prevents item dropping during battle to prevent item duplication
  • World border limits to prevent players from escaping
  • Player data persisted to disk, supports recovery after server restart

Player Experience

  • Server-side only, no client mod required
  • Chat button interaction, easy to operate
  • Enter spectator mode after accepting duel, movement disabled during countdown
  • Automatically switch to battle mode after countdown, normal movement and attack
  • Night vision effect for arena visibility

Built-in Game Modes

Classic Duel (classic)

  • Display Name: Classic Duel
  • Description: High version sword fight PVP
  • Arena Mode: Generate
  • Equipment: Diamond sword, iron sword (Sharpness I), full diamond armor
  • Game Mode: Adventure
  • Night Vision: Enabled
  • Countdown: 5 seconds
  • Refill Health: Enabled

Epic Battle (epic)

  • Display Name: Epic Battle
  • Description: Full netherite gear, max level enchantments, full inventory
  • Arena Mode: Generate
  • Equipment: Full netherite equipment, all weapons and tools, 27 golden apples
  • Game Mode: Adventure
  • Night Vision: Enabled
  • Countdown: 5 seconds
  • Refill Health: Enabled

Configuration

Config File Location

Server Root/config/pvpmod-config.json

Config Structure

Each game mode has independent configuration with the following core sections:

{
  "game-mode-id": {
    "display-name": "Display Name",
    "description": "Game Mode Description",
    "arena-mode": "Arena Mode",
    "game-mode": "Game Mode",
    "equipment": { ... },
    "countdown-seconds": 5,
    "give-night-vision": true,
    "refill-health-hunger": true
  }
}

Chinese Field Name Support

Starting from v1.0.2, config files support Chinese field names. Chinese and English can be mixed. The following Chinese aliases are supported:

Chinese Field English Field Description
显示名称 display-name Game mode display name
描述 description Game mode description
场地模式 arena-mode Arena mode (tp/generate)
游戏模式 game-mode Game mode
夜视效果 give-night-vision Enable night vision
倒计时 countdown-seconds Countdown seconds
回满生命 refill-health-hunger Refill health and hunger
装备 equipment Equipment config
快捷栏 hotbar 9 hotbar slots
背包 inventory 27 inventory slots
盔甲 armor Armor config
副手 offhand Offhand item
头盔 helmet Helmet
胸甲 chestplate Chestplate
护腿 leggings Leggings
靴子 boots Boots
生成配置 generate-config Generate mode config
传送配置 tp-config TP mode config
传送点 spawn-points Spawn points list
尺寸 size Arena size
最小坐标 min-coordinate Min generate coordinate
最大坐标 max-coordinate Max generate coordinate
物品 item Item ID
数量 count Item count
附魔 enchantments Enchantment config
世界边界 world-border World border config
中心X center-x World border center X
中心Z center-z World border center Z

Note: Item IDs (e.g., diamond_sword, iron_sword), enchantment IDs (e.g., sharpness, protection), and game mode values (e.g., adventure, survival) must be in English.

Chinese Config Example:

{
  "chinese-example": {
    "显示名称": "中文配置演示",
    "描述": "使用中文配置字段的示例玩法",
    "场地模式": "generate",
    "生成配置": {
      "尺寸": 32,
      "最小坐标": 1000,
      "最大坐标": 5000
    },
    "装备": {
      "快捷栏": {
        "0": { "物品": "iron_sword", "数量": 1, "附魔": { "sharpness": 3 } }
      },
      "盔甲": {
        "头盔": { "物品": "iron_helmet" },
        "胸甲": { "物品": "iron_chestplate" }
      },
      "副手": { "物品": "shield", "数量": 1 }
    },
    "游戏模式": "adventure",
    "夜视效果": true,
    "倒计时": 3,
    "回满生命": true
  }
}

Arena Mode Configuration

Generate Mode

"arena-mode": "generate",
"generate-config": {
  "size": 64,
  "min-coordinate": 1000,
  "max-coordinate": 5000
}

Parameters:

  • size: Arena size, e.g., 64 means 64x64 arena
  • min-coordinate: Minimum coordinate for arena generation
  • max-coordinate: Maximum coordinate for arena generation

TP Mode

"arena-mode": "tp",
"tp-config": {
  "spawn-points": [
    {
      "player1": { "x": 100, "y": 64, "z": 100 },
      "player2": { "x": 150, "y": 64, "z": 100 }
    }
  ]
}

Parameters:

  • spawn-points: List of spawn points, each containing two player positions
  • player1: Challenger's teleport position
  • player2: Target player's teleport position

Optional world border configuration:

"world-border": {
  "center-x": 125,
  "center-z": 100,
  "size": 64
}

Equipment Configuration

Equipment configuration includes four parts: hotbar, inventory, armor, and offhand.

Each item can be in simple string format or detailed object format.

Simple Format (item name only):

"helmet": "diamond_helmet"

Detailed Format (with count and enchantments):

"0": {
  "item": "diamond_sword",
  "count": 1,
  "enchantments": {
    "sharpness": 5,
    "knockback": 2
  }
}

Full equipment configuration example:

"equipment": {
  "hotbar": {
    "0": {
      "item": "diamond_sword",
      "count": 1,
      "enchantments": {
        "sharpness": 5
      }
    },
    "1": {
      "item": "bow",
      "count": 1,
      "enchantments": {
        "power": 5,
        "flame": 1,
        "infinity": 1
      }
    },
    "8": {
      "item": "arrow",
      "count": 64
    }
  },
  "inventory": {
    "0": { "item": "golden_apple", "count": 64 },
    "1": { "item": "golden_apple", "count": 64 }
  },
  "armor": {
    "helmet": {
      "item": "diamond_helmet",
      "enchantments": {
        "protection": 4,
        "unbreaking": 3
      }
    },
    "chestplate": "diamond_chestplate",
    "leggings": "diamond_leggings",
    "boots": "diamond_boots"
  },
  "offhand": {
    "item": "shield",
    "count": 1,
    "enchantments": {
      "unbreaking": 3
    }
  }
}

Health & Hunger Restoration Configuration

"refill-health-hunger": true

Parameters:

  • true: Automatically restore health and hunger to max when teleporting to arena, restore original values after battle
  • false: Keep player's original health and hunger unchanged

Game Mode Configuration

"game-mode": "adventure"

Available values:

  • survival: Survival mode
  • creative: Creative mode
  • adventure: Adventure mode (recommended, cannot break blocks)
  • spectator: Spectator mode

Other Configuration

"give-night-vision": true,
"countdown-seconds": 5

Parameters:

  • give-night-vision: Whether to give players night vision effect
  • countdown-seconds: Countdown seconds

Common Item IDs

Weapons

Item Name Item ID
Diamond Sword diamond_sword
Iron Sword iron_sword
Netherite Sword netherite_sword
Stone Sword stone_sword
Wooden Sword wooden_sword
Bow bow
Crossbow crossbow
Trident trident

Tools

Item Name Item ID
Diamond Axe diamond_axe
Diamond Pickaxe diamond_pickaxe
Diamond Shovel diamond_shovel
Diamond Hoe diamond_hoe
Netherite Axe netherite_axe
Netherite Pickaxe netherite_pickaxe
Netherite Shovel netherite_shovel
Netherite Hoe netherite_hoe

Armor

Item Name Item ID
Diamond Helmet diamond_helmet
Diamond Chestplate diamond_chestplate
Diamond Leggings diamond_leggings
Diamond Boots diamond_boots
Iron Helmet iron_helmet
Iron Chestplate iron_chestplate
Iron Leggings iron_leggings
Iron Boots iron_boots
Netherite Helmet netherite_helmet
Netherite Chestplate netherite_chestplate
Netherite Leggings netherite_leggings
Netherite Boots netherite_boots

Other

Item Name Item ID
Shield shield
Golden Apple golden_apple
Arrow arrow

Common Enchantment IDs

Weapon Enchantments

Enchantment Effect Max Level
sharpness Sharpness 5
smite Smite 5
bane_of_arthropods Bane of Arthropods 5
knockback Knockback 2
fire_aspect Fire Aspect 2
looting Looting 3
sweeping_edge Sweeping Edge 3

Bow/Crossbow Enchantments

Enchantment Effect Max Level
power Power 5
punch Punch 2
flame Flame 1
infinity Infinity 1
quick_charge Quick Charge 3
multishot Multishot 1

Armor Enchantments

Enchantment Effect Max Level
protection Protection 4
fire_protection Fire Protection 4
blast_protection Blast Protection 4
projectile_protection Projectile Protection 4
feather_falling Feather Falling 4
thorns Thorns 3
unbreaking Unbreaking 3
mending Mending 1
respiration Respiration 3
aqua_affinity Aqua Affinity 1
depth_strider Depth Strider 3
frost_walker Frost Walker 2

Tool Enchantments

Enchantment Effect Max Level
efficiency Efficiency 5
silk_touch Silk Touch 1
fortune Fortune 3
unbreaking Unbreaking 3
mending Mending 1

Trident Enchantments

Enchantment Effect Max Level
impaling Impaling 5
loyalty Loyalty 3
riptide Riptide 3
channeling Channeling 1

Command System

Player Commands

Command Description
/duel <player> Challenge a specific player to a duel, shows game mode selection menu
/duel <player> <game-mode-id> Directly challenge a player with a specific game mode
/duel list View all available game modes
/duel accept Accept current duel invitation
/duel decline Decline current duel invitation

Admin Commands

Command Description
/pvp reload Reload config file (requires admin permission)

Usage Flow

Initiate Challenge

  1. Player A uses /duel <playerB> command
  2. System shows game mode selection menu (lists all available game modes)
  3. Player A clicks to select desired game mode
  4. System sends duel invitation to Player B

Accept Challenge

  1. Player B receives duel invitation as a chat message
  2. Click "Accept" button in message (or use /duel accept command)
  3. System saves both players' original data (equipment, health, hunger, position, game mode)
  4. Both players switch to spectator mode
  5. System generates or allocates arena
  6. Teleport both players to arena
  7. Start countdown

Battle Progress

  1. After countdown ends, both players switch to configured game mode (adventure by default)
  2. Players can move and attack normally
  3. World border limits player movement range
  4. Equipment dropping is prohibited

Battle End

  1. Battle ends when one player dies
  2. Winner immediately restores original equipment, health, hunger, and teleports back to original position
  3. Loser restores original equipment, health, hunger, and teleports back to original position after clicking respawn
  4. Arena is cleaned up (generate mode) or released (TP mode)

Performance Optimization

Generate Mode Optimization

  • Uses asynchronous batch generation, processing 2048 blocks per batch
  • Chunk preloading executed in async thread
  • Block data preparation completed in async thread
  • Recommended arena size is 64x64

TP Mode Optimization

  • Preload arena chunks
  • Configure sufficient arenas
  • Set appropriate world borders

Data Persistence

Player data (equipment, health, hunger, position, game mode) is saved to memory and disk when battle starts. After server restart, the system automatically restores offline players' data.

Data file location:

World Directory/data/pvpmod_pending_restore.dat

Notes

Config Hot Reload

Use /pvp reload command to reload config without server restart. This does not affect ongoing duels.

Update Config File

When mod version is updated, if config file is not updated, you can delete the old config file. A new config file will be automatically generated when server restarts.

Version Compatibility

This mod theoretically supports Minecraft 1.21.1, but is compiled using 1.21.1 API. If new versions have major API changes, recompilation may be required.

Troubleshooting

Config Errors

Check if config file format is correct. Use JSON validation tools to ensure syntax is correct. Config file must contain display-name and arena-mode fields.

Arena Issues

For generate mode arena not generating, check chunk loading status and memory usage. For TP mode arena issues, check if spawn point coordinates are valid.

Equipment Issues

When equipment is not distributed or restored, check if item IDs are correct and if data files are complete.

Player Stuck

If player is stuck after battle ends, it may be because player data was not restored correctly. Try /duel list command to check for ongoing duels, or restart server.

Performance Issues

When TPS drops, check if multiple arenas are generating simultaneously. Consider using TP mode or increasing server resources.

Extension Guide

Add New Game Mode

Add a new game mode config block in the config file, set arena mode, equipment config, and game rules. Use /pvp reload command to make it take effect.

Modify Existing Game Mode

Edit the game mode config in the config file, save, and use /pvp reload command to make changes take effect.

Custom Arena Design

TP mode supports arenas with any design, just configure player teleport positions and view directions.

Available Versions

SMP PVP MODE 1.0.3.1release
MC 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2paper
July 3, 2026
SMP PVP MODE 1.0.3 [Paper]release
MC 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2paper
July 2, 2026
SMP PVP MODE 1.0.3release
MC 1.21.1neoforge
July 2, 2026
SMP PVP MODE 1.0.2release
MC 1.21.1neoforge
July 2, 2026
SMP PVP MODE 1.0.1release
MC 1.21.1neoforge
June 30, 2026

How to Install SMP PVP MODE on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set neoforge Loader

In the panel under "Egg", select the neoforge loader and matching Minecraft version (26.2).

3

Install Mod

Open the mod browser in the dashboard and search for "SMP PVP MODE". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

neoforgepaper

Minecraft Versions

26.2, 26.1.2, 26.1.1 (+19 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

SMP PVP MODE server crashes on startup – what to do?

Most common cause: wrong neoforge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.2). You can switch loaders with one click in the panel.

Is SMP PVP MODE compatible with neoforge and paper?

SMP PVP MODE officially supports neoforge, paper for Minecraft 26.2, 26.1.2, 26.1.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with SMP PVP MODE – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if SMP PVP MODE consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install SMP PVP MODE with just one click on your server.

Recommended RAM
4 GBfrom €8/mo
Minimum 3 GB | per 8 players
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

26.226.1.226.1.126.11.21.111.21.101.21.91.21.81.21.71.21.6+12 more