This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
start.cmd
1545 lines (1051 loc) · 84.2 KB
/
start.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
:: _ _ __ __ __ _____ _____
:: | | (_) / _| | \/ | / ____| / ____|
:: | | _ | |_ ___ | \ / | | | | (___ ___ _ __ __ __ ___ _ __
:: | | | | | _| / _ \ | |\/| | | | \___ \ / _ \ | '__| \ \ / / / _ \ | '__|
:: | |____ | | | | | __/ | | | | | |____ ____) | | __/ | | \ V / | __/ | |
:: |______| |_| |_| \___| |_| |_| \_____| |_____/ \___| |_| \_/ \___| |_|
:: ____ _ _ _ __ _
:: | _ \ | | | | | |/ / | |
:: | |_) | __ _ ___ | | __ _ | |_ _ __ ___ __ _ | ' / ___ __| | _ _
:: | _ < / _` | / __| | | / _` | | __| | '_ ` _ \ / _` | | < / _ \ / _` | | | | |
:: | |_) | | (_| | \__ \ | | | (_| | | |_ | | | | | | | (_| | | . \ | (_) | | (_| | | |_| |
:: |____/ \__,_| |___/ |_| \__,_| \__| |_| |_| |_| \__,_| |_|\_\ \___/ \__,_| \__,_|
:: ___ _____ ___
:: |__ \ | ____| / _ \
:: __ __ ) | | |__ | | | |
:: \ \ / / / / |___ \ | | | |
:: \ V / / /_ _ ___) | _ | |_| |
:: \_/ |____| (_) |____/ (_) \___/
::
::
:: LifeMCServer baslatma kodu - flags.lifemcserver.com
:: Tanitim konusu icin flags.lifemcserver.com 'a gidebilirsiniz.
:: Her ne kadar hicbirsey yapmadan direk ilk calistirmanizda calismasi gereksede,
:: En iyi sonuclar icin .NET 5.0, Windows Server 2012 R2+/Windows 7+
:: ve PowerShell 7.x kullanin. .NET 5.0: https://dotnet.microsoft.com/download/dotnet/5.0
:: PowerShell 7.x
:: Windows 7 kullaniyorsaniz once WMF 4.0 kurun.
:: https://github.com/PowerShell/PowerShell/releases/latest/
:: Dosyalar kismindan PowerShell-7.x.x-win-x64/x86.msi olan kisma basip indirip kurun.
:: Java olarak 64-bit Oracle JDK onerilir. Fakat OpenJDK ve OpenJ9 da da calisir.
:: 1.16.5 gibi yeni surumler kullaniyorsaniz Java 15 tavsiye edilir.
:: Discord: https://discord.gg/tmupwqn - Tanitim Konusu: https://flags.lifemcserver.com
@echo off
:: Turkce karakter sorunu yasiyorsaniz alttaki satirin basindaki :: i kaldirin.
:: Not: Bu konsol fontunu kotu gozuken bir font ile degistirebilir.
:: chcp 65001 > nul
:: Bu kismi ellemeniz onerilmez
setlocal enableextensions enabledelayedexpansion
cd /d "%~dp0"
set "SystemPath=%SystemRoot%\System32"
if not "%ProgramFiles(x86)%" == "" set "SystemPath=%SystemRoot%\Sysnative"
if exist "%SystemPath%\cmd.exe" if exist "%0" if not "%1" == "true" start "" /b "%SystemPath%\cmd.exe" "%0" true
if not defined in_subprocess (cmd /q /e:on /v:on /f:off /k set in_subprocess=y ^& %0 %*) & exit )
:: SURUM - degistermeniz onerilmez
set version=2.5.0
:: AYARLAR - kendinize gore duzenleyebilirsiniz
:: Hazir ayarlari belirler. Hazir ayarlar, sizin icin bir cok ayari otomatik olarak ayarlayabilir.
:: Uyari: Hazir ayarlar, ayarlar kisminda ki ayarlarin uzerine yazar. Ayarlariniz gecerliligini yitirebilir.
:: Olabilecek degerler: none, strict-jdk, strict-jdk-9, yatopia, dev, upgrade, no-tracking, security, aggressive, gui, relaxgc, hungryos
:: Birden fazla degeri bosluk ile belirleyebilirsiniz. Ornek: settings_preset=strict-jdk no-tracking
:: none : Hic bir hazir ayar yuklemez ve tamamen asagida gireceginiz degerleri kullanir.
:: strict-jdk : Sadece Oracle'nin sitesinden (java.com degil) 64-bit JDK indirdiyseniz kullanin
:: strict-jdk-9 : Sadece Java 9 veya daha ust bir surum kullaniyorsaniz kullanin
:: online-mode : Sadece Premium hesaplarin giris yapabilmesi icin ayarlar
:: yatopia : Sadece Yatopia kullanmak istiyorsaniz kullanin
:: dev : Gelistirici modu ayarlari. Normal kullanicilarin acmasi onerilmez.
:: upgrade : Buyuk surum guncellemelerinde acarsaniz surum yukseltmesi yapar. (orn. 1.12 -> 1.13, 1.13 -> 1.14)
:: no-tracking : Tum telemetri servislerini engeller. Performansi arttirabilir.
:: security : Guvenlik icin bazi ayarlar yapar. Performans dusurebilir veya bazi seyleri bozabilir fakat guvenligi arttirir.
:: aggressive : Optimize edilmis fakat hatalara veya uyumluluk sorunlarina yol acabilecek ayarlari yapar.
:: gui : head_less ve nogui parametrelerini kapatir. Sunucu konsolu veya menu/javafx kullanan eklentiler icin acabilirsiniz.
:: relaxgc : new size gibi gc parametrelerini kisar. MC disi uygulamalar icin acilmasi uygulamayi rahatlatabilir.
:: hungryos : Windows'a varsayilan 1GB yerine 2GB ram birakir. Sunucu ve clienti ayni anda kullanacaksaniz onerilebilir.
set settings_preset=none
:: Sunucunuzun ana JAR dosyasinin adi - spigot, craftbukkit, paper, yatopia vb. olabilir
set jar_name=craftbukkit
:: Sunucunuzun surumu - 1.8.8, 1.9.4, 1.10.2, 1.11.2, 1.12.2, 1.13.2, 1.14.4, 1.15.2 veya 1.16.5 olabilir
:: Not: Sadece yukarida belirtilen sunucu JAR dosyasi yok ise calisir
set game_version=1.8.8
:: Eger sunucunuzu daha eski bir surumden 1.13 veya daha ust bir surume guncelleyecekseniz
:: bunu bir kez acip sonra yukseltme islemi bittiginde tekrar kapatmaniz onerilir.
set is_upgrading=false
:: Eger sunucunuzu 1.13'den 1.14'e veya 1.14'den daha ust bir surume yukseltiyorsaniz,
:: yukaridaki ayara ek olarak bunuda acip, yukseltme isleminden sonra kapatin.
set erase_cache=false
:: Sunucunun kullanacagi minimum ram miktari (MB icin M, GB icin G kullanin)
:: Eger 1024K (varsayilan) ise ve sistemde yeterli ram yok ise, toplam RAM - 1GB'a otomatik dusurulebilir.
:: Lag sorunu yasiyorsaniz 1024M veya daha ust degerler deneyebilirsiniz. max_ram ile ayni deger olmasi da fayda edebilir.
set min_ram=1024K
:: Sunucunun kullanacagi maximum ram miktari (MB icin M, GB icin G kullanin)
:: Eger 1536M (varsayilan) ise, toplam bosta RAM - 1GB'a mumkun oldugunda otomatik genisletilebilir.
:: Not: Tum rami vermeyin, Java bu miktardan fazla kullanabilir ve isletim sistemine RAM birakmalisiniz.
:: Ek olarak, 1536M ise otomatik ayarlar, fakat kendiniz ayarlamaniz daha stabil sonuclar dogurur.
set max_ram=1536M
:: Sunucunuzun daha az RAM yemesini fakat daha az performansli calismasini saglar
set less_ram=false
:: Eger konsolun renkli olmasini istemiyor iseniz false yapabilirsiniz
:: Konsol renkleri calismiyorsa jansi_passthrough ve jansi_force ayarlarini inceleyebilirsiniz
set colored_console=true
:: Sunucu kapandiktan sonra loglar temizlensin mi?
set clear_logs=true
:: Baslatma kodu guncellemeleri otomatik kontrol edilsin mi?
set check_for_updates=true
:: JVM cokmelerini vs. depolayan dump dosyalarini siler. Bu dosyalar buyuk olabilir
:: ve disk alaninizdan yiyebilir. True kalmasi onerilir.
set clear_jvm_dumps=true
:: Sunucu kapandiktan sonra gereksiz dosyalar silinsin mi?
set auto_del_temp_files=true
:: Sunucu kapandiginda otomatik tekrar acar, cokme vb. durumlarda ise yarayabilir
set auto_restart=true
:: Sunucu kapandiktan ne kadar sonra yeniden baslatilsin? (saniye)
set delay=3
:: Eger herhangi bir kullanici arayuzu gerektiren plugin vs. kullaniyor iseniz false yapin
set head_less=true
:: Eger sunucunuzda cok timeout/disconnected sorunu yasiyorsaniz arttirabilirsiniz
:: Not: Ek olarak AsyncKeepAlive eklentisi isinize yarayabilir. Bu degeri 60 veya 120'den yukari yapmaniz onerilmez.
set io_timeout=30
:: Eger sunucunuza sadece premium sahibi kisilerin girmesini istiyorsaniz true yapin
set online_mode=false
:: Eger dunya ayarlarini baslangicta konsola yazdirmasini istiyorsaniz true yapin
set verbose=false
:: Eger bStats'a telemetri verisi gonderilmesini istemiyorsaniz false yapin
:: Async oldugundan performansi fazla etkilemeyecektir fakat yine de performans kazanci saglayabilir.
set bstats_enabled=true
:: Snooperi kapatmak icin true yapin. Mojang'a telemetri verisi gonderen hizmete Snooper denir.
:: Kapatmanizin bir zarari yoktur. Kapatilmasi durumunda performans artabilir.
set disable_snooper=false
:: Query'i kapatmak icin true yapin. True oldugunda eklentileriniz webden goruntulenemez
:: (dinnerbone server status viewer ile) - true yapmaniz ayrica performansi da arttirabilir.
set disable_query=false
:: Help indexini gizlemek/kapatmak icin true yapin. /help ve /?'de sunucu komutlari gozukmez.
set disable_help_index=false
:: GELISMIS AYARLAR - duzenlemeniz pek onerilmez
:: Eger sunucu JAR dosyasi yok ise, otomatik olarak bu linkten indirilir
:: 1.15.2+ kullaniyorsaniz Paper'a gore daha performansli olan Yatopia'yi kullanmak icin "yatopia" girin.
:: Yatopia kullanmak icin yatopia girebilirsiniz.
set download_provider=paper
:: Eger Java 9 veya ustu bir surum kullaniyor iseniz ve hatalar aliyor iseniz true yapin
set allow_module_access=false
:: Eger baslatma scriptinin ayarlari ve bazi bilgileri yazdirmasini istiyor iseniz true yapin
set verbose_info=false
:: Eger sunucu dosyalariniz cok buyuk ise disk aktivitesini azaltmak icin kapatabilirsiniz
set unblock_files=true
:: Sunucunuzun daha optimizeli calismasi icin normal Java yerine JDK indirip bunu acabilirsiniz
set use_server_vm=false
:: Assertion ozelligini acar. Sadece gelistirici iseniz acin, sunucudaki hatalari arttirabilir
:: Bu ayar acik iken ekstra kati kontroller yapilir. (Sanity checks)
:: Bu ayar java.lang.AssertionError hatalarina yol acabilir. Sadece test sunucularinda acik olmasi onerilir.
set enable_assertions=false
:: Hata ciktiginda mesaj kutusu gosterir, sunucuyu debug islemleri icin acik tutar
:: Normal sartlarda JVM hatalarinda sunucu komple kapanir. Bu ayar ise sadece JVM (Java)'yi acik birakir.
:: Bu sayede VisualVM gibi araclarla baglanabilirsiniz. Gelistirici degil iseniz acmayin.
set messagebox_on_error=false
:: Eger sadece guvenli TLS surumlerini kullanmak ve TLS 1.3 aktif etmek istiyorsaniz true yapin
:: Bu ayari acmaniz onerilir. SSL 3, TLS 1.0 ve TLS 1.1 uzun yillardir kullanilmamasi onerilen protokoller.
:: Eger bu ayar acildiktan sonra guncelleme kontrolu yapamayan eklentiler vs. goruyorsaniz tekrar kapatin!
set use_secure_tls=false
:: Eger baslangicta Java surumunun yazdirilmasini istemiyorsaniz false yapin
set print_java_version=true
:: Java komutu - java.exe konumunu girin veya varsayilan JAVA_HOME'u kullanmak icin "java" yazin
:: Not: Klasor/java.exe yolunda / yerine \ kullanin ve "" icerisine yazin orn. "C:\Program Files\Java\jdk-11.0.10\bin\java.exe"
:: veya Java 8 icin "C:\Program Files\Java\jre1.8.0_281\bin\java.exe"
set java_command=java
:: Eger java_command bulunamaz ise indirilecek varsayilan Java surumunu belirler. Paper 1.16.4 ve ustu icin 11 yapin.
set built_in_java_version=8
:: Java 12 ve ustu: Preview ozelliklerini acar. Bu ozelliklerin performansa etkisi belirsizdir.
set enable_preview=false
:: HTTP baglantilari icin kullanilacak baglanti zaman asimi (yavas internet icin 30000, hizli internet icin 5000 yapin)
set connect_timeout=10000
:: HTTP baglantilari icin kullanilacak okuma zaman asimi (yavas internet icin 30000, hizli internet icin 5000 yapin)
set read_timeout=10000
:: Sunucunun sayisal IP adresini Timings sonuclarinda vs gorunmesi icin baslatma argumanlarina ekler
set expose_ip=false
:: MC 1.8 gibi eski surumlerde bulunabilen loglarda ANSI kodlari (orn. [m[0;32;1m) gozukmesi sorununu cozen Log4J config
:: dosyasini otomatik indirip kullanmasini kapatmak icin false yapabilirsiniz. Baslangici hizlandirabilir fakat onerilmez.
set use_custom_log4j_config=true
:: PERFORMANS AYARLARI - duzenlemeniz ancak performans sorunu yasiyorsaniz onerilir
:: Not: Sunucuzda lag var ve sunucunuz eski bir surum kullaniyorsa view-distance ve tab-complete ayarlariyla oynayin:
:: 1. server.properties & spigot.yml: view-distance ayarini 3 veya 4 yapin. (ne kadar dusuk yaparsaniz o kadar az lag olur)
:: 2. spigot.yml: tab-complete: 0 kismini tab-complete: -1 yapin.
:: Bunun disinda spawnin yuklenmesini geciktirecek olsa da paper.yml'den keep-spawn-loaded: true kismini da false yapabilirsiniz.
:: Son olarak TacoSpigot veya yuksek surum Paper kullaniyorsaniz taco/paper.yml de hopper kisminda disable-move-event'i true yapabilirsiniz.
:: Not: Java surumunuzunde guncel olduguna ve resmi sitelerden indirdiginize emin olun.
:: Bu ayari acarsaniz Aikar'in GC ayarlarindan bazilarini uygular. Performansa etkisi belirsizdir.
:: Arttiradabilir, azaltadabilir. Timings'de GC ile alakali sorunlariniz var ise deneyebilirsiniz.
set use_aikars_gc_settings=false
:: GC ayarlari
:: Young/New generation boyutu.
:: 12GB ustunde 50 yapabilirsiniz. MC disi programlar icin (orn. discord botlari) dusurebilirsiniz.
set new_size_percent=40
:: Maximum young/new generation boyutu.
:: 12GB ustunde 70 yapabilirsiniz. MC disi programlar icin (orn. discord botlari) dusurebilirsiniz.
set max_new_size_percent=60
:: 12GB ustu icin 15 yapin. MC disi programlar icin (orn. discord botlari) 30 yapin.
set reserve_percent=20
:: 12GB ustu icin 20 yapin. MC disi programlar icin (orn. discord botlari) 10 yapin.
set heap_occupancy_percent=15
:: Maximum GC donma zamani, milisaniye cinsinden. MC disi programlar icin (orn. discord botlari) arttirabilirsiniz.
set max_gc_pause_millis=1
:: Yukaridaki sayidan asagi bir deger girmeyin aksi takdirde hata verebilir.
set gc_pause_interval_millis=201
:: 1GB ve ustu icin 32, 512MB icin 16, 256MB icin 8, 128MB icin 4 yapin.
set survivor_ratio=32
:: Eger varsayilan min_ram ve max_ram degerlerini kullaniyorsaniz baslatma kodu RAM'i otomatik ayarlar.
:: Bu ayar true ise baslatma kodu sisteme 1GB ram birakir. False yaparsaniz tum RAM'i kullanabilir, fakat onerilmez.
set leave_ram_to_windows=true
:: Bu yukaridaki ayar true ise sisteme ne kadar RAM birakilacagini ayarlar. KB cinsindendir. default ise 1GB kullanilir.
set windows_reserved_ram=default
:: Eger renkli konsol calismiyorsa bunlari acmayi deneyebilirsiniz. Eger zaten calisiyor ise
:: acmayin; bozabilir.
set jansi_passthrough=false
set jansi_force=false
:: Eger bilgisayariniz ve Java surumunuz 64-bit ise bunu true yapin
set sixty_four_bit_java=false
:: Sunucunuzun performansini arttiran bir ayar, fakat bazi Java surumlerinde calismaz
set tiered_compilation=true
:: Surekli tekrarlanan hatalarda, hatanin bir kismini gizler. Gelistiriciler soyler ise kapatin
:: Not: Bu ayari kapatmak ciddi performans dususlerine sebep olabilir. Sadece test sunucularinda kapatmaniz onerilir.
set omit_stacktrace=true
:: Hatalarda hic bir zaman detay gosterilmemesini saglar. Hatanin nerede ciktigini gostermez. Sadece hata mesaji ve
:: hata cesidi gozukur. Acmaniz onerilmez, fakat acmak performansi arttirabilir.
set always_omit_stacktrace=false
:: Class dosyalarini onbellege alarak performans arttirir, fakat bazi sistemlerde calismaz
set class_caching=true
:: Baslatma kodu uzun suruyorsa veya powershell ile alakali hata veriyorsa true yapin
set disable_powershell=false
:: MESAJLAR - kendinize gore duzenleyebilirsiniz
:: Eger birden fazla sunucu penceresi aciyorsaniz karistirmamak icin bir onek girebilirsiniz
:: orn. Skyblock, Bungee, Lobi vb.
set title_prefix=
:: Onek ile asil baslik arasina bosluk koyar
if not "%title_prefix%" equ "" set title_prefix=%title_prefix%
:: Pencere basligi
set title=%title_prefix%Sunucu Konsolu
title %title%
:: DIGER MESAJLAR
set baslatiliyor=Sunucu baslatilmak uzere, lutfen bekleyin...
set guncellemeler_kontrol_ediliyor=Guncellemeler kontrol ediliyor...
set oto_ayarlar_uygulaniyor=Otomatik ayarlar uygulaniyor, bu biraz uzun surebilir, lutfen bekleyin...
set log4j_ayar_dosyasi_indiriliyor=Log4J ayar dosyasi indiriliyor...
set dosya_bloklari_kaldiriliyor=Dosya bloklari arka planda kaldiriliyor...
set java_kontrol_ediliyor=Java kontrol ediliyor...
set java_indiriliyor=Java indiriliyor...
set ram_ayarlaniyor=RAM ayarlaniyor...
set ip_ayarlaniyor=IP ayarlaniyor...
set sunucu_baslatiliyor=Sunucu baslatiliyor...
set dosya_indiriliyor=Sunucu dosyasi indiriliyor...
set temizlik_yapiliyor=Temizlik yapiliyor...
set yeniden_baslatiliyor=Sunucu %delay% saniye icinde yeniden baslatilacak...
:: KOS KISMI - duzenlemeniz onerilmez
::
:: strict-jdk, strict-jdk-9, online-mode, yatopia, dev, upgrade, no-tracking, aggressive, gui, relaxgc, hungryos
if not "x%settings_preset:strict-jdk=%" == "x%settings_preset%" (
set use_server_vm=true
set sixty_four_bit_java=true
echo Strict JDK hazir ayarlari uygulandi.
)
if not "x%settings_preset:strict-jdk-9=%" == "x%settings_preset%" (
::set allow_module_access=true
echo Strict JDK 9+ hazir ayarlari uygulandi.
)
if not "x%settings_preset:online-mode=%" == "x%settings_preset%" (
set online_mode=true
echo Premium sunucu hazir ayarlari uygulandi.
)
if not "x%settings_preset:yatopia=%" == "x%settings_preset%" (
set download_provider=yatopia
echo Yatopia hazir ayarlari uygulandi.
)
if not "x%settings_preset:dev=%" == "x%settings_preset%" (
set clear_logs=false
set clear_jvm_dumps=false
set auto_del_temp_files=false
set io_timeout=120
set verbose_info=true
set enable_assertions=true
set messagebox_on_error=true
set omit_stacktrace=false
::set additional_commands= -XX:+PrintFlagsFinal
set additional_commands= -XX:+PrintWarnings -Xcheck:jni -Xfuture -XX:+PreserveFramePointer -XX:+PoisonOSREntry -XX:+EagerXrunInit -XX:DiagnoseSyncOnValueBasedClasses
echo Gelistirici hazir ayarlari uygulandi.
echo(
echo Not: Bu ayarlar sadece test sunuculari ve gelistiriciler icindir!
echo Ciddi performans dususlerine sebep olabilir. Bilmeden acmayin!
)
if not "x%settings_preset:upgrade=%" == "x%settings_preset%" (
set is_upgrading=true
set erase_cache=true
echo Guncelleme hazir ayarlari uygulandi.
)
if not "x%settings_preset:no-tracking=%" == "x%settings_preset%" (
set bstats_enabled=false
set disable_snooper=true
set disable_query=true
set disable_help_index=true
echo Izleme engelleme hazir ayarlari uygulandi.
)
if not "x%settings_preset:security=%" == "x%settings_preset%" (
set use_secure_tls=true
echo Guvenlik hazir ayarlari uygulandi.
)
if not "x%settings_preset:agressive=%" == "x%settings_preset%" (
set class_caching=true
set connect_timeout=5000
set read_timeout=5000
::set always_omit_stacktrace=true
echo Optimizeli hazir ayarlar uygulandi.
)
if not "x%settings_preset:gui=%" == "x%settings_preset%" (
set head_less=false
set server_gui=true
echo GUI hazir ayarlari uygulandi.
)
if not "x%settings_preset:relaxgc=%" == "x%settings_preset%" (
set new_size_percent=20
set max_new_size_percent=60
set reserve_percent=25
set heap_occupancy_percent=10
set max_gc_pause_millis=99
set gc_pause_interval_millis=201
echo Rahat cop toplama ayarlari uygulandi.
)
if not "x%settings_preset:hungryos=%" == "x%settings_preset%" (
set windows_reserved_ram=2097152
echo Sunucuya daha az RAM veren hazir ayarlar uygulandi.
)
::
set unblocked=false
set downloaded_log4j_config=false
set ip_address=127.0.0.1
set checked_for_updates=false
:start
setlocal
set start=%time%
echo(
echo %baslatiliyor%
echo(
if not "%~x0" equ ".cmd" echo(
if not "%~x0" equ ".cmd" echo Dosya uzantisi olarak .cmd onerilmektedir. (su anda kullanilan: %~x0)
if not "%~x0" equ ".cmd" echo(
if %verbose_info% equ true if "%1" == "true" echo Running from 64-bit command-line
:: Detect most configuration errors and warn about unsafe options
if %io_timeout% gtr 120 echo Uyari: 120'den yuksek io_timeout ayari algilandi. Bu ayar eski surumlerde calismayabilir veya tum surumlerde garip sorunlara yol acabilir!
if %enable_assertions% equ true echo Kati kontroller etkin. Bu performans dususune veya hatalara neden olabilir. Sadece test sunucularinda acin!
if %messagebox_on_error% equ true echo Uyari: messagebox_on_error aktif iken otomatik yeniden baslatma calismayabilir.
if %omit_stacktrace% equ false echo Uyari: omit_stacktrace false iken ciddi performans dususleri yasanabilir! Sadece test sunucularinda acin!
if %connect_timeout% lss 5000 echo Uyari: HTTP baglanma zaman asimi cok dusuk. Bu baglanti sorunlarina neden olabilir.
if %read_timeout% lss 500 echo Uyari: HTTP okuma zaman asimi cok dusuk. Bu baglanti sorunlarina neden olabilir.
if not exist "%homedrive%%homepath%\.batch.lock" (
echo true> "%homedrive%%homepath%\.batch.lock"
echo Baslatma kodunu ilk kez calistirdiginiz tespit edildi. Ilk acilista sizin icin ekstra islemler yapilir. Bu 1 dakikayi bulabilir, bekleyin!
echo(
)
if not exist "%scriptdir%cache" mkdir "%scriptdir%cache"
if not exist "%scriptdir%cache/.batch.lock" (
echo true> "%scriptdir%cache/.batch.lock"
echo Bu sunucuyu ilk kez aciyorsunuz. En iyi sonuclar icin acilma bittikten sonra kapatip tekrar acin!
echo(
)
set vendor_original=lifemc
:: change this only if you distribute a changed version of this file
set vendor=%vendor_original%
set "scriptdir=%~dp0"
if not "%scriptdir:~-1%" == "\" set "scriptdir=%scriptdir%\"
attrib +h "%scriptdir%cache"
if exist "%scriptdir%.git" attrib +h "%scriptdir%.git"
::cmd /q /e:off /v:off /f:off /c start "" /belownormal /b systeminfo 2> nul | findstr "OS Name" > "%scriptdir%cache\osname.txt" 2> nul
:: Initialize PowerShell in background
start "" /b cmd /q /e:off /v:off /f:off /c %powershell_command% %powershell_arguments% "%powershell_workarounds%" > nul 2> nul
:: Fix common Windows issues
start "" /belownormal /b sc config printnotify type= own > nul 2> nul
start "" /belownormal /b lodctr /T:TermService > nul 2> nul
start "" /belownormal /b lodctr /T:LSM > nul 2> nul
start "" /belownormal /b schtasks /change /tn "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /disable > nul 2> nul
start "" /belownormal /b taskkill /F /IM MicrosoftEdgeUpdate.exe > nul 2> nul
:: Requires admin
::start "" /belownormal /b reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Autologger\EventLog-Application\{23b8d46b-67dd-40a3-b636-d43e50552c6d}" /t REG_SZ /v "Enabled" /d 0 /f > nul 2> nul
set additional_parameters=
if %colored_console% equ false set additional_parameters= -nojline
if %verbose_info% equ true echo Checking server JAR...
if not exist "%jar_name%.jar" if exist "bukkit.jar" set jar_name=bukkit
if not exist "%jar_name%.jar" if exist "spigot.jar" set jar_name=spigot
if not exist "%jar_name%.jar" if exist "paper.jar" set jar_name=paper
if not exist "%jar_name%.jar" if exist "paperclip.jar" set jar_name=paperclip
if not exist "%jar_name%.jar" if exist "purpur.jar" set jar_name=purpur
if not exist "%jar_name%.jar" if exist "tuinity.jar" set jar_name=tuinity
if not exist "%jar_name%.jar" if exist "yatopia.jar" set jar_name=yatopia
if not exist "%jar_name%.jar" if exist "yatoclip.jar" set jar_name=yatoclip
if not exist "%jar_name%.jar" if exist "yatopia-%game_version%-yatoclip.jar" set jar_name=yatopia-%game_version%-yatoclip
:: Check for default file names when downloaded from https://getbukkit.org/
if not exist "%jar_name%.jar" if exist "Spigot-%game_version%.jar" set jar_name=Spigot-%game_version%
if not exist "%jar_name%.jar" if exist "Spigot-%game_version%-R0.1-SNAPSHOT-latest.jar" set jar_name=Spigot-%game_version%-R0.1-SNAPSHOT-latest
if not exist "%jar_name%.jar" if exist "Craftbukkit-%game_version%.jar" set jar_name=Craftbukkit-%game_version%
if not exist "%jar_name%.jar" if exist "Craftbukkit-%game_version%-R0.1-SNAPSHOT-latest.jar" set jar_name=Craftbukkit-%game_version%-R0.1-SNAPSHOT-latest
if not exist "%jar_name%.jar" if exist "Server.jar" set jar_name=Server
set size=1
for /f "usebackq" %%a in ('%jar_name%.jar') do set "size=%%~za"
:: Result of an aborted download
if size lss 1 del /f /q "%jar_name%.jar" > nul 2> nul
if %verbose_info% equ true echo Processing download providers...
if not "x%download_provider:yatopia=%" == "x%download_provider%" (
set download_url=https://api.yatopiamc.org/v2/stableBuild/download?branch=ver/%game_version%
)
:: Try to automatically install PowerShell 7.1
::if %disable_powershell% equ false start "" /belownormal /wait /b msiexec.exe /package PowerShell-7.1.0-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
set powershell_command=powershell
:: Use PowerShell 7 if available
:: Currently causes script to wait longer before start-up. See https://github.com/PowerShell/PowerShell/issues/6443
::if %disable_powershell% equ false if exist "%ProgramFiles%\PowerShell\7\pwsh.exe" set "powershell_command=pwsh"
if %powershell_command% equ "pwsh" echo Using PowerShell 7
set powershell_arguments=-nologo -noprofile -noninteractive -executionpolicy bypass -mta -command
set additional_workarounds0=Set-ExecutionPolicy Bypass -Force -Scope CurrentUser;
set powershell_workarounds=%additional_workarounds0% $ProgressPreference = 'SilentlyContinue'; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; [System.Net.ServicePointManager]::DefaultConnectionLimit = [System.Int32]::MaxValue; [System.Net.WebRequest]::DefaultWebProxy = $null; [System.Net.ServicePointManager]::Expect100Continue = $false;
:: Enables TLS 1.3 and above, if found
set powershell_workarounds=%powershell_workarounds% $CurrentVersionTls = [System.Net.ServicePointManager]::SecurityProtocol; $AvailableTls = [enum]::GetValues('System.Net.SecurityProtocolType') ^| Where-Object { $_ -ge 'Tls12' }; $AvailableTls.ForEach({[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor $_});
set powershell_new_web_client_wc=$WC = New-Object System.Net.WebClient; $WC.Proxy = $null; $WC.Encoding = New-Object System.Text.UTF8Encoding $false; $WC.Headers.Add('User-Agent', 'Mozilla/5.0'); $WC.Headers.Add('Accept', '*/*');
:: PowerShell kodlamasini UTF8 yapar, fakat suan bakimda
::if %disable_powershell% equ false %powershell_command% %powershell_arguments% "$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding"
:: Supposed to be a slow startup work-around but not working currently
::if %disable_powershell% equ false %powershell_command% %powershell_arguments% "Start-Process %powershell_command% '%powershell_arguments% [environment]::SetEnvironmentVariable(`POWERSHELL_UPDATECHECK_OPTOUT`, `1`); [environment]::SetEnvironmentVariable(`POWERSHELL_TELEMETRY_OPTOUT`, `1`); Set-MpPreference -DisableRealtimeMonitoring $True -Force; Enter-PSSession -HostName localhost -SSHTransport -UserName administrator' -Verb RunAs; . (Join-Path ([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) ngen.exe) update; Clear-History; [Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory(); Add-MpPreference -ExclusionPath '%powershell_command%'"
:: Slows down opening
set print_powershell_version=false
if %print_powershell_version% equ true (
:: Shows the PowerShell version that is being used (either Windows default or PowerShell 7) and the underlying .NET version behind it.
%powershell_command% %powershell_arguments% "%powershell_workarounds% $PSVersionTable.PSVersion; $PSVersionTable.CLRVersion"
)
start "" /belownormal /b %powershell_command% %powershell_arguments% "%powershell_workarounds% Start-Job -Name 'Native Image Generation Cache' -ScriptBlock { [System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'; ([System.Diagnostics.Process]::GetCurrentProcess()).PriorityClass = 'BelowNormal'; $Env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory(); [AppDomain]::CurrentDomain.GetAssemblies() | ^^% { $pt = $_.Location; if (^^!$pt) { continue; } if ($cn++) { '' } $na = Split-Path -Leaf $pt; Write-Host -ForegroundColor Yellow "NGENing $na"; ngen install $pt; } }" > nul
:: Check for startup script updates
:: Only works when vendor is the official vendor.
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% echo %guncellemeler_kontrol_ediliyor%
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% echo(
set update_check_url=https://raw.githubusercontent.com/LifeMC/site-assets/main/other/startup_script_latest_version.txt
set use_curl=true
curl --version > nul 2> nul || (
set use_curl=false
)
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if not "%use_curl%" equ "true" for /f "usebackq delims=" %%i in (`%powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadString('%update_check_url%')"`) do set "latest_version=%%i"
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if not "%use_curl%" equ "false" for /f "usebackq delims=" %%i in (`curl --silent %update_check_url%`) do set "latest_version=%%i"
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% title %title%
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if "%version%" neq "%latest_version%" echo(
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if "%version%" neq "%latest_version%" echo Yeni bir guncelleme mevcut! Son surum (v%latest_version%). Sizdeki surum (v%version%).
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if "%version%" neq "%latest_version%" echo Guncellemek icin bu adresden son surumu indirebilirsiniz: https://flags.lifemcserver.com/
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if "%version%" neq "%latest_version%" echo(
if %disable_powershell% equ false if %check_for_updates% equ true if %checked_for_updates% equ false if %vendor% equ %vendor_original% if "%version%" neq "%latest_version%" echo(
if %checked_for_updates% equ false if %vendor% equ %vendor_original% set checked_for_updates=true
if "%3" equ "version" set game_version=%4
if exist "%jar_name%.jar" (
set disable_powershell_oldvalue=%disable_powershell%
set disable_powershell=true
)
set response=none
if not "x%download_provider:paper=%" == "x%download_provider%" (
if %disable_powershell% equ false if %verbose_info% equ true echo Getting response from Paper API v2...
if %disable_powershell% equ false for /f "usebackq delims=" %%i in (`%powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadString('https://papermc.io/api/v2/projects/paper/versions/%game_version%/')"`) do set "response=%%i"
if %disable_powershell% equ false title %title%
)
if exist "%jar_name%.jar" (
set disable_powershell=%disable_powershell_oldvalue%
)
if not "%response%" == "none" (
if %verbose_info% equ true echo Processing paper API response...
if %verbose_info% equ true echo Original response: %response%
set "response=%response:,=" & set "response=%"
set response=!response:]=!
set response=!response:}=!
set response=!response:[=!
set response=!response::=!
set response=!response:"=!
set response=!response:b=!
set response=!response:u=!
set response=!response:i=!
set response=!response:l=!
set response=!response:d=!
set response=!response:s=!
set latest_build=!response!
if %verbose_info% equ true echo Using build !latest_build!
set download_url=https://papermc.io/api/v2/projects/paper/versions/%game_version%/builds/!latest_build!/downloads/paper-%game_version%-!latest_build!.jar
)
set batch_provided_jar=false
if not exist %jar_name%.jar (
echo %dosya_indiriliyor%
echo(
if %verbose_info% equ true echo Using download provider url of %download_url%
if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('%download_url%', '%jar_name%.jar')"
if %disable_powershell% equ false title %title%
set batch_provided_jar=true
)
::
for /f %%k in ('dir /b "%scriptdir%cache\patched*.jar" 2^> nul') do set "patched_jar_name=%scriptdir%cache\%%k"
if exist "%scriptdir%cache\patched_%game_version%.jar" set "patched_jar_name=%scriptdir%cache\patched_%game_version%.jar"
if exist "%scriptdir%cache\patched.jar" set "patched_jar_name=%scriptdir%cache\patched.jar"
if "%patched_jar_name%" equ "" set patched_jar_name=%scriptdir%cache\first-start-non-existent.jar
set cond=false
if "%patched_jar_name%" equ "%scriptdir%cache\patched.jar" set cond=true
if %batch_provided_jar% equ true set cond=true
if %use_custom_log4j_config% equ false set cond=false
if %use_custom_log4j_config% equ false if exist "%scriptdir%cache\log4j2.xml" del /f /q "%scriptdir%cache\log4j2.xml"
if %cond% equ true (
set cond=false
if %disable_powershell% equ false if %downloaded_log4j_config% equ false if %game_version% equ 1.8.8 set cond=true
)
if %cond% equ true if %verbose_info% equ true echo %log4j_ayar_dosyasi_indiriliyor%
if %cond% equ true if %verbose_info% equ true echo(
:: n: hotspot
set log4j2_config_download_url=https://raw.githubusercontent.com/LifeMC/site-assets/main/other/log4j2.xml
:: downloads in background if file already exists, speeds up repeated starts
if %cond% equ true if exist "%scriptdir%cache\log4j2.xml" start "" /belownormal /b %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('%log4j2_config_download_url%', '%scriptdir%cache\log4j2.xml')"
if %cond% equ true if not exist "%scriptdir%cache\log4j2.xml" %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('%log4j2_config_download_url%', '%scriptdir%cache\log4j2.xml')"
if %cond% equ true if not exist "%scriptdir%cache\log4j2.xml" title %title%
set downloaded_log4j_config=true
:: Above 1.8.8, Paper uses TerminalConsoleAppender, which has different Log4J2 configuration and fixes the issues
:: covered by the batch file provided log4j2 configuration file.
if exist "%scriptdir%cache\log4j2.xml" if %game_version% equ 1.8.8 if %cond% equ true if not "%2" equ "client" set log4j_config_parameter= -Dlog4j.configurationFile="cache\log4j2.xml"
if %verbose_info% equ true echo %oto_ayarlar_uygulaniyor%
if exist "%patched_jar_name%" (
if not exist "%scriptdir%cache\yggdrasil_session_pubkey_new.der" if %disable_powershell% equ false if %verbose_info% equ true echo Downloading yggdrasil certificate...
if not exist "%scriptdir%cache\yggdrasil_session_pubkey_new.der" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('https://github.com/LifeMC/site-assets/raw/main/other/yggdrasil_session_pubkey.der', '%scriptdir%cache\yggdrasil_session_pubkey_new.der')"
if not exist "%scriptdir%cache\yggdrasil_session_pubkey_new.der" if %disable_powershell% equ false title %title%
if not exist "%scriptdir%cache\7z.exe" if %disable_powershell% equ false if %verbose_info% equ true echo Downloading 7z exe...
if not exist "%scriptdir%cache\7z.exe" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('https://github.com/LifeMC/site-assets/raw/main/other/7z.exe', '%scriptdir%cache\7z.exe')"
if not exist "%scriptdir%cache\7z.exe" if %disable_powershell% equ false title %title%
if not exist "%scriptdir%cache\7z.dll" if %disable_powershell% equ false if %verbose_info% equ true echo Downloading 7z dll...
if not exist "%scriptdir%cache\7z.dll" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('https://github.com/LifeMC/site-assets/raw/main/other/7z.dll', '%scriptdir%cache\7z.dll')"
if not exist "%scriptdir%cache\7z.dll" if %disable_powershell% equ false title %title%
if %verbose_info% equ true echo Patching the JAR file...
"%scriptdir%cache\7z.exe" x "%patched_jar_name%" -o"%scriptdir%cache" yggdrasil_session_pubkey.der -r -y > nul
fc "%scriptdir%cache\yggdrasil_session_pubkey.der" "%scriptdir%cache\yggdrasil_session_pubkey_new.der" > nul
if errorlevel 1 del /f /q "%scriptdir%cache\yggdrasil_session_pubkey.der" > nul 2> nul
if errorlevel 1 ren "%scriptdir%cache\yggdrasil_session_pubkey_new.der" yggdrasil_session_pubkey.der
if errorlevel 1 "%scriptdir%cache\7z.exe" a -y "%patched_jar_name%" "%scriptdir%cache\yggdrasil_session_pubkey.der" > nul
if errorlevel 1 move /y "%patched_jar_name%" "%scriptdir%%jar_name%.jar"
)
if %verbose_info% equ true echo Applying settings to config files...
if not exist "%scriptdir%eula.txt" if %verbose_info% equ true echo Creating eula...
if not exist "%scriptdir%server.properties" echo online-mode=%online_mode%> server.properties
if not exist "%scriptdir%eula.txt" echo eula=true> eula.txt
set spigot_config=spigot.yml
if not exist "%scriptdir%cache\fart.exe" if %disable_powershell% equ false if %verbose_info% equ true echo Downloading fart exe...
if not exist "%scriptdir%cache\fart.exe" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('https://github.com/LifeMC/site-assets/raw/main/other/fart.exe', '%scriptdir%cache\fart.exe')"
if not exist "%scriptdir%cache\fart.exe" if %disable_powershell% equ false title %title%
if exist "%spigot_config%" if %verbose_info% equ true echo Setting up spigot config...
if 4 gtr %NUMBER_OF_PROCESSORS% if exist %spigot_config% "%scriptdir%cache\fart.exe" -q -i -a -C "%spigot_config%" "netty-threads: 4" "netty-threads: %NUMBER_OF_PROCESSORS%" > nul 2> nul
if exist "%spigot_config%" if %verbose% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%spigot_config%" "item-despawn-rate: 6000" "item-despawn-rate: 4000" > nul 2> nul
set paper_config=paper.yml
if exist "%paper_config%" if %verbose_info% equ true echo Setting up paper config...
if "%5" equ "online-mode" set online_mode=true
if exist "%paper_config%" if %online_mode% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "online-mode: false" "online-mode: true" > nul 2> nul
if exist "%paper_config%" if %online_mode% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "online-mode: true" "online-mode: false" > nul 2> nul
if exist "%paper_config%" if %online_mode% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "bungee-online-mode: false" "bungee-online-mode: true" > nul 2> nul
if exist "%paper_config%" if %online_mode% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "bungee-online-mode: true" "bungee-online-mode: false" > nul 2> nul
:: For performance - if we can't load a chunk, don't try to load other chunks further away by
:: preventing player from moving into unloaded chunks.
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "prevent-moving-into-unloaded-chunks: false" "prevent-moving-into-unloaded-chunks: true" > nul 2> nul
:: Unloads unused chunks faster, resulting in more performance.
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "delay-chunk-unloads-by: 10s" "delay-chunk-unloads-by: 5s" > nul 2> nul
:: Optimizes explosion performance by caching entity lookups.
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "optimize-explosions: false" "optimize-explosions: true" > nul 2> nul
:: Optimizes lightning performance by making lightning updates async
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "use-async-lighting: false" "use-async-lighting: true" > nul 2> nul
:: Caches chunk maps to improve performance of them
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "cache-chunk-maps: false" "cache-chunk-maps: true" > nul 2> nul
:: Fixes CommandSender#hasPermission on ConsoleCommandSender
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "console-has-all-permissions: false" "console-has-all-permissions: true" > nul 2> nul
:: Fixes Paper excessive velocity warnings.
if exist "%paper_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%paper_config%" "warnWhenSettingExcessiveVelocity: true" "warnWhenSettingExcessiveVelocity: false" > nul 2> nul
:: Fix timings verbose
if exist "%spigot_config%" if %verbose% equ false "%scriptdir%cache\fart.exe" -q -a -C -w "%spigot_config%" "verbose: false" "verbose: true" > nul 2> nul
if exist "%paper_config%" if %verbose% equ false "%scriptdir%cache\fart.exe" -q -a -C -w "%paper_config%" "verbose: false" "verbose: true" > nul 2> nul
if exist "%spigot_config%" if %verbose% equ false "%scriptdir%cache\fart.exe" -q -a -C -w "%spigot_config%" " verbose: true" " verbose: false" > nul 2> nul
if exist "%spigot_config%" if %verbose% equ true "%scriptdir%cache\fart.exe" -q -a -C -w "%spigot_config%" " verbose: false" " verbose: true" > nul 2> nul
if exist "%paper_config%" if %verbose% equ false "%scriptdir%cache\fart.exe" -q -a -C -w "%paper_config%" " verbose: true" " verbose: false" > nul 2> nul
if exist "%paper_config%" if %verbose% equ true "%scriptdir%cache\fart.exe" -q -a -C -w "%paper_config%" " verbose: false" " verbose: true" > nul 2> nul
set server_config=server.properties
if exist "%server_config%" if %verbose_info% equ true echo Setting up server.properties...
if exist "%server_config%" if %online_mode% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%server_config%" "online-mode=false" "online-mode=true" > nul 2> nul
if exist "%server_config%" if %online_mode% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%server_config%" "online-mode=true" "online-mode=false" > nul 2> nul
if exist "%server_config%" if %disable_snooper% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%server_config%" "snooper-enabled=true" "snooper-enabled=false" > nul 2> nul
if exist "%server_config%" if %disable_snooper% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%server_config%" "snooper-enabled=false" "snooper-enabled=true" > nul 2> nul
:: Improves performance of chunk writes by making them async
if exist "%server_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%server_config%" "sync-chunk-writes=true" "sync-chunk-writes=false" > nul 2> nul
set "pluginmetrics_config=%scriptdir%plugins\PluginMetrics\config.yml"
if exist "%pluginmetrics_config%" if %verbose_info% equ true echo Setting up PluginMetrics config...
if exist "%pluginmetrics_config%" if %bstats_enabled% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%pluginmetrics_config%" "opt-out: false" "opt-out: true" > nul 2> nul
if exist "%pluginmetrics_config%" if %bstats_enabled% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%pluginmetrics_config%" "opt-out: true" "opt-out: false" > nul 2> nul
set "bstats_config=%scriptdir%plugins\bStats\config.yml"
if exist "%bstats_config%" if %verbose_info% equ true echo Setting up bStats config...
if exist "%bstats_config%" if %bstats_enabled% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%bstats_config%" "enabled: true" "enabled: false" > nul 2> nul
if exist "%bstats_config%" if %bstats_enabled% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%bstats_config%" "enabled: false" "enabled: true" > nul 2> nul
set bukkit_config=bukkit.yml
if exist "%bukkit_config%" if %verbose_info% equ true echo Setting up bukkit config...
if exist "%bukkit_config%" if %disable_query% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%bukkit_config%" "query-plugins: true" "query-plugins: false" > nul 2> nul
if exist "%bukkit_config%" if %disable_query% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%bukkit_config%" "query-plugins: false" "query-plugins: true" > nul 2> nul
:: Enable & Optimize Chunk GC
if exist "%bukkit_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%bukkit_config%" "load-threshold: 0" "load-threshold: 300" > nul 2> nul
if exist "%bukkit_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%bukkit_config%" "period-in-ticks: 600" "period-in-ticks: 300" > nul 2> nul
set purpur_config=purpur.yml
if exist "%purpur_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%purpur_config%" "dont-send-useless-entity-packets: false" "dont-send-useless-entity-packets: true" > nul 2> nul
if exist "%purpur_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%purpur_config%" "use-alternate-keepalive: false" "use-alternate-keepalive: true" > nul 2> nul
set yatopia_config=yatopia.yml
if exist "%yatopia_config%" if %verbose% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%yatopia_config%" "verbose: true" "verbose: false" > nul 2> nul
if exist "%yatopia_config%" if %verbose% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%yatopia_config%" "verbose: false" "verbose: true" > nul 2> nul
if exist "%yatopia_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%yatopia_config%" "fixFallDistance: false" "fixFallDistance: true" > nul 2> nul
set help_command_config=help.yml
if exist "%help_command_config%" if %verbose_info% equ true echo Setting up help.yml...
if exist "%help_command_config%" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% Clear-Content '%scriptdir%%help_command_config%'; Add-Content -Path '%scriptdir%%help_command_config%' -Value 'ignore-plugins:' -Force; Add-Content -Path '%scriptdir%%help_command_config%' -Value ' - All' -Force"
if exist "%help_command_config%" if %disable_powershell% equ false title %title%
if exist "%help_command_config%" if %disable_help_index% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%help_command_config%" "#ignore-plugins:" "ignore-plugins:" > nul 2> nul
if exist "%help_command_config%" if %disable_help_index% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%help_command_config%" "ignore-plugins:" "#ignore-plugins:" > nul 2> nul
if exist "%help_command_config%" if %disable_help_index% equ true "%scriptdir%cache\fart.exe" -q -i -a -C "%help_command_config%" "# - All" " - All" > nul 2> nul
if exist "%help_command_config%" if %disable_help_index% equ false "%scriptdir%cache\fart.exe" -q -i -a -C "%help_command_config%" " - All" "# - All" > nul 2> nul
:: Fixes Skellet HangingEvent errors if Skellet is installed.
if exist "%skellet_config%" if %disable_powershell% equ false if %verbose_info% equ true echo Setting up skellet config...
set "skellet_config=%scriptdir%plugins\Skellet\SyntaxToggles.yml"
if exist "%skellet_config%" "%scriptdir%cache\fart.exe" -q -i -a -C "%skellet_config%" "Hanging: true" "Hanging: false" > nul 2> nul
::
if %unblock_files% equ true if %unblocked% equ false (
if %verbose_info% equ true echo(
if %verbose_info% equ true echo %dosya_bloklari_kaldiriliyor%
:: n: hotspot
if %disable_powershell% equ false cmd /q /e:off /v:off /f:off /c start "" /belownormal /b %powershell_command% %powershell_arguments% "Start-Job -Name 'Unblock Files' -ScriptBlock { [System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'; ([System.Diagnostics.Process]::GetCurrentProcess()).PriorityClass = 'BelowNormal'; Get-ChildItem -Recurse | Unblock-File }" > nul
set unblocked=true
)
if %sixty_four_bit_java% equ true set sixty_four_bit_java0= -d64
if %verbose_info% equ true echo(
echo %java_kontrol_ediliyor%
if "%6" equ "no-java" set java_command=non-existent
set found_working_java=true
%java_command% -version > nul 2> nul || (
set found_working_java=false
)
:: Defines the bundled JRE version. Change below to latest version when a new one is released
set bundled_jre_ver_minor=282
set bundled_jre_ver_build=08
set bundled_jre11_ver_patch=10
set bundled_jre11_ver_build=9
set built_in_java_loc=%scriptdir%cache\java\openjdk-8u%bundled_jre_ver_minor%-b%bundled_jre_ver_build%-jre\bin\java.exe
set built_in_java11_loc=%scriptdir%cache\java\openjdk-11.0.%bundled_jre11_ver_patch%_%bundled_jre11_ver_build%-jre\bin\java.exe
if exist "%built_in_java11_loc%" set built_in_java_loc=%built_in_java11_loc%
:: Set variables
if %found_working_java% equ false if exist "%built_in_java_loc%" set java_command="%built_in_java_loc%"
if %found_working_java% equ false if exist "%built_in_java_loc%" set JAVA_PATH=%built_in_java_loc%
if %found_working_java% equ false if exist "%built_in_java_loc%" set found_working_java=true
:: Re-test after detecting built-in Java
%java_command% -version > nul 2> nul || (
set found_working_java=false
)
if %found_working_java% equ false echo(
if %found_working_java% equ false echo %java_indiriliyor%
:: 37 MB, JRE, unaltered OpenJDK (not AdoptOpenJDK) as ZIP file.
:: Note: Only 64-bit is supported.
if %found_working_java% equ false set java_download_url=https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u%bundled_jre_ver_minor%-b%bundled_jre_ver_build%/OpenJDK8U-jre_x64_windows_8u%bundled_jre_ver_minor%b%bundled_jre_ver_build%.zip
if %found_working_java% equ false set java11_download_url=https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases/download/jdk-11.0.%bundled_jre11_ver_patch%%%2B%bundled_jre11_ver_build%/OpenJDK11U-jre_x64_windows_11.0.%bundled_jre11_ver_patch%_%bundled_jre11_ver_build%.zip
set game_version_number=%game_version:.=%
:: Paper 1.16.4 build 311 onwards gives a warning on Java 8, so download Java 11 instead.
:: This will also be future compatible when Paper 1.17 comes.
if %found_working_java% equ false if %game_version_number% geq 1164 set built_in_java_version=11
if %found_working_java% equ false if "%built_in_java_version%" equ "11" set java_download_url=%java11_download_url%
if %found_working_java% equ false if not exist "%scriptdir%cache\java" mkdir "%scriptdir%cache\java"
if %found_working_java% equ false set java_download_loc=%scriptdir%cache\java\java.zip
if %found_working_java% equ false if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('%java_download_url%', '%java_download_loc%')"
if %found_working_java% equ false if %disable_powershell% equ false title %title%
if not exist "%scriptdir%cache\7z.exe" if %disable_powershell% equ false if %verbose_info% equ true echo Downloading 7z exe...
if not exist "%scriptdir%cache\7z.exe" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('https://github.com/LifeMC/site-assets/raw/main/other/7z.exe', '%scriptdir%cache\7z.exe')"
if not exist "%scriptdir%cache\7z.exe" if %disable_powershell% equ false title %title%
if not exist "%scriptdir%cache\7z.dll" if %disable_powershell% equ false if %verbose_info% equ true echo Downloading 7z dll...
if not exist "%scriptdir%cache\7z.dll" if %disable_powershell% equ false %powershell_command% %powershell_arguments% "%powershell_workarounds% %powershell_new_web_client_wc% $WC.DownloadFile('https://github.com/LifeMC/site-assets/raw/main/other/7z.dll', '%scriptdir%cache\7z.dll')"
if not exist "%scriptdir%cache\7z.dll" if %disable_powershell% equ false title %title%
if %found_working_java% equ false if exist "%java_download_loc%" if exist "%scriptdir%cache\7z.exe" "%scriptdir%cache\7z.exe" x "%java_download_loc%" -o"%scriptdir%cache\java" * -r -y > nul
if %found_working_java% equ false if exist "%java_download_loc%" if exist "%scriptdir%cache\7z.exe" del /f /q "%java_download_loc%"
if exist "%built_in_java11_loc%" set built_in_java_loc=%built_in_java11_loc%
:: Set variables
if %found_working_java% equ false if exist "%built_in_java_loc%" set java_command="%built_in_java_loc%"
if %found_working_java% equ false if exist "%built_in_java_loc%" set JAVA_PATH=%built_in_java_loc%
if %found_working_java% equ false if exist "%built_in_java_loc%" set found_working_java=true
:: Re-test after downloading built-in Java
%java_command% -version > nul 2> nul || (
set found_working_java=false
)
:: Set JAVA_HOME from PATH if not defined
if not defined JAVA_HOME if not defined JAVA_PATH for /f "delims=" %%i in ('where java') do set "JAVA_PATH=%%i"
if defined JAVA_PATH for %%a in ("%JAVA_PATH%") do set "JAVA_PATH=%%~dpa"
if defined JAVA_PATH set JAVA_PATH=%%~dpJAVA_PATH
if not defined JAVA_HOME if defined JAVA_PATH set "JAVA_HOME=%JAVA_PATH%"
:: Set JDK_HOME to JAVA_HOME if no JDK_HOME defined, but JAVA_HOME is defined