BannedItems

by Mad
for 7 Days to Die
Consolidated module for managing banned items with configurable immunity permissions per item. Efficiently checks player inventories using the new playerongameserver data structure. Server owners can select from predefined permission tiers for each item.
communityTakaro v0.4.9

Components Overview

1
config
0
commands
0
hooks
1
Cron Jobs
1
functions
6
permissions

New Module: BannedItems

NEW
December 15, 2025
Updated to version latest. Added 1 scheduled task: CheckBannedItems. Added 1 function: CheckBannedItems. New permissions: banned_items_immunity_admin, banned_items_immunity_vip, banned_items_immunity_moderator, banned_items_immunity_patreon, banned_items_immunity_donor, banned_items_immunity_trusted. New configuration options: bannedItems, banDuration, kickMessage, banMessage, warningMessage, arrestMessage, discordKickMessage, discordBanMessage, discordArrestMessage, discordWarningMessage, cheaterDetected.

New Module: BannedItems

NEW
August 6, 2025
Updated to version 0.0.9. Added 1 scheduled task: bannedItems. New permissions: BANNED_ITEMS_IMMUNITY, ALLOW_ITEMS_TIER. New configuration options: bannedItemsWithPermissions, warningsBeforePunishment, punishmentType, banDuration, kickMessage, discordChannelId, banMessage, warningMessage.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (11)

bannedItemsarray
Banned Items

Select items that players should not have in their inventory and configure immunity permissions for each

banDurationnumberduration
Ban Duration

How long to ban the player (only applies if punishment type is 'ban')

Default: 86400000
kickMessagestring
Kick Message

Message shown when player is kicked. Use {item} for item name

Default: You have been kicked for possessing: {item}
banMessagestring
Ban Message

Message shown when player is banned. Use {item} for item name

Default: You have been banned for possessing: {item}
warningMessagestring
Warning Message

Message shown for each warning. Use {item} for item name

Default: Remove {item} from your inventory immediately!
arrestMessagestring
Arrest Message

Message shown when player is arrested. Use {pname} for player name, {item} for item name

Default: Player {pname} has been arrested for possessing {item}. Open a ticket to be released.
discordKickMessagestring
Discord Kick Message

Message sent to Discord when player is kicked. Use {pname} for player name, {item} for item name

Default: ⚠️ Player **{pname}** was kicked for possessing: **{item}**
discordBanMessagestring
Discord Ban Message

Message sent to Discord when player is banned. Use {pname} for player name, {item} for item name

Default: 🚫 Player **{pname}** was banned for possessing: **{item}**
discordArrestMessagestring
Discord Arrest Message

Message sent to Discord when player is arrested. Use {pname} for player name, {item} for item name

Default: ⚠️ Player **{pname}** was arrested for possessing: **{item}**
discordWarningMessagestring
Discord Warning Message

Message sent to Discord when player receives a warning. Use {pname} for player name, {item} for item name, {warnings} for warning count, {maxWarnings} for max warnings

Default: ⚡ Player **{pname}** warned for possessing: **{item}** (Warning {warnings}/{maxWarnings})
cheaterDetectedstring
Discord Alert Channel

Discord channel ID to send alerts when punishments are applied

UI Schema

No configuration properties defined. This module uses default settings.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Scheduled Jobs (1)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

CheckBannedItems

*/5 * * * *Schedule

Description

Runs the banned items check on all online players

Schedule Details

Cron Expression
*/5 * * * *
Human-Readable Schedule

Every 5 minutes

Function Implementation

CheckBannedItems Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.

Functions (1)

Reusable JavaScript functions that can be imported and used by other module components like commands, hooks, and cron jobs. These promote code reuse and modularity.

CheckBannedItems

functionReusable Component

Description

Checks all online players for banned items and applies warnings or punishments

Function Implementation

CheckBannedItems Function

JAVASCRIPT

Import Usage

Import: import { CheckBannedItems } from './utils';

About Module Functions

Functions are reusable JavaScript components that can be imported and used by commands, hooks, and cron jobs within your module. They promote code reuse, improve maintainability, and allow you to organize complex logic into modular pieces. Functions must be exported with proper ES6/CommonJS syntax to be importable by other components.

Permissions (6)

These permissions control who can access different features of this module. Administrators can assign these permissions to roles, allowing fine-grained access control.

General Permissions

6 permissions

Admin Immunity

banned_items_immunity_adminPermission Key
Description

Grants immunity from banned items checks (Admin tier)

Permission Details
Full Key:banned_items_immunity_admin
Can Have Count:No
Category:General

Donor Immunity

banned_items_immunity_donorPermission Key
Description

Grants immunity from banned items checks (Donor tier)

Permission Details
Full Key:banned_items_immunity_donor
Can Have Count:No
Category:General

Moderator Immunity

banned_items_immunity_moderatorPermission Key
Description

Grants immunity from banned items checks (Moderator tier)

Permission Details
Full Key:banned_items_immunity_moderator
Can Have Count:No
Category:General

Patreon Immunity

banned_items_immunity_patreonPermission Key
Description

Grants immunity from banned items checks (Patreon tier)

Permission Details
Full Key:banned_items_immunity_patreon
Can Have Count:No
Category:General

Trusted Immunity

banned_items_immunity_trustedPermission Key
Description

Grants immunity from banned items checks (Trusted tier)

Permission Details
Full Key:banned_items_immunity_trusted
Can Have Count:No
Category:General

VIP Immunity

banned_items_immunity_vipPermission Key
Description

Grants immunity from banned items checks (VIP tier)

Permission Details
Full Key:banned_items_immunity_vip
Can Have Count:No
Category:General

About Module Permissions

Permissions control access to module features and functionality. Each permission has a unique key for identification, a friendly name for display, and a description explaining what it allows. Some permissions are countable, meaning they can have numeric values or limits assigned. Administrators assign these permissions to user roles to control who can use different module features.