Archived
0

Добавлено описание модулям

This commit is contained in:
2018-04-24 22:34:26 +03:00
parent c6c3b0e294
commit fc2eb71fb6
2 changed files with 81 additions and 0 deletions

52
core/README.MD Normal file
View File

@@ -0,0 +1,52 @@
# Core
Ядро сервера
## Spring beans
### ConfigFromSpring
Implements: `mc.core.Config`
Bean:
```xml
<bean id="config" class="mc.core.embedded.ConfigFromSpring">
<property name="descriptionServer" value="MC Core"/>
<property name="maxPlayers" value="100"/>
<property name="faviconBase64" value="icon.png"/>
</bean>
```
### InMemoryPlayerManager
Implements: `mc.core.PlayerManager`
Bean:
```xml
<bean id="playerManager" class="mc.core.embedded.InMemoryPlayerManager">
<property name="keepAliveInterval" value="10"/>
</bean>
```
`keepAliveInterval` - как часто (в ms) отправлять клиентам пакет `KeepAlive`
### GameLoop
Bean:
```xml
<bean id="gameLoop" class="mc.core.GameLoop">
<property name="startGameTime" value="6000"/>
<property name="timeMode" value="realtime"/>
</bean>
```
`timeMode` - режим хода времени суток.
Есть три режима:
* `0` или `idle` - полная остановка хода времени суток;
* `normal` - стандартных ход времени (20 минут = 1 игровой день);
* `realtime` - соответствует реальному системному времени.