# WorldEvent > Represents a custom world event with an icon, translation, and commands to execute on activation. `gg.lode.observerapi.api.data` --- ## Signature ```java public class WorldEvent ``` --- ## Constructor ```java public WorldEvent(Material itemIcon, String id, String translationId, List<String> commands) ``` | Parameter | Type | Description | |-----------|------|-------------| | `itemIcon` | `Material` | The icon material for the GUI | | `id` | `String` | Unique identifier for this world event | | `translationId` | `String` | Translation key broadcast on activation/deactivation | | `commands` | `List<String>` | Commands executed on activation | --- ## Methods ### getId ```java public String getId() ``` **Returns:** `String` - the unique identifier --- ### setId ```java public void setId(String id) ``` | Parameter | Type | Description | |-----------|------|-------------| | `id` | `String` | The new identifier | --- ### getItemIcon ```java public Material getItemIcon() ``` **Returns:** `Material` - the icon material for the GUI --- ### setItemIcon ```java public void setItemIcon(Material itemIcon) ``` | Parameter | Type | Description | |-----------|------|-------------| | `itemIcon` | `Material` | The new icon material | --- ### getTranslationId ```java public String getTranslationId() ``` **Returns:** `String` - the translation key broadcast on activation/deactivation --- ### setTranslationId ```java public void setTranslationId(String translationId) ``` | Parameter | Type | Description | |-----------|------|-------------| | `translationId` | `String` | The new translation key | --- ### getCommands ```java public List<String> getCommands() ``` **Returns:** `List<String>` - the commands executed on activation --- ### setCommands ```java public void setCommands(List<String> commands) ``` | Parameter | Type | Description | |-----------|------|-------------| | `commands` | `List<String>` | The new commands list | --- ## Related Pages - [[IWorldEventManager]] - [[StartWorldEvent]] - [[EndWorldEvent]]