Fully removed Vault

Added commands for /island.
This commit is contained in:
Tastybento 2017-12-16 09:33:24 -08:00
parent 4fcd6174ad
commit 90f88b4425
29 changed files with 35 additions and 45 deletions

View File

@ -1,15 +1,16 @@
package us.tastybento.bskyblock.api.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginIdentifiableCommand;
import us.tastybento.bskyblock.BSkyBlock;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginIdentifiableCommand;
import us.tastybento.bskyblock.BSkyBlock;
public abstract class CompositeCommand extends Command implements PluginIdentifiableCommand {
private BSkyBlock plugin = BSkyBlock.getPlugin();

View File

@ -1,6 +1,7 @@
package us.tastybento.bskyblock.commands;
import org.bukkit.command.CommandSender;
import us.tastybento.bskyblock.api.commands.CompositeCommand;
import us.tastybento.bskyblock.commands.admin.AdminVersionCommand;
import us.tastybento.bskyblock.config.Settings;
@ -8,7 +9,7 @@ import us.tastybento.bskyblock.config.Settings;
public class AdminCommand extends CompositeCommand {
public AdminCommand() {
super(Settings.ADMINCOMMAND, "Admin commands");
super(Settings.ADMINCOMMAND, "Admin commands", "bsb");
}
@Override

View File

@ -1,8 +1,15 @@
package us.tastybento.bskyblock.commands;
import org.bukkit.command.CommandSender;
import us.tastybento.bskyblock.api.commands.CompositeCommand;
import us.tastybento.bskyblock.commands.island.IslandAboutCommand;
import us.tastybento.bskyblock.commands.island.IslandCreateCommand;
import us.tastybento.bskyblock.commands.island.IslandGoCommand;
import us.tastybento.bskyblock.commands.island.IslandResetCommand;
import us.tastybento.bskyblock.commands.island.IslandResetnameCommand;
import us.tastybento.bskyblock.commands.island.IslandSethomeCommand;
import us.tastybento.bskyblock.commands.island.IslandSetnameCommand;
import us.tastybento.bskyblock.commands.island.teams.IslandTeamCommand;
import us.tastybento.bskyblock.config.Settings;
@ -15,6 +22,12 @@ public class IslandCommand extends CompositeCommand {
@Override
public void setup() {
this.addSubCommand(new IslandAboutCommand());
this.addSubCommand(new IslandCreateCommand());
this.addSubCommand(new IslandGoCommand());
this.addSubCommand(new IslandResetCommand());
this.addSubCommand(new IslandResetnameCommand());
this.addSubCommand(new IslandSethomeCommand());
this.addSubCommand(new IslandSetnameCommand());
this.addSubCommand(new IslandTeamCommand());
}

View File

@ -1,12 +1,13 @@
package us.tastybento.bskyblock.commands.admin;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import java.util.Set;
public class AdminVersionCommand extends CommandArgument {
public AdminVersionCommand() {

View File

@ -1,12 +1,12 @@
package us.tastybento.bskyblock.commands.island;
import java.util.Set;
import org.bukkit.command.CommandSender;
import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import java.util.Set;
public class IslandAboutCommand extends CommandArgument {
public IslandAboutCommand() {

View File

@ -14,7 +14,6 @@ import us.tastybento.bskyblock.api.commands.CommandArgument;
import us.tastybento.bskyblock.api.events.island.IslandEvent.Reason;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.managers.island.NewIsland;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author ben

View File

@ -13,7 +13,6 @@ import org.bukkit.entity.Player;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author ben

View File

@ -13,7 +13,6 @@ import us.tastybento.bskyblock.api.events.island.IslandEvent.Reason;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.managers.island.NewIsland;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.util.VaultHelper;
public class IslandResetCommand extends CommandArgument {

View File

@ -12,7 +12,6 @@ import org.bukkit.entity.Player;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author ben

View File

@ -10,7 +10,6 @@ import org.bukkit.entity.Player;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
public class IslandSethomeCommand extends CommandArgument {

View File

@ -12,7 +12,6 @@ import org.bukkit.entity.Player;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author ben

View File

@ -15,7 +15,6 @@ import com.google.common.collect.HashBiMap;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.util.VaultHelper;
public abstract class AbstractIslandTeamCommandArgument extends CommandArgument {

View File

@ -10,7 +10,6 @@ import org.bukkit.entity.Player;
import us.tastybento.bskyblock.api.events.team.TeamEvent;
import us.tastybento.bskyblock.api.events.team.TeamEvent.TeamReason;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.util.VaultHelper;
public class IslandTeamUninviteCommand extends AbstractIslandTeamCommandArgument {

View File

@ -19,7 +19,6 @@ import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.BSBDatabase;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.objects.Players;
import us.tastybento.bskyblock.util.VaultHelper;
public class PlayersManager{

View File

@ -5,7 +5,6 @@ import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;

View File

@ -2,7 +2,6 @@ package us.tastybento.bskyblock.island.builders;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.TreeType;

View File

@ -13,8 +13,6 @@ import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.managers.PlayersManager;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
public class JoinLeaveListener implements Listener {

View File

@ -24,8 +24,6 @@ import us.tastybento.bskyblock.generators.IslandWorld;
import us.tastybento.bskyblock.island.builders.IslandBuilder;
import us.tastybento.bskyblock.island.builders.IslandBuilder.IslandType;
import us.tastybento.bskyblock.util.SafeSpotTeleport;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
public class NetherPortals implements Listener {
private final BSkyBlock plugin;

View File

@ -54,7 +54,6 @@ import org.bukkit.event.entity.PlayerLeashEntityEvent;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.hanging.HangingPlaceEvent;
import org.bukkit.event.inventory.CraftItemEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerBedEnterEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent;
@ -82,7 +81,6 @@ import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;
import us.tastybento.bskyblock.generators.IslandWorld;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author tastybento

View File

@ -20,7 +20,6 @@ import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author tastybento

View File

@ -39,7 +39,6 @@ import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;
import us.tastybento.bskyblock.generators.IslandWorld;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author tastybento

View File

@ -22,8 +22,6 @@ import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.generators.IslandWorld;
import us.tastybento.bskyblock.util.SafeSpotTeleport;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
public class NetherEvents implements Listener {
private final BSkyBlock plugin;

View File

@ -9,7 +9,6 @@ import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
@ -18,7 +17,6 @@ import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.database.objects.Island;
import us.tastybento.bskyblock.database.objects.Island.SettingsFlag;
import us.tastybento.bskyblock.util.Util;
import us.tastybento.bskyblock.util.VaultHelper;
/**
* @author tastybento

View File

@ -1,10 +1,10 @@
package us.tastybento.bskyblock.managers;
import us.tastybento.bskyblock.api.addons.BSAddon;
import java.util.ArrayList;
import java.util.List;
import us.tastybento.bskyblock.api.addons.BSAddon;
public final class AddonsManager {
private final List<BSAddon> addons = new ArrayList<>();

View File

@ -1,14 +1,15 @@
package us.tastybento.bskyblock.managers;
import org.bukkit.command.Command;
import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.api.BSModule;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.bukkit.command.Command;
import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.api.BSModule;
public final class CommandsManager {
private Map<BSModule, List<Command>> commands = new LinkedHashMap<>();

View File

@ -11,13 +11,11 @@ import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@ -32,7 +30,6 @@ import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.config.Settings;
import us.tastybento.bskyblock.generators.IslandWorld;
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
import us.tastybento.bskyblock.util.placeholders.PlaceholderHandler;
/**
* A set of utility methods

View File

@ -1,11 +1,8 @@
package us.tastybento.bskyblock.util.nms;
import org.bukkit.command.Command;
import org.bukkit.command.CommandMap;
import org.bukkit.entity.Player;
import java.util.Map;
public interface NMSAbstraction {
/**

View File

@ -2,6 +2,7 @@ package us.tastybento.bskyblock.util.nms.fallback;
import org.bukkit.command.CommandMap;
import org.bukkit.entity.Player;
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
public class NMSHandler implements NMSAbstraction {

View File

@ -4,6 +4,7 @@ import org.bukkit.Bukkit;
import org.bukkit.command.CommandMap;
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
import org.bukkit.entity.Player;
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
public class NMSHandler implements NMSAbstraction {