<commit_before>/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package com.skelril.skree.content.market;

import com.skelril.skree.content.market.admin.*;
import org.spongepowered.api.Game;
import org.spongepowered.api.text.Texts;
import org.spongepowered.api.util.command.spec.CommandSpec;

public class MarketAdminCommand {
    public static CommandSpec aquireSpec(Game game) {
        return CommandSpec.builder()
                .description(Texts.of("Administrative commands for the market"))
                .child(MarketQuickAddCommand.aquireSpec(game), "quickadd")
                .child(MarketAddAliasCommand.aquireSpec(game), "addalias")
                .child(MarketSetPriceCommand.aquireSpec(game), "setprice")
                .child(MarketSetPrimaryAliasCommand.aquireSpec(game), "setprimaryalias", "setpalias")
                .child(MarketTrackItemCommand.aquireSpec(game), "track")
                .build();
    }<commit_msg>Added a permission check to the skree admin commands<commit_after>/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package com.skelril.skree.content.market;

import com.skelril.skree.content.market.admin.*;
import org.spongepowered.api.Game;
import org.spongepowered.api.text.Texts;
import org.spongepowered.api.util.command.spec.CommandSpec;

public class MarketAdminCommand {
    public static CommandSpec aquireSpec(Game game) {
        return CommandSpec.builder()
                .description(Texts.of("Administrative commands for the market"))
                .permission("skree.market.admin")
                .child(MarketQuickAddCommand.aquireSpec(game), "quickadd")
                .child(MarketAddAliasCommand.aquireSpec(game), "addalias")
                .child(MarketSetPriceCommand.aquireSpec(game), "setprice")
                .child(MarketSetPrimaryAliasCommand.aquireSpec(game), "setprimaryalias", "setpalias")
                .child(MarketTrackItemCommand.aquireSpec(game), "track")
                .build();
    }
{'fraction_non_alphanumeric': 0.1084967320261438, 'fraction_numerical': 0.003485838779956427, 'mean_word_length': 3.136936936936937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3110809', 'n_tokens_mistral': 683, 'n_tokens_neox': 640, 'n_words': 153}