forked from John-Paul-R/Essential-Commands
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEssentialCommandsConfigSnapshot.java
More file actions
181 lines (176 loc) · 10.9 KB
/
Copy pathEssentialCommandsConfigSnapshot.java
File metadata and controls
181 lines (176 loc) · 10.9 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
package com.fibermc.essentialcommands.config;
import java.util.List;
import java.util.Set;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.Style;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.level.Level;
import com.fibermc.essentialcommands.types.NicknameCommandArgMode;
import com.fibermc.essentialcommands.types.RespawnCondition;
import com.fibermc.essentialcommands.types.RtpCenter;
import dev.jpcode.eccore.config.expression.Expression;
import dev.jpcode.eccore.util.TimeUtil;
@SuppressWarnings("checkstyle:all")
public final class EssentialCommandsConfigSnapshot {
public final Style FORMATTING_DEFAULT;
public final Style FORMATTING_ACCENT;
public final Style FORMATTING_ERROR;
public final Component NICKNAME_PREFIX;
public final boolean ENABLE_BACK;
public final boolean ENABLE_HOME;
public final boolean ENABLE_SPAWN;
public final boolean ENABLE_TPA;
public final boolean ENABLE_WARP;
public final boolean ENABLE_NICK;
public final boolean ENABLE_RTP;
public final boolean ENABLE_FLY;
public final boolean ENABLE_INVULN;
public final boolean ENABLE_WORKBENCH;
public final boolean ENABLE_ANVIL;
public final boolean ENABLE_ENDERCHEST;
public final boolean ENABLE_WASTEBIN;
public final boolean ENABLE_ESSENTIALSX_CONVERT;
public final boolean ENABLE_TOP;
public final boolean ENABLE_GAMETIME;
public final boolean ENABLE_MOTD;
public final boolean ENABLE_AFK;
public final boolean ENABLE_DAY;
public final boolean ENABLE_RULES;
public final boolean ENABLE_BED;
public final boolean ENABLE_FEED;
public final boolean ENABLE_HEAL;
public final boolean ENABLE_EXTINGUISH;
public final boolean ENABLE_SUICIDE;
public final boolean ENABLE_NIGHT;
public final boolean ENABLE_REPAIR;
public final boolean ENABLE_NEAR;
public final boolean ENABLE_SLEEP;
public final boolean ENABLE_DELETE_ALL_PLAYER_DATA;
public final List<Integer> HOME_LIMIT;
public final double TELEPORT_COOLDOWN;
public final int TELEPORT_DELAY_TICKS;
public final boolean ALLOW_BACK_ON_DEATH;
public final int TELEPORT_REQUEST_DURATION_TICKS;
public final boolean USE_PERMISSIONS_API;
public final boolean CHECK_FOR_UPDATES;
public final boolean TELEPORT_INTERRUPT_ON_DAMAGED;
public final boolean TELEPORT_INTERRUPT_ON_MOVE;
public final double TELEPORT_INTERRUPT_ON_MOVE_AMOUNT;
public final boolean TELEPORT_FOLLOWERS;
public final double TELEPORT_FOLLOWERS_RADIUS;
public final boolean ALLOW_TELEPORT_BETWEEN_DIMENSIONS;
public final boolean OPS_BYPASS_TELEPORT_RULES;
public final boolean NICKNAMES_IN_PLAYER_LIST;
public final int NICKNAME_MAX_LENGTH;
public final NicknameCommandArgMode NICKNAMES_AS_COMMAND_ARG;
public final boolean NICKNAME_ABOVE_HEAD;
public final RtpCenter RTP_CENTER;
public final int RTP_RADIUS;
public final int RTP_MIN_RADIUS;
public final int RTP_COOLDOWN;
public final int RTP_MAX_ATTEMPTS;
public final Set<ResourceKey<Level>> RTP_ENABLED_WORLDS;
public final boolean BROADCAST_TO_OPS;
public final boolean NICK_REVEAL_ON_HOVER;
public final boolean GRANT_LOWEST_NUMERIC_BY_DEFAULT;
public final String LANGUAGE;
public final String MOTD;
public final Component AFK_PREFIX;
public final boolean INVULN_WHILE_AFK;
public final boolean AUTO_AFK_ENABLED;
public final int AUTO_AFK_TICKS;
public final boolean SLEEP_NEAR_MONSTERS;
public final boolean SLEEP_INVULN;
public final boolean REGISTER_TOP_LEVEL_COMMANDS;
public final List<String> EXCLUDED_TOP_LEVEL_COMMANDS;
public final Expression<RespawnCondition> RESPAWN_AT_EC_SPAWN;
public final boolean PERSIST_BACK_LOCATION;
public final boolean RECHECK_PLAYER_ABILITY_PERMISSIONS_ON_DIMENSION_CHANGE;
public final int FLY_MAX_SPEED;
public final int NEAR_COMMAND_DEFAULT_RADIUS;
public final int NEAR_COMMAND_MAX_RADIUS;
public final boolean PRINT_TELEPORT_COORDINATES;
private EssentialCommandsConfigSnapshot(EssentialCommandsConfig config) {
this.FORMATTING_DEFAULT = config.FORMATTING_DEFAULT.getValue();
this.FORMATTING_ACCENT = config.FORMATTING_ACCENT.getValue();
this.FORMATTING_ERROR = config.FORMATTING_ERROR.getValue();
this.NICKNAME_PREFIX = config.NICKNAME_PREFIX.getValue();
this.ENABLE_BACK = config.ENABLE_BACK.getValue();
this.ENABLE_HOME = config.ENABLE_HOME.getValue();
this.ENABLE_SPAWN = config.ENABLE_SPAWN.getValue();
this.ENABLE_TPA = config.ENABLE_TPA.getValue();
this.ENABLE_WARP = config.ENABLE_WARP.getValue();
this.ENABLE_NICK = config.ENABLE_NICK.getValue();
this.ENABLE_RTP = config.ENABLE_RTP.getValue();
this.ENABLE_FLY = config.ENABLE_FLY.getValue();
this.ENABLE_INVULN = config.ENABLE_INVULN.getValue();
this.ENABLE_WORKBENCH = config.ENABLE_WORKBENCH.getValue();
this.ENABLE_ANVIL = config.ENABLE_ANVIL.getValue();
this.ENABLE_ENDERCHEST = config.ENABLE_ENDERCHEST.getValue();
this.ENABLE_WASTEBIN = config.ENABLE_WASTEBIN.getValue();
this.ENABLE_ESSENTIALSX_CONVERT = config.ENABLE_ESSENTIALSX_CONVERT.getValue();
this.ENABLE_TOP = config.ENABLE_TOP.getValue();
this.ENABLE_GAMETIME = config.ENABLE_GAMETIME.getValue();
this.ENABLE_MOTD = config.ENABLE_MOTD.getValue();
this.ENABLE_AFK = config.ENABLE_AFK.getValue();
this.ENABLE_DAY = config.ENABLE_DAY.getValue();
this.ENABLE_RULES = config.ENABLE_RULES.getValue();
this.ENABLE_BED = config.ENABLE_BED.getValue();
this.ENABLE_FEED = config.ENABLE_FEED.getValue();
this.ENABLE_HEAL = config.ENABLE_HEAL.getValue();
this.ENABLE_EXTINGUISH = config.ENABLE_EXTINGUISH.getValue();
this.ENABLE_SUICIDE = config.ENABLE_SUICIDE.getValue();
this.ENABLE_NIGHT = config.ENABLE_NIGHT.getValue();
this.ENABLE_REPAIR = config.ENABLE_REPAIR.getValue();
this.ENABLE_NEAR = config.ENABLE_NEAR.getValue();
this.ENABLE_SLEEP = config.ENABLE_SLEEP.getValue();
this.ENABLE_DELETE_ALL_PLAYER_DATA = config.ENABLE_DELETE_ALL_PLAYER_DATA.getValue();
this.HOME_LIMIT = config.HOME_LIMIT.getValue();
this.TELEPORT_COOLDOWN = config.TELEPORT_COOLDOWN.getValue();
this.TELEPORT_DELAY_TICKS = (int) (config.TELEPORT_DELAY.getValue() * TimeUtil.TPS);
this.ALLOW_BACK_ON_DEATH = config.ALLOW_BACK_ON_DEATH.getValue();
this.TELEPORT_REQUEST_DURATION_TICKS = config.TELEPORT_REQUEST_DURATION.getValue() * TimeUtil.TPS;
this.USE_PERMISSIONS_API = config.USE_PERMISSIONS_API.getValue();
this.CHECK_FOR_UPDATES = config.CHECK_FOR_UPDATES.getValue();
this.TELEPORT_INTERRUPT_ON_DAMAGED = config.TELEPORT_INTERRUPT_ON_DAMAGED.getValue();
this.TELEPORT_INTERRUPT_ON_MOVE = config.TELEPORT_INTERRUPT_ON_MOVE.getValue();
this.TELEPORT_INTERRUPT_ON_MOVE_AMOUNT = config.TELEPORT_INTERRUPT_ON_MOVE_AMOUNT.getValue();
this.ALLOW_TELEPORT_BETWEEN_DIMENSIONS = config.ALLOW_TELEPORT_BETWEEN_DIMENSIONS.getValue();
this.TELEPORT_FOLLOWERS = config.TELEPORT_WITH_FOLLOWERS.getValue();
this.TELEPORT_FOLLOWERS_RADIUS = config.TELEPORT_WITH_FOLLOWERS_RADIUS.getValue();
this.OPS_BYPASS_TELEPORT_RULES = config.OPS_BYPASS_TELEPORT_RULES.getValue();
this.NICKNAMES_IN_PLAYER_LIST = config.NICKNAMES_IN_PLAYER_LIST.getValue();
this.NICKNAME_MAX_LENGTH = config.NICKNAME_MAX_LENGTH.getValue();
this.NICKNAMES_AS_COMMAND_ARG = config.NICKNAMES_AS_COMMAND_ARG.getValue();
this.NICKNAME_ABOVE_HEAD = config.NICKNAME_ABOVE_HEAD.getValue();
this.RTP_CENTER = config.RTP_CENTER.getValue();
this.RTP_RADIUS = config.RTP_RADIUS.getValue();
this.RTP_MIN_RADIUS = config.RTP_MIN_RADIUS.getValue();
this.RTP_COOLDOWN = config.RTP_COOLDOWN.getValue();
this.RTP_MAX_ATTEMPTS = config.RTP_MAX_ATTEMPTS.getValue();
this.RTP_ENABLED_WORLDS = config.getValidRtpWorldKeys();
this.BROADCAST_TO_OPS = config.BROADCAST_TO_OPS.getValue();
this.NICK_REVEAL_ON_HOVER = config.NICK_REVEAL_ON_HOVER.getValue();
this.GRANT_LOWEST_NUMERIC_BY_DEFAULT = config.GRANT_LOWEST_NUMERIC_BY_DEFAULT.getValue();
this.LANGUAGE = config.LANGUAGE.getValue();
this.MOTD = config.MOTD.getValue();
this.AFK_PREFIX = config.AFK_PREFIX.getValue();
this.INVULN_WHILE_AFK = config.INVULN_WHILE_AFK.getValue();
this.AUTO_AFK_ENABLED = config.AUTO_AFK_ENABLED.getValue();
this.AUTO_AFK_TICKS = config.AUTO_AFK_TICKS.getValue();
this.SLEEP_NEAR_MONSTERS = config.SLEEP_NEAR_MONSTERS.getValue();
this.SLEEP_INVULN = config.SLEEP_INVULN.getValue();
this.REGISTER_TOP_LEVEL_COMMANDS = config.REGISTER_TOP_LEVEL_COMMANDS.getValue();
this.EXCLUDED_TOP_LEVEL_COMMANDS = config.EXCLUDED_TOP_LEVEL_COMMANDS.getValue();
this.RESPAWN_AT_EC_SPAWN = config.RESPAWN_AT_EC_SPAWN.getValue();
this.PERSIST_BACK_LOCATION = config.PERSIST_BACK_LOCATION.getValue();
this.RECHECK_PLAYER_ABILITY_PERMISSIONS_ON_DIMENSION_CHANGE = config.RECHECK_PLAYER_ABILITY_PERMISSIONS_ON_DIMENSION_CHANGE.getValue();
this.FLY_MAX_SPEED = config.FLY_MAX_SPEED.getValue();
this.NEAR_COMMAND_DEFAULT_RADIUS = config.NEAR_COMMAND_DEFAULT_RADIUS.getValue();
this.NEAR_COMMAND_MAX_RADIUS = config.NEAR_COMMAND_MAX_RADIUS.getValue();
this.PRINT_TELEPORT_COORDINATES = config.PRINT_TELEPORT_COORDINATES.getValue();
}
public static EssentialCommandsConfigSnapshot create(EssentialCommandsConfig config) {
return new EssentialCommandsConfigSnapshot(config);
}
}