<commit_before>package io.github.thatsmusic99.headsplus.api;

import io.github.thatsmusic99.headsplus.HeadsPlus;
import io.github.thatsmusic99.headsplus.config.HeadsPlusMessagesManager;
import io.github.thatsmusic99.headsplus.config.challenges.HPChallengeRewardTypes;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

import java.util.ArrayList;
import java.util.List;

public class Reward implements Cloneable {

    private final HPChallengeRewardTypes type;
    private double money;
    private int xp;
    private ItemStack item;
    private String group;
    private boolean consoleSender = false;
    private final boolean multiply;
    private final String name;
    private List<String> commands;
    private String rewardString = null;

    public Reward(String name, HPChallengeRewardTypes type, Object value, int amount, String sender, int xp, boolean multiply, String... rewardString) {
        this.name = name;
        switch (type) {
            case ECO:
                money = Double.parseDouble(String.valueOf(value));
                break;
            case ADD_GROUP:
            case REMOVE_GROUP:
                group = String.valueOf(value);
                break;
            case RUN_COMMAND:
                commands = new ArrayList<>((List<String>) value);
                break;
            case GIVE_ITEM:
                item = new ItemStack(Material.getMaterial(String.valueOf(value)), amount);
                break;
        }
        this.type = type;
        this.multiply = multiply;
        if (sender != null && sender.equalsIgnoreCase("console")) {
            consoleSender = true;
        }
        this.xp = xp;<commit_msg>You can now execute multiple commands in rewards<commit_after>package io.github.thatsmusic99.headsplus.api;

import io.github.thatsmusic99.headsplus.HeadsPlus;
import io.github.thatsmusic99.headsplus.config.HeadsPlusMessagesManager;
import io.github.thatsmusic99.headsplus.config.challenges.HPChallengeRewardTypes;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Reward implements Cloneable {

    private final HPChallengeRewardTypes type;
    private double money;
    private int xp;
    private ItemStack item;
    private String group;
    private boolean consoleSender = false;
    private final boolean multiply;
    private final String name;
    private List<String> commands;
    private String rewardString = null;

    public Reward(String name, HPChallengeRewardTypes type, Object value, int amount, String sender, int xp, boolean multiply, String... rewardString) {
        this.name = name;
        switch (type) {
            case ECO:
                money = Double.parseDouble(String.valueOf(value));
                break;
            case ADD_GROUP:
            case REMOVE_GROUP:
                group = String.valueOf(value);
                break;
            case RUN_COMMAND:
                if (value instanceof List) {
                    commands = new ArrayList<>((List<String>) value);
                } else {
                    commands = Collections.singletonList(String.valueOf(value));
                }
                break;
            case GIVE_ITEM:
                item = new ItemStack(Material.getMaterial(String.valueOf(value)), amount);
                break;
        }
        this.type = type;
        this.multiply = multiply;
        if (sender != null && sender.equalsIgnoreCase("console")) {
            consoleSender = true;
        }
        this.xp = xp;
{'fraction_non_alphanumeric': 0.08400429414922168, 'fraction_numerical': 0.0042941492216854536, 'mean_word_length': 2.4192660550458718, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2768034', 'n_tokens_mistral': 1041, 'n_tokens_neox': 975, 'n_words': 253}