@@ -23,6 +23,8 @@ const SFS = pocketnode("utils/SimpleFileSystem");
2323
2424class Server {
2525 initVars ( ) {
26+ this . _pocketnode = { } ;
27+
2628 this . _bannedIps = { } ;
2729 this . _bannedNames = { } ;
2830 this . _ops = { } ;
@@ -70,9 +72,11 @@ class Server {
7072 this . _entityCount = 0 ;
7173 }
7274
73- constructor ( logger , paths ) {
75+ constructor ( pocketnode , logger , paths ) {
7476 this . initVars ( ) ;
7577
78+ this . _pocketnode = pocketnode ;
79+
7680 this . _logger = logger ;
7781 this . _paths = paths ;
7882
@@ -108,7 +112,7 @@ class Server {
108112 this . _maxPlayers = this . _config . getNested ( "server.max-players" , 20 ) ;
109113 this . _onlineMode = this . _config . getNested ( "server.online-mode" , true ) ;
110114
111- if ( ! pocketnode . TRAVIS_BUILD ) process . stdout . write ( "\x1b]0;" + this . getName ( ) + " " + this . getPocketNodeVersion ( ) + "\x07" ) ;
115+ if ( ! TRAVIS_BUILD ) process . stdout . write ( "\x1b]0;" + this . getName ( ) + " " + this . getPocketNodeVersion ( ) + "\x07" ) ;
112116
113117 this . getLogger ( ) . debug ( "Server Id:" , this . _serverId ) ;
114118
@@ -145,7 +149,7 @@ class Server {
145149
146150 this . _tickCounter = 0 ;
147151
148- this . getLogger ( ) . info ( "Done (" + ( Date . now ( ) - pocketnode . START_TIME ) + "ms)!" ) ;
152+ this . getLogger ( ) . info ( "Done (" + ( Date . now ( ) - this . _pocketnode . START_TIME ) + "ms)!" ) ;
149153
150154 this . tickProcessor ( ) ;
151155 //this.forceShutdown();
@@ -180,21 +184,21 @@ class Server {
180184 * @return {string }
181185 */
182186 getName ( ) {
183- return pocketnode . NAME ;
187+ return this . _pocketnode . NAME ;
184188 }
185189
186190 /**
187191 * @return {string }
188192 */
189193 getCodeName ( ) {
190- return pocketnode . CODENAME ;
194+ return this . _pocketnode . CODENAME ;
191195 }
192196
193197 /**
194198 * @return {string }
195199 */
196200 getPocketNodeVersion ( ) {
197- return pocketnode . VERSION ;
201+ return this . _pocketnode . VERSION ;
198202 }
199203
200204 /**
@@ -215,7 +219,7 @@ class Server {
215219 * @return {string }
216220 */
217221 getApiVersion ( ) {
218- return pocketnode . API_VERSION ;
222+ return this . _pocketnode . API_VERSION ;
219223 }
220224
221225 /**
@@ -303,7 +307,7 @@ class Server {
303307 * @return {string }
304308 */
305309 getMotd ( ) {
306- return this . _config . getNested ( "server.motd" , pocketnode . NAME + " Server" ) ;
310+ return this . _config . getNested ( "server.motd" , this . _pocketnode . NAME + " Server" ) ;
307311 }
308312
309313 /**
0 commit comments