This repository was archived by the owner on Jan 3, 2021. It is now read-only.
forked from ZacklogansRandomShit/Mineplex-Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMineplex.sk
More file actions
7790 lines (7454 loc) · 417 KB
/
Copy pathMineplex.sk
File metadata and controls
7790 lines (7454 loc) · 417 KB
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
on load:
set {mineplex.starttime} to now
#(Old ugly acci text here)
#
#Mineplex Core Remake
#The best and only Mineplex Copy
#by Josh Roy (WheezyGold7931)
#Enjoy!
script options:
$ use permissions
#! MCR Settings
#! If you want to use MySQL features edit the details below
script options:
$ db url jdbc:mysql://<HOST>:3306/<DATABASE>
$ db username <USERNAME>
$ db password <PASSWORD>
#! This value can be set to the following:
#! "file": Stores the playerdata into files (Default)
#! "sql": Stores the playerdata into a sql database (Details must be setup above)
options:
mode: file
#! These are internal settings, it is not recomended that you mess with them as they WILL mess up the plugin!
options:
MCRVER: 2.9
MCRHOTFIX: 0
configver: shamu
playerdata: 3
#! json.sk code DO NOT MESS WITH THIS! !(Rezz ily)!
options:
debug: false
codes: 0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|k|l|m|n|o|r
function mcrremoveColor(msg: text) :: text:
set {_m::*} to {_msg} split at ""
set {_color-codes} to "{@codes}"
set {_colors::*} to {_color-codes} split at "|"
set {_new} to ""
loop {_m::*}:
set {_char} to loop-value
set {_prev} to the last character of {_new}
if {_prev} is "&":
loop {_colors::*}:
if loop-value-2 is {_char}:
set {_skip} to true
if {_skip} is set:
delete {_skip}
else:
set {_new} to "%{_new}%%{_char}%"
return {_new}
function mcrjsonColorize(msg: text, default-color: text = "&r") :: text:
set {_m::*} to {_msg} split at ""
set {_color-codes} to "{@codes}"
set {_colors::*} to {_color-codes} split at "|"
set {_color} to colored {_default-color}
set {_code} to the first character of {_color}
set {_new} to ""
set {_skip} to 0
loop amount of {_m::*} times:
if {_skip} is more than or equal to 1:
subtract 1 from {_skip}
else:
set {_char} to {_m::%loop-number%}
set {_next} to {_m::%loop-number + 1%}
if {@debug} is true:
broadcast "&a[Character Check] &r%loop-number%: &7%{_char}% &r&onext: &8%{_next}% &r[%{_color}%color&r]"
if {_char} is "&" or {_code}:
if {@debug} is true:
broadcast "&a[Color Check] &rFOUND: &o%{_char}%%{_next}% &7&m<--&7&o is it valid?"
loop {_colors::*}:
if loop-value-2 is {_next}:
set {_color} to "%{_color}%%{_code}%%{_next}%"
if {_next} is "r":
set {_color} to {_default-color}
set {_new} to "%{_new}%%{_color}%"
set {_skip} to 1
if {_skip} is less than or equal to 0:
set {_new} to "%{_new}%%{_char}%"
else if {_char} is " ":
set {_new} to "%{_new}% %{_color}%"
else:
set {_new} to "%{_new}%%{_char}%"
return {_new}
function mcrjsonSanitize(msg: text) :: text:
if {@debug} is true:
broadcast "&a[Sanitize] &7&oSanitizing input..."
set {_m::*} to {_msg} split at ""
loop {_m::*}:
if loop-value is """":
set {_m::%loop-index%} to "\""" # """
else if loop-value is "\":
set {_m::%loop-index%} to "\\"
set {_new} to join {_m::*} with ""
return {_new}
function mcrjsonFormat(msg: text, color: boolean = true) :: text:
set {_m::*} to {_msg} split at "||"
set {_current} to 1
loop {_m::*}:
if {_clusters::%{_current}%} is not set:
set {_clusters::%{_current}%} to ""
if {_clusters::%{_current}%::text} is not set:
set {_clusters::%{_current}%::text} to mcrjsonSanitize(loop-value)
else:
set {_tag} to the first 4 characters of loop-value
set {_value} to subtext of loop-value from characters 5 to the length of loop-value
if {_tag} is "ttp:":
set {_clusters::%{_current}%::tooltip} to mcrjsonSanitize({_value})
else if {_tag} is "cmd:":
set {_clusters::%{_current}%::command} to mcrjsonSanitize({_value})
else if {_tag} is "sgt:":
set {_clusters::%{_current}%::suggest} to mcrjsonSanitize({_value})
else if {_tag} is "url:":
if {_value} doesn't contain "http://" or "https://":
set {_value} to "http://%{_value}%"
set {_clusters::%{_current}%::url} to mcrjsonSanitize({_value})
else if {_tag} is "ins:":
set {_clusters::%{_current}%::insertion} to mcrjsonSanitize({_value})
else:
add 1 to {_current}
set {_clusters::%{_current}%::text} to mcrjsonSanitize(loop-value)
set {_clusters::%{_current}%} to ""
if {@debug} is true:
broadcast "&a[Tag Check] &3cluster:&b%{_current}% &8(&f&o%{_tag}%&8)"
loop {_clusters::*}:
if {@debug} is true:
broadcast "&a[Cluster Check] &7&oCluster ##%loop-index% exists."
set {_i} to loop-index
set {_text} to {_clusters::%{_i}%::text}
if {_color} is true:
set {_text} to mcrjsonColorize({_text})
if {_json} is not set:
set {_json} to "{""text"":""%{_text}%"""
else:
set {_json} to "%{_json}%,{""text"":""%{_text}%"""
if {_clusters::%{_i}%::tooltip} is set:
if {_color} is true:
set {_tooltip} to mcrjsonColorize({_clusters::%{_i}%::tooltip})
else:
set {_tooltip} to {_clusters::%{_i}%::tooltip}
set {_json} to "%{_json}%,""hoverEvent"":{""action"": ""show_text"",""value"": ""%{_tooltip}%""}"
if {_clusters::%{_i}%::insertion} is set:
set {_json} to "%{_json}%,""insertion"":""%{_clusters::%{_i}%::insertion}%"",""obfuscated"":false"
if {_clusters::%{_i}%::command} is set:
set {_clickable} to "%{_json}%,""clickEvent"":{""action"":""run_command"",""value"":""%{_clusters::%{_i}%::command}%""}"
if {_clusters::%{_i}%::suggest} is set:
set {_clickable} to "%{_json}%,""clickEvent"":{""action"": ""suggest_command"",""value"": ""%{_clusters::%{_i}%::suggest}%""}"
if {_clusters::%{_i}%::url} is set:
set {_clickable} to "%{_json}%,""clickEvent"":{""action"": ""open_url"",""value"": ""%{_clusters::%{_i}%::url}%""}"
if {_clickable} is set:
set {_json} to "%{_clickable}%}"
delete {_clickable}
else:
set {_json} to "%{_json}%}"
return "{""text"":"""", ""extra"":[%{_json}%]}"
function mcrjson(to: text, msg: text, color: boolean = true):
set {_msg} to mcrjsonFormat({_msg}, {_color})
execute console command "/tellraw %{_to}% %{_msg}%"
if {@debug} is true:
set {_player} to {_to} parsed as offline player
if {_player} is online:
send uncolored {_msg} to {_player}
function mcrjsonBroadcast(msg: text, color: boolean = true):
mcrjson("@a", {_msg}, {_color})
#MCR Code
#MCR Code
#MCR Code
#MCR Code
#MCR Code
#MCR Code
#MCR Code
on load: #You cannot trust people to enter the correct thing so lets double check for them :)
if "{@mode}" is "file":
set {mineplex.mode} to "file"
send "§9MCR> §eMCR has been set to store playerdata into files!" to the console
else if "{@mode}" is "sql":
set {mineplex.mode} to "sql"
send "§9MCR> §eMCR has been set to store playerdata into SQL!" to the console
send "§9MCR> §eThey better have setup the database correctly" to the console
else:
set {mineplex.mode} to "file"
send "§9MCR> §eMCR has been set to store playerdata into files!" to the console
on load:
if {mineplex.mode} is "sql":
update "CREATE TABLE IF NOT EXISTS `accounts` ( `id` INT NULL DEFAULT NULL AUTO_INCREMENT , `name` VARCHAR(40) NOT NULL , `uuid` VARCHAR(100) NOT NULL , `rank` VARCHAR(20) NOT NULL DEFAULT 'All' , `level` INT(20) NOT NULL DEFAULT '0' , `gems` INT(20) NOT NULL DEFAULT '0' , `shards` INT(20) NOT NULL DEFAULT '0' , `banned` VARCHAR(20) NOT NULL DEFAULT 'no' , `muted` VARCHAR(20) NOT NULL DEFAULT 'no' , UNIQUE (`id`)) ENGINE = InnoDB;"
update "CREATE TABLE IF NOT EXISTS `newslist` ( `id` INT(11) NOT NULL AUTO_INCREMENT , `newsString` VARCHAR(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL , `newsPosition` VARCHAR(11) NULL DEFAULT NULL , UNIQUE (`id`)) ENGINE = InnoDB;"
command /getu [<string>]:
trigger:
set {_p} to player
set {_get} to first element out of objects in column "%arg-1%" from result of query "SELECT %arg-1% FROM `accounts` WHERE uuid = '%uuid of {_p}%'"
send "&a||&b%{_get}%&a||"
function parseRank(p: player , r: text) :: string:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set {_get} to value "rank" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
if {mineplex.mode} is "sql":
set {_get} to first element out of objects in column "rank" from result of query "SELECT rank FROM `accounts` WHERE uuid = '%uuid of {_p}%'"
if {_get} is "All":
set {mineplex.rank.%{_p}%} to ""
return "&fPlayer"
if {_get} is "Ultra":
set {mineplex.rank.%{_p}%} to "&b&lULTRA "
return "&bUltra"
if {_get} is "Hero":
set {mineplex.rank.%{_p}%} to "&d&lHERO "
return "&dHero"
if {_get} is "Legend":
set {mineplex.rank.%{_p}%} to "&a&lLEGEND "
return "&aLegend"
if {_get} is "Titan":
set {mineplex.rank.%{_p}%} to "&c&lTITAN "
return "&cTitan"
if {_get} is "Trainee":
set {mineplex.rank.%{_p}%} to "&6&lTRAINEE "
return "&6Trainee"
if {_get} is "Mod":
set {mineplex.rank.%{_p}%} to "&6&lMOD "
return "&6Mod"
if {_get} is "SrMod":
set {mineplex.rank.%{_p}%} to "&6&lSR.MOD "
return "&6Sr.Mod"
if {_get} is "CMod":
set {mineplex.rank.%{_p}%} to "&6&lC.MOD "
return "&6C.Mod"
if {_get} is "Admin":
set {mineplex.rank.%{_p}%} to "&4&lADMIN "
return "&4Admin"
if {_get} is "Apex":
set {mineplex.rank.%{_p}%} to "&9&lAPEX "
return "&9Apex"
if {_get} is "Leader":
set {mineplex.rank.%{_p}%} to "&4&lLEADER "
return "&4Leader"
if {_get} is "Owner":
set {mineplex.rank.%{_p}%} to "&4&lOWNER "
return "&4Owner"
if {_get} is "Builder":
set {mineplex.rank.%{_p}%} to "&9&lBUILDER "
return "&9Builder"
if {_get} is "Maplead":
set {mineplex.rank.%{_p}%} to "&9&lMAPLEAD "
return "&9Maplead"
if {_get} is "Mapper":
set {mineplex.rank.%{_p}%} to "&9&lMAPPER "
return "&9Mapper"
if {_get} is "JrDev":
set {mineplex.rank.%{_p}%} to "&6&lJR.DEV "
return "&6Jr.Dev"
if {_get} is "Dev":
set {mineplex.rank.%{_p}%} to "&4&lDEV "
return "&4Dev"
if {_get} is "Twitch":
set {mineplex.rank.%{_p}%} to "&5&lTWITCH "
return "&5Twitch"
if {_get} is "Youtube":
set {mineplex.rank.%{_p}%} to "&c&lYOUTUBE "
return "&cYouTube"
if {_get} is "Event":
set {mineplex.rank.%{_p}%} to "&f&lEVENT "
return "&fEvent"
if {_get} is "Yt":
set {mineplex.rank.%{_p}%} to "&5&lYT "
return "&5YT"
if {_get} is "Eternal":
set {mineplex.rank.%{_p}%} to "&3&lETERNAL "
return "&3Eternal"
if {_get} is "Support":
set {mineplex.rank.%{_p}%} to "&9&lSUPPORT "
return "&9Support"
if {_get} is "Artist":
set {mineplex.rank.%{_p}%} to "&9&lARTIST "
return "&9Artist"
function parseRankRaw(r: text) :: string:
set {_get} to {_r}
if {_get} is "All":
set {_rank} to ""
if {_get} is "Ultra":
set {_rank} to "&b&lULTRA "
if {_get} is "Hero":
set {_rank} to "&d&lHERO "
if {_get} is "Legend":
set {_rank} to "&a&lLEGEND "
if {_get} is "Titan":
set {_rank} to "&c&lTITAN "
if {_get} is "Trainee":
set {_rank} to "&6&lTRAINEE "
if {_get} is "Mod":
set {_rank} to "&6&lMOD "
if {_get} is "SrMod":
set {_rank} to "&6&lSR.MOD "
if {_get} is "CMod":
set {_rank} to "&6&lC.MOD "
if {_get} is "Admin":
set {_rank} to "&4&lADMIN "
if {_get} is "Apex":
set {_rank} to "&9&lAPEX "
if {_get} is "Leader":
set {_rank} to "&4&lLEADER "
if {_get} is "Owner":
set {_rank} to "&4&lOWNER "
if {_get} is "Builder":
set {_rank} to "&9&lBUILDER "
if {_get} is "Maplead":
set {_rank} to "&9&lMAPLEAD "
if {_get} is "Mapper":
set {_rank} to "&9&lMAPPER "
if {_get} is "JrDev":
set {_rank} to "&6&lJR.DEV "
if {_get} is "Dev":
set {_rank} to "&4&lDEV "
if {_get} is "Twitch":
set {_rank} to "&5&lTWITCH "
if {_get} is "Youtube":
set {_rank} to "&c&lYOUTUBE "
if {_get} is "Event":
set {_rank} to "&f&lEVENT "
if {_get} is "Yt":
set {_rank} to "&5&lYT "
if {_get} is "Eternal":
set {_rank} to "&3&lETERNAL "
if {_get} is "Support":
set {_rank} to "&9&lSUPPORT "
if {_get} is "Artist":
set {_rank} to "&9&lARTIST "
if {_rank} is set:
return {_rank}
else:
return "null"
function playerdata(p: offline player) :: boolean:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
if file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml" doesn't exists:
create file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "version" to "{@playerdata}" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "player" to "%{_p}%" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "rank" to "All" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "level" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "gems" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "shards" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "banned" to "no" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "muted" to "no" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.gems" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.games" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.dailyr" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.voted" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.chests" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
else:
set {_ver} to value "version" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
if {_ver} is not "{@playerdata}":
if {_ver} is "1":
set "stats.global.gems" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.games" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.dailyr" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.voted" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.chests" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "version" to "{@playerdata}" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
send "&9MCR> &7Your playdata has been updated to the latest version!" to {_p}
if {_ver} is "2":
set "stats.global.gems" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.games" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.dailyr" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.voted" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "stats.global.chests" to "0" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set "version" to "{@playerdata}" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
send "&9MCR> &7Your playdata has been updated to the latest version!" to {_p}
set "player" to "%{_p}%" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set {_get} to value "rank" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
parseRank({_p}, "LOL")
set {_lvl} to value "level" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
execute console command "/givestat %{_p}% Global.ExpEarned %{_lvl}%"
set {_sh} to value "shards" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set {mineplex.shards.%{_p}%} to {_sh} parsed as an number
set {_ge} to value "gems" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
set {mineplex.gems.%{_p}%} to {_ge} parsed as an number
set {_ban} to value "banned" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
if {_ban} is "yes":
set {banned::%{_p}%} to true
else:
set {banned::%{_p}%} to false
set {_mute} to value "muted" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
if {_mute} is "yes":
set {muted::%{_p}%} to true
else:
set {muted::%{_p}%} to false
else if {mineplex.mode} is "sql":
set {_getuuid} to first element out of objects in column "uuid" from result of query "SELECT uuid FROM `accounts` WHERE uuid = '%{_uuid}%'"
if {_getuuid} is not set:
update "INSERT INTO `accounts` (`uuid`, `name`) VALUES ('%{_uuid}%', '%{_p}%')"
parseRank({_p}, "LOL")
set {_lvl} to first element out of objects in column "level" from result of query "SELECT level FROM `accounts` WHERE uuid = '%{_uuid}%'"
execute console command "/givestat %{_p}% Global.ExpEarned %{_lvl}%"
set {_sh} to first element out of objects in column "shards" from result of query "SELECT shards FROM `accounts` WHERE uuid = '%{_uuid}%'"
set {mineplex.shards.%{_p}%} to {_sh}
set {_ge} to first element out of objects in column "gems" from result of query "SELECT gems FROM `accounts` WHERE uuid = '%{_uuid}%'"
set {mineplex.gems.%{_p}%} to {_ge}
set {_ban} to first element out of objects in column "banned" from result of query "SELECT banned FROM `accounts` WHERE uuid = '%{_uuid}%'"
if {_ban} is "yes":
set {banned::%{_p}%} to true
else:
set {banned::%{_p}%} to false
set {_mute} to first element out of objects in column "muted" from result of query "SELECT muted FROM `accounts` WHERE uuid = '%{_uuid}%'"
if {_mute} is "yes":
set {muted::%{_p}%} to true
else:
set {muted::%{_p}%} to false
function getPlayerdata(p: offline player , f: text) :: string:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set {_get} to value "%{_f}%" get of "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
return {_get}
else if {mineplex.mode} is "sql":
set {_get} to first element out of objects in column "%{_f}%" from result of query "SELECT %{_f}% FROM `accounts` WHERE uuid = '%{_uuid}%'"
return {_get}
function setPlayerdata(p: offline player , f: text , v: text) :: boolean:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set "%{_f}%" to "%{_v}%" in yaml file "plugins/Mineplex-Core-Remake/playerdata/%{_uuid}%.yml"
return true
playerdata({_p})
else if {mineplex.mode} is "sql":
update "UPDATE `accounts` SET `%{_f}%` = '%{_v}%' WHERE uuid = '%{_uuid}%'"
return true
set {_s} to getPlayerdata({_p}, "shards")
set {_g} to getPlayerdata({_p}, "gems")
broadcast "shard: %{_s}% -gem: %{_g}%"
playerdata({_p})
function addShards(p: offline player , a: number) :: boolean:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set {_get} to getPlayerdata({_p}, "shards")
set {_cur} to {_get} parsed as a number
add {_a} to {_cur}
setPlayerdata({_p}, "shards", "%{_cur}%")
else if {mineplex.mode} is "sql":
set {_get} to first element out of objects in column "shards" from result of query "SELECT shards FROM `accounts` WHERE uuid = '%{_uuid}%'"
add {_a} to {_get}
setPlayerdata({_p}, "shards", "%{_get}%")
function delShards(p: offline player , a: number) :: boolean:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set {_get} to getPlayerdata({_p}, "shards")
set {_cur} to {_get} parsed as a number
remove {_a} from {_cur}
setPlayerdata({_p}, "shards", "%{_cur}%")
else if {mineplex.mode} is "sql":
set {_get} to first element out of objects in column "shards" from result of query "SELECT shards FROM `accounts` WHERE uuid = '%{_uuid}%'"
remove {_a} from {_get}
setPlayerdata({_p}, "shards", "%{_get}%")
function addGems(p: offline player , a: number) :: boolean:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set {_get} to getPlayerdata({_p}, "gems")
set {_cur} to {_get} parsed as a number
add {_a} to {_cur}
setPlayerdata({_p}, "gems", "%{_cur}%")
else if {mineplex.mode} is "sql":
set {_get} to first element out of objects in column "gems" from result of query "SELECT gems FROM `accounts` WHERE uuid = '%{_uuid}%'"
add {_a} to {_get}
setPlayerdata({_p}, "gems", "%{_get}%")
function delGems(p: offline player , a: number) :: boolean:
set {_uuid} to uuid of {_p}
if {mineplex.mode} is "file":
set {_get} to getPlayerdata({_p}, "gems")
set {_cur} to {_get} parsed as a number
remove {_a} from {_cur}
setPlayerdata({_p}, "gems", "%{_cur}%")
else if {mineplex.mode} is "sql":
set {_get} to first element out of objects in column "gems" from result of query "SELECT gems FROM `accounts` WHERE uuid = '%{_uuid}%'"
remove {_a} from {_get}
setPlayerdata({_p}, "gems", "%{_get}%")
on quit:
delete {mineplex.rank.%player%}
delete {mineplex.level.%player%}
delete {mineplex.gems.%player%}
delete {mineplex.shards.%player%}
delete {banned::%player%}
delete {muted::%player%}
on connect:
set {_uuid} to uuid of {_p}
playerdata(player)
send "§9MCR> §e%player% (%uuid of player%) has been loaded from playerdata!" to the console
function Beam(e1: entity , e2: entity):
spawn a squid at location 0 meter behind {_e1}'s head
set {_el} to last spawned entity
set target of {_el} to {_e2}
apply invisibility to the last spawned entity
add "{CustomName:""BeamGuar"", NoGravity:1, Silent:1, NoAI:1}" to nbt of last spawned entity
set {_targLoc} to location of {_e2}
loop 100 times:
teleport {_el} to location 0 meter behind {_e1}'s head
set target of {_el} to {_e2}
add "{Motion:[0.0,0.0,0.0]}" to nbt of {_el}
if "%{_e2}'s name%" is "BeamCow":
teleport {_e2} to {_targLoc}
add "{Motion:[0.0,0.0,0.0]}" to nbt of {_e2}
wait 1 tick
create a safe explosion with force 2 at {_e1}
loop entities in radius 3 of {_e2}:
make {_e1} damage loop-entity by (3 - (distance between loop-entity and {_e2}))
teleport {_el} 300 blocks below {_el}
teleport {_e2} 300 blocks below {_e2}
kill {_el}
kill {_e2}
function ClientBeam(e1: entity , e3: entity , e2: entity):
spawn a cow at location of {_e2}
set {_c} to last spawned entity
add "{CustomName:""BeamCow"", NoGravity:1, Silent:1}" to nbt of last spawned entity
spawn a guardian at location 1 meter behind {_e1}'s head
set {_el} to last spawned entity
set target of {_el} to {_e2}
loop all players:
protocol hide {_e1} from loop-player
protocol hide {_e2} from loop-player
protocol show {_e1} to {_e3}
protocol show {_e2} to {_e3}
apply invisibility to {_c}
apply invisibility to the last spawned entity
add "{CustomName:""BeamGuar"", NoGravity:1, Silent:1}" to nbt of last spawned entity
set {_targLoc} to location of {_e2}
loop 100 times:
teleport {_el} to location 1 meter behind {_e1}'s head
add "{Motion:[0.0,0.0,0.0]}" to nbt of {_el}
if "%{_e2}'s name%" is "BeamCow":
teleport {_e2} to {_targLoc}
add "{Motion:[0.0,0.0,0.0]}" to nbt of {_e2}
wait 1 tick
create a safe explosion with force 2 at {_e2}
loop entities in radius 3 of {_c}:
make {_e1} damage loop-entity by (3 - (distance between loop-entity and {_c}))
teleport {_el} 300 blocks below {_el}
teleport {_e2} 300 blocks below {_e2}
kill {_el}
kill {_c}
function configRefresh(n: number) :: number:
set {mineplex.config.config} to value "config" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.servername} to value "servername" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.website} to value "website" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.appealwebsite} to value "appealwebsite" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.ruleswebsite} to value "ruleswebsite" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.youtube} to value "youtube" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.twitter} to value "twitter" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.shoplink} to value "shoplink" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.world} to value "worldname" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.doublejump} to value "doublejump" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.autoop} to value "autoop" get of "plugins/Mineplex-Core-Remake/config.yml"
set {mineplex.config.unbanadmin} to value "unbanadmin" get of "plugins/Mineplex-Core-Remake/config.yml"
function configPopulate(n: number) :: number:
create file "plugins/Mineplex-Core-Remake/config.yml"
set "config" to "{@configver}" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "servername" to "Mineplex" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "website" to "www.mineplex.com" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "appealwebsite" to "www.mineplex.com/appeals" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "ruleswebsite" to "www.mineplex.com/rules" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "youtube" to "http://youtube.com/mineplexgamesofficial" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "twitter" to "http://twitter.com/mineplex" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "shoplink" to "www.mineplex.com/shop" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "worldname" to "world" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "doublejump" to "true" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "autoop" to "false" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
set "unbanadmin" to "false" in yaml file "plugins/Mineplex-Core-Remake/config.yml"
function updateRankAPI(p: player) :: player:
wait 5 ticks
if {mineplex.rank.%{_p}%} is not set:
set {mineplex.rank.%{_p}%} to ""
if {mineplex.disguise.%{_p}%} is set:
set {_br} to uncolored {mineplex.rank.%{_p}%}
set {_dr} to uncolored {mineplex.rank.%{mineplex.disguise.%{_p}%}%}
if {mineplex.rank.%{mineplex.disguise.%{_p}%}%} is set:
make all players see {_p}'s prefix as "%{mineplex.rank.%{mineplex.disguise.%{_p}%}%}%&r&e"
else:
make all players see {_p}'s prefix as "&e"
set {_br} to convert string "%{_br}%" to lowercase
set {_br} to 1st char in each word of "%{_br}%" to caps
set {_dr} to convert string "%{_dr}%" to lowercase
set {_dr} to 1st char in each word of "%{_dr}%" to caps
replace all " " in {_br} with ""
replace all " " in {_dr} with ""
if {_dr} is "":
set {_dr} to "No Rank"
if {_br} contains "mod":
replace all "mod" with "Mod" in {_br}
if {_dr} contains "mod":
replace all "mod" with "Mod" in {_dr}
if {_br} contains "dev":
replace all "dev" with "Dev" in {_br}
if {_dr} contains "dev":
replace all "dev" with "Dev" in {_dr}
if {_dr} contains "lead":
replace all "lead" with "Lead" in {_dr}
if {_br} contains "lead":
replace all "lead" with "Lead" in {_br}
if {_br} is "":
set {_br} to "No Rank"
if {_br} contains "mod":
replace all "mod" with "Mod" in {_br}
if {_br} contains "dev":
replace all "dev" with "Dev" in {_br}
if {_br} contains "mod":
replace all "mod" with "Mod" in {_br}
if {_br} contains "tube":
replace all "tube" with "Tube" in {_br}
loop {mineplex.patreon::*}:
if loop-value is "%{_p}%":
set {_br} to "P.%{_br}%"
set {mineplex.api.displayrank.%{_p}%} to "%{_dr}% (%{_br}%)"
set {mineplex.api.displayname.%{_p}%} to "%{mineplex.disguise.%{_p}%}%"
else:
set {_br} to uncolored {mineplex.rank.%{_p}%}
if {mineplex.rank.%{_p}%} is set:
make all players see {_p}'s prefix as "%{mineplex.rank.%{_p}%}%&r&e"
else:
make all players see {_p}'s prefix as "&e"
set {_br} to convert string "%{_br}%" to lowercase
set {_br} to 1st char in each word of "%{_br}%" to caps
if {_br} is "":
set {_br} to "No Rank"
if {_br} contains "mod":
replace all "mod" with "Mod" in {_br}
if {_br} contains "dev":
replace all "dev" with "Dev" in {_br}
if {_br} contains "mod":
replace all "mod" with "Mod" in {_br}
if {_br} contains "tube":
replace all "tube" with "Tube" in {_br}
if {_br} contains "lead":
replace all "lead" with "Lead" in {_br}
if {_br} contains "dev":
replace all "dev" with "Dev" in {_br}
loop {mineplex.patreon::*}:
if loop-value is "%{_p}%":
set {_br} to "P.%{_br}%"
set {mineplex.api.displayrank.%{_p}%} to "%{_br}%"
set {mineplex.api.displayname.%{_p}%} to "%{_p}%"
function mcs(p: player , m: text) :: number:
if {mineplex.overridechat} is true:
if {mineplex.disguise.%{_p}%} is set:
set {_player} to {mineplex.disguise.%{_p}%}
else:
set {_player} to {_p}
set {_prerank} to getPlayerdata({_player}, "rank")
set {_rank} to parseRankRaw({_prerank})
if {_rank} is not set:
set {_rank} to ""
if {_rank} is "null":
set {_rank} to ""
if {mineplex.level.%{_player}%} is not set:
set {mineplex.level.%{_player}%} to "&70"
replace all " fuck " with " **** " in {_m}
replace all " bitch " with " ***** " in {_m}
replace all " ass " with " *** " in {_m}
replace all " nigger " with " *** " in {_m}
replace all " cunt " with " *** " in {_m}
replace all " f|_|ck " with " ****** " in {_m}
replace all " shit " with " **** " in {_m}
if {_m} is {mineplex.lastsent.%{_p}%}:
if {_p} does not have permission "mineplex.mod":
send "&9Chat> &7This message is too similar to your previous message." to {_p}
return -1
stop
if {mineplex.authlock.%{_p}%} is true:
return -1
stop
set {mineplex.lastsent.%{_p}%} to {_m}
loop all players:
if {mineplex.pref.pc.%loop-player%} is true:
if {mineplex.rank.%{_player}%} is set:
set {_lvl} to {mineplex.level.%{_player}%}
if {_player} is "WheezyGold7931":
set {_lvl} to "&c101"
loop {mineplex.ignorelist.%loop-player%::*}:
if loop-value-2 is "%{_player}%":
set {_ignore.%loop-player-1%} to true
if {_ignore.%loop-player-1%} is not set:
if {mineplex.rank.%{_player}%} is not "":
set {_sanitizedm} to uncolored {_m}
loop {mineplex.patreon::*}: #Do not worry about this. It only has to do with my test server, not you guys <3
if loop-value-2 is {_player}:
set {_brank} to uncolored {mineplex.rank.%{_player}%}
set {_rank} to "&6&lP.%{_brank}%"
else:
set {_rank} to {mineplex.rank.%{_player}%}
mcrjson("%loop-player%", "%{_lvl}%|| %{_rank}%||ttp:%{mineplex.hover.%{_player}%}%||&e%{_player}% &f%{_sanitizedm}%", false)
else:
send "%{_lvl}% %{mineplex.rank.%{_player}%}%&e%{_player}% &f%{_m}%" to loop-player
return -1
else:
stop
function caseSensitive(source: String, compareTo: String) :: boolean:
if size of split {_source} at {_compareTo} is 2:
return true
else: #Hi Snow
return false
function gwenAlert(p: player , r: text) :: number:
if {mineplex.disguise.%{_p}%} is set:
set {_player} to {mineplex.disguise.%{_p}%}
else:
set {_player} to {_p}
loop all players:
if loop-player has permission "mineplex.trainee":
if {mineplex.pref.gwen.%loop-player%} is true:
send "&b&kK&r &c&lGWEN > &6%{_player}% &esuspected of &a%{_r}%&e." to loop-player
#Config Loading
on script unload:
broadcast "&9MCR> &7Mineplex Core is recompiling!"
on load:
if file "plugins/Mineplex-Core-Remake/config.yml" doesn't exists:
configPopulate(1)
# set {mineplex.config.servername} to colored value "servername" get of "plugins/Mineplex-Core-Remake/config.yml"
configRefresh(1)
wait 1 second
if {mineplex.config.config} is "{@configver}":
broadcast "&9MCR> &7Config &e{@configver} &7is up to date!"
else:
broadcast "&9Mineplex Core> &7Your Config is not up to Date! Updating this shit for you!"
configPopulate(1)
broadcast "&9Mineplex Core> &7Config Re-Populated!"
broadcast "&9Mineplex Core> &7Going to reload plugin now!"
broadcast "&9Mineplex Core> &7Going to reload plugin now!"
wait 1 second
configRefresh(1)
broadcast "&9Mineplex Core> &7Config Done!"
if {mineplex.usescoreboard} is not set:
set {mineplex.usescoreboard} to true
#Main Command/Toggles
command /mineplex-core [<string>] [<string>] [<string>]:
aliases: /mpcore
permission: op
permission message: &9Permissions> &7This requires Permission Rank [&9OP&7].
trigger:
if arg-1 is not set:
send "&a"
send "&9Core Settings> &7Listing Commands:"
send "&4/Mineplex-Core Chat (True/False) &7Toggles the MCR Chat system to override the default chat system. &4Operator"
send "&4/Mineplex-Core Admin (Player) &7Give the target administrator permissions temporarily. &4Operator"
send "&4/Mineplex-Core News (True/False) &7Toggles whether the MCR News system is being used. &4Operator"
send "&4/Mineplex-Core Scoreboard (True/False) &7Toggles whether the MCR Scoreboard is being used. &4Operator"
send "&4/Mineplex-Core TreasurePoint (1/2/3/4) &7Sets the Treasure point to your targeted block. &4Operator"
send "&4/Mineplex-Core TreasurePointSub (1/2/3/4) (1/2/3/4/5/6/7/8) &7Sets the Opening Treasure point to your targeted block. &4Operator"
send "&4/Mineplex-Core Carl &7Spawn Carl the Creeper in a fixed position at your current location. &4Operator"
send "&4/Mineplex-Core TNT (True/False) &7Toggles the Throwing TNT Mechanics to be true or false. &4Operator"
send "&4/Mineplex-Core purgehistory (player) &7Purges a player's punish history. &4Operator"
send "&4/Mineplex-Core ForcefieldOff (Player) &7Forces a player to toggle off thier forcefield. &4Operator"
send "&a"
else if arg-1 is set:
if arg-1 is "help":
send "&a"
send "&9Core Settings> &7Listing Commands:"
send "&4/Mineplex-Core Chat (True/False) &7Toggles the MCR Chat system to override the default chat system. &4Operator"
send "&4/Mineplex-Core Admin (Player) &7Give the target administrator permissions temporarily. &4Operator"
send "&4/Mineplex-Core News (True/False) &7Toggles whether the MCR News system is being used. &4Operator"
send "&4/Mineplex-Core Scoreboard (True/False) &7Toggles whether the MCR Scoreboard is being used. &4Operator"
send "&4/Mineplex-Core TreasurePoint (1/2/3/4) &7Sets the Treasure point to your targeted block. &4Operator"
send "&4/Mineplex-Core TreasurePointSub (1/2/3/4) (1/2/3/4/5/6/7/8) &7Sets the Opening Treasure point to your targeted block. &4Operator"
send "&4/Mineplex-Core Carl &7Spawn Carl the Creeper in a fixed position at your current location. &4Operator"
send "&4/Mineplex-Core TNT (True/False) &7Toggles the Throwing TNT Mechanics to be true or false. &4Operator"
send "&4/Mineplex-Core purgehistory (player) &7Purges a player's punish history. &4Operator"
send "&4/Mineplex-Core ForcefieldOff (Player) &7Forces a player to toggle off thier forcefield. &4Operator"
send "&a"
else if arg-1 is "Chat":
if arg-2 is not set:
send "&4/Mineplex-Core Chat (True/False) &7Toggles the MCR Chat system to override the default chat system. &4Operator"
else if arg-2 is set:
if arg-2 is "true":
set {mineplex.overridechat} to true
send "&9Core Settings> &7Now using the Mineplex Chat System (MCS)."
else if arg-2 is "false":
set {mineplex.overridechat} to false
send "&9Core Settings> &7No longer using the Mineplex Chat System (MCS)."
else:
send "&4/Mineplex-Core Chat (True/False) &7Toggles the MCR Chat system to override the default chat system. &4Operator"
else:
send "&4/Mineplex-Core Chat (True/False) &7Toggles the MCR Chat system to override the default chat system. &4Operator"
else if arg-1 is "Scoreboard":
if arg-2 is not set:
send "&4/Mineplex-Core Scoreboard (True/False) &7Toggles whether the MCR Scoreboard is being used. &4Operator"
else if arg-2 is set:
if arg-2 is "true":
set {mineplex.usescoreboard} to true
send "&9Core Settings> &7Now using the Mineplex Scoreboard System."
else if arg-2 is "false":
set {mineplex.usescoreboard} to false
send "&9Core Settings> &7No longer using the Mineplex Scoreboard System."
else:
send "&4/Mineplex-Core Scoreboard (True/False) &7Toggles whether the MCR Scoreboard is being used. &4Operator"
else:
send "&4/Mineplex-Core Scoreboard (True/False) &7Toggles whether the MCR Scoreboard is being used. &4Operator"
else if arg-1 is "ForcefieldOff":
if arg-2 is not set:
send "&4/Mineplex-Core ForcefieldOff (Player) &7Forces a player to toggle off thier forcefield. &4Operator"
else:
delete {mineplex.pref.ff.%arg-2%}
delete {mineplex.ff.list::%arg-2%}
send "&9MCR> &7Done!"
else if arg-1 is "News":
if arg-2 is not set:
send "&4/Mineplex-Core News (True/False) &7Toggles whether the MCR News system is being used. &4Operator"
else if arg-2 is set:
if arg-2 is "true":
set {mineplex.news.allow} to true
send "&9Core Settings> &7Now using the Mineplex News System."
else if arg-2 is "false":
set {mineplex.news.allow} to false
send "&9Core Settings> &7No longer using the Mineplex News System."
else:
send "&4/Mineplex-Core News (True/False) &7Toggles whether the MCR News system is being used. &4Operator"
else:
send "&4/Mineplex-Core News (True/False) &7Toggles whether the MCR News system is being used. &4Operator"
else if arg-1 is "TNT":
if arg-2 is not set:
send "&4/Mineplex-Core TNT (True/False) &7Toggles the Throwing TNT Mechanics to be true or false. &4Operator"
else if arg-2 is set:
if arg-2 is "true":
set {mineplex.tntlauncher} to true
send "&9Core Settings> &7Now using the Throwing TNT Mechanics."
else if arg-2 is "false":
set {mineplex.tntlauncher} to false
send "&9Core Settings> &7No longer using the Throwing TNT Mechanics."
else:
send "&4/Mineplex-Core TNT (True/False) &7Toggles the Throwing TNT Mechanics to be true or false. &4Operator"
else:
send "&4/Mineplex-Core TNT (True/False) &7Toggles the Throwing TNT Mechanics to be true or false. &4Operator"
else if arg-1 is "purgehistory":
if arg 2 is not set:
send "&4/Mineplex-Core purgehistory (player) &7Purges a player's punish history. &4Operator"
else:
send "&9MCR> &7Purged %arg-2%'s history"
delete {p.%arg-2%::*}
delete {punishgui.%arg-2%::*}
delete {reversed.p.%arg-2%::history::*}
delete {reversed.p.%arg-2%::*}
else if arg-1 is "reload":
configRefresh(1)
send "&9Core Settings> &7The main configuration file has been refreshed."
else if arg-1 is "Carl":
spawn 1 creeper at location of player
set {_carl} to spawned creeper
set name of last spawned entity to "&a&lCarl the Creeper"
add "{NoAI:1b}" to nbt of {_carl}
add "{powered:1}" to nbt of {_carl}
apply slowness 255 to last spawned entity for 999 days
set {kitnpc} to location of player
send "&9Core Settings> &7Carl has been spawned in a fixed position at your current location."
else if arg-1 is "admin":
if arg-2 is set:
set {mineplex.rank.%arg-2%} to "&4&lADMIN "
set {_mineplex.setadmin.temp} to "%arg-2%" parsed as player
execute console command "/__mp__dp__ %arg-2%"
add "mineplex.trainee" to {_mineplex.setadmin.temp}'s permissions
add "mineplex.mod" to {_mineplex.setadmin.temp}'s permissions
add "mineplex.srmod" to {_mineplex.setadmin.temp}'s permissions
add "mineplex.admin" to {_mineplex.setadmin.temp}'s permissions
add "mineplex.legend" to {_mineplex.setadmin.temp}'s permissions
add "mineplex.builder" to {_mineplex.setadmin.temp}'s permissions
updateRankAPI({_mineplex.setadmin.temp})
send "&9Core Settings> &7Temporarily added Admin permissions to %arg-2%."
else:
send "&4/Mineplex-Core Admin (Player) &7Give the target administrator permissions temporarily. &4Operator"
else if arg-1 is "TreasurePoint":
if arg-2 is "1" or "2" or "3" or "4":
set {mineplex.chestpoint.%arg-2%} to target block
send "&9Core Settings> &7Treasure Point %arg-2% has been set to your targeted block."
else:
send "&4/Mineplex-Core TreasurePoint (1/2/3/4) &7Sets the Treasure point to your targeted block. &4Operator"
else if arg-1 is "TreasurePointSub":
if arg-2 is "1" or "2" or "3" or "4":
if arg-3 is "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8":
set {mineplex.chestpoint.%arg-2%.sub.%arg-3%} to target block
send "&9Core Settings> &7Treasure Point Sub %arg-3% of Treasure Point %arg-2% has been set to your targeted block."
else:
send "&4/Mineplex-Core TreasurePointSub (1/2/3/4) (1/2/3/4/5/6/7/8) &7Sets the Opening Treasure point to your targeted block. &4Operator"
else:
send "&4/Mineplex-Core TreasurePointSub (1/2/3/4) (1/2/3/4/5/6/7/8) &7Sets the Opening Treasure point to your targeted block. &4Operator"
else:
send "&a"
send "&9Core Settings> &7Listing Commands:"
send "&4/Mineplex-Core Chat (True/False) &7Toggles the MCR Chat system to override the default chat system. &4Operator"
send "&4/Mineplex-Core Admin (Player) &7Give the target administrator permissions temporarily. &4Operator"
send "&4/Mineplex-Core News (True/False) &7Toggles whether the MCR News system is being used. &4Operator"
send "&4/Mineplex-Core Scoreboard (True/False) &7Toggles whether the MCR Scoreboard is being used. &4Operator"
send "&4/Mineplex-Core TreasurePoint (1/2/3/4) &7Sets the Treasure point to your targeted block. &4Operator"
send "&4/Mineplex-Core TreasurePointSub (1/2/3/4) (1/2/3/4/5/6/7/8) &7Sets the Opening Treasure point to your targeted block. &4Operator"
send "&4/Mineplex-Core Carl &7Spawn Carl the Creeper in a fixed position at your current location. &4Operator"
send "&4/Mineplex-Core TNT (True/False) &7Toggles the Throwing TNT Mechanics to be true or false. &4Operator"
send "&4/Mineplex-Core purgehistory (player) &7Purges a player's punish history. &4Operator"
send "&4/Mineplex-Core ForcefieldOff (Player) &7Forces a player to toggle off thier forcefield. &4Operator"
send "&a"
command /help [<string>]:
trigger:
send "&9MCR> &7Please see &bhttps://github.com/WheezyGold7931/Mineplex-Core/wiki/Commands-and-Permissions &7for updated commands!"
command /recompile [<string>]:
aliases: /rec
permission: op
permission message: &9Permissions> &7This requires Permission Rank [&9OP&7].
trigger: