<commit_before>package com.skcraft.plume.module;

import com.google.common.collect.Sets;
import com.google.inject.Inject;
import com.sk89q.intake.Command;
import com.sk89q.intake.CommandException;
import com.sk89q.intake.parametric.annotation.Text;
import com.skcraft.plume.command.At;
import com.skcraft.plume.command.Group;
import com.skcraft.plume.command.Sender;
import com.skcraft.plume.common.UserId;
import com.skcraft.plume.common.service.party.*;
import com.skcraft.plume.common.util.concurrent.Deferred;
import com.skcraft.plume.common.util.concurrent.Deferreds;
import com.skcraft.plume.common.util.module.Module;
import com.skcraft.plume.common.util.service.InjectService;
import com.skcraft.plume.common.util.service.Service;
import com.skcraft.plume.util.Messages;
import com.skcraft.plume.util.profile.ProfileLookupException;
import com.skcraft.plume.util.profile.ProfileNotFoundException;
import com.skcraft.plume.util.profile.ProfileService;
import com.skcraft.plume.util.profile.Profiles;
import com.skcraft.plume.util.concurrent.BackgroundExecutor;
import com.skcraft.plume.util.concurrent.TickExecutorService;
import lombok.extern.java.Log;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;

import java.util.Date;

import static com.skcraft.plume.common.util.SharedLocale.tr;

@Module(name = "party-commands")
@Log
public class PartyCommands {
    @Inject private BackgroundExecutor executor;
    @Inject private ProfileService profileService;
    @Inject private TickExecutorService tickExecutorService;
    @InjectService private Service<PartyCache> partyCache;

    @Command(aliases = "party", desc = "/party create/add/remove/info/mine")
    //@Require("plume.party.party") //TODO uncomment this when online
    public void party(@Sender EntityPlayer sender, String name) {
        sender.addChatMessage(Messages.info(tr("party.help.usage")));
    }

    @Command(aliases = "create", desc = "Create a new party")
    @Group(@At("party"))
    //@Require("plume.party.create") //TODO uncomment this when online
    public void create(@Sender EntityPlayer sender, String name) {
        PartyCache partyMan = this.partyCache.provide();
        UserId issuer = Profiles.fromPlayer(sender);

        Deferred<?> deferred = Deferreds
                .when(() -> {
                    Party party = new Party();
                    party.setName(name);<commit_msg>Remove unneeded party root command.<commit_after>package com.skcraft.plume.module;

import com.google.common.collect.Sets;
import com.google.inject.Inject;
import com.sk89q.intake.Command;
import com.sk89q.intake.CommandException;
import com.sk89q.intake.parametric.annotation.Text;
import com.skcraft.plume.command.At;
import com.skcraft.plume.command.Group;
import com.skcraft.plume.command.Sender;
import com.skcraft.plume.common.UserId;
import com.skcraft.plume.common.service.party.*;
import com.skcraft.plume.common.util.concurrent.Deferred;
import com.skcraft.plume.common.util.concurrent.Deferreds;
import com.skcraft.plume.common.util.module.Module;
import com.skcraft.plume.common.util.service.InjectService;
import com.skcraft.plume.common.util.service.Service;
import com.skcraft.plume.util.Messages;
import com.skcraft.plume.util.profile.ProfileLookupException;
import com.skcraft.plume.util.profile.ProfileNotFoundException;
import com.skcraft.plume.util.profile.ProfileService;
import com.skcraft.plume.util.profile.Profiles;
import com.skcraft.plume.util.concurrent.BackgroundExecutor;
import com.skcraft.plume.util.concurrent.TickExecutorService;
import lombok.extern.java.Log;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;

import java.util.Date;

import static com.skcraft.plume.common.util.SharedLocale.tr;

@Module(name = "party-commands")
@Log
public class PartyCommands {
    @Inject private BackgroundExecutor executor;
    @Inject private ProfileService profileService;
    @Inject private TickExecutorService tickExecutorService;
    @InjectService private Service<PartyCache> partyCache;

    @Command(aliases = "create", desc = "Create a new party")
    @Group(@At("party"))
    //@Require("plume.party.create") //TODO uncomment this when online
    public void create(@Sender EntityPlayer sender, String name) {
        PartyCache partyMan = this.partyCache.provide();
        UserId issuer = Profiles.fromPlayer(sender);

        Deferred<?> deferred = Deferreds
                .when(() -> {
                    Party party = new Party();
                    party.setName(name);
{'fraction_non_alphanumeric': 0.11474694589877836, 'fraction_numerical': 0.002617801047120419, 'mean_word_length': 4.517448856799037, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2400881', 'n_tokens_mistral': 1384, 'n_tokens_neox': 1378, 'n_words': 252}