File tree Expand file tree Collapse file tree 5 files changed +16
-6
lines changed
Expand file tree Collapse file tree 5 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 3838 "nameList" :{
3939 "path" :" assets/nameList.txt" ,
4040 "type" :" text"
41+ },
42+ "config" :{
43+ "path" :" assets/config.json" ,
44+ "type" :" text"
4145 }
4246}
Original file line number Diff line number Diff line change 1+ {
2+ "minecraftProduction" : " 185.228.139.97:25564" ,
3+ "minecraftDevelopment" :" localhost:25565" ,
4+ "proxyHTTPS" : " wss:web-minecraft-proxy.herokuapp.com:443" ,
5+ "proxyHTTP" : " ws:web-minecraft-proxy.herokuapp.com:80"
6+ }
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ async function Setup (game) {
4040 document . body . appendChild ( game . stats . dom )
4141 }
4242 game . distanceBasedFog = new DistanceBasedFog ( game )
43+ game . servers = {
44+ production : game . al . get ( 'config' ) . minecraftProduction ,
45+ development : game . al . get ( 'config' ) . minecraftDevelopment
46+ }
4347 UrlParams ( game ) . then ( ( password ) => {
4448 game . password = password
4549 $ ( '.loadingText' ) . text ( `Connecting to ${ game . server } ...` )
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ function UrlParams (game) {
2525 reload = true
2626 if ( game . production ) {
2727 if ( document . location . protocol === 'https:' ) {
28- game . proxy = 'wss:web-minecraft-proxy.herokuapp.com:443'
28+ game . proxy = game . al . get ( 'config' ) . proxyHTTPS
2929 } else {
30- game . proxy = 'ws:web-minecraft-proxy.herokuapp.com:80'
30+ game . proxy = game . al . get ( 'config' ) . proxyHTTP
3131 }
3232 } else {
3333 game . proxy = 'local'
Original file line number Diff line number Diff line change @@ -13,10 +13,6 @@ class Game {
1313 } else {
1414 console . log ( 'Running in development mode' )
1515 }
16- this . servers = {
17- production : '185.228.139.97:25564' ,
18- development : 'localhost:25565'
19- }
2016 this . fov = {
2117 normal : 70 ,
2218 sprint : 80
You can’t perform that action at this time.
0 commit comments