Archived
0
This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mc-core/core/README.MD

70 lines
1.3 KiB
Markdown

# 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>
```
### IdleTime
Implements: `mc.core.time.TimeProcessor`
Bean:
```xml
<bean id="idleTime" class="mc.core.time.IdleTime">
<constructor-arg index="0" type="long" value="1000"/>
</bean>
```
в качестве параметра конструктора указывается стартовое время.
### TimePerTick
Implements: `mc.core.time.TimeProcessor`
Bean:
```xml
<bean id="timePerTick" class="mc.core.time.TimePerTick">
<property name="startGameTime" value="1000"/>
</bean>
```
в качестве параметра указывается стартовое время.
### RealTime
Implements: `mc.core.time.TimeProcessor`
Bean:
```xml
<bean id="realTime" class="mc.core.time.RealTime"/>
```
### GameLoop
Bean:
```xml
<bean id="gameLoop" class="mc.core.GameLoop">
<property name="gameTimer" ref="timeProcessor"/>
</bean>
```
`gameTimer` - бин, управляющий ходом времени