-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathAISettings.java
More file actions
2206 lines (2027 loc) · 74.4 KB
/
AISettings.java
File metadata and controls
2206 lines (2027 loc) · 74.4 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
package world.bentobox.acidisland;
import java.util.ArrayList;
import java.util.Collections;
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.Material;
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;
import org.bukkit.potion.PotionEffectType;
import world.bentobox.bentobox.BentoBox;
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.FlagBooleanSerializer;
import world.bentobox.bentobox.database.objects.adapters.PotionEffectListAdapter;
/**
* Settings for AcidIsland
* @author tastybento
*
*/
@ConfigComment("AcidIsland Configuration [version]")
@StoreAt(filename="config.yml", path="addons/AcidIsland") // Explicitly call out what name this should have.
public class AISettings implements WorldSettings {
// ---------------------------------------------
// Command
@ConfigComment("Island Command. What command users will run to access their island")
@ConfigEntry(path = "acid.command.island")
private String playerCommandAliases = "ai";
@ConfigComment("The island admin command.")
@ConfigEntry(path = "acid.command.admin")
private String adminCommandAliases = "acid";
@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 = "acid.command.new-player-action", since = "1.13.1")
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 = "acid.command.default-action", since = "1.13.1")
private String defaultPlayerAction = "go";
/* ACID */
@ConfigComment("Acid can damage ops or not")
@ConfigEntry(path = "acid.damage-op")
private boolean acidDamageOp = false;
@ConfigComment("Acid can damage chickens - best to leave false because they like to swim")
@ConfigEntry(path = "acid.damage-chickens")
private boolean acidDamageChickens = false;
// Damage
@ConfigComment("Damage that a player will experience in acid. 10 is half their health typically. 5 would be easier.")
@ConfigEntry(path = "acid.damage.acid.player")
private int acidDamage = 10;
@ConfigComment("Damage that monsters experience from acid. Some monsters have armor or natural armor so will take less damage.")
@ConfigEntry(path = "acid.damage.acid.monster")
private int acidDamageMonster = 5;
@ConfigComment("Damage animals experience from acid")
@ConfigEntry(path = "acid.damage.acid.animal")
private int acidDamageAnimal = 1;
@ConfigComment("Destroy items after this many seconds in acid. 0 = do not destroy items")
@ConfigEntry(path = "acid.damage.acid.item")
private long acidDestroyItemTime = 0;
@ConfigComment("Damage from acid rain (and snow, if toggled on).")
@ConfigEntry(path = "acid.damage.rain")
private int acidRainDamage = 1;
@ConfigComment("Damage from acid snow")
@ConfigEntry(path = "acid.damage.snow")
private boolean acidDamageSnow;
@ConfigComment("Delay before acid or acid rain starts burning")
@ConfigComment("This can give time for conduit power to kick in")
@ConfigEntry(path = "acid.damage.delay")
private long acidDamageDelay = 2;
@ConfigComment("Potion effects from going into acid water.")
@ConfigComment("You can list multiple effects.")
@ConfigComment("Available effects are:")
@ConfigComment(" BLINDNESS")
@ConfigComment(" CONFUSION")
@ConfigComment(" HUNGER")
@ConfigComment(" POISON")
@ConfigComment(" SLOW")
@ConfigComment(" SLOW_DIGGING")
@ConfigComment(" WEAKNESS")
@ConfigEntry(path = "acid.damage.effects")
@Adapter(PotionEffectListAdapter.class)
private List<PotionEffectType> acidEffects = new ArrayList<>();
@ConfigComment("Acid effect duration in seconds")
@ConfigEntry(path = "acid.damage.acid-effect-duration", since = "1.11.2")
private int acidEffectDuation = 30;
@ConfigComment("Potion effects from going into acid rain and snow.")
@ConfigComment("You can list multiple effects.")
@ConfigComment("Available effects are:")
@ConfigComment(" BLINDNESS")
@ConfigComment(" CONFUSION")
@ConfigComment(" HUNGER")
@ConfigComment(" POISON")
@ConfigComment(" SLOW")
@ConfigComment(" SLOW_DIGGING")
@ConfigComment(" WEAKNESS")
@ConfigEntry(path = "acid.damage.rain-effects", since = "1.9.1")
@Adapter(PotionEffectListAdapter.class)
private List<PotionEffectType> acidRainEffects = new ArrayList<>();
@ConfigComment("Rain effect duration in seconds")
@ConfigEntry(path = "acid.damage.rain-effect-duration", since = "1.11.2")
private int rainEffectDuation = 10;
@ConfigComment("If player wears a helmet then they will not suffer from acid rain")
@ConfigEntry(path = "acid.damage.protection.helmet")
private boolean helmetProtection;
@ConfigComment("If player wears any set of full armor, they will not suffer from acid damage")
@ConfigEntry(path = "acid.damage.protection.full-armor")
private boolean fullArmorProtection;
/* PURIFIED WATER */
@ConfigComment("Enable the purified water mechanic. Drinking acid water from a bottle damages")
@ConfigComment("the player; drinking purified water heals them. Purified water can be made by")
@ConfigComment("collecting rain in a cauldron (dripstone fills it as purified; rain/bucket fills")
@ConfigComment("it as acid), smelting a water bottle in a furnace, brewing water bottles with coal,")
@ConfigComment("or smelting a water bucket in a furnace (if bucket-furnace-enabled is true).")
@ConfigEntry(path = "acid.purified-water.enabled", since = "1.21")
private boolean purifiedWaterEnabled = true;
@ConfigComment("Damage dealt to a player who drinks an acid water bottle (in half-hearts)")
@ConfigEntry(path = "acid.purified-water.drink-damage", since = "1.21")
private double acidDrinkDamage = 4.0;
@ConfigComment("Health restored to a player who drinks a purified water bottle (in half-hearts)")
@ConfigEntry(path = "acid.purified-water.heal-amount", since = "1.21")
private double purifiedWaterHeal = 4.0;
@ConfigComment("Allow purifying a water bucket by smelting it in a furnace.")
@ConfigComment("The cook time is 2000 ticks (100 seconds) to simulate the effort of boiling.")
@ConfigComment("Disable if this feels too easy for your server's balance.")
@ConfigEntry(path = "acid.purified-water.bucket-furnace-enabled", since = "1.21")
private boolean purifiedBucketFurnaceEnabled = true;
/* WORLD */
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
@ConfigEntry(path = "world.friendly-name", needsReset = true)
private String friendlyName = "AcidIsland";
@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. acidisland_world, acidisland_world_nether, acidisland_world_end)")
@ConfigEntry(path = "world.world-name", needsReset = true)
private String worldName = "acidisland_world";
@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", since = "1.11.2")
private int spawnLimitMonsters = -1;
@ConfigEntry(path = "world.spawn-limits.animals", since = "1.11.2")
private int spawnLimitAnimals = -1;
@ConfigEntry(path = "world.spawn-limits.water-animals", since = "1.11.2")
private int spawnLimitWaterAnimals = -1;
@ConfigEntry(path = "world.spawn-limits.ambient", since = "1.11.2")
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", since = "1.11.2")
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", since = "1.11.2")
private int ticksPerMonsterSpawns = -1;
@ConfigComment("Radius of island in blocks. (So distance between islands is twice this)")
@ConfigComment("It is the same for every dimension : Overworld, Nether and End.")
@ConfigComment("This value cannot be changed mid-game and the plugin will not start if it is different.")
@ConfigEntry(path = "world.distance-between-islands", needsReset = true)
private int islandDistance = 64;
@ConfigComment("Default protection range radius in blocks. Cannot be larger than distance.")
@ConfigComment("Admins can change protection sizes for players individually using /acid range set <player> <new range>")
@ConfigComment("or set this permission: acidisland.island.range.<number>")
@ConfigEntry(path = "world.protection-range", overrideOnChange = true)
private int islandProtectionRange = 50;
@ConfigComment("Start islands at these coordinates. This is where new islands will start in the")
@ConfigComment("world. These must be a factor of your island distance, but the plugin will auto")
@ConfigComment("calculate the closest location on the grid. Islands develop around this location")
@ConfigComment("both positively and negatively in a square grid.")
@ConfigComment("If none of this makes sense, leave it at 0,0.")
@ConfigEntry(path = "world.start-x", needsReset = true)
private int islandStartX = 0;
@ConfigEntry(path = "world.start-z", needsReset = true)
private int islandStartZ = 0;
@ConfigEntry(path = "world.offset-x")
private int islandXOffset;
@ConfigEntry(path = "world.offset-z")
private int islandZOffset;
@ConfigComment("Island height - Lowest is 5.")
@ConfigComment("It is the y coordinate of the bedrock block in the schem.")
@ConfigEntry(path = "world.island-height")
private int islandHeight = 50;
@ConfigComment("The number of concurrent islands a player can have in the world")
@ConfigComment("A value of 0 will use the BentoBox config.yml default")
@ConfigEntry(path = "world.concurrent-islands")
private int concurrentIslands = 0;
@ConfigComment("Disallow players to have other islands if they are in a team.")
@ConfigEntry(path = "world.disallow-team-member-islands")
boolean disallowTeamMemberIslands = true;
@ConfigComment("Use your own world generator for this world.")
@ConfigComment("In this case, the plugin will not generate anything.")
@ConfigEntry(path = "world.use-own-generator", experimental = true)
private boolean useOwnGenerator;
@ConfigComment("Sea height (don't changes this mid-game unless you delete the world)")
@ConfigComment("Minimum is 0, which means you are playing Skyblock!")
@ConfigEntry(path = "world.sea-height")
private int seaHeight = 54;
@ConfigComment("Water block. This should usually stay as WATER, but may be LAVA for fun")
@ConfigEntry(path = "world.water-block", needsReset = true)
private Material waterBlock = Material.WATER;
@ConfigComment("Ocean Floor")
@ConfigComment("This creates an ocean floor environment, with vanilla elements.")
@ConfigEntry(path = "world.ocean-floor", needsReset = true)
private boolean oceanFloor = false;
@ConfigComment("Structures")
@ConfigComment("This creates an vanilla structures in the worlds.")
@ConfigEntry(path = "world.make-structures", needsReset = true)
private boolean makeStructures = false;
@ConfigComment("Caves")
@ConfigComment("This creates an vanilla caves in the worlds.")
@ConfigEntry(path = "world.make-caves", needsReset = true)
private boolean makeCaves = false;
@ConfigComment("Decorations")
@ConfigComment("This creates an vanilla decorations in the worlds.")
@ConfigEntry(path = "world.make-decorations", needsReset = true)
private boolean makeDecorations = true;
@ConfigComment("Maximum number of islands in the world. Set to -1 or 0 for unlimited. ")
@ConfigComment("If the number of islands is greater than this number, no new island will be created.")
@ConfigEntry(path = "world.max-islands")
private int maxIslands = -1;
@ConfigComment("The default game mode for this world. Players will be set to this mode when they create")
@ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR")
@ConfigEntry(path = "world.default-game-mode")
private GameMode defaultGameMode = GameMode.SURVIVAL;
@ConfigComment("The default biome for the overworld")
@ConfigEntry(path = "world.default-biome")
private Biome defaultBiome = Biome.WARM_OCEAN;
@ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)")
@ConfigEntry(path = "world.default-nether-biome")
private Biome defaultNetherBiome = Biome.NETHER_WASTES;
@ConfigComment("The default biome for the end world (this may affect what mobs can spawn)")
@ConfigEntry(path = "world.default-end-biome")
private Biome defaultEndBiome = Biome.THE_END;
@ConfigComment("The maximum number of players a player can ban at any one time in this game mode.")
@ConfigComment("The permission acidisland.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 islands.")
@ConfigEntry(path = "world.nether.generate")
private boolean netherGenerate = true;
@ConfigComment("Islands in Nether. Change to false for standard vanilla nether.")
@ConfigEntry(path = "world.nether.islands", needsReset = true)
private boolean netherIslands = true;
@ConfigComment("Sea height in Nether. Only operates if nether islands is true.")
@ConfigComment("Changing mid-game will cause problems!")
@ConfigEntry(path = "world.nether.sea-height", needsReset = true)
private int netherSeaHeight = 54;
@ConfigComment("Water block. This should usually stay as WATER, but may be LAVA for fun")
@ConfigEntry(path = "world.nether.water-block", needsReset = true)
private Material netherWaterBlock = Material.WATER;
@ConfigComment("Make the nether roof, if false, there is nothing up there")
@ConfigComment("Change to false if lag is a problem from the generation")
@ConfigComment("Only applies to islands Nether")
@ConfigEntry(path = "world.nether.roof")
private boolean netherRoof = true;
@ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn")
@ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)")
@ConfigComment("Minimum is 0 (not recommended), maximum is 100. Default is 25.")
@ConfigComment("Only applies to vanilla nether")
@ConfigEntry(path = "world.nether.spawn-radius")
private int netherSpawnRadius = 32;
@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.14.6")
private boolean makeNetherPortals = false;
// End
@ConfigComment("End Nether - 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("Islands in The End. Change to false for standard vanilla end.")
@ConfigEntry(path = "world.end.islands", needsReset = true)
private boolean endIslands = true;
@ConfigComment("Sea height in The End. Only operates if end islands is true.")
@ConfigComment("Changing mid-game will cause problems!")
@ConfigEntry(path = "world.end.sea-height", needsReset = true)
private int endSeaHeight = 54;
@ConfigComment("Water block. This should usually stay as WATER, but may be LAVA for fun")
@ConfigEntry(path = "world.end.water-block", needsReset = true)
private Material endWaterBlock = Material.WATER;
@ConfigComment("This option indicates if obsidian platform in the end should be generated")
@ConfigComment("when player enters the end world.")
@ConfigEntry(path = "world.end.create-obsidian-platform", since = "1.14.6")
private boolean makeEndPortals = false;
@ConfigEntry(path = "world.end.dragon-spawn", experimental = true)
private boolean dragonSpawn = false;
@ConfigComment("Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps")
@ConfigComment("players return to their island if the island has been overrun by monsters.")
@ConfigComment("This setting is toggled in world flags and set by the settings GUI.")
@ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /island")
@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 islands.")
@ConfigComment("The value is the minimum island rank required allowed to do the action")
@ConfigComment("Ranks are: Visitor = 0, Member = 900, Owner = 1000")
@ConfigEntry(path = "world.default-island-flags")
private Map<String, Integer> defaultIslandFlagNames = new HashMap<>();
@ConfigComment("These are the default settings for new islands")
@ConfigEntry(path = "world.default-island-settings")
@Adapter(FlagBooleanSerializer.class)
private Map<String, Integer> defaultIslandSettingNames = 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 islands 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("Use this permission to set for specific user groups: acidisland.team.maxsize.<number>")
@ConfigComment("Permission size cannot be less than the default below.")
@ConfigEntry(path = "island.max-team-size")
private int maxTeamSize = 4;
@ConfigComment("Default maximum number of coop rank members per island")
@ConfigComment("Players can have the acidisland.coop.maxsize.<number> permission to be bigger but")
@ConfigComment("permission size cannot be less than the default below. ")
@ConfigEntry(path = "island.max-coop-size", since = "1.13.0")
private int maxCoopSize = 4;
@ConfigComment("Default maximum number of trusted rank members per island")
@ConfigComment("Players can have the acidisland.trust.maxsize.<number> permission to be bigger but")
@ConfigComment("permission size cannot be less than the default below. ")
@ConfigEntry(path = "island.max-trusted-size", since = "1.13.0")
private int maxTrustSize = 4;
@ConfigComment("Default maximum number of homes a player can have. Min = 1")
@ConfigComment("Accessed via /ai sethome <number> or /ai go <number>")
@ConfigComment("Use this permission to set for specific user groups: acidisland.island.maxhomes.<number>")
@ConfigEntry(path = "island.max-homes")
private int maxHomes = 5;
// Reset
@ConfigComment("How many resets a player is allowed (manage with /acid 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 islands lifetime")
@ConfigEntry(path = "island.reset.reset-limit")
private int resetLimit = -1;
@ConfigComment("Kicked or leaving players lose resets")
@ConfigComment("Players who leave a team will lose an island reset chance")
@ConfigComment("If a player has zero resets left and leaves a team, they cannot make a new")
@ConfigComment("island by themselves and can only join a team.")
@ConfigComment("Leave this true to avoid players exploiting free islands")
@ConfigEntry(path = "island.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 = "island.reset.kicked-keep-inventory")
private boolean kickedKeepInventory = false;
@ConfigComment("What the plugin should reset when the player joins or creates an island")
@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 = "island.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 = "island.reset.on-join.inventory")
private boolean onJoinResetInventory = false;
@ConfigComment("Reset health - if true, the player's health will be reset.")
@ConfigEntry(path = "island.reset.on-join.health")
private boolean onJoinResetHealth = true;
@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
@ConfigEntry(path = "island.reset.on-join.hunger")
private boolean onJoinResetHunger = true;
@ConfigComment("Reset experience points - if true, the player's experience will be reset.")
@ConfigEntry(path = "island.reset.on-join.exp")
private boolean onJoinResetXP = false;
@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@ConfigEntry(path = "island.reset.on-join.ender-chest")
private boolean onJoinResetEnderChest = false;
@ConfigComment("What the plugin should reset when the player leaves or is kicked from an island")
@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 = "island.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 = "island.reset.on-leave.inventory")
private boolean onLeaveResetInventory = false;
@ConfigComment("Reset health - if true, the player's health will be reset.")
@ConfigEntry(path = "island.reset.on-leave.health")
private boolean onLeaveResetHealth = false;
@ConfigComment("Reset hunger - if true, the player's hunger will be reset.")
@ConfigEntry(path = "island.reset.on-leave.hunger")
private boolean onLeaveResetHunger = false;
@ConfigComment("Reset experience - if true, the player's experience will be reset.")
@ConfigEntry(path = "island.reset.on-leave.exp")
private boolean onLeaveResetXP = false;
@ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.")
@ConfigEntry(path = "island.reset.on-leave.ender-chest")
private boolean onLeaveResetEnderChest = false;
@ConfigComment("Toggles the automatic island 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 island 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 island.")
@ConfigComment(" * An island 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 island in all the gamemodes will be created simultaneously.")
@ConfigComment(" However, it is impossible to know on which island 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 = "island.create-island-on-first-login.enable")
private boolean createIslandOnFirstLoginEnabled;
@ConfigComment("Time in seconds after the player logged in, before his island gets created.")
@ConfigComment("If set to 0 or less, the island will be created directly upon the player's login.")
@ConfigComment("It is recommended to keep this value under a minute's time.")
@ConfigEntry(path = "island.create-island-on-first-login.delay")
private int createIslandOnFirstLoginDelay = 5;
@ConfigComment("Toggles whether the island 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 island creation.")
@ConfigComment(" * If the player relogs afterward, since he will not be recognized as a new player, no island")
@ConfigComment(" would be created for him.")
@ConfigComment(" * If the island creation started before the player logged off, it will continue.")
@ConfigComment("If set to false, the player's island 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 = "island.create-island-on-first-login.abort-on-logout")
private boolean createIslandOnFirstLoginAbortOnLogout = true;
@ConfigComment("Toggles whether the player should be teleported automatically to his island when it is created.")
@ConfigComment("If set to false, the player will be told his island is ready but will have to teleport to his island using the command.")
@ConfigEntry(path = "island.teleport-player-to-island-when-created", since = "1.10.0")
private boolean teleportPlayerToIslandUponIslandCreation = true;
@ConfigComment("Create Nether or End islands if they are missing when a player goes through a portal.")
@ConfigComment("Nether and End islands are usually pasted when a player makes their island, but if they are")
@ConfigComment("missing for some reason, you can switch this on.")
@ConfigComment("Note that bedrock removal glitches can exploit this option.")
@ConfigEntry(path = "island.create-missing-nether-end-islands")
private boolean pasteMissingIslands = false;
// Commands
@ConfigComment("List of commands to run when a player joins an island 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(" * \"acid deaths set [player] 0\"")
@ConfigEntry(path = "island.commands.on-join")
private List<String> onJoinCommands = new ArrayList<>();
@ConfigComment("List of commands to run when a player leaves an island, resets his island 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(" * 'acid 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 = "island.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 = "island.commands.on-respawn", since = "1.14.0")
private List<String> onRespawnCommands = new ArrayList<>();
// Sethome
@ConfigComment("Allow setting home in the nether. Only available on nether islands, not vanilla nether.")
@ConfigEntry(path = "island.sethome.nether.allow")
private boolean allowSetHomeInNether = true;
@ConfigEntry(path = "island.sethome.nether.require-confirmation")
private boolean requireConfirmationToSetHomeInNether = true;
@ConfigComment("Allow setting home in the end. Only available on end islands, not vanilla end.")
@ConfigEntry(path = "island.sethome.the-end.allow")
private boolean allowSetHomeInTheEnd = true;
@ConfigEntry(path = "island.sethome.the-end.require-confirmation")
private boolean requireConfirmationToSetHomeInTheEnd = true;
// Deaths
@ConfigComment("Whether deaths are counted or not.")
@ConfigEntry(path = "island.deaths.counted")
private boolean deathsCounted = true;
@ConfigComment("Maximum number of deaths to count. The death count can be used by add-ons.")
@ConfigEntry(path = "island.deaths.max")
private int deathsMax = 10;
@ConfigComment("When a player joins a team, reset their death count")
@ConfigEntry(path = "island.deaths.team-join-reset")
private boolean teamJoinDeathReset = true;
@ConfigComment("Reset player death count when they start a new island or reset and island")
@ConfigEntry(path = "island.deaths.reset-on-new-island")
private boolean deathsResetOnNewIsland = true;
// Ranks
@ConfigEntry(path = "island.customranks")
private Map<String, Integer> customRanks = new HashMap<>();
// ---------------------------------------------
/* PROTECTION */
@ConfigComment("Geo restrict mobs.")
@ConfigComment("Mobs that exit the island space where they were spawned will be removed.")
@ConfigEntry(path = "protection.geo-limit-settings")
private List<String> geoLimitSettings = new ArrayList<>();
@ConfigComment("AcidIsland blocked mobs.")
@ConfigComment("List of mobs that should not spawn in AcidIsland.")
@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 acidDamage
*/
public int getAcidDamage() {
return acidDamage;
}
/**
* @return the acidDamageAnimal
*/
public int getAcidDamageAnimal() {
return acidDamageAnimal;
}
/**
* @return the acidDamageDelay
*/
public long getAcidDamageDelay() {
return acidDamageDelay;
}
/**
* @return the acidDamageMonster
*/
public int getAcidDamageMonster() {
return acidDamageMonster;
}
/**
* @return the acidDestroyItemTime
*/
public long getAcidDestroyItemTime() {
return acidDestroyItemTime;
}
/**
* @return damage dealt when drinking an acid water bottle (half-hearts)
*/
public double getAcidDrinkDamage() {
return acidDrinkDamage;
}
/**
* @return the acidEffects
*/
public List<PotionEffectType> getAcidEffects() {
return acidEffects;
}
/**
* @return the acidRainDamage
*/
public int getAcidRainDamage() {
return acidRainDamage;
}
/**
* @return health restored when drinking purified water (half-hearts)
*/
public double getPurifiedWaterHeal() {
return purifiedWaterHeal;
}
/**
* @return true if the purified water mechanic is enabled
*/
public boolean isPurifiedWaterEnabled() {
return purifiedWaterEnabled;
}
/**
* @return true if water buckets can be purified by smelting in a furnace
*/
public boolean isPurifiedBucketFurnaceEnabled() {
return purifiedBucketFurnaceEnabled;
}
@Override
public int getBanLimit() {
return banLimit;
}
//---------------------------------------------------------------------------------------/
/**
* @return the customRanks
*/
public Map<String, Integer> getCustomRanks() {
return customRanks;
}
/**
* @return the deathsMax
*/
@Override
public int getDeathsMax() {
return deathsMax;
}
/**
* @return the defaultBiome
*/
public Biome getDefaultBiome() {
return defaultBiome;
}
/**
* @return the defaultGameMode
*/
@Override
public GameMode getDefaultGameMode() {
return defaultGameMode;
}
/**
* @return the defaultIslandFlags
* @since 1.21.0
*/
@Override
public Map<String, Integer> getDefaultIslandFlagNames()
{
return defaultIslandFlagNames;
}
/**
* @return the defaultIslandSettings
* @since 1.21.0
*/
@Override
public Map<String, Integer> getDefaultIslandSettingNames()
{
return defaultIslandSettingNames;
}
/**
* @return the defaultIslandProtection
* @deprecated since 1.21
*/
@Deprecated(since = "1.21")
@Override
public Map<Flag, Integer> getDefaultIslandFlags() {
return Collections.emptyMap();
}
/**
* @return the defaultIslandSettings
* @deprecated since 1.21
*/
@Deprecated(since = "1.21")
@Override
public Map<Flag, Integer> getDefaultIslandSettings() {
return Collections.emptyMap();
}
/**
* @return the difficulty
*/
@Override
public Difficulty getDifficulty() {
return difficulty;
}
/**
* @return the endSeaHeight
*/
public int getEndSeaHeight() {
return endSeaHeight;
}
/* (non-Javadoc)
* @see world.bentobox.bbox.api.configuration.WorldSettings#getFriendlyName()
*/
@Override
public String getFriendlyName() {
return friendlyName;
}
/**
* @return the geoLimitSettings
*/
@Override
public List<String> getGeoLimitSettings() {
return geoLimitSettings;
}
/**
* @return the islandDistance
*/
@Override
public int getIslandDistance() {
return islandDistance;
}
/**
* @return the islandHeight
*/
@Override
public int getIslandHeight() {
return islandHeight;
}
/**
* @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 islandXOffset;
}
/**
* @return the islandZOffset
*/
@Override
public int getIslandZOffset() {
return islandZOffset;
}
/**
* Invincible visitor settings
* @return the ivSettings
*/
@Override
public List<String> getIvSettings() {
return ivSettings;
}
/**
* @return the maxHomes
*/
@Override
public int getMaxHomes() {
return maxHomes;
}
/**
* @return the maxIslands
*/
@Override
public int getMaxIslands() {
return maxIslands;
}
/**
* @return the maxTeamSize
*/
@Override
public int getMaxTeamSize() {
return maxTeamSize;
}
/**
* @return the netherSeaHeight
*/
public int getNetherSeaHeight() {
return netherSeaHeight;
}
/**
* @return the netherSpawnRadius
*/
@Override
public int getNetherSpawnRadius() {
return netherSpawnRadius;
}
@Override
public String getPermissionPrefix() {
return "acidisland";
}
/**
* @return the removeMobsWhitelist
*/
@Override
public Set<EntityType> getRemoveMobsWhitelist() {
return removeMobsWhitelist;
}
@Override
public long getResetEpoch() {
return resetEpoch;
}
/**
* @return the resetLimit
*/
@Override
public int getResetLimit() {
return resetLimit;
}
/**
* @return the seaHeight
*/
@Override
public int getSeaHeight() {
return seaHeight;
}
/**
* @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 worldFlags
*/
@Override
public Map<String, Boolean> getWorldFlags() {
return worldFlags;
}
/**
* @return the worldName
*/
@Override
public String getWorldName() {
return worldName;
}
/**
* @return the acidDamageChickens
*/
public boolean isAcidDamageChickens() {
return acidDamageChickens;
}
/**