Skip to content

Repository files navigation

HyPixelic/mineflayer (Hyflayer)

Version Downloads

Caution

Using Mineflayer and an Minecraft Account to log into Hypixel as a Bot violates Hypixels Terms of Service.
This may get your Minecraft Account banned if abused for non chat related things that give you an unfair advantage.

✨ Quick Start

npm » npx jsr add @hypixelic/mineflayer
pnpm » pnpm dlx jsr add @hypixelic/mineflayer
bun » bunx jsr add @hypixelic/mineflayer

import mineflayer from "mineflayer";
import { HyFlayer, Bot as HyFlayerBot } from "@hypixelic/mineflayer"

// The following type trickery is needed as mineflayer isn't really type compatible.

// @ts-expect-error
const bot = mineflayer.createBot({
  host: "hypixel.net",
  username: "MICROSOFT_ACCOUNT_EMAIL",
  auth: "microsoft",
  version: "1.8.9",
}) as HyFlayerBot

const hyflayer = HyFlayer()

// @ts-expect-error
bot.loadPlugin(hyflayer);

bot.on("HYFLAYER_GUILD_CHAT", (event) => {
  /*
  On every Message sent in the Guild Chat you will now receive an Event Object structured like below:
  {
    "UUID":"14727faefbdc4aff848cd2713eb9939e",
    "username":"Pixelic",
    "message":"Hey",
    "timestamp":1742216120
  }
  */
});

Commands

Commands are available through the bot.commands object:

bot.commands.inviteToParty("Pixelic");

Messaging

  • bot.commands.sendPrivateMessage(player, message)
  • bot.commands.replyToPrivateMessage(message)
  • bot.commands.sendPartyMessage(message)
  • bot.commands.sendGuildMessage(message)
  • bot.commands.sendGuildOfficerMessage(message)
  • bot.commands.sendSkyblockCoopMessage(message)

Friends

  • bot.commands.addFriend(player)
  • bot.commands.denyFriend()
  • bot.commands.removeFriend(player)
  • bot.commands.removeAllFriends()
  • bot.commands.getFriends()

Party

  • bot.commands.inviteToParty(player)
  • bot.commands.removeFromParty(player)
  • bot.commands.leaveParty()
  • bot.commands.disbandParty()
  • bot.commands.kickOfflinePartyMembers()
  • bot.commands.warpParty()
  • bot.commands.getPartyMembers()

Guild

  • bot.commands.sendGuildMessage(message)
  • bot.commands.sendGuildOfficerMessage(message)
  • bot.commands.toggleGuildSlowChat()
  • bot.commands.muteGuildChat(duration)
  • bot.commands.muteGuildMember(member, duration)
  • bot.commands.unmuteGuildChat()
  • bot.commands.unmuteGuildMember(member)
  • bot.commands.getGuildInfo()
  • bot.commands.getGuildMembers()
  • bot.commands.getGuildMember(member)
  • bot.commands.inviteToGuild(member)
  • bot.commands.kickFromGuild(member)
  • bot.commands.promoteGuildMember(member)
  • bot.commands.demoteGuildMember(member)

Ignore List

  • bot.commands.addIgnore(player)
  • bot.commands.removeIgnore(player)
  • bot.commands.getIgnores()

Social

  • bot.commands.boop(player)
  • bot.commands.cookie(player)
  • bot.commands.hug(player)

Navigation And Chat

  • bot.commands.lobby(lobbyName)
  • bot.commands.toggleChat()
  • bot.commands.sendHypixelCommand(command, args)

lobbyName accepts Hypixel lobby IDs and aliases such as "bedwars", "skyblock", and "SkyBlock".

⚙️ Development

  • pnpm install: Installs all required dependencies
  • pnpm build: Runs the TypeScript compiler
  • pnpm test: Runs the local mocked command tests
  • pnpm test:live: Launches the Mineflayer Bot for live testing

Note

This Project is not affiliated or endorsed by Hypixel, Inc.

About

Hypixel Utilities for Mineflayer.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages