fixed another bug

This commit is contained in:
delvh 2020-04-02 20:32:54 +02:00
parent b2cd3c340c
commit 051705106b

View File

@ -17,7 +17,7 @@ import envoy.data.User;
* @author Leon Hofmeister
* @since Envoy Common v0.1-beta
*/
public class GroupResizeEvent extends Event<Long> {
public class GroupResizeEvent extends Event<User> {
private final long groupID;
private final ElementOperation operation;
@ -35,7 +35,7 @@ public class GroupResizeEvent extends Event<Long> {
* @since Envoy Common v0.2-alpha
*/
public GroupResizeEvent(User user, Group group, ElementOperation operation) {
super(user.getID());
super(user);
if (group.getContacts().contains(user)) {
if (operation.equals(ElementOperation.ADD)) throw new IllegalStateException(
"Cannot add " + user + " to group " + group.getID() + " because he is already a member of this group");