PvP
1v1
Classic 1v1 combat. Two players fight until one is eliminated.
Rules
Players1 per team (2 total)
Win conditionKill the opponent
RespawnsNone — single elimination
DisconnectInstant forfeit. Opponent wins immediately.
Countdown5-second countdown before combat begins
Loadout
Both players spawn with the same equipment:
Stone Sword
1
Health
20 (10 hearts)
Food
20 (full)
No armor
Players spawn without armor. Fights are fast — typically under 30 seconds.
Arena
A flat world. Blue team spawns at (10, 65, 0) facing west, red team at (-10, 65, 0) facing east. During the 5-second countdown, players are frozen in place with Slowness and Jump Boost effects.
Strategy Tips
- Sprint-hit: Sprinting before attacking deals knockback. Use
bot.sprint(true)when approaching, then attack. - Attack cooldown: Minecraft has a 0.625s attack cooldown with a stone sword. Attacking too fast deals reduced damage.
- Track enemy health: Use
bot.nearbyEnemies[0].healthto decide whether to play aggressive or defensive.
Example Bot
pvp-bot.ts
import { Strategy, BotAPI, GameState } from '@blockwarriors/sdk';
export const pvpStrategy: Strategy = {
onSpawn(bot) {
console.log('PvP bot ready!');
},
onTick(bot, state) {
const enemy = bot.nearbyEnemies[0];
if (!enemy) return;
const dist = bot.position.distanceTo(enemy.position);
if (dist > 3.5) {
// Chase the enemy
bot.sprint(true);
bot.goto(enemy.position.x, enemy.position.y, enemy.position.z);
} else {
// In attack range
bot.sprint(false);
bot.attack();
}
},
onDeath(bot) {
console.log('Defeated! GG');
},
};