# Skript Integration Reference

With Verité and Skript both installed, Verité registers a Skript addon automatically and its syntax becomes available with no configuration. Every element delegates to the same public `teacommontea.api` surface documented in the [Developer API Reference](page:developers/api), so a script sees exactly what the plugin enforces.

This page lists every registered condition, effect, expression, event, and event value, grouped by kind, with the actual registered pattern for each. Optional parts appear in `[square brackets]` and choices in `(a|b)`, matching Skript's own pattern grammar. A leading `-` on a type (for example `%-player%`) marks that argument optional.

Two topics have dedicated guides that show these elements in a working chat handler:

- Filtering chat content: [Custom Chat Integration](page:developers/wiring).
- Enforcing mutes, slowmode, and freeze: [Custom Moderation Enforcement](page:developers/moderation-enforcement).

## Conditions

### Muted, banned, vanished, in captcha

These are player-property conditions, so they support Skript's standard `is` / `is not` grammar and plural targets.

```vb
%players% (is|are) muted
%players% (is|are) banned by verite
%players% (is|are) vanished in verite
%players% (is|are) in a captcha
```

| Pattern root | Meaning | Backed by |
| --- | --- | --- |
| `muted` | Player has an active Verité mute. Pure read, sends nothing. | `VeriteModeration.isMuted` |
| `banned by verite` | Player has an active Verité ban. | `VeriteModeration.isBanned` |
| `vanished in verite` | Player is vanished through staff vanish. | `VeriteVanish.isVanished` |
| `in a captcha` | Player is currently solving a captcha challenge. | `VeriteCaptcha.isActive` |

```vb
on chat:
    if player is in a captcha:
        cancel event
```

### Chat freeze and slowmode

```vb
chat is frozen [for %-player%]
%player% is rate limited
%player% is on slowmode
```

`is rate limited` and `is on slowmode` are two phrasings of the same slowmode check. All three map to the moderation gates and send the player a notice as a side effect, so use them in a chat handler where you intend to stop the message, not merely to read state. `chat is frozen` maps to `VeriteModeration.chatMuteGate`; the slowmode phrasings map to `VeriteModeration.slowmodeGate`.

```vb
on chat:
    if chat is frozen for player:
        cancel event
    else if player is on slowmode:
        cancel event
```

### Text blocked by the filter

```vb
%string% (was|is|are) blocked [for %-player%]
%string% (wasn't|was not|isn't|is not|aren't|are not) blocked [for %-player%]
```

Without a player it is a pure classification that records nothing, safe for scanning signs, book titles, or anvil renames. With `for %player%` it also records the hit against that player, matching live chat filtering. This reports only whether the text is blocked; use the filter-result expression below to distinguish profanity from self-harm or abuse. Backed by `VeriteFilter`. See [Custom Chat Integration](page:developers/wiring).

### Punishment issued or removed

Usable inside the `verite punishment` event to tell an issue apart from a removal.

```vb
[the] verite punishment was removed
[the] verite punishment was (not removed|issued)
```

Reads the removed flag off the current event. Outside the event it is always false.

## Effects

### Issue a punishment

```vb
verite ban %player% [for %-timespan%] [(with reason|for) %-string%] [by %-player%] [silent:silently]
verite mute %player% [for %-timespan%] [(with reason|for) %-string%] [by %-player%] [silent:silently]
verite kick %player% [(with reason|for) %-string%] [by %-player%] [silent:silently]
verite warn %player% [(with reason|for) %-string%] [by %-player%] [silent:silently]
```

A timespan makes a ban or mute temporary; omitting it makes it permanent. Kick and warn take no timespan. `by %player%` sets the executor; omitted, the punishment is issued as console. Trailing `silently` sets the silent flag so the punishment is not broadcast. The target must be an online player, since the effect resolves the uuid and name from it. Backed by `VeriteModeration.ban` / `mute` / `kick` / `warn`.

```vb
verite ban player for 7 days with reason "spam" by {_staff} silently
verite warn player for "first offence"
```

### Lift a punishment

```vb
verite unban %player% [(with reason|for) %-string%] [by %-player%]
verite unmute %player% [(with reason|for) %-string%] [by %-player%]
verite unwarn %player% [(with reason|for) %-string%] [by %-player%]
```

`by %player%` records who lifted it; omitted, it is recorded as console. The target must be online. Backed by `VeriteModeration.unban` / `unmute` / `unwarn`.

### Scan text and record the flag

```vb
check %string% for %player%
```

Runs a message through the filter and records any hit against the player, exactly as live chat filtering does, without returning the verdict. This is the fire-and-forget companion to the blocked condition and the filter-result expression. Backed by `VeriteFilter.check`.

### Issue a captcha challenge

```vb
challenge %player% with [a] captcha [(with reason|for|from) %-string%]
challenge %player% with [a] detailed captcha [(with reason|for|from) %-string%]
```

Starts a standard or detailed challenge immediately, tagged with an optional source label recording why it was opened. The label defaults to a generic value when omitted. Backed by `VeriteCaptcha.challengeStandard` / `challengeDetailed`.

### Server lockdown

```vb
begin message lockdown [(with reason|for) %-string%]
end message lockdown
```

Seals the server behind a lockdown with an optional reason, or lifts it. The reason defaults to a generic label. Backed by `VeriteLockdown.begin` / `end`. See [Custom Moderation Enforcement](page:developers/moderation-enforcement).

## Expressions

### Filter result of a message

```vb
filter [the] result of %string% [for %-player%]
```

Returns the filter's classification as a lowercase string: `clean`, `block`, `profanity`, `self_harm`, or `abuse`. This is the only filter syntax that preserves the distinction between ordinary blocked content and a speaker who may be in crisis or being harmed, so route `self_harm` and `abuse` to a care response rather than a punishment. Without a player it records nothing; with `for %player%` it also records the hit. Backed by `VeriteFilter.check` and `FilterResult`.

```vb
set {_result} to filter the result of {_msg} for player
if {_result} is "self_harm" or {_result} is "abuse":
    # handle with care, do not punish
    stop
if {_result} is not "clean":
    send block message to player
    stop
```

### Filter block message

```vb
block message
```

Returns the configured message shown when a chat message is blocked. Backed by `VeriteFilter.blockMessage`.

### Filter flag count

```vb
[get] message flags (for|of) %player%
```

Returns how many times the filter has flagged a player. Returns 0 for a player with no record. Backed by `VeriteFilter.count`.

### Active ban or mute details

```vb
[get] [verite] ban status of %player% [reason:with reason]
[get] [verite] mute status of %player% [reason:with reason]
```

Without `with reason` the expression returns the remaining time in milliseconds, or `-1` for a permanent punishment. With `with reason` it returns the punishment reason text. Returns nothing when there is no active punishment of that kind. Backed by `VeriteModeration.activeBan` / `activeMute`.

```vb
set {_left} to verite ban status of player
set {_why} to verite ban status of player with reason
```

### Fields of a punishment value

```vb
[get] punishment type of %veritepunishment%
[get] punishment reason of %veritepunishment%
[get] punishment target uuid of %veritepunishment%
[get] punishment target ip of %veritepunishment%
[get] punishment executor name of %veritepunishment%
[get] punishment removed by name of %veritepunishment%
[get] punishment removal reason of %veritepunishment%
[get] punishment length of %veritepunishment%
```

Reads one field off a Verité punishment value, most useful inside the `verite punishment` event. `type` is the lowercase punishment type (`ban`, `mute`, `warning`, `kick`). `target uuid` is the affected player's uuid as a string, or nothing for an ip-scoped punishment. `length` is the total duration in milliseconds, or `-1` for a permanent punishment. Backed by the public `Punishment` accessors.

### Vanish state

A settable boolean property.

```vb
[the] vanish state of %players%
%players%'s vanish state
```

Reading returns whether the player is vanished. Setting to `true` vanishes them, `false` unvanishes. Only the set change mode is supported. Backed by `VeriteVanish.isVanished` / `vanish` / `unvanish`.

```vb
set vanish state of player to true
```

### Known name and uuid lookups

```vb
[get] [verite] name of %player%
[get] [verite] uuid of %string%
```

`name of` returns the last known username Verité recorded for a player. `uuid of` resolves a username to the uuid Verité last recorded for it (as a string), which works for offline or never-online names in Verité's directory. Both return nothing when unknown. Backed by `VeritePlayerData.nameOf` / `uuidByName`.

### GeoIP country

```vb
[get] country of %string%
```

Returns the country name Verité resolves for an ip string, or nothing when the ip cannot be resolved, the database is unavailable, or the address is private. Backed by `VeriteGeoIp.country`.

### Fancy time

```vb
[get] fancy time of %number%
```

Formats a millisecond count as a human-readable duration in Verité's own style, matching the wording the plugin uses for punishment lengths and remaining times. Backed by `VeriteFormat.fancyTime`.

## Event

Verité registers a Bukkit event so scripts can react to punishments.

```vb
on verite punishment:
```

The event fires when a punishment is issued and when one is lifted, pardoned, or expired. Use the `verite punishment was removed` / `was issued` condition to tell the two apart, and the punishment-field expressions to read the record.

```vb
on verite punishment:
    if the verite punishment was issued:
        broadcast "%punishment executor name of event-punishment% punished someone"
```

### Event values

Inside the `verite punishment` event, the punishment is exposed as an event value.

| Event value | Type | Meaning |
| --- | --- | --- |
| `event-punishment` | Verite Punishment | The punishment that was issued or lifted. |

The `Verite Punishment` type is registered under the pattern `(verite ?)?punishments?`, so `punishment` and `verite punishment` both name it. Read its fields with the punishment-field expressions above.
