Renamed partycommand and made party chat work from galaxy to proxy

This commit is contained in:
2022-01-30 19:31:29 +01:00
parent 4f4f48e847
commit 2acebc6c16
14 changed files with 150 additions and 118 deletions
@@ -14,10 +14,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Party implements SimpleCommand {
public class PartyCommand implements SimpleCommand {
private final List<SubCommand> subCommands;
public Party() {
public PartyCommand() {
subCommands = Arrays.asList(
new Help(this),
new Create(),
@@ -29,6 +29,7 @@ public class Party implements SimpleCommand {
new Owner(),
new Password(),
new Remove());
}
@Override
@@ -1,7 +1,7 @@
package com.alttd.velocitychat.commands.partysubcommands;
import com.alttd.chat.config.Config;
import com.alttd.velocitychat.commands.Party;
import com.alttd.velocitychat.commands.PartyCommand;
import com.alttd.velocitychat.commands.SubCommand;
import com.velocitypowered.api.command.CommandSource;
@@ -10,9 +10,9 @@ import java.util.List;
public class Help implements SubCommand {
private final Party partyCommand;
private final PartyCommand partyCommand;
public Help(Party partyCommand)
public Help(PartyCommand partyCommand)
{
this.partyCommand = partyCommand;
}
@@ -47,7 +47,7 @@ public class Leave implements SubCommand {
Utility.parseMiniMessage(Config.OWNER_LEFT_PARTY, List.of(
Template.template("old_owner", player.getUsername()),
Template.template("new_owner", party.getPartyUser(uuid).getPlayerName())
)));
)), null);
} else {
party.delete();
}
@@ -53,7 +53,7 @@ public class Owner implements SubCommand {
Utility.parseMiniMessage(Config.NEW_PARTY_OWNER, List.of(
Template.template("old_owner", player.getUsername()),
Template.template("new_owner", partyUser.getPlayerName())
)));
)), null);
}
@Override