1 | <?php namespace FreedomCore\TrinityCore\Console\Commands; |
||
10 | class Server extends BaseCommand |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @inheritdoc |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $doNotPrefix = [ |
||
18 | 'saveAll', |
||
19 | 'notify', |
||
20 | 'announce' |
||
21 | ]; |
||
22 | |||
23 | /** |
||
24 | * Trigger corpses expire check in world |
||
25 | * @return array|string |
||
26 | */ |
||
27 | public function corpses() |
||
31 | |||
32 | /** |
||
33 | * Terminate server NOW |
||
34 | * Exit code 0 |
||
35 | * @return array|string |
||
36 | */ |
||
37 | public function exit() |
||
41 | |||
42 | /** |
||
43 | * Display server version and the number of connected players |
||
44 | * @return array|string |
||
45 | */ |
||
46 | public function info() |
||
50 | |||
51 | /** |
||
52 | * Show message of the day |
||
53 | * @return array|string |
||
54 | */ |
||
55 | public function motd() |
||
59 | |||
60 | /** |
||
61 | * Without the argument passed, it will display current limit for players. |
||
62 | * With argument greater that 0, it will set the new limit for max players. |
||
63 | * `reset` parameter may be used to set the value from config. |
||
64 | * @param string $parameter |
||
65 | * @return array|string |
||
66 | */ |
||
67 | public function plimit($parameter = '') |
||
71 | |||
72 | /** |
||
73 | * Set Diff Time For Sever |
||
74 | * @param int $diffTime |
||
75 | * @return array|string |
||
76 | */ |
||
77 | public function setDiffTime(int $diffTime) |
||
81 | |||
82 | /** |
||
83 | * Set Log Level For Server |
||
84 | * @param string $facility |
||
85 | * @param string $name |
||
86 | * @param int $logLevel |
||
87 | * @return array|string |
||
88 | */ |
||
89 | public function setLogLevel(string $facility, string $name, int $logLevel) |
||
105 | |||
106 | /** |
||
107 | * Set new message of the day |
||
108 | * @param string $motd |
||
109 | * @return array|string |
||
110 | */ |
||
111 | public function setMotd(string $motd) |
||
115 | |||
116 | /** |
||
117 | * Sets whether the world accepts new client connections |
||
118 | * @param bool $isClosed |
||
119 | * @return array|string |
||
120 | */ |
||
121 | public function setClosed(bool $isClosed) |
||
126 | |||
127 | /** |
||
128 | * Shutdown server |
||
129 | * @param int $timer Timer for the sever shutdown |
||
130 | * @param bool $force Should the shutdown be forced |
||
131 | * @param int $code Exit code |
||
132 | * @return array|string |
||
133 | */ |
||
134 | public function shutdown(int $timer, bool $force = false, int $code = 0) |
||
143 | |||
144 | /** |
||
145 | * Cancel the restart/shutdown timer if any |
||
146 | */ |
||
147 | public function shutdownCancel() |
||
151 | |||
152 | /** |
||
153 | * Save all players. |
||
154 | * @return array|string |
||
155 | */ |
||
156 | public function saveAll() |
||
160 | |||
161 | /** |
||
162 | * Display a message to all online players |
||
163 | * @param string $message |
||
164 | * @return array|string |
||
165 | */ |
||
166 | public function notify(string $message) |
||
170 | |||
171 | /** |
||
172 | * Send announcement |
||
173 | * @param string $message |
||
174 | * @return array|string |
||
175 | */ |
||
176 | public function announce(string $message) |
||
180 | } |
||
181 |