# IMechanicsManager
> Manages game mechanics toggles and settings.
`gg.lode.observerapi.api.manager`
---
## Signature
```java
public interface IMechanicsManager
```
---
## Nested Types
### ICombatLoggingManager
```java
public interface ICombatLoggingManager
```
Manages combat logging detection and display settings.
#### Methods
##### canCombatLog
```java
boolean canCombatLog()
```
**Returns:** `boolean` - `true` if combat logging detection is enabled
##### getCombatTimer
```java
int getCombatTimer()
```
**Returns:** `int` - the combat timer duration
##### getDisplayType
```java
DisplayType getDisplayType()
```
**Returns:** `DisplayType` - how the combat timer is displayed to players
##### getDisplayMessage
```java
String getDisplayMessage()
```
**Returns:** `String` - the message template for the combat timer display
##### getCombatNotificationTranslation
```java
String getCombatNotificationTranslation()
```
**Returns:** `String` - the translation key for combat notifications
---
### DisplayType
```java
public enum DisplayType
```
| Constant | Description |
|----------|-------------|
| `ACTION_BAR` | Display in the action bar |
| `TITLE` | Display as a title |
| `CHAT` | Display in chat |
---
## Methods
### Boolean Toggles
The following methods each have a getter (`boolean`) and setter (`void`) pair for toggling game mechanics:
| Getter | Setter | Description |
|--------|--------|-------------|
| `isSleepingAllowed()` | `setSleepingAllowed(boolean)` | Whether players can sleep in beds |
| `canEnchantItems()` | `setEnchantItems(boolean)` | Whether enchanting tables work |
| `canUseAnvils()` | `setUseAnvils(boolean)` | Whether anvils are usable |
| `canUseEnderChests()` | `setUseEnderChests(boolean)` | Whether ender chests are usable |
| `canBreedVillagers()` | `setBreedVillagers(boolean)` | Whether villagers can breed |
| `canTradeWithVillagers()` | `setTradeWithVillagers(boolean)` | Whether villager trading is allowed |
| `canUseRespawnAnchors()` | `setUseRespawnAnchors(boolean)` | Whether respawn anchors work |
| `canBedBomb()` | `setBedBomb(boolean)` | Whether beds explode in other dimensions |
| `canPortalTrap()` | `setPortalTrap(boolean)` | Whether portal trapping is allowed |
| `canIndirectPVP()` | `setIndirectPVP(boolean)` | Whether indirect PvP (lava, TNT, etc.) is allowed |
| `shouldGlobalBlockDecay()` | `setGlobalBlockDecay(boolean)` | Whether all placed blocks decay over time |
| `isUnbreakableSpawners()` | `setUnbreakableSpawners(boolean)` | Whether spawners are unbreakable |
| `isBetterWorldBorder()` | `setBetterWorldBorder(boolean)` | Whether the improved world border system is active |
| `shouldMatchWorldBorders()` | `setMatchWorldBorders(boolean)` | Whether world borders synchronize across dimensions |
| `canBrewPotions()` | `setBrewPotions(boolean)` | Whether brewing stands work |
| `isNetherAllowed()` | `setNetherAllowed(boolean)` | Whether nether access is allowed |
| `isEndAllowed()` | `setEndAllowed(boolean)` | Whether end access is allowed |
| `shouldGrantAllRecipes()` | `setShouldGrantAllRecipes(boolean)` | Whether all recipes are unlocked for players |
| `shouldAllowBlockTrampling()` | `setShouldAllowBlockTrampling(boolean)` | Whether farmland can be trampled |
---
### increasedAppleRates
```java
double increasedAppleRates()
```
**Returns:** `double` - the apple drop rate multiplier
---
### setIncreasedAppleRates
```java
void setIncreasedAppleRates(double rate)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `rate` | `double` | The apple drop rate multiplier |
---
### increasedFlintRates
```java
double increasedFlintRates()
```
**Returns:** `double` - the flint drop rate multiplier
---
### setIncreasedFlintRates
```java
void setIncreasedFlintRates(double rate)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `rate` | `double` | The flint drop rate multiplier |
---
### getCombatLoggingManager
```java
ICombatLoggingManager getCombatLoggingManager()
```
**Returns:** `ICombatLoggingManager` - the combat logging manager
---
## Related Pages
- [[IObserverAPI]]
- [[IDecayManager]]