@@ -23,18 +23,16 @@ const SFS = pocketnode("utils/SimpleFileSystem");
2323
2424class Server {
2525 initVars ( ) {
26- this . PocketNode = { } ;
27-
2826 this . _bannedIps = { } ;
2927 this . _bannedNames = { } ;
3028 this . _ops = { } ;
3129 this . _whitelist = { } ;
32-
30+
3331 this . _running = true ;
3432 this . _stopped = false ;
3533
3634 this . _pluginManager = { } ;
37-
35+
3836 this . _scheduler = { } ; //todo
3937
4038 this . _tickCounter = 0 ;
@@ -51,18 +49,18 @@ class Server {
5149 this . _commandMap = { } ;
5250
5351 this . _resourcePackManager = { } ;
54-
52+
5553 this . _onlineMode = false ;
5654
5755 this . _raknetAdapter = { } ;
58-
56+
5957 this . _serverId = Math . floor ( ( Math . random ( ) * 99999999 ) + 1 ) ;
6058
6159 this . _paths = { } ;
6260 this . _config = { } ;
6361
6462 this . _maxPlayers = - 1 ;
65-
63+
6664 this . _players = new PlayerList ( ) ;
6765 this . _loggedInPlayers = new PlayerList ( ) ;
6866 this . _playerList = new PlayerList ( ) ;
@@ -72,10 +70,9 @@ class Server {
7270 this . _entityCount = 0 ;
7371 }
7472
75- constructor ( PocketNode , logger , paths ) {
73+ constructor ( logger , paths ) {
7674 this . initVars ( ) ;
7775
78- this . PocketNode = PocketNode ;
7976 this . _logger = logger ;
8077 this . _paths = paths ;
8178
@@ -111,7 +108,7 @@ class Server {
111108 this . _maxPlayers = this . _config . getNested ( "server.max-players" , 20 ) ;
112109 this . _onlineMode = this . _config . getNested ( "server.online-mode" , true ) ;
113110
114- if ( ! TRAVIS_BUILD ) process . stdout . write ( "\x1b]0;" + this . getName ( ) + " " + this . getPocketNodeVersion ( ) + "\x07" ) ;
111+ if ( ! pocketnode . TRAVIS_BUILD ) process . stdout . write ( "\x1b]0;" + this . getName ( ) + " " + this . getPocketNodeVersion ( ) + "\x07" ) ;
115112
116113 this . getLogger ( ) . debug ( "Server Id:" , this . _serverId ) ;
117114
@@ -148,7 +145,7 @@ class Server {
148145
149146 this . _tickCounter = 0 ;
150147
151- this . getLogger ( ) . info ( "Done (" + ( Date . now ( ) - this . PocketNode . START_TIME ) + "ms)!" ) ;
148+ this . getLogger ( ) . info ( "Done (" + ( Date . now ( ) - pocketnode . START_TIME ) + "ms)!" ) ;
152149
153150 this . tickProcessor ( ) ;
154151 //this.forceShutdown();
@@ -183,21 +180,21 @@ class Server {
183180 * @return {string }
184181 */
185182 getName ( ) {
186- return this . PocketNode . NAME ;
183+ return pocketnode . NAME ;
187184 }
188185
189186 /**
190187 * @return {string }
191188 */
192189 getCodeName ( ) {
193- return this . PocketNode . CODENAME ;
190+ return pocketnode . CODENAME ;
194191 }
195192
196193 /**
197194 * @return {string }
198195 */
199196 getPocketNodeVersion ( ) {
200- return this . PocketNode . VERSION ;
197+ return pocketnode . VERSION ;
201198 }
202199
203200 /**
@@ -218,7 +215,7 @@ class Server {
218215 * @return {string }
219216 */
220217 getApiVersion ( ) {
221- return this . PocketNode . API_VERSION ;
218+ return pocketnode . API_VERSION ;
222219 }
223220
224221 /**
@@ -306,7 +303,7 @@ class Server {
306303 * @return {string }
307304 */
308305 getMotd ( ) {
309- return this . _config . getNested ( "server.motd" , this . PocketNode . NAME + " Server" ) ;
306+ return this . _config . getNested ( "server.motd" , pocketnode . NAME + " Server" ) ;
310307 }
311308
312309 /**
0 commit comments