9
0
mirror of https://github.com/GeyserExtensionists/GeyserUtils.git synced 2025-12-19 15:09:24 +00:00

stop throw error

This commit is contained in:
zimzaza4
2024-04-14 11:54:55 +08:00
parent 8dd86015e5
commit 1afafdeaad

View File

@@ -22,8 +22,9 @@ public class CameraPreset {
public static void registerCameraPresets(CameraPreset... presets) {
for (var preset : presets) {
if (PRESETS.containsKey(preset.getIdentifier()))
throw new IllegalArgumentException("Camera preset " + preset.getIdentifier() + " already exists!");
if (PRESETS.containsKey(preset.getIdentifier())) {
continue;
}
PRESETS.put(preset.getIdentifier(), preset);
}
int id = 0;