package com.demigodsrpg.demigames.model;

import com.demigodsrpg.demigames.minigame.kit.MutableKit;
import org.bukkit.entity.Player;

import java.util.Optional;

@Model(name = "profile")
public class Profile {
    // -- DATA -- //

    private final Player player;
    private transient Optional<MutableKit> kit;

    // -- CONSTRUCTORS -- //

    public Profile(Player player) {
        this.player = player;
        this.kit = Optional.empty();
    }

    public Profile(Player player, MutableKit kit) {
        this.player = player;
        this.kit = Optional.of(kit);
    }

    // -- GETTERS -- //

    public Player getPlayer() {
        return player;
    }

    public Optional<MutableKit> getKit() {
        return kit;
    }

    // -- MUTATORS -- //

    public void setKit(MutableKit kit) {
        this.kit = Optional.ofNullable(kit);
    }
}

@@ -35,16 +35,67 @@
 model;%0A%0A
+import com.demigodsrpg.demigames.minigame.kit.Kit;%0A
 import c
@@ -336,31 +336,24 @@
 nt Optional%3C
-Mutable
 Kit%3E kit;%0A%0A 
@@ -724,23 +724,16 @@
 ptional%3C
-Mutable
 Kit%3E get
@@ -816,23 +816,16 @@
  setKit(
-Mutable
 Kit kit)

Make Profile accept a Kit instead of a MutableKit.