Interface in @minecraft/server
Extends PlayerChangeSkinAfterEvent, CancellableEvent
Basalt’s own: a skin change before anyone sees it; cancelled, the player keeps the old one.
import type { PlayerChangeSkinBeforeEvent } from '@minecraft/server';Subscribe to it with world.beforeEvents.playerChangeSkin.
Example
Section titled “Example”import { world, type PlayerChangeSkinBeforeEvent } from '@minecraft/server';
world.beforeEvents.playerChangeSkin.subscribe((event: PlayerChangeSkinBeforeEvent) => { console.log('playerChangeSkin', event.player.name, event.isTrusted);
// Uncomment to stop it from happening. // event.cancel = true;});import { world } from '@minecraft/server';
world.beforeEvents.playerChangeSkin.subscribe((event) => { console.log('playerChangeSkin', event.player.name, event.isTrusted);
// Uncomment to stop it from happening. // event.cancel = true;});Used by
Section titled “Used by”WorldBeforeEvents.playerChangeSkin
Inherited
Section titled “Inherited”From PlayerChangeSkinAfterEvent: player, skin, isTrusted
From CancellableEvent: cancel