X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotification.java;h=c7e5b7c31b0867819e4a16f7fac50fe3c990f730;hb=9e4db46b86d084eba9029906e779ec1d96f78ac4;hp=423bea47a3d996b34d70c370363229660f80f1af;hpb=92b5ee58620b50020b3fe9a1a942ded9a0d59c9e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java index 423bea4..c7e5b7c 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java @@ -48,7 +48,7 @@ public class ListNotification extends TemplateNotification { */ public ListNotification(String id, String key, Template template) { super(id, template); - template.set(key, elements); + template.getInitialContext().set(key, elements); } // @@ -56,6 +56,15 @@ public class ListNotification extends TemplateNotification { // /** + * Returns the current list of elements. + * + * @return The current list of elements + */ + public List getElements() { + return new ArrayList(elements); + } + + /** * Returns whether there are any new elements. * * @return {@code true} if there are no new elements, {@code false} if there