-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Settings.java
1757 lines (1503 loc) · 53.8 KB
/
Settings.java
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
package world.bentobox.boxed;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.Difficulty;
import org.bukkit.GameMode;
import org.bukkit.entity.EntityType;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
import world.bentobox.bentobox.api.configuration.StoreAt;
import world.bentobox.bentobox.api.configuration.WorldSettings;
import world.bentobox.bentobox.api.flags.Flag;
import world.bentobox.bentobox.database.objects.adapters.Adapter;
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer;
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2;
/**
* All the plugin settings are here
* @author Tastybento
*/
@StoreAt(filename="config.yml", path="addons/Boxed") // Explicitly call out what name this should have.
@ConfigComment("Boxed Configuration [version]")
public class Settings implements WorldSettings {
/* Commands */
@ConfigComment("Player Command. What command users will run to access their area.")
@ConfigComment("To define alias, just separate commands with white space.")
@ConfigEntry(path = "boxed.command.player")
private String playerCommandAliases = "box bx boxed";
@ConfigComment("The admin command.")
@ConfigComment("To define alias, just separate commands with white space.")
@ConfigEntry(path = "boxed.command.admin")
private String adminCommandAliases = "boxedadmin";
@ConfigComment("The default action for new player command call.")
@ConfigComment("Sub-command of main player command that will be run on first player command call.")
@ConfigComment("By default it is sub-command 'create'.")
@ConfigEntry(path = "boxed.command.new-player-action")
private String defaultNewPlayerAction = "create";
@ConfigComment("The default action for player command.")
@ConfigComment("Sub-command of main player command that will be run on each player command call.")
@ConfigComment("By default it is sub-command 'go'.")
@ConfigEntry(path = "boxed.command.default-action")
private String defaultPlayerAction = "go";
/* Boxed */
@ConfigComment("Ignore advancements.")
@ConfigComment("If this is true, advancements will not change the size of the box.")
@ConfigEntry(path = "boxed.ignore-advancements")
private boolean ignoreAdvancements = false;
@ConfigComment("Announce advancements. We recommend you set the game rule `/gamerule announceAdvancements false`")
@ConfigComment("but that blocks all new advancement announcements. This setting tells Boxed to broadcast new advancements.")
@ConfigEntry(path = "boxed.broadcast-advancements")
private boolean broadcastAdvancements;
@ConfigComment("Deny advancements for visitors.")
@ConfigComment("Visitors cannot get an advancement. Note visitors will still get the reward, e.g., experience")
@ConfigEntry(path = "boxed.deny-visitor-advancements")
private boolean denyVisitorAdvancements = true;
/* WORLD */
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
@ConfigEntry(path = "world.friendly-name")
private String friendlyName = "Boxed";
@ConfigComment("Name of the world - if it does not exist then it will be generated.")
@ConfigComment("It acts like a prefix for nether and end (e.g. boxed_world, boxed_world_nether, boxed_world_end)")
@ConfigEntry(path = "world.world-name")
private String worldName = "boxed_world";
@ConfigComment("World seed.")
@ConfigEntry(path = "world.generator.seed", needsReset = true)
private long seed = 602103456450L;
@ConfigComment("World difficulty setting - PEACEFUL, EASY, NORMAL, HARD")
@ConfigComment("Other plugins may override this setting")
@ConfigEntry(path = "world.difficulty")
private Difficulty difficulty = Difficulty.NORMAL;
@ConfigComment("Spawn limits. These override the limits set in bukkit.yml")
@ConfigComment("If set to a negative number, the server defaults will be used")
@ConfigEntry(path = "world.spawn-limits.monsters")
private int spawnLimitMonsters = -1;
@ConfigEntry(path = "world.spawn-limits.animals")
private int spawnLimitAnimals = -1;
@ConfigEntry(path = "world.spawn-limits.water-animals")
private int spawnLimitWaterAnimals = -1;
@ConfigEntry(path = "world.spawn-limits.ambient")
private int spawnLimitAmbient = -1;
@ConfigComment("Setting to 0 will disable animal spawns, but this is not recommended. Minecraft default is 400.")
@ConfigComment("A negative value uses the server default")
@ConfigEntry(path = "world.spawn-limits.ticks-per-animal-spawns")
private int ticksPerAnimalSpawns = -1;
@ConfigComment("Setting to 0 will disable monster spawns, but this is not recommended. Minecraft default is 400.")
@ConfigComment("A negative value uses the server default")
@ConfigEntry(path = "world.spawn-limits.ticks-per-monster-spawns")
private int ticksPerMonsterSpawns = -1;
@ConfigComment("Radius of player area. (So distance between player starting spots is twice this)")
@ConfigComment("It is the same for every dimension : Overworld, Nether and End.")
@ConfigEntry(path = "world.area-radius", needsReset = true)
private int islandDistance = 320;
@ConfigComment("Starting size of boxed spaces. This is a radius so 1 = a 2x2 area.")
@ConfigComment("Admins can adjust via the /boxadmin range set <player> <new range> command")
@ConfigEntry(path = "world.starting-protection-range")
private int islandProtectionRange = 1;
@ConfigComment("Start to place players at these coordinates. This is where players will start in the")
@ConfigComment("world. This must be a multiple of your area radius, but the plugin will auto")
@ConfigComment("calculate the closest location on the grid. Players are placed around this location")
@ConfigComment("in a spiral manner.")
@ConfigComment("If none of this makes sense, leave it at 0,0.")
@ConfigEntry(path = "world.start-x")
private int islandStartX = 0;
@ConfigEntry(path = "world.start-z")
private int islandStartZ = 0;
@ConfigComment("Maximum number of player areas in the world. Set to -1 or 0 for unlimited.")
@ConfigComment("If the number of areas is greater than this number, it will stop players from joining the world.")
@ConfigEntry(path = "world.max-areas")
private int maxIslands = -1;
@ConfigComment("Area height")
@ConfigComment("It is the y coordinate of the bedrock block in the blueprint.")
@ConfigEntry(path = "world.area-height")
private int islandHeight = 8;
@ConfigComment("The maximum number of players a player can ban at any one time in this game mode.")
@ConfigComment("The permission boxed.ban.maxlimit.X where X is a number can also be used per player")
@ConfigComment("-1 = unlimited")
@ConfigEntry(path = "world.ban-limit")
private int banLimit = -1;
// Nether
@ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to")
@ConfigComment("the nether will not occur. Other plugins may still enable portal usage.")
@ConfigComment("Note: Some default challenges will not be possible if there is no nether.")
@ConfigComment("Note that with a standard nether all players arrive at the same portal and entering a")
@ConfigComment("portal will return them back to their areas.")
@ConfigEntry(path = "world.nether.generate")
private boolean netherGenerate = true;
@ConfigComment("This option indicates if nether portals should be linked via dimensions.")
@ConfigComment("Option will simulate vanilla portal mechanics that links portals together")
@ConfigComment("or creates a new portal, if there is not a portal in that dimension.")
@ConfigEntry(path = "world.nether.create-and-link-portals", since = "1.0.3")
private boolean makeNetherPortals = false;
// End
@ConfigComment("End World - if this is false, the end world will not be made and access to")
@ConfigComment("the end will not occur. Other plugins may still enable portal usage.")
@ConfigEntry(path = "world.end.generate")
private boolean endGenerate = true;
@ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /boxed")
@ConfigEntry(path = "world.remove-mobs-whitelist")
private Set<EntityType> removeMobsWhitelist = new HashSet<>();
@ConfigComment("World flags. These are boolean settings for various flags for this world")
@ConfigEntry(path = "world.flags")
private Map<String, Boolean> worldFlags = new HashMap<>();
@ConfigComment("These are the default protection settings for new areas.")
@ConfigComment("The value is the minimum area rank required allowed to do the action")
@ConfigComment("Ranks are the following:")
@ConfigComment(" VISITOR = 0")
@ConfigComment(" COOP = 200")
@ConfigComment(" TRUSTED = 400")
@ConfigComment(" MEMBER = 500")
@ConfigComment(" SUB-OWNER = 900")
@ConfigComment(" OWNER = 1000")
@ConfigEntry(path = "world.default-area-flags")
@Adapter(FlagSerializer.class)
private Map<Flag, Integer> defaultIslandFlags = new HashMap<>();
@ConfigComment("These are the default settings for new areas")
@ConfigEntry(path = "world.default-area-settings")
@Adapter(FlagSerializer2.class)
private Map<Flag, Integer> defaultIslandSettings = new HashMap<>();
@ConfigComment("These settings/flags are hidden from users")
@ConfigComment("Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings")
@ConfigEntry(path = "world.hidden-flags")
private List<String> hiddenFlags = new ArrayList<>();
@ConfigComment("Visitor banned commands - Visitors to areas cannot use these commands in this world")
@ConfigEntry(path = "world.visitor-banned-commands")
private List<String> visitorBannedCommands = new ArrayList<>();
@ConfigComment("Falling banned commands - players cannot use these commands when falling")
@ConfigComment("if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active")
@ConfigEntry(path = "world.falling-banned-commands")
private List<String> fallingBannedCommands = new ArrayList<>();
// ---------------------------------------------
/* ISLAND */
@ConfigComment("Default max team size")
@ConfigComment("Permission size cannot be less than the default below. ")
@ConfigEntry(path = "area.max-team-size")
private int maxTeamSize = 4;
@ConfigComment("Default maximum number of coop rank members per area")
@ConfigComment("Players can have the boxed.coop.maxsize.<number> permission to be bigger but")
@ConfigComment("permission size cannot be less than the default below. ")
@ConfigEntry(path = "area.max-coop-size")
private int maxCoopSize = 4;
@ConfigComment("Default maximum number of trusted rank members per area")
@ConfigComment("Players can have the boxed.trust.maxsize.<number> permission to be bigger but")
@ConfigComment("permission size cannot be less than the default below. ")
@ConfigEntry(path = "area.max-trusted-size")
private int maxTrustSize = 4;
@ConfigComment("Default maximum number of homes a player can have. Min = 1")
@ConfigComment("Accessed via /is sethome <number> or /is go <number>")
@ConfigEntry(path = "area.max-homes")
private int maxHomes = 5;
// Reset
@ConfigComment("How many resets a player is allowed (manage with /boxadmin reset add/remove/reset/set command)")
@ConfigComment("Value of -1 means unlimited, 0 means hardcore - no resets.")
@ConfigComment("Example, 2 resets means they get 2 resets or 3 areas lifetime")
@ConfigEntry(path = "area.reset.reset-limit")
private int resetLimit = -1;
@ConfigComment("Kicked or leaving players lose resets")
@ConfigComment("Players who leave a team will lose an area reset chance")
@ConfigComment("If a player has zero resets left and leaves a team, they cannot make a new")
@ConfigComment("area by themselves and can only join a team.")
@ConfigComment("Leave this true to avoid players exploiting free areas")
@ConfigEntry(path = "area.reset.leavers-lose-reset")
private boolean leaversLoseReset = false;
@ConfigComment("Allow kicked players to keep their inventory.")
@ConfigComment("Overrides the on-leave inventory reset for kicked players.")
@ConfigEntry(path = "area.reset.kicked-keep-inventory")
private boolean kickedKeepInventory = false;
@ConfigComment("What the addon should reset when the player joins or creates an area")
@ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money")
@ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds")
@ConfigComment("make sure your economy handles multi-worlds too.")
@ConfigEntry(path = "area.reset.on-join.money")
private boolean onJoinResetMoney = false;
@ConfigComment("Reset inventory - if true, the player's inventory will be cleared.")
@ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that")
@ConfigComment("plugin may still reset the inventory when the world changes.")
@ConfigEntry(path = "area.reset.on-join.inventory")
private boolean onJoinResetInventory = false;
@ConfigComment("Reset health - if true, the player's health will be reset.")
@ConfigEntry(path = "area.reset.on-join.health")
private boolean onJoinResetHealth = true;
@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
@ConfigEntry(path = "area.reset.on-join.hunger")
private boolean onJoinResetHunger = true;
@ConfigComment("Reset experience points - if true, the player's experience will be reset.")
@ConfigEntry(path = "area.reset.on-join.exp")
private boolean onJoinResetXP = false;
@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@ConfigEntry(path = "area.reset.on-join.ender-chest")
private boolean onJoinResetEnderChest = false;
@ConfigComment("Reset advancements.")
@ConfigEntry(path = "area.reset.on-join.reset-advancements")
private boolean onJoinResetAdvancements = true;
@ConfigComment("Grant these advancements")
@ConfigEntry(path = "area.reset.on-join.grant-advancements")
private List<String> onJoinGrantAdvancements = new ArrayList<>();
@ConfigComment("What the plugin should reset when the player leaves or is kicked from an area")
@ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money")
@ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds")
@ConfigComment("make sure your economy handles multi-worlds too.")
@ConfigEntry(path = "area.reset.on-leave.money")
private boolean onLeaveResetMoney = false;
@ConfigComment("Reset inventory - if true, the player's inventory will be cleared.")
@ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that")
@ConfigComment("plugin may still reset the inventory when the world changes.")
@ConfigEntry(path = "area.reset.on-leave.inventory")
private boolean onLeaveResetInventory = false;
@ConfigComment("Reset health - if true, the player's health will be reset.")
@ConfigEntry(path = "area.reset.on-leave.health")
private boolean onLeaveResetHealth = false;
@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
@ConfigEntry(path = "area.reset.on-leave.hunger")
private boolean onLeaveResetHunger = false;
@ConfigComment("Reset experience - if true, the player's experience will be reset.")
@ConfigEntry(path = "area.reset.on-leave.exp")
private boolean onLeaveResetXP = false;
@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@ConfigEntry(path = "area.reset.on-leave.ender-chest")
private boolean onLeaveResetEnderChest = false;
@ConfigComment("Reset advancements.")
@ConfigEntry(path = "area.reset.on-leave.reset-advancements")
private boolean onLeaveResetAdvancements = false;
@ConfigComment("Grant these advancements")
@ConfigEntry(path = "area.reset.on-leave.grant-advancements")
private List<String> onLeaveGrantAdvancements = new ArrayList<>();
@ConfigComment("Toggles the automatic area creation upon the player's first login on your server.")
@ConfigComment("If set to true,")
@ConfigComment(" * Upon connecting to your server for the first time, the player will be told that")
@ConfigComment(" an area will be created for him.")
@ConfigComment(" * Make sure you have a Blueprint Bundle called \"default\": this is the one that will")
@ConfigComment(" be used to create the area.")
@ConfigComment(" * An area will be created for the player without needing him to run the create command.")
@ConfigComment("If set to false, this will disable this feature entirely.")
@ConfigComment("Warning:")
@ConfigComment(" * If you are running multiple gamemodes on your server, and all of them have")
@ConfigComment(" this feature enabled, an area in all the gamemodes will be created simultaneously.")
@ConfigComment(" However, it is impossible to know on which area the player will be teleported to afterwards.")
@ConfigComment(" * Island creation can be resource-intensive, please consider the options below to help mitigate")
@ConfigComment(" the potential issues, especially if you expect a lot of players to connect to your server")
@ConfigComment(" in a limited period of time.")
@ConfigEntry(path = "area.create-area-on-first-login.enable")
private boolean createIslandOnFirstLoginEnabled;
@ConfigComment("Time in seconds after the player logged in, before his area gets created.")
@ConfigComment("If set to 0 or less, the area will be created directly upon the player's login.")
@ConfigComment("It is recommended to keep this value under a minute's time.")
@ConfigEntry(path = "area.create-area-on-first-login.delay")
private int createIslandOnFirstLoginDelay = 5;
@ConfigComment("Toggles whether the area creation should be aborted if the player logged off while the")
@ConfigComment("delay (see the option above) has not worn off yet.")
@ConfigComment("If set to true,")
@ConfigComment(" * If the player has logged off the server while the delay (see the option above) has not")
@ConfigComment(" worn off yet, this will cancel the area creation.")
@ConfigComment(" * If the player relogs afterward, since he will not be recognized as a new player, no area")
@ConfigComment(" would be created for him.")
@ConfigComment(" * If the area creation started before the player logged off, it will continue.")
@ConfigComment("If set to false, the player's area will be created even if he went offline in the meantime.")
@ConfigComment("Note this option has no effect if the delay (see the option above) is set to 0 or less.")
@ConfigEntry(path = "area.create-area-on-first-login.abort-on-logout")
private boolean createIslandOnFirstLoginAbortOnLogout = true;
@ConfigComment("Toggles whether the player should be teleported automatically to his area when it is created.")
@ConfigComment("If set to false, the player will be told his area is ready but will have to teleport to his area using the command.")
@ConfigEntry(path = "area.teleport-player-to-area-when-created")
private boolean teleportPlayerToIslandUponIslandCreation = true;
// Commands
@ConfigComment("List of commands to run when a player joins an area or creates one.")
@ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,")
@ConfigComment("in which case they are executed by the player.")
@ConfigComment("")
@ConfigComment("Available placeholders for the commands are the following:")
@ConfigComment(" * [name]: name of the player")
@ConfigComment("")
@ConfigComment("Here are some examples of valid commands to execute:")
@ConfigComment(" * \"[SUDO] bbox version\"")
@ConfigComment(" * \"boxadmin deaths set [player] 0\"")
@ConfigEntry(path = "area.commands.on-join")
private List<String> onJoinCommands = new ArrayList<>();
@ConfigComment("List of commands to run when a player leaves an area, resets his area or gets kicked from it.")
@ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,")
@ConfigComment("in which case they are executed by the player.")
@ConfigComment("")
@ConfigComment("Available placeholders for the commands are the following:")
@ConfigComment(" * [name]: name of the player")
@ConfigComment("")
@ConfigComment("Here are some examples of valid commands to execute:")
@ConfigComment(" * '[SUDO] bbox version'")
@ConfigComment(" * 'boxadmin deaths set [player] 0'")
@ConfigComment("")
@ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.")
@ConfigEntry(path = "area.commands.on-leave")
private List<String> onLeaveCommands = new ArrayList<>();
@ConfigComment("List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.")
@ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,")
@ConfigComment("in which case they are executed by the player.")
@ConfigComment("")
@ConfigComment("Available placeholders for the commands are the following:")
@ConfigComment(" * [name]: name of the player")
@ConfigComment("")
@ConfigComment("Here are some examples of valid commands to execute:")
@ConfigComment(" * '[SUDO] bbox version'")
@ConfigComment(" * 'bsbadmin deaths set [player] 0'")
@ConfigComment("")
@ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.")
@ConfigEntry(path = "area.commands.on-respawn", since = "1.14.0")
private List<String> onRespawnCommands = new ArrayList<>();
// Sethome
@ConfigComment("Allow setting home in the nether.")
@ConfigEntry(path = "area.sethome.nether.allow")
private boolean allowSetHomeInNether = true;
@ConfigEntry(path = "area.sethome.nether.require-confirmation")
private boolean requireConfirmationToSetHomeInNether = true;
@ConfigComment("Allow setting home in the end.")
@ConfigEntry(path = "area.sethome.the-end.allow")
private boolean allowSetHomeInTheEnd = true;
@ConfigEntry(path = "area.sethome.the-end.require-confirmation")
private boolean requireConfirmationToSetHomeInTheEnd = true;
// Deaths
@ConfigComment("Whether deaths are counted or not.")
@ConfigEntry(path = "area.deaths.counted")
private boolean deathsCounted = true;
@ConfigComment("Maximum number of deaths to count. The death count can be used by add-ons.")
@ConfigEntry(path = "area.deaths.max")
private int deathsMax = 10;
@ConfigComment("When a player joins a team, reset their death count")
@ConfigEntry(path = "area.deaths.team-join-reset")
private boolean teamJoinDeathReset = true;
@ConfigComment("Reset player death count when they start a new area or reset an area")
@ConfigEntry(path = "area.deaths.reset-on-new-area")
private boolean deathsResetOnNewIsland = true;
// ---------------------------------------------
/* PROTECTION */
@ConfigComment("Geo restrict mobs.")
@ConfigComment("Mobs that exit the area space where they were spawned will be removed.")
@ConfigEntry(path = "protection.geo-limit-settings")
private List<String> geoLimitSettings = new ArrayList<>();
@ConfigComment("Blocked mobs.")
@ConfigComment("List of mobs that should not spawn in Boxed.")
@ConfigEntry(path = "protection.block-mobs")
private List<String> mobLimitSettings = new ArrayList<>();
// Invincible visitor settings
@ConfigComment("Invincible visitors. List of damages that will not affect visitors.")
@ConfigComment("Make list blank if visitors should receive all damages")
@ConfigEntry(path = "protection.invincible-visitors")
private List<String> ivSettings = new ArrayList<>();
//---------------------------------------------------------------------------------------/
@ConfigComment("These settings should not be edited")
@ConfigEntry(path = "do-not-edit-these-settings.reset-epoch")
private long resetEpoch = 0;
/**
* @return the friendlyName
*/
@Override
public String getFriendlyName() {
return friendlyName;
}
/**
* @return the worldName
*/
@Override
public String getWorldName() {
return worldName;
}
/**
* @return the difficulty
*/
@Override
public Difficulty getDifficulty() {
return difficulty;
}
/**
* @return the islandDistance
*/
@Override
public int getIslandDistance() {
return islandDistance;
}
/**
* @return the islandProtectionRange
*/
@Override
public int getIslandProtectionRange() {
return islandProtectionRange;
}
/**
* @return the islandStartX
*/
@Override
public int getIslandStartX() {
return islandStartX;
}
/**
* @return the islandStartZ
*/
@Override
public int getIslandStartZ() {
return islandStartZ;
}
/**
* @return the islandXOffset
*/
@Override
public int getIslandXOffset() {
return 0;
}
/**
* @return the islandZOffset
*/
@Override
public int getIslandZOffset() {
return 0;
}
/**
* @return the islandHeight
*/
@Override
public int getIslandHeight() {
return islandHeight;
}
/**
* @return the useOwnGenerator
*/
@Override
public boolean isUseOwnGenerator() {
return false;
}
/**
* @return the seaHeight
*/
@Override
public int getSeaHeight() {
return 0;
}
/**
* @return the maxIslands
*/
@Override
public int getMaxIslands() {
return maxIslands;
}
/**
* @return the defaultGameMode
*/
@Override
public GameMode getDefaultGameMode() {
return GameMode.SURVIVAL;
}
/**
* @return the netherGenerate
*/
@Override
public boolean isNetherGenerate() {
return netherGenerate;
}
/**
* @return the netherIslands
*/
@Override
public boolean isNetherIslands() {
return true;
}
/**
* @return the netherSpawnRadius
*/
@Override
public int getNetherSpawnRadius() {
return 32;
}
/**
* @return the endGenerate
*/
@Override
public boolean isEndGenerate() {
return endGenerate;
}
/**
* @return the endIslands
*/
@Override
public boolean isEndIslands() {
return false;
}
/**
* @return the dragonSpawn
*/
@Override
public boolean isDragonSpawn() {
return false;
}
/**
* @return the removeMobsWhitelist
*/
@Override
public Set<EntityType> getRemoveMobsWhitelist() {
return removeMobsWhitelist;
}
/**
* @return the worldFlags
*/
@Override
public Map<String, Boolean> getWorldFlags() {
return worldFlags;
}
/**
* @return the defaultIslandFlags
*/
@Override
public Map<Flag, Integer> getDefaultIslandFlags() {
return defaultIslandFlags;
}
/**
* @return the defaultIslandSettings
*/
@Override
public Map<Flag, Integer> getDefaultIslandSettings() {
return defaultIslandSettings;
}
/**
* @return the hidden flags
*/
@Override
public List<String> getHiddenFlags() {
return hiddenFlags;
}
/**
* @return the visitorBannedCommands
*/
@Override
public List<String> getVisitorBannedCommands() {
return visitorBannedCommands;
}
/**
* @return the fallingBannedCommands
*/
@Override
public List<String> getFallingBannedCommands() {
return fallingBannedCommands;
}
/**
* @return the maxTeamSize
*/
@Override
public int getMaxTeamSize() {
return maxTeamSize;
}
/**
* @return the maxHomes
*/
@Override
public int getMaxHomes() {
return maxHomes;
}
/**
* @return the resetLimit
*/
@Override
public int getResetLimit() {
return resetLimit;
}
/**
* @return the leaversLoseReset
*/
@Override
public boolean isLeaversLoseReset() {
return leaversLoseReset;
}
/**
* @return the kickedKeepInventory
*/
@Override
public boolean isKickedKeepInventory() {
return kickedKeepInventory;
}
/**
* This method returns the createIslandOnFirstLoginEnabled boolean value.
* @return the createIslandOnFirstLoginEnabled value
* @since 1.9.0
*/
@Override
public boolean isCreateIslandOnFirstLoginEnabled()
{
return createIslandOnFirstLoginEnabled;
}
/**
* This method returns the createIslandOnFirstLoginDelay int value.
* @return the createIslandOnFirstLoginDelay value
* @since 1.9.0
*/
@Override
public int getCreateIslandOnFirstLoginDelay()
{
return createIslandOnFirstLoginDelay;
}
/**
* This method returns the createIslandOnFirstLoginAbortOnLogout boolean value.
* @return the createIslandOnFirstLoginAbortOnLogout value
* @since 1.9.0
*/
@Override
public boolean isCreateIslandOnFirstLoginAbortOnLogout()
{
return createIslandOnFirstLoginAbortOnLogout;
}
/**
* @return the onJoinResetMoney
*/
@Override
public boolean isOnJoinResetMoney() {
return onJoinResetMoney;
}
/**
* @return the onJoinResetInventory
*/
@Override
public boolean isOnJoinResetInventory() {
return onJoinResetInventory;
}
/**
* @return the onJoinResetEnderChest
*/
@Override
public boolean isOnJoinResetEnderChest() {
return onJoinResetEnderChest;
}
/**
* @return the onLeaveResetMoney
*/
@Override
public boolean isOnLeaveResetMoney() {
return onLeaveResetMoney;
}
/**
* @return the onLeaveResetInventory
*/
@Override
public boolean isOnLeaveResetInventory() {
return onLeaveResetInventory;
}
/**
* @return the onLeaveResetEnderChest
*/
@Override
public boolean isOnLeaveResetEnderChest() {
return onLeaveResetEnderChest;
}
/**
* @return the isDeathsCounted
*/
@Override
public boolean isDeathsCounted() {
return deathsCounted;
}
/**
* @return the allowSetHomeInNether
*/
@Override
public boolean isAllowSetHomeInNether() {
return allowSetHomeInNether;
}
/**
* @return the allowSetHomeInTheEnd
*/
@Override
public boolean isAllowSetHomeInTheEnd() {
return allowSetHomeInTheEnd;
}
/**
* @return the requireConfirmationToSetHomeInNether
*/
@Override
public boolean isRequireConfirmationToSetHomeInNether() {
return requireConfirmationToSetHomeInNether;
}
/**
* @return the requireConfirmationToSetHomeInTheEnd
*/
@Override
public boolean isRequireConfirmationToSetHomeInTheEnd() {
return requireConfirmationToSetHomeInTheEnd;
}
/**
* @return the deathsMax
*/
@Override
public int getDeathsMax() {
return deathsMax;
}
/**
* @return the teamJoinDeathReset
*/
@Override
public boolean isTeamJoinDeathReset() {
return teamJoinDeathReset;
}
/**
* @return the geoLimitSettings
*/
@Override
public List<String> getGeoLimitSettings() {
return geoLimitSettings;
}
/**
* @return the ivSettings
*/
@Override
public List<String> getIvSettings() {
return ivSettings;
}
/**
* @return the resetEpoch
*/
@Override
public long getResetEpoch() {
return resetEpoch;
}
/**
* @param friendlyName the friendlyName to set
*/
public void setFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
}
/**
* @param worldName the worldName to set
*/
public void setWorldName(String worldName) {
this.worldName = worldName;
}
/**
* @param difficulty the difficulty to set
*/
@Override
public void setDifficulty(Difficulty difficulty) {
this.difficulty = difficulty;
}
/**
* @param islandDistance the islandDistance to set
*/
public void setIslandDistance(int islandDistance) {
this.islandDistance = islandDistance;
}
/**
* @param islandProtectionRange the islandProtectionRange to set
*/
public void setIslandProtectionRange(int islandProtectionRange) {
this.islandProtectionRange = islandProtectionRange;
}
/**
* @param islandStartX the islandStartX to set
*/
public void setIslandStartX(int islandStartX) {
this.islandStartX = islandStartX;
}
/**
* @param islandStartZ the islandStartZ to set
*/
public void setIslandStartZ(int islandStartZ) {
this.islandStartZ = islandStartZ;
}
/**
* @param maxIslands the maxIslands to set
*/
public void setMaxIslands(int maxIslands) {
this.maxIslands = maxIslands;
}
/**
* @param netherGenerate the netherGenerate to set
*/
public void setNetherGenerate(boolean netherGenerate) {
this.netherGenerate = netherGenerate;
}
/**
* @param endGenerate the endGenerate to set
*/
public void setEndGenerate(boolean endGenerate) {
this.endGenerate = endGenerate;
}
/**
* @param removeMobsWhitelist the removeMobsWhitelist to set
*/
public void setRemoveMobsWhitelist(Set<EntityType> removeMobsWhitelist) {
this.removeMobsWhitelist = removeMobsWhitelist;
}
/**
* @param worldFlags the worldFlags to set
*/
public void setWorldFlags(Map<String, Boolean> worldFlags) {
this.worldFlags = worldFlags;
}
/**
* @param defaultIslandFlags the defaultIslandFlags to set
*/
public void setDefaultIslandFlags(Map<Flag, Integer> defaultIslandFlags) {
this.defaultIslandFlags = defaultIslandFlags;
}
/**
* @param defaultIslandSettings the defaultIslandSettings to set
*/
public void setDefaultIslandSettings(Map<Flag, Integer> defaultIslandSettings) {
this.defaultIslandSettings = defaultIslandSettings;
}
/**
* @param hiddenFlags the hidden flags to set
*/
public void setHiddenFlags(List<String> hiddenFlags) {
this.hiddenFlags = hiddenFlags;
}
/**
* @param visitorBannedCommands the visitorBannedCommands to set
*/
public void setVisitorBannedCommands(List<String> visitorBannedCommands) {
this.visitorBannedCommands = visitorBannedCommands;
}