mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-29 06:05:13 +01:00
Added abstract class to handle the invite map.
This commit is contained in:
parent
4b9762fb81
commit
c6e885a8de
@ -29,6 +29,8 @@ public abstract class CommandArgument {
|
|||||||
this.subCommands = new LinkedHashMap<>();
|
this.subCommands = new LinkedHashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CommandArgument() {}
|
||||||
|
|
||||||
public abstract boolean execute(CommandSender sender, String[] args);
|
public abstract boolean execute(CommandSender sender, String[] args);
|
||||||
public abstract Set<String> tabComplete(CommandSender sender, String[] args);
|
public abstract Set<String> tabComplete(CommandSender sender, String[] args);
|
||||||
|
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package us.tastybento.bskyblock.commands.island;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import com.google.common.collect.BiMap;
|
||||||
|
import com.google.common.collect.HashBiMap;
|
||||||
|
|
||||||
|
import us.tastybento.bskyblock.api.commands.CommandArgument;
|
||||||
|
|
||||||
|
public abstract class AbstractIslandTeamCommandArgument extends CommandArgument {
|
||||||
|
|
||||||
|
protected BiMap<UUID, UUID> inviteList = HashBiMap.create();
|
||||||
|
|
||||||
|
public AbstractIslandTeamCommandArgument(String label, String... aliases) {
|
||||||
|
super(label,aliases);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -12,23 +12,13 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||||
|
|
||||||
import com.google.common.collect.BiMap;
|
|
||||||
import com.google.common.collect.HashBiMap;
|
|
||||||
|
|
||||||
import us.tastybento.bskyblock.api.commands.CommandArgument;
|
|
||||||
import us.tastybento.bskyblock.api.events.team.TeamEvent;
|
import us.tastybento.bskyblock.api.events.team.TeamEvent;
|
||||||
import us.tastybento.bskyblock.api.events.team.TeamEvent.TeamReason;
|
import us.tastybento.bskyblock.api.events.team.TeamEvent.TeamReason;
|
||||||
import us.tastybento.bskyblock.config.Settings;
|
import us.tastybento.bskyblock.config.Settings;
|
||||||
import us.tastybento.bskyblock.util.Util;
|
import us.tastybento.bskyblock.util.Util;
|
||||||
import us.tastybento.bskyblock.util.VaultHelper;
|
import us.tastybento.bskyblock.util.VaultHelper;
|
||||||
|
|
||||||
public class IslandTeamInviteCommand extends CommandArgument {
|
public class IslandTeamInviteCommand extends AbstractIslandTeamCommandArgument {
|
||||||
/**
|
|
||||||
* Invite list - invited player name string (key), inviter name string
|
|
||||||
* (value)
|
|
||||||
*/
|
|
||||||
private final BiMap<UUID, UUID> inviteList = HashBiMap.create();
|
|
||||||
|
|
||||||
|
|
||||||
public IslandTeamInviteCommand() {
|
public IslandTeamInviteCommand() {
|
||||||
super("invite");
|
super("invite");
|
||||||
|
@ -7,22 +7,12 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.google.common.collect.BiMap;
|
|
||||||
import com.google.common.collect.HashBiMap;
|
|
||||||
|
|
||||||
import us.tastybento.bskyblock.api.commands.CommandArgument;
|
|
||||||
import us.tastybento.bskyblock.api.events.team.TeamEvent;
|
import us.tastybento.bskyblock.api.events.team.TeamEvent;
|
||||||
import us.tastybento.bskyblock.api.events.team.TeamEvent.TeamReason;
|
import us.tastybento.bskyblock.api.events.team.TeamEvent.TeamReason;
|
||||||
import us.tastybento.bskyblock.config.Settings;
|
import us.tastybento.bskyblock.config.Settings;
|
||||||
import us.tastybento.bskyblock.util.VaultHelper;
|
import us.tastybento.bskyblock.util.VaultHelper;
|
||||||
|
|
||||||
public class IslandTeamUninviteCommand extends CommandArgument {
|
public class IslandTeamUninviteCommand extends AbstractIslandTeamCommandArgument {
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO: this actually needs to be the same as what is in the IslandTeamInvite class!
|
|
||||||
*/
|
|
||||||
private final BiMap<UUID, UUID> inviteList = HashBiMap.create();
|
|
||||||
|
|
||||||
|
|
||||||
public IslandTeamUninviteCommand() {
|
public IslandTeamUninviteCommand() {
|
||||||
super("uninvite");
|
super("uninvite");
|
||||||
|
Loading…
Reference in New Issue
Block a user