PageSourceSearch

https://fabricmc.net/scripts/Server.acff9dc7.js

js fabricmc.net collected 2026-10-02 05:34:45 UTC 11,217 bytes, 399 lines download raw bytes

1import { S as qe, i as Fe, s as Je, h as Me, e as i, c as g, u as Ue, o as Le, p as Se, d as k, q as re, t as I, a as b, f as O, g as s, n as F, v as Ge, k as _, r as oe, l as H, w as Te, m as se, A as ge, j as ae, x as ze, B as Ae } from "./index.4deac2e0.js";
2import { d as Be, b as De, c as Ee } from "./Api.fd2c0b6d.js";
3import He from "./DownloadIcon.39c279f6.js";
4function ke(n, e, r) {
5  const o = n.slice();
6  return o[11] = e[r], o;
7}
8function we(n, e, r) {
9  const o = n.slice();
10  return o[11] = e[r], o;
11}
12function Ce(n, e, r) {
13  const o = n.slice();
14  return o[11] = e[r], o;
15}
16function Oe(n) {
17  let e, r, o = (
18    /*error*/
19    n[18].message + ""
20  ), c, a, m;
21  return {
22    c() {
23      e = i("p"), r = I("Error: "), c = I(o), a = b(), m = i("p"), m.innerHTML = `For support please visit one of our
24    <a href="/discuss/">community discussion</a>
25    groups.`, O(e, "color", "red");
26    },
27    m(f, h) {
28      g(f, e, h), s(e, r), s(e, c), g(f, a, h), g(f, m, h);
29    },
30    p: F,
31    i: F,
32    o: F,
33    d(f) {
34      f && k(e), f && k(a), f && k(m);
35    }
36  };
37}
38function Pe(n) {
39  let e, r, o, c, a, m, f, h, G, V, y, J, T, K, j, L, w, C, z, ie, ce, Q, P, fe, R, N, W, S, Y, ue, Z, _e, X, he, $, x, q, ee, me, te, de, A, pe, le, ve, M, ne, be, B = (
40    /*data*/
41    n[10].game
42  ), d = [];
43  for (let t = 0; t < B.length; t += 1)
44    d[t] = Ve(Ce(n, B, t));
45  let D = (
46    /*data*/
47    n[10].loader
48  ), p = [];
49  for (let t = 0; t < D.length; t += 1)
50    p[t] = je(we(n, D, t));
51  let E = (
52    /*data*/
53    n[10].installer
54  ), v = [];
55  for (let t = 0; t < E.length; t += 1)
56    v[t] = Ie(ke(n, E, t));
57  return z = new He({}), {
58    c() {
59      e = i("div"), r = i("div"), o = i("label"), o.textContent = "Minecraft Version:", c = b(), a = i("select");
60      for (let t = 0; t < d.length; t += 1)
61        d[t].c();
62      m = b(), f = i("div"), h = i("label"), h.textContent = "Fabric 
62Loader Version:", G = b(), V = i("select");
63      for (let t = 0; t < p.length; t += 1)
64        p[t].c();
65      y = b(), J = i("div"), T = i("label"), T.textContent = "Installer Version:", K = b(), j = i("select");
66      for (let t = 0; t < v.length; t += 1)
67        v[t].c();
68      L = b(), w = i("div"), C = i("a"), Ge(z.$$.fragment), ie = I("Executable Server (.jar)"), ce = b(), Q = i("p"), P = i("a"), fe = I("Download installer for older versions or manual installation"), R = b(), N = i("p"), N.textContent = "The executable jar is a small launcher that will start the Fabric enabled Minecraft server using the versions specified above. There is no need to use an installer when using this method.", W = b(), S = i("div"), Y = i("h4"), Y.textContent = "CLI download:", ue = b(), Z = i("p"), Z.textContent = "Use the following command to download the executable server launcher to the current directory", _e = b(), X = i("code"), he = I("curl -OJ "), $ = I(
69        /*serverJarUrl*/
70        n[5]
71      ), x = b(), q = i("div"), ee = i("h4"), ee.textContent = "Launch command:", me = b(), te = i("p"), te.textContent = "Use the following command to run the executable server launcher with 2GB of ram. After a small wait the Minecraft server will be ready.", de = b(), A = i("code"), pe = I("java -Xmx2G -jar "), le = I(
72        /*serverJarFilename*/
73        n[4]
74      ), ve = I(" nogui"), _(o, "for", "minecraft-version"), _(a, "id", "minecraft-version"), O(a, "min-width", "200px"), /*gameVersion*/
75      n[0] === void 0 && oe(() => (
76        /*select0_change_handler*/
77        n[7].call(a)
78      )), _(r, "class", "form-line"), _(h, "for", "loader-version"), _(V, "id", "loader-version"), O(V, "min-width", "200px"), /*loaderVersion*/
79      n[1] === void 0 && oe(() => (
80        /*select1_change_handler*/
81        n[8].call(V)
82      )), _(f, "class", "form-line"), _(T, "for", "installer-version"), _(j, "id", "installer-version"), O(j, "min-width", "200px"), /*installerVersion*/
83      n[2] === void 0 && oe(() => (
84        /*select2_change_handler*/
85        n[9].call(j)
86      )), _(J, "class", "form-line"), _(C, "class", "button primary large"), _(
87        C,
88        "href",
89        /*serverJarUrl*/
90        n[5]
91      ), _(w, "class", "download"), _(
92        P,
93        "href",
94        /*installerJarUrl*/
95        n[3]
96      ), _(e, "class", "download"), _(X, "class", "svelte-l8qzb7"), O(S, "margin-bottom", "15px"), _(A, "class", "svelte-l8qzb7"), O(q, "margin-bottom", "15px");
97    },
98    m(t, u) {
99      g(t, e, u), s(e, r), s(r, o), s(r, c), s(r, a);
100      for (let l = 0; l < d.length; l += 1)
101        d[l] && d[l].m(a, null);
102      H(
103        a,
104        /*gameVersion*/
105        n[0],
106        !0
107      ), s(e, m), s(e, f), s(f, h), s(f, G), s(f, V);
108      for (let l = 0; l < p.length; l += 1)
109        p[l] && p[l].m(V, null);
110      H(
111        V,
112        /*loaderVersion*/
113        n[1],
114        !0
115      ), s(e, y), s(e, J), s(J, T), s(J, K), s(J, j);
116      for (let l = 0; l < v.length; l += 1)
117        v[l] && v[l].m(j, null);
118      H(
119        j,
120        /*installerVersion*/
121        n[2],
122        !0
123      ), s(e, L), s(e, w), s(w, C), Te(z, C, null), s(C, ie), s(e, ce), s(e, Q), s(Q, P), s(P, fe), g(t, R, u), g(t, N, u), g(t, W, u), g(t, S, u), s(S, Y), s(S, ue), s(S, Z), s(S, _e), s(S, X), s(X, he), s(X, $), g(t, x, u), g(t, q, u), s(q, ee), s(q, me), s(q, te), s(q, de), s(q, A), s(A, pe), s(A, le), s(A, ve), M = !0, ne || (be = [
124        se(
125          a,
126          "change",
127          /*select0_change_handler*/
128          n[7]
129        ),
130        se(
131          V,
132          "change",
133          /*select1_change_handler*/
134          n[8]
135        ),
136        se(
137          j,
138          "change",
139          /*select2_change_handler*/
140          n[9]
141        )
142      ], ne = !0);
143    },
144    p(t, u) {
145      if (u & /*versions*/
146      64) {
147        B = /*data*/
148        t[10].game;
149        let l;
150        for (l = 0; l < B.length; l += 1) {
151          const U = Ce(t, B, l);
152          d[l] ? d[l].p(U, u) : (d[l] = Ve(U), d[l].c(), d[l].m(a, null));
153        }
154        for (; l < d.length; l += 1)
155          d[l].d(1);
156        d.length = B.length;
157      }
158      if (u & /*gameVersion, versions*/
159      65 && H(
160        a,
161        /*gameVersion*/
162        t[0]
163      ), u & /*versions*/
164      64) {
165        D = /*data*/
166        t[10].loader;
167        let l;
168        for (l = 0; l < D.length; l += 1) {
169          const U = we(t, D, l);
170          p[l] ? p[l].p(U, u) : (p[l] = je(U), p[l].c(), p[l].m(V, null));
171        }
172        for (; l < p.length; l += 1)
173          p[l].d(1);
174        p.length = D.length;
175      }
176      if (u & /*loaderVersion, versions*/
177      66 && H(
178        V,
179        /*loaderVersion*/
180        t[1]
181      ), u & /*versions*/
182      64) {
183        E = /*data*/
184        t[10].installer;
185        let l;
186        for (l = 0; l < E.length; l += 1) {
187          const U = ke(t, E, l);
188          v[l] ? v[l].p(U, u) : (v[l] = Ie(U), v[l].c(), v[l].m(j, null));
189        }
190        for (; l < v.length; l += 1)
191          v[l].d(1);
192        v.length = E.length;
193      }
194      u & /*installerVersion, versions*/
195      68 && H(
196        j,
197        /*installerVersion*/
198        t[2]
199      ), (!M || u & /*serverJarUrl*/
200      32) && _(
201        C,
202        "href",
203        /*serverJarUrl*/
204        t[5]
205      ), (!M || u & /*installerJarUrl*/
206      8) && _(
207        P,
208        "href",
209        /*installerJarUrl*/
210        t[3]
211      ), (!M || u & /*serverJarUrl*/
212      32) && ge(
213        $,
214        /*serverJarUrl*/
215        t[5]
216      ), (!M || u & /*serverJarFilename*/
217      16) && ge(
218        le,
219        /*serverJarFilename*/
220        t[4]
221      );
222    },
223    i(t) {
224      M || (Le(z.$$.fragment, t), M = !0);
225    },
226    o(t) {
227      Se(z.$$.fragment, t), M = !1;
228    },
229    d(t) {
230      t && k(e), ae(d, t), ae(p, t), ae(v, t), ze(z), t && k(R), t && k(N), t && k(W), t && k(S), t && k(x), t && k(q), ne = !1, Ae(be);
231    }
232  };
233}
234function Ve(n) {
235  let e, r = (
236    /*version*/
237    n[11].version + ""
238  ), o;
239  return {
240    c() {
241      e = i("option"), o = I(r), e.__value = /*version*/
242      n[11].version, e.value = e.__value;
243    },
244    m(c, a) {
245      g(c, e, a), s(e, o);
246    },
247    p: F,
248    d(c) {
249      c && k(e);
250    }
251  };
252}
253function je(n) {
254  let e, r = (
255    /*version*/
256    n[11].version + ""
257  ), o;
258  return {
259    c() {
260      e = i("option"), o = I(r), e.__value = /*version*/
261      n[11].version, e.value = e.__value;
262    },
263    m(c, a) {
264      g(c, e, a), s(e, o);
265    },
266    p: F,
267    d(c) {
268      c && k(e);
269    }
270  };
271}
272function Ie(n) {
273  let e, r = (
274    /*version*/
275    n[11].version + ""
276  ), o;
277  return {
278    c() {
279      e = i("option"), o = I(r), e.__value = /*version*/
280      n[11].version, e.value = e.__value;
281    },
282    m(c, a) {
283      g(c, e, a), s(e, o);
284    },
285    p: F,
286    d(c) {
287      c && k(e);
288    }
289  };
290}
291function Xe(n) {
292  let e;
293  return {
294    c() {
295      e = i("p"), e.textContent = "Loading versions..";
296    },
297    m(r, o) {
298      g(r, e, o);
299    },
300    p: F,
301    i: F,
302    o: F,
303    d(r) {
304      r && k(e);
305    }
306  };
307}
308function ye(n) {
309  let e, r, o = {
310    ctx: n,
311    current: null,
312    token: null,
313    hasCatch: !0,
314    pending: Xe,
315    then: Pe,
316    catch: Oe,
317    value: 10,
318    error: 18,
319    blocks: [, , ,]
320  };
321  return Me(
322    /*versions*/
323    n[6],
324    o
325  ), {
326    c() {
327      e = i("main"), o.block.c();
328    },
329    m(c, a) {
330      g(c, e, a), o.block.m(e, o.anchor = null), o.mount = () => e, o.anchor = null, r = !0;
331    },
332    p(c, [a]) {
333      n = c, Ue(o, n, a);
334    },
335    i(c) {
336      r || (Le(o.block), r = !0);
337    },
338    o(c) {
339      for (let a = 0; a < 3; a += 1) {
340        const m = o.blocks[a];
341        Se(m);
342      }
343      r = !1;
344    },
345    d(c) {
346      c && k(e), o.block.d(), o.token = null, o = null;
347    }
348  };
349}
350function Ke(n, e, r) {
351  let o, c, a, m, f, h, G = Promise.all([Be(), De(), Ee()]).then(([T, K, j]) => {
352    const L = {
353      game: T,
354      loader: K.filter((w) => {
355        const C = w.version.split(".");
356        return parseInt(C[0]) > 0 || parseInt(C[1]) >= 12;
357      }),
358      installer: j.filter((w) => {
359        const C = w.version.split(".");
360        return parseInt(C[0]) > 0 || parseInt(C[1]) >= 8;
361      })
362    };
363    return r(0, m = (L.game.find((w) => w.stable) || L.game[0]).version), r(1, f = (L.loader.find((w) => w.stable) || L.loader[0]).version), r(2, h = (L.installer.find((w) => w.stable) || L.installer[0]).version), L;
364  });
365  function V() {
366    m = re(this), r(0, m), r(6, G);
367  }
368  function y() {
369    f = re(this), r(1, f), r(6, G);
370  }
371  function J() {
372    h = re(this), r(2, h), r(6, G);
373  }
374  return n.$$.update = () => {
375    n.$$.dirty & /*gameVersion, loaderVersion, installerVersion*/
376    7 && r(5, o = `https://meta.fabricmc.net/v2/versions/loader/${m}/${f}/${h}/server/jar`), n.$$.dirty & /*gameVersion, loaderVersion, installerVersion*/
377    7 && r(4, c = `fabric-server-mc.${m}-loader.${f}-launcher.${h}.jar`), n.$$.dirty & /*installerVersion*/
378    4 && r(3, a = `https://maven.fabricmc.net/net/fabricmc/fabric-installer/${h}/fabric-installer-${h}.jar`);
379  }, [
380    m,
381    f,
382    h,
383    a,
384    c,
385    o,
386    G,
387    V,
388    y,
389    J
390  ];
391}
392class We extends qe {
393  constructor(e) {
394    super(), Fe(this, e, Ke, ye, Je, {});
395  }
396}
397export {
398  We as default
399};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.