# AffectMode
> Controls whether a storm's geometry, damage, and visuals are shared by every player in a world, or maintained independently per player.
`gg.lode.barrierapi.AffectMode`
Added in API `1.0.4`.
---
## Signature
```java
public enum AffectMode
```
---
## Values
| Value | Description |
|---|---|
| `GLOBAL` | One shared border for the whole world. Mutations via [[IBarrierAPI#getStorm\|`getStorm(World)`]] affect every player. This is the default and is identical to Barrier's historical behavior. |
| `PER_PLAYER` | Each player has their own independent border, seeded from the global border as a template, then free to diverge. Resolve a player's border with [[IBarrierAPI#getStorm (player-scoped)\|`getStorm(Player)`]]. Per-player state is session-only (not persisted across restarts). |
---
## Usage
```java
import gg.lode.barrierapi.AffectMode;
import gg.lode.barrierapi.IStorm;
IStorm storm = BarrierAPI.getApi().getStorm(world);
// Switch the world to per-player borders
storm.setAffectMode(AffectMode.PER_PLAYER);
// Now control one player's border without affecting anyone else
IStorm mine = BarrierAPI.getApi().getStorm(player);
mine.setRadius(50, 10); // shrink just this player's border over 10s
mine.setColor(Color.RED);
```
Server owners can switch modes in-game with `/worldborder affect GLOBAL|PER_PLAYER`.
> [!info] Backwards compatible
> `AffectMode` and `getStorm(Player)` are purely additive. Existing integrations that use `getStorm(World)` are unaffected and continue to control the shared `GLOBAL` border.
---
## Related Pages
- [[IBarrierAPI]] — `getStorm(World)` and `getStorm(Player)`
- [[IStorm]] — `getAffectMode()` / `setAffectMode(AffectMode)`
- [[StormType]] — Storm shape types