From 0332e4abb7b0befe0fade55d4a1b76aa0e3c346b Mon Sep 17 00:00:00 2001 From: Almighty-Satan <43804777+Almighty-Satan@users.noreply.github.com> Date: Sun, 10 Sep 2023 14:31:19 +0200 Subject: [PATCH] Make argument list unmodifiable --- .../io/github/almightysatan/slams/standalone/Component.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/standalone/src/main/java/io/github/almightysatan/slams/standalone/Component.java b/standalone/src/main/java/io/github/almightysatan/slams/standalone/Component.java index 457629e..dee3eee 100644 --- a/standalone/src/main/java/io/github/almightysatan/slams/standalone/Component.java +++ b/standalone/src/main/java/io/github/almightysatan/slams/standalone/Component.java @@ -26,6 +26,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Collections; import java.util.List; import java.util.Objects; @@ -48,7 +49,7 @@ interface Component { if (placeholder == null) return raw; else - return placeholder.value(context, arguments); + return placeholder.value(context, Collections.unmodifiableList(arguments)); }; } }