Sign In

allowListAdded

This event is fired when a player was added to the allow list

v1.0.0+

Register the event

Enable allowListAdded in events in your ForgeMinecraft options in index.js:

const { ForgeClient } = require("@tryforge/forgescript")
const { ForgeMinecraft } = require("@tryforge/forge.minecraft")

const minecraft = new ForgeMinecraft({
  events: [
    "allowListAdded"
  ]
})

const client = new ForgeClient({
  events: [
    "clientReady"
  ],
  intents: [
    "Guilds"
  ],
  extensions: [
    minecraft
  ]
})

Handle the event

Listen and react when allowListAdded is triggered using an inline command or an external handler file:

minecraft.commands.add({
  type: "allowListAdded",
  code: `$log[allowListAdded event was triggered!]`
})

Was this page helpful?