File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/main/java/com/falsepattern/lib/config Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 185
185
@ Target ({ElementType .FIELD , ElementType .TYPE })
186
186
@interface RequiresWorldRestart {
187
187
}
188
+
189
+ /**
190
+ * Signals that this configuration entry/class should be synchronized between the client and the server when
191
+ * joining a multiplayer instance.
192
+ *
193
+ * Note that synchronization ALWAYS happens FROM the server TO the client. The server should NEVER attempt to get
194
+ * configuration values from a client. This is to avoid malicious clients manipulating the server configs.
195
+ */
196
+ @ StableAPI (since = "0.10.0" )
197
+ @ Documented
198
+ @ Retention (RetentionPolicy .RUNTIME )
199
+ @ Target ({ElementType .FIELD , ElementType .TYPE })
200
+ @interface Synchronize {
201
+ /**
202
+ * This is a limit on how many bytes the client will accept from the server. If this limit is exceeded,
203
+ * the client shall refuse to connect to the server. For String[]-s, the amount of bytes is the sum of all
204
+ * strings inside the array.<br><br>
205
+ *
206
+ * This limitation option exists to avoid malicious servers flooding clients with data.<br><br>
207
+ *
208
+ * By default, the client will accept any amount of bytes.<br><br>
209
+ *
210
+ * This only applies for String and String[] configurations, and is ignored on the other config types.
211
+ * For enums, this value is computed automatically.
212
+ */
213
+ int maxLength ();
214
+ }
188
215
}
You can’t perform that action at this time.
0 commit comments