diff --git a/pom.xml b/pom.xml index a4ce163..5707dd1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.loganmagnan - PluginBase + NaturalDisasters 1.0 diff --git a/src/main/java/aether/Aether.java b/src/main/java/aether/Aether.java deleted file mode 100644 index c432e94..0000000 --- a/src/main/java/aether/Aether.java +++ /dev/null @@ -1,201 +0,0 @@ -package aether; - -import aether.event.BoardCreateEvent; -import aether.scoreboard.Board; -import aether.scoreboard.BoardAdapter; -import aether.scoreboard.BoardEntry; -import lombok.Getter; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.plugin.java.JavaPlugin; -import org.bukkit.scheduler.BukkitRunnable; -import org.bukkit.scoreboard.DisplaySlot; -import org.bukkit.scoreboard.Objective; -import org.bukkit.scoreboard.Score; -import org.bukkit.scoreboard.Scoreboard; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import static aether.AetherOptions.defaultOptions; - -public class Aether implements Listener { - - @Getter BoardAdapter adapter; - @Getter private JavaPlugin plugin; - @Getter private AetherOptions options; - - private Pattern HEX_PATTERN = Pattern.compile("&#([A-Fa-f0-9]{6})"); - - public Aether(JavaPlugin plugin, BoardAdapter adapter, AetherOptions options) { - this.options = options; - this.plugin = plugin; - - Bukkit.getPluginManager().registerEvents(this, plugin); - - setAdapter(adapter); - run(); - } - - public Aether(JavaPlugin plugin, BoardAdapter adapter) { - this(plugin, adapter, defaultOptions()); - } - - public Aether(JavaPlugin plugin) { - this(plugin, null, defaultOptions()); - } - - private void run() { - new BukkitRunnable() { - @Override - public void run() { - if (adapter == null) return; - for (Player player : Bukkit.getOnlinePlayers()) { - Board board = Board.getByPlayer(player); - if (board != null) { - List scores = adapter.getScoreboard(player, board, board.getCooldowns()); - List translatedScores = new ArrayList<>(); - if (scores == null) { - if (!board.getEntries().isEmpty()) { - for (BoardEntry boardEntry : board.getEntries()) { - boardEntry.remove(); - } - board.getEntries().clear(); - } - continue; - } - - for (String line : scores) { - translatedScores.add(ChatColor.translateAlternateColorCodes('&', line)); - } - - if (!options.scoreDirectionDown()) { - Collections.reverse(scores); - } - - Scoreboard scoreboard = board.getScoreboard(); - Objective objective = board.getObjective(); - - if (!(objective.getDisplayName().equals(adapter.getTitle(player)))) { - objective.setDisplayName(ChatColor.translateAlternateColorCodes('&', adapter.getTitle(player))); - } - - outer: - for (int i = 0; i < scores.size(); i++) { - String text = scores.get(i); - int position; - if (options.scoreDirectionDown()) { - position = 15 - i; - } else { - position = i + 1; - } - - Iterator iterator = new ArrayList<>(board.getEntries()).iterator(); - while (iterator.hasNext()) { - BoardEntry boardEntry = iterator.next(); - Score score = objective.getScore(boardEntry.getKey()); - - if (score != null && boardEntry.getText().equals(ChatColor.translateAlternateColorCodes('&', text))) { - if (score.getScore() == position) { - continue outer; - } - } - } - - int positionToSearch = options.scoreDirectionDown() ? 15 - position : position - 1; - - iterator = board.getEntries().iterator(); - while (iterator.hasNext()) { - BoardEntry boardEntry = iterator.next(); - int entryPosition = scoreboard.getObjective(DisplaySlot.SIDEBAR).getScore(boardEntry.getKey()).getScore(); - - if (!options.scoreDirectionDown()) { - if (entryPosition > scores.size()) { - iterator.remove(); - boardEntry.remove(); - } - } - - } - - BoardEntry entry = board.getByPosition(positionToSearch); - - if (entry == null) { - new BoardEntry(board, text).send(position); - } else { - entry.setText(text).setup().send(position); - } - - if (board.getEntries().size() > scores.size()) { - iterator = board.getEntries().iterator(); - while (iterator.hasNext()) { - BoardEntry boardEntry = iterator.next(); - if ((!translatedScores.contains(boardEntry.getText())) || Collections.frequency(board.getBoardEntriesFormatted(), boardEntry.getText()) > 1) { - iterator.remove(); - boardEntry.remove(); - } - } - } - } - adapter.onScoreboardCreate(player, scoreboard); - player.setScoreboard(scoreboard); - } - } - } - }.runTaskTimerAsynchronously(plugin, 20L, 2L); - } - - public void setAdapter(BoardAdapter adapter) { - this.adapter = adapter; - for (Player player : Bukkit.getOnlinePlayers()) { - Board board = Board.getByPlayer(player); - if (board != null) { - Board.getBoards().remove(board); - } - Bukkit.getPluginManager().callEvent(new BoardCreateEvent(new Board(player, this, options), player)); - } - } - - @EventHandler - public void onPlayerJoinEvent(PlayerJoinEvent event) { - if (Board.getByPlayer(event.getPlayer()) == null) { - Bukkit.getPluginManager().callEvent(new BoardCreateEvent(new Board(event.getPlayer(), this, options), event.getPlayer())); - } - } - - @EventHandler(priority = EventPriority.HIGHEST) - public void onPlayerQuitEvent(PlayerQuitEvent event) { - Board board = Board.getByPlayer(event.getPlayer()); - if (board != null) { - Board.getBoards().remove(board); - } - } - - public String colorize(String message) { - return ChatColor.translateAlternateColorCodes('&', message); - } - - public String translateHexColorCodes(String message) { - char colorChar = '§'; - Matcher matcher = HEX_PATTERN.matcher(message); - StringBuffer buffer = new StringBuffer(message.length() + 32); - while (matcher.find()) { - String group = matcher.group(1); - matcher.appendReplacement(buffer, "§x§" + group - .charAt(0) + '§' + group.charAt(1) + '§' + group - .charAt(2) + '§' + group.charAt(3) + '§' + group - .charAt(4) + '§' + group.charAt(5)); - } - return matcher.appendTail(buffer).toString(); - } -} diff --git a/src/main/java/aether/AetherOptions.java b/src/main/java/aether/AetherOptions.java deleted file mode 100644 index 526c513..0000000 --- a/src/main/java/aether/AetherOptions.java +++ /dev/null @@ -1,18 +0,0 @@ -package aether; - -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; - -@Getter -@Setter -@Accessors(chain = true, fluent = true) -public class AetherOptions { - - private boolean hook; - private boolean scoreDirectionDown; - - static AetherOptions defaultOptions() { - return new AetherOptions().hook(false).scoreDirectionDown(false); - } -} diff --git a/src/main/java/aether/event/BoardCreateEvent.java b/src/main/java/aether/event/BoardCreateEvent.java deleted file mode 100644 index 0cc018e..0000000 --- a/src/main/java/aether/event/BoardCreateEvent.java +++ /dev/null @@ -1,27 +0,0 @@ -package aether.event; - -import aether.scoreboard.Board; -import lombok.Getter; -import org.bukkit.entity.Player; -import org.bukkit.event.Event; -import org.bukkit.event.HandlerList; - -public class BoardCreateEvent extends Event { - - private static final HandlerList HANDLERS = new HandlerList(); - @Getter private final Board board; - @Getter private final Player player; - - public BoardCreateEvent(Board board, Player player) { - this.board = board; - this.player = player; - } - - public static HandlerList getHandlerList() { - return HANDLERS; - } - - public HandlerList getHandlers() { - return HANDLERS; - } -} diff --git a/src/main/java/aether/scoreboard/Board.java b/src/main/java/aether/scoreboard/Board.java deleted file mode 100644 index 2bdc888..0000000 --- a/src/main/java/aether/scoreboard/Board.java +++ /dev/null @@ -1,129 +0,0 @@ -package aether.scoreboard; - -import aether.Aether; -import aether.AetherOptions; -import aether.scoreboard.cooldown.BoardCooldown; -import lombok.Getter; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.entity.Player; -import org.bukkit.scoreboard.DisplaySlot; -import org.bukkit.scoreboard.Objective; -import org.bukkit.scoreboard.Scoreboard; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -public class Board { - - @Getter private static Set boards = new HashSet<>(); - - private final Aether aether; - private final AetherOptions options; - - @Getter private Scoreboard scoreboard; - @Getter private Player player; - @Getter private Objective objective; - @Getter private Set keys; - @Getter private List entries; - - private Set cooldowns; - - public Board(Player player, Aether aether, AetherOptions options) { - this.player = player; - this.aether = aether; - this.options = options; - - this.keys = new HashSet<>(); - this.entries = new ArrayList<>(); - - this.cooldowns = new HashSet<>(); - - setup(); - } - - public static Board getByPlayer(Player player) { - for (Board board : boards) { - if (board.getPlayer().getName().equals(player.getName())) { - return board; - } - } - - return null; - } - - private void setup() { - if (options.hook() && !player.getScoreboard().equals(Bukkit.getScoreboardManager().getMainScoreboard())) { - scoreboard = player.getScoreboard(); - } else { - scoreboard = Bukkit.getScoreboardManager().getNewScoreboard(); - } - - objective = scoreboard.registerNewObjective("glaedr_is_shit", "dummy"); - objective.setDisplaySlot(DisplaySlot.SIDEBAR); - - if (aether.getAdapter() != null) { - objective.setDisplayName(ChatColor.translateAlternateColorCodes('&', aether.getAdapter().getTitle(player))); - } else { - objective.setDisplayName("Default Title"); - } - - boards.add(this); - } - - public String getNewKey(BoardEntry entry) { - for (ChatColor color : ChatColor.values()) { - String colorText = color + "" + ChatColor.WHITE; - if (entry.getText().length() > 16) { - String sub = entry.getText().substring(0, 16); - colorText = colorText + ChatColor.getLastColors(sub); - } - - if (!keys.contains(colorText)) { - keys.add(colorText); - return colorText; - } - } - - throw new IndexOutOfBoundsException("No more keys available!"); - } - - public List getBoardEntriesFormatted() { - List toReturn = new ArrayList<>(); - for (BoardEntry entry : new ArrayList<>(entries)) { - toReturn.add(entry.getText()); - } - - return toReturn; - } - - public BoardEntry getByPosition(int position) { - int i = 0; - - for (BoardEntry board : entries) { - if (i == position) { - return board; - } - i++; - } - - return null; - } - - public BoardCooldown getCooldown(String id) { - for (BoardCooldown cooldown : getCooldowns()) { - if (cooldown.getId().equals(id)) { - return cooldown; - } - } - - return null; - } - - public Set getCooldowns() { - cooldowns.removeIf(cooldown -> System.currentTimeMillis() >= cooldown.getEnd()); - return cooldowns; - } -} diff --git a/src/main/java/aether/scoreboard/BoardAdapter.java b/src/main/java/aether/scoreboard/BoardAdapter.java deleted file mode 100644 index 2b1b1b8..0000000 --- a/src/main/java/aether/scoreboard/BoardAdapter.java +++ /dev/null @@ -1,17 +0,0 @@ -package aether.scoreboard; - -import aether.scoreboard.cooldown.BoardCooldown; -import org.bukkit.entity.Player; -import org.bukkit.scoreboard.Scoreboard; - -import java.util.List; -import java.util.Set; - -public interface BoardAdapter { - - String getTitle(Player player); - - List getScoreboard(Player player, Board board, Set cooldowns); - - void onScoreboardCreate(Player player, Scoreboard board); -} diff --git a/src/main/java/aether/scoreboard/BoardEntry.java b/src/main/java/aether/scoreboard/BoardEntry.java deleted file mode 100644 index 903832e..0000000 --- a/src/main/java/aether/scoreboard/BoardEntry.java +++ /dev/null @@ -1,90 +0,0 @@ -package aether.scoreboard; - -import lombok.Getter; -import lombok.Setter; -import lombok.experimental.Accessors; -import org.bukkit.ChatColor; -import org.bukkit.scoreboard.Objective; -import org.bukkit.scoreboard.Score; -import org.bukkit.scoreboard.Scoreboard; -import org.bukkit.scoreboard.Team; - -@Accessors(chain = true) -public class BoardEntry { - - @Getter private Board board; - @Getter @Setter private String text; - @Getter private String originalText; - @Getter private String key; - @Getter private Team team; - - public BoardEntry(Board board, String text) { - this.board = board; - this.text = text; - this.originalText = text; - this.key = board.getNewKey(this); - - setup(); - } - - public BoardEntry setup() { - Scoreboard scoreboard = board.getScoreboard(); - - text = ChatColor.translateAlternateColorCodes('&', text); - - String teamName = key; - - if (teamName.length() > 16) { - teamName = teamName.substring(0, 16); - } - - if (scoreboard.getTeam(teamName) != null) { - team = scoreboard.getTeam(teamName); - } else { - team = scoreboard.registerNewTeam(teamName); - } - - if (!(team.getEntries().contains(key))) { - team.addEntry(key); - } - - if (!(board.getEntries().contains(this))) { - board.getEntries().add(this); - } - - return this; - } - - public BoardEntry send(int position) { - Objective objective = board.getObjective(); - - if (text.length() > 16) { - boolean fix = text.toCharArray()[15] == ChatColor.COLOR_CHAR; - - String prefix = fix ? text.substring(0, 15) : text.substring(0, 16); - String suffix = fix ? text.substring(15) : ChatColor.getLastColors(prefix) + text.substring(16); - - team.setPrefix(prefix); - - if (suffix.length() > 16) { - team.setSuffix(suffix.substring(0, 16)); - } else { - team.setSuffix(suffix); - } - } else { - team.setPrefix(text); - team.setSuffix(""); - } - - Score score = objective.getScore(key); - score.setScore(position); - - return this; - } - - public void remove() { - board.getKeys().remove(key); - board.getScoreboard().resetScores(key); - } - -} diff --git a/src/main/java/aether/scoreboard/cooldown/BoardCooldown.java b/src/main/java/aether/scoreboard/cooldown/BoardCooldown.java deleted file mode 100644 index cfb9482..0000000 --- a/src/main/java/aether/scoreboard/cooldown/BoardCooldown.java +++ /dev/null @@ -1,42 +0,0 @@ -package aether.scoreboard.cooldown; - -import aether.scoreboard.Board; -import lombok.Getter; -import org.apache.commons.lang3.time.DurationFormatUtils; - -import java.text.DecimalFormat; - -public class BoardCooldown { - - private static final DecimalFormat SECONDS_FORMATTER = new DecimalFormat("#0.0"); - - @Getter private final Board board; - @Getter private final String id; - @Getter private final double duration; - @Getter private final long end; - - public BoardCooldown(Board board, String id, double duration) { - this.board = board; - this.id = id; - this.duration = duration; - this.end = (long) (System.currentTimeMillis() + (duration * 1000)); - - board.getCooldowns().add(this); - } - - public String getFormattedString(BoardFormat format) { - if (format == null) { - throw new NullPointerException(); - } - if (format == BoardFormat.SECONDS) { - return SECONDS_FORMATTER.format(((end - System.currentTimeMillis()) / 1000.0f)); - } else { - return DurationFormatUtils.formatDuration(end - System.currentTimeMillis(), "mm:ss"); - } - } - - public void cancel() { - board.getCooldowns().remove(this); - } - -} \ No newline at end of file diff --git a/src/main/java/aether/scoreboard/cooldown/BoardFormat.java b/src/main/java/aether/scoreboard/cooldown/BoardFormat.java deleted file mode 100644 index 24f34cf..0000000 --- a/src/main/java/aether/scoreboard/cooldown/BoardFormat.java +++ /dev/null @@ -1,5 +0,0 @@ -package aether.scoreboard.cooldown; - -public enum BoardFormat { - SECONDS, MINUTES, HOURS -} diff --git a/src/main/java/com/loganmagnan/pluginbase/PluginBase.java b/src/main/java/com/loganmagnan/naturaldisasters/NaturalDisasters.java similarity index 67% rename from src/main/java/com/loganmagnan/pluginbase/PluginBase.java rename to src/main/java/com/loganmagnan/naturaldisasters/NaturalDisasters.java index 49075ff..a6d6a95 100644 --- a/src/main/java/com/loganmagnan/pluginbase/PluginBase.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/NaturalDisasters.java @@ -1,12 +1,13 @@ -package com.loganmagnan.pluginbase; +package com.loganmagnan.naturaldisasters; -import com.loganmagnan.pluginbase.menusystem.PlayerMenuUtil; -import com.loganmagnan.pluginbase.utils.ClassRegistrationUtils; -import com.loganmagnan.pluginbase.utils.ColorUtils; -import com.loganmagnan.pluginbase.utils.Utils; -import com.loganmagnan.pluginbase.utils.command.CommandFramework; -import com.loganmagnan.pluginbase.utils.config.FileConfig; -import com.loganmagnan.pluginbase.utils.config.file.Config; +import com.loganmagnan.naturaldisasters.managers.naturaldisasters.NaturalDisasterManager; +import com.loganmagnan.naturaldisasters.menusystem.PlayerMenuUtil; +import com.loganmagnan.naturaldisasters.utils.ClassRegistrationUtils; +import com.loganmagnan.naturaldisasters.utils.ColorUtils; +import com.loganmagnan.naturaldisasters.utils.Utils; +import com.loganmagnan.naturaldisasters.utils.command.CommandFramework; +import com.loganmagnan.naturaldisasters.utils.config.FileConfig; +import com.loganmagnan.naturaldisasters.utils.config.file.Config; import lombok.Getter; import lombok.Setter; import org.bukkit.entity.Player; @@ -15,16 +16,17 @@ import java.util.HashMap; @Getter @Setter -public class PluginBase extends JavaPlugin { +public class NaturalDisasters extends JavaPlugin { // Main class instance - @Getter private static PluginBase instance; + @Getter private static NaturalDisasters instance; // Configuration files private Config mainConfig; private FileConfig messagesConfig; // Managers + private NaturalDisasterManager naturalDisasterManager; // Menu system private HashMap playerMenuUtilMap = new HashMap<>(); @@ -45,7 +47,7 @@ public class PluginBase extends JavaPlugin { // Say the plugin's name this.getServer().getConsoleSender().sendMessage(Utils.chatBar); - this.getServer().getConsoleSender().sendMessage(ColorUtils.getMessageType("&dPluginBase &7- &av" + this.getDescription().getVersion())); + this.getServer().getConsoleSender().sendMessage(ColorUtils.getMessageType("&dNaturalDisasters &7- &av" + this.getDescription().getVersion())); this.getServer().getConsoleSender().sendMessage(ColorUtils.getMessageType("&7Made by &eLoganM Development")); this.getServer().getConsoleSender().sendMessage(Utils.chatBar); @@ -65,17 +67,17 @@ public class PluginBase extends JavaPlugin { // Load commands function private void loadCommands() { - ClassRegistrationUtils.loadCommands("com.loganmagnan.pluginbase.commands"); + ClassRegistrationUtils.loadCommands("com.loganmagnan.naturaldisasters.commands"); } // Load managers function private void loadManagers() { - + this.naturalDisasterManager = new NaturalDisasterManager(); } // Load listeners function private void loadListeners() { - ClassRegistrationUtils.loadListeners("com.loganmagnan.pluginbase.listeners"); + ClassRegistrationUtils.loadListeners("com.loganmagnan.naturaldisasters.listeners"); } // Load runnables function diff --git a/src/main/java/com/loganmagnan/pluginbase/chatcolor/ColorSet.java b/src/main/java/com/loganmagnan/naturaldisasters/chatcolor/ColorSet.java similarity index 85% rename from src/main/java/com/loganmagnan/pluginbase/chatcolor/ColorSet.java rename to src/main/java/com/loganmagnan/naturaldisasters/chatcolor/ColorSet.java index 8c8da2d..6037110 100644 --- a/src/main/java/com/loganmagnan/pluginbase/chatcolor/ColorSet.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/chatcolor/ColorSet.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.chatcolor; +package com.loganmagnan.naturaldisasters.chatcolor; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/com/loganmagnan/pluginbase/chatcolor/GradientColor.java b/src/main/java/com/loganmagnan/naturaldisasters/chatcolor/GradientColor.java similarity index 86% rename from src/main/java/com/loganmagnan/pluginbase/chatcolor/GradientColor.java rename to src/main/java/com/loganmagnan/naturaldisasters/chatcolor/GradientColor.java index 1d6133f..1c08f3b 100644 --- a/src/main/java/com/loganmagnan/pluginbase/chatcolor/GradientColor.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/chatcolor/GradientColor.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.chatcolor; +package com.loganmagnan.naturaldisasters.chatcolor; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/com/loganmagnan/naturaldisasters/commands/ExampleCommand.java b/src/main/java/com/loganmagnan/naturaldisasters/commands/ExampleCommand.java new file mode 100644 index 0000000..0fe6c83 --- /dev/null +++ b/src/main/java/com/loganmagnan/naturaldisasters/commands/ExampleCommand.java @@ -0,0 +1,25 @@ +package com.loganmagnan.naturaldisasters.commands; + +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import com.loganmagnan.naturaldisasters.utils.ColorUtils; +import com.loganmagnan.naturaldisasters.utils.command.BaseCommand; +import com.loganmagnan.naturaldisasters.utils.command.Command; +import com.loganmagnan.naturaldisasters.utils.command.CommandArguments; +import org.bukkit.entity.Player; + +public class ExampleCommand extends BaseCommand { + + private NaturalDisasters main = NaturalDisasters.getInstance(); + + @Command(name = "example", permission = "permission.example") + @Override + public void executeAs(CommandArguments command) { + Player player = command.getPlayer(); + + String[] args = command.getArgs(); + + if (args.length == 0) { + player.sendMessage(ColorUtils.getMessageType("&aThis is an example command.")); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/loganmagnan/pluginbase/listeners/MenuListener.java b/src/main/java/com/loganmagnan/naturaldisasters/listeners/MenuListener.java similarity index 73% rename from src/main/java/com/loganmagnan/pluginbase/listeners/MenuListener.java rename to src/main/java/com/loganmagnan/naturaldisasters/listeners/MenuListener.java index 02b1232..caa0a10 100644 --- a/src/main/java/com/loganmagnan/pluginbase/listeners/MenuListener.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/listeners/MenuListener.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.listeners; +package com.loganmagnan.naturaldisasters.listeners; -import com.loganmagnan.pluginbase.PluginBase; -import com.loganmagnan.pluginbase.menusystem.Menu; +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import com.loganmagnan.naturaldisasters.menusystem.Menu; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; @@ -9,7 +9,7 @@ import org.bukkit.inventory.InventoryHolder; public class MenuListener implements Listener { - private PluginBase main = PluginBase.getInstance(); + private NaturalDisasters main = NaturalDisasters.getInstance(); @EventHandler public void onMenuClick(InventoryClickEvent event) { diff --git a/src/main/java/com/loganmagnan/naturaldisasters/managers/naturaldisasters/NaturalDisasterManager.java b/src/main/java/com/loganmagnan/naturaldisasters/managers/naturaldisasters/NaturalDisasterManager.java new file mode 100644 index 0000000..2261f44 --- /dev/null +++ b/src/main/java/com/loganmagnan/naturaldisasters/managers/naturaldisasters/NaturalDisasterManager.java @@ -0,0 +1,21 @@ +package com.loganmagnan.naturaldisasters.managers.naturaldisasters; + +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import lombok.Getter; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +@Getter +@Setter +public class NaturalDisasterManager { + + private NaturalDisasters main = NaturalDisasters.getInstance(); + + private Map naturalDisasters = new HashMap(); + + public NaturalDisasterManager() { + + } +} diff --git a/src/main/java/com/loganmagnan/naturaldisasters/managers/naturaldisasters/NaturalDisasterType.java b/src/main/java/com/loganmagnan/naturaldisasters/managers/naturaldisasters/NaturalDisasterType.java new file mode 100644 index 0000000..8e03c6b --- /dev/null +++ b/src/main/java/com/loganmagnan/naturaldisasters/managers/naturaldisasters/NaturalDisasterType.java @@ -0,0 +1,92 @@ +package com.loganmagnan.naturaldisasters.managers.naturaldisasters; + +public enum NaturalDisasterType { + + AVALANCHE, + ASHFALL, + ARIDIFICATION, + BLIZZARD, + BUSHFIRE, + BARREN_LAND_EXPANSION, + CYCLONE, + COLD_WAVE, + COASTAL_EROSION, + CROP_FAILURE, + DROUGHT, + DUST_STORM, + DEBRIS_FLOW, + DAM_FAILURE, + EARTHQUAKE, + EPIDEMIC, + EROSION, + EXTREME_HEAT, + FLOOD, + FAMINE, + FIRESTORM, + FLASH_FLOOD, + FREEZING_RAIN, + GROUND_COLLAPSE, + GLACIER_COLLAPSE, + GEYSER_ERUPTION, + HURRICANE, + HEAT_WAVE, + HAILSTORM, + HABOOB, + ICE_STORM, + INLAND_FLOODING, + INSECT_INFESTATION, + JUNGLE_FIRE, + JET_STREAM_SHIFT, + KARST_COLLAPSE, + KRAKATOA_TYPE_ERUPTION, + LANDSLIDE, + LIGHTNING_STORM, + LAVA_FLOW, + LIMNIC_ERUPTION, + MUDSLIDE, + MONSOON_FLOODING, + METEOR_STRIKE, + MEGA_TSUNAMI, + NUCLEAR_DISASTER, + NIGHT_FROST, + OCEAN_SWELL, + OIL_SPILL, + OUTBURST_FLOOD, + PANDEMIC, + PLAGUE, + PERMAFROST_MELTING, + QUICKSAND_FORMATION, + QUAKE_INDUCED_TSUNAMI, + QUASAR_ERUPTION, + ROCKFALL, + RIVERBANK_EROSION, + ROGUE_WAVE, + RADIATION_RELEASE, + STORM_SURGE, + SNOW_STORM, + SANDSTORM, + SINKHOLE, + SEVERE_THUNDERSTORM, + SOLAR_FLARE, + TORNADO, + TSUNAMI, + TYPHOON, + TUNDRA_THAWING, + UNDERWATER_ERUPTION, + UNSEASONAL_WEATHER_EXTREMES, + URBAN_FLOODING, + VOLCANIC_ERUPTION, + VALLEY_FLOODING, + VOLCANIC_MUDFLOW, + WILDFIRE, + WATERSPOUT, + WINDSTORM, + WINTER_STORM, + X_CATEGORY_CYCLONES, + X_FACTOR_DROUGHT, + YELLOW_DUST_STORM, + YEDOMA_THAWING, + ZUD, + ZONE_COLLAPSE, + ZEPHYR_WINDS; +} diff --git a/src/main/java/com/loganmagnan/pluginbase/menusystem/ItemStackButton.java b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/ItemStackButton.java similarity index 80% rename from src/main/java/com/loganmagnan/pluginbase/menusystem/ItemStackButton.java rename to src/main/java/com/loganmagnan/naturaldisasters/menusystem/ItemStackButton.java index f92313f..a323bc7 100644 --- a/src/main/java/com/loganmagnan/pluginbase/menusystem/ItemStackButton.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/ItemStackButton.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.menusystem; +package com.loganmagnan.naturaldisasters.menusystem; -import com.loganmagnan.pluginbase.utils.ColorUtils; -import com.loganmagnan.pluginbase.utils.ItemBuilder; +import com.loganmagnan.naturaldisasters.utils.ColorUtils; +import com.loganmagnan.naturaldisasters.utils.ItemBuilder; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/loganmagnan/pluginbase/menusystem/Menu.java b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/Menu.java similarity index 94% rename from src/main/java/com/loganmagnan/pluginbase/menusystem/Menu.java rename to src/main/java/com/loganmagnan/naturaldisasters/menusystem/Menu.java index 952cdba..ed8316b 100644 --- a/src/main/java/com/loganmagnan/pluginbase/menusystem/Menu.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/Menu.java @@ -1,6 +1,6 @@ -package com.loganmagnan.pluginbase.menusystem; +package com.loganmagnan.naturaldisasters.menusystem; -import com.loganmagnan.pluginbase.utils.ItemBuilder; +import com.loganmagnan.naturaldisasters.utils.ItemBuilder; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/src/main/java/com/loganmagnan/pluginbase/menusystem/PaginatedMenu.java b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/PaginatedMenu.java similarity index 93% rename from src/main/java/com/loganmagnan/pluginbase/menusystem/PaginatedMenu.java rename to src/main/java/com/loganmagnan/naturaldisasters/menusystem/PaginatedMenu.java index 9bcc2dc..9902104 100644 --- a/src/main/java/com/loganmagnan/pluginbase/menusystem/PaginatedMenu.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/PaginatedMenu.java @@ -1,6 +1,6 @@ -package com.loganmagnan.pluginbase.menusystem; +package com.loganmagnan.naturaldisasters.menusystem; -import com.loganmagnan.pluginbase.utils.ColorUtils; +import com.loganmagnan.naturaldisasters.utils.ColorUtils; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/com/loganmagnan/pluginbase/menusystem/PlayerMenuUtil.java b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/PlayerMenuUtil.java similarity index 85% rename from src/main/java/com/loganmagnan/pluginbase/menusystem/PlayerMenuUtil.java rename to src/main/java/com/loganmagnan/naturaldisasters/menusystem/PlayerMenuUtil.java index 9137a38..5e5c0dc 100644 --- a/src/main/java/com/loganmagnan/pluginbase/menusystem/PlayerMenuUtil.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/menusystem/PlayerMenuUtil.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.menusystem; +package com.loganmagnan.naturaldisasters.menusystem; import org.bukkit.entity.Player; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/AsyncScheduler.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/AsyncScheduler.java similarity index 95% rename from src/main/java/com/loganmagnan/pluginbase/utils/AsyncScheduler.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/AsyncScheduler.java index 70aed45..d967ccc 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/AsyncScheduler.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/AsyncScheduler.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import com.google.common.util.concurrent.ThreadFactoryBuilder; import lombok.experimental.UtilityClass; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/BlockUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/BlockUtils.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/BlockUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/BlockUtils.java index 1cfafbf..c72e389 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/BlockUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/BlockUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/Cache.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/Cache.java similarity index 93% rename from src/main/java/com/loganmagnan/pluginbase/utils/Cache.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/Cache.java index 97d5fb7..0ea4cba 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/Cache.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/Cache.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; public class Cache { diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/CachedInventory.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/CachedInventory.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/CachedInventory.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/CachedInventory.java index b9b8be4..b918612 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/CachedInventory.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/CachedInventory.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import com.google.gson.JsonArray; import com.google.gson.JsonObject; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/ClassRegistrationUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/ClassRegistrationUtils.java similarity index 88% rename from src/main/java/com/loganmagnan/pluginbase/utils/ClassRegistrationUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/ClassRegistrationUtils.java index ed0ebf9..04176c8 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/ClassRegistrationUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/ClassRegistrationUtils.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import com.google.common.collect.ImmutableSet; -import com.loganmagnan.pluginbase.PluginBase; +import com.loganmagnan.naturaldisasters.NaturalDisasters; import org.bukkit.event.Listener; import java.io.IOException; @@ -19,7 +19,7 @@ public class ClassRegistrationUtils { for (Class clazz : getClassesInPackage(packageName)) { if (isListener(clazz)) { try { - PluginBase.getInstance().getServer().getPluginManager().registerEvents((Listener) clazz.newInstance(), PluginBase.getInstance()); + NaturalDisasters.getInstance().getServer().getPluginManager().registerEvents((Listener) clazz.newInstance(), NaturalDisasters.getInstance()); } catch (Exception exception) { exception.printStackTrace(); } @@ -50,7 +50,7 @@ public class ClassRegistrationUtils { public static Collection> getClassesInPackage(String packageName) { JarFile jarFile; Collection> classes = new ArrayList<>(); - CodeSource codeSource = PluginBase.getInstance().getClass().getProtectionDomain().getCodeSource(); + CodeSource codeSource = NaturalDisasters.getInstance().getClass().getProtectionDomain().getCodeSource(); URL resource = codeSource.getLocation(); String relPath = packageName.replace('.', '/'); diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/Clickable.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/Clickable.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/Clickable.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/Clickable.java index f2cc33c..15c341c 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/Clickable.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/Clickable.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import lombok.NoArgsConstructor; import net.md_5.bungee.api.chat.ClickEvent; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/ColorUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/ColorUtils.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/ColorUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/ColorUtils.java index aa1b190..dd6a7f4 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/ColorUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/ColorUtils.java @@ -1,6 +1,6 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; -import com.loganmagnan.pluginbase.chatcolor.ColorSet; +import com.loganmagnan.naturaldisasters.chatcolor.ColorSet; import lombok.Getter; import lombok.Setter; import net.md_5.bungee.api.ChatColor; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/ConfigUpdater.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/ConfigUpdater.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/ConfigUpdater.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/ConfigUpdater.java index 3cad316..b56bf66 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/ConfigUpdater.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/ConfigUpdater.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import com.google.common.base.Preconditions; import org.bukkit.configuration.ConfigurationSection; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/Cuboid.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/Cuboid.java similarity index 95% rename from src/main/java/com/loganmagnan/pluginbase/utils/Cuboid.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/Cuboid.java index d4e08c1..5752d1b 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/Cuboid.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/Cuboid.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Location; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/CustomLocation.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/CustomLocation.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/CustomLocation.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/CustomLocation.java index dc68ca2..6f00d7a 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/CustomLocation.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/CustomLocation.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/ItemBuilder.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/ItemBuilder.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/ItemBuilder.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/ItemBuilder.java index 25113c9..a4d8984 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/ItemBuilder.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/ItemBuilder.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.ChatColor; import org.bukkit.Color; @@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.LeatherArmorMeta; import org.bukkit.inventory.meta.SkullMeta; -import org.bukkit.material.MaterialData; import org.bukkit.util.io.BukkitObjectInputStream; import org.bukkit.util.io.BukkitObjectOutputStream; import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/ItemUtil.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/ItemUtil.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/ItemUtil.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/ItemUtil.java index cee868b..c4e72ae 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/ItemUtil.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/ItemUtil.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/KeyBuilder.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/KeyBuilder.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/KeyBuilder.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/KeyBuilder.java index f8482a8..10ae6ea 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/KeyBuilder.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/KeyBuilder.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.configuration.file.FileConfiguration; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/KeyUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/KeyUtils.java similarity index 93% rename from src/main/java/com/loganmagnan/pluginbase/utils/KeyUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/KeyUtils.java index 17f617e..c33fa1c 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/KeyUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/KeyUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; public class KeyUtils { diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/LocationUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/LocationUtils.java similarity index 94% rename from src/main/java/com/loganmagnan/pluginbase/utils/LocationUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/LocationUtils.java index 4121ed0..11474d5 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/LocationUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/LocationUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Location; import org.bukkit.block.Block; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/MathUtil.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/MathUtil.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/MathUtil.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/MathUtil.java index c1c4836..2d68879 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/MathUtil.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/MathUtil.java @@ -1,4 +1,4 @@ - package com.loganmagnan.pluginbase.utils; + package com.loganmagnan.naturaldisasters.utils; import java.util.Random; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/NBTEditor.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/NBTEditor.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/NBTEditor.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/NBTEditor.java index b05f7af..34a9008 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/NBTEditor.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/NBTEditor.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/Pair.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/Pair.java similarity index 83% rename from src/main/java/com/loganmagnan/pluginbase/utils/Pair.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/Pair.java index 87a3a3a..2fe41ae 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/Pair.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/Pair.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/ParameterType.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/ParameterType.java similarity index 86% rename from src/main/java/com/loganmagnan/pluginbase/utils/ParameterType.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/ParameterType.java index 0f580df..b9c3669 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/ParameterType.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/ParameterType.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/PlayerHeadUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/PlayerHeadUtils.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/PlayerHeadUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/PlayerHeadUtils.java index ef8da7b..febe47a 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/PlayerHeadUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/PlayerHeadUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/PlayerUtil.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/PlayerUtil.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/PlayerUtil.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/PlayerUtil.java index 708fb17..d0a5d9f 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/PlayerUtil.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/PlayerUtil.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.GameMode; import org.bukkit.entity.Player; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/SpigotUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/SpigotUtils.java similarity index 97% rename from src/main/java/com/loganmagnan/pluginbase/utils/SpigotUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/SpigotUtils.java index cec8408..8190378 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/SpigotUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/SpigotUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.ChatColor; import org.bukkit.entity.Player; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/StringUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/StringUtils.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/StringUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/StringUtils.java index dadae28..d1f389a 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/StringUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/StringUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/TeamAction.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/TeamAction.java similarity index 57% rename from src/main/java/com/loganmagnan/pluginbase/utils/TeamAction.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/TeamAction.java index 3b5c536..357021f 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/TeamAction.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/TeamAction.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; public enum TeamAction { diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/TimeUtil.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/TimeUtil.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/TimeUtil.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/TimeUtil.java index 1e182b2..51b698c 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/TimeUtil.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/TimeUtil.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import java.sql.Timestamp; import java.text.DecimalFormat; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/TimeUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/TimeUtils.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/TimeUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/TimeUtils.java index 38613c2..770a667 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/TimeUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/TimeUtils.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import java.text.SimpleDateFormat; import java.util.Date; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/TimerRunnable.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/TimerRunnable.java similarity index 94% rename from src/main/java/com/loganmagnan/pluginbase/utils/TimerRunnable.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/TimerRunnable.java index e6c8c4e..a2bd298 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/TimerRunnable.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/TimerRunnable.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import java.util.concurrent.ScheduledFuture; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/TtlHandler.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/TtlHandler.java similarity index 68% rename from src/main/java/com/loganmagnan/pluginbase/utils/TtlHandler.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/TtlHandler.java index 1f1f3e8..ebfdd4c 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/TtlHandler.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/TtlHandler.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; public interface TtlHandler { diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/TtlHashMap.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/TtlHashMap.java similarity index 98% rename from src/main/java/com/loganmagnan/pluginbase/utils/TtlHashMap.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/TtlHashMap.java index 162c9d5..7a4a34a 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/TtlHashMap.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/TtlHashMap.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Bukkit; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/Utils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/Utils.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/Utils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/Utils.java index dbc8d5a..dc08edd 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/Utils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/Utils.java @@ -1,6 +1,6 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; -import com.loganmagnan.pluginbase.PluginBase; +import com.loganmagnan.naturaldisasters.NaturalDisasters; import net.md_5.bungee.api.ChatColor; import org.bukkit.Location; import org.bukkit.block.Block; @@ -11,7 +11,7 @@ import java.util.concurrent.TimeUnit; public class Utils { - private PluginBase main = PluginBase.getInstance(); + private NaturalDisasters main = NaturalDisasters.getInstance(); public static String scoreboardBar = org.bukkit.ChatColor.GRAY.toString() + org.bukkit.ChatColor.STRIKETHROUGH + "----------------------"; public static String chatBar = org.bukkit.ChatColor.GRAY.toString() + org.bukkit.ChatColor.STRIKETHROUGH + "--------------------------------------------"; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/Vector3.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/Vector3.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/Vector3.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/Vector3.java index d466b11..2b54a45 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/Vector3.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/Vector3.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils; +package com.loganmagnan.naturaldisasters.utils; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/WorldUtils.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/WorldUtils.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/WorldUtils.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/WorldUtils.java index 61c558e..366403f 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/WorldUtils.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/WorldUtils.java @@ -1,4 +1,4 @@ - package com.loganmagnan.pluginbase.utils; + package com.loganmagnan.naturaldisasters.utils; import org.bukkit.*; import org.bukkit.block.Block; diff --git a/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BaseCommand.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BaseCommand.java new file mode 100644 index 0000000..df21852 --- /dev/null +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BaseCommand.java @@ -0,0 +1,12 @@ +package com.loganmagnan.naturaldisasters.utils.command; + +import com.loganmagnan.naturaldisasters.NaturalDisasters; + +public abstract class BaseCommand { + + public BaseCommand() { + NaturalDisasters.getInstance().getCommandFramework().registerCommands(this, null); + } + + public abstract void executeAs(CommandArguments command); +} diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/BukkitCommand.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BukkitCommand.java similarity index 97% rename from src/main/java/com/loganmagnan/pluginbase/utils/command/BukkitCommand.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/command/BukkitCommand.java index 95830b7..dea0a1a 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/BukkitCommand.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BukkitCommand.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.command; +package com.loganmagnan.naturaldisasters.utils.command; import org.apache.commons.lang3.Validate; import org.bukkit.command.Command; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/BukkitCompleter.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BukkitCompleter.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/command/BukkitCompleter.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/command/BukkitCompleter.java index a8823e5..fc7f8c5 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/BukkitCompleter.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/BukkitCompleter.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.command; +package com.loganmagnan.naturaldisasters.utils.command; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/Command.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/Command.java similarity index 89% rename from src/main/java/com/loganmagnan/pluginbase/utils/command/Command.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/command/Command.java index d1e5388..2db4d12 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/Command.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/Command.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.command; +package com.loganmagnan.naturaldisasters.utils.command; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/CommandArguments.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/CommandArguments.java similarity index 95% rename from src/main/java/com/loganmagnan/pluginbase/utils/command/CommandArguments.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/command/CommandArguments.java index 46cfeb7..004b613 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/CommandArguments.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/CommandArguments.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.command; +package com.loganmagnan.naturaldisasters.utils.command; import lombok.Getter; import org.bukkit.command.CommandSender; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/CommandFramework.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/CommandFramework.java similarity index 96% rename from src/main/java/com/loganmagnan/pluginbase/utils/command/CommandFramework.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/command/CommandFramework.java index 4ce216b..97f340d 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/CommandFramework.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/CommandFramework.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.utils.command; +package com.loganmagnan.naturaldisasters.utils.command; -import com.loganmagnan.pluginbase.PluginBase; -import com.loganmagnan.pluginbase.utils.ColorUtils; +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import com.loganmagnan.naturaldisasters.utils.ColorUtils; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandMap; import org.bukkit.command.CommandSender; @@ -20,11 +20,11 @@ import java.util.Map.Entry; public class CommandFramework implements CommandExecutor { - private PluginBase plugin; + private NaturalDisasters plugin; private Map> commandMap = new HashMap<>(); private CommandMap map; - public CommandFramework(PluginBase plugin) { + public CommandFramework(NaturalDisasters plugin) { this.plugin = plugin; if (plugin.getServer().getPluginManager() instanceof SimplePluginManager) { diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/Completer.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/Completer.java similarity index 84% rename from src/main/java/com/loganmagnan/pluginbase/utils/command/Completer.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/command/Completer.java index 4350b13..b173a45 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/Completer.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/command/Completer.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.command; +package com.loganmagnan.naturaldisasters.utils.command; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/config/ConfigCursor.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/ConfigCursor.java similarity index 97% rename from src/main/java/com/loganmagnan/pluginbase/utils/config/ConfigCursor.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/config/ConfigCursor.java index 8b7277a..812d407 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/config/ConfigCursor.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/ConfigCursor.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.config; +package com.loganmagnan.naturaldisasters.utils.config; import org.bukkit.Bukkit; import org.bukkit.World; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/config/FileConfig.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/FileConfig.java similarity index 85% rename from src/main/java/com/loganmagnan/pluginbase/utils/config/FileConfig.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/config/FileConfig.java index aaac4da..9b4857e 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/config/FileConfig.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/FileConfig.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.utils.config; +package com.loganmagnan.naturaldisasters.utils.config; -import com.loganmagnan.pluginbase.PluginBase; -import com.loganmagnan.pluginbase.utils.ConfigUpdater; +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import com.loganmagnan.naturaldisasters.utils.ConfigUpdater; import org.bukkit.Bukkit; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; @@ -41,7 +41,7 @@ public class FileConfig { try { if (update) { - ConfigUpdater.update(PluginBase.getInstance(), fileName, this.file); + ConfigUpdater.update(NaturalDisasters.getInstance(), fileName, this.file); } } catch (Exception exception) { exception.printStackTrace(); diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/config/file/Config.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/file/Config.java similarity index 79% rename from src/main/java/com/loganmagnan/pluginbase/utils/config/file/Config.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/config/file/Config.java index afa6a19..830b45b 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/config/file/Config.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/file/Config.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.utils.config.file; +package com.loganmagnan.naturaldisasters.utils.config.file; -import com.loganmagnan.pluginbase.PluginBase; -import com.loganmagnan.pluginbase.utils.ConfigUpdater; +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import com.loganmagnan.naturaldisasters.utils.ConfigUpdater; import lombok.Getter; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; @@ -31,7 +31,7 @@ public class Config { try { if (update) { - ConfigUpdater.update(PluginBase.getInstance(), name + ".yml", this.configFile); + ConfigUpdater.update(NaturalDisasters.getInstance(), name + ".yml", this.configFile); } } catch (Exception exception) { exception.printStackTrace(); diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/config/file/ConfigFile.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/file/ConfigFile.java similarity index 92% rename from src/main/java/com/loganmagnan/pluginbase/utils/config/file/ConfigFile.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/config/file/ConfigFile.java index 5adbf74..bace53b 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/config/file/ConfigFile.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/config/file/ConfigFile.java @@ -1,7 +1,7 @@ -package com.loganmagnan.pluginbase.utils.config.file; +package com.loganmagnan.naturaldisasters.utils.config.file; -import com.loganmagnan.pluginbase.PluginBase; -import com.loganmagnan.pluginbase.utils.ConfigUpdater; +import com.loganmagnan.naturaldisasters.NaturalDisasters; +import com.loganmagnan.naturaldisasters.utils.ConfigUpdater; import lombok.Getter; import org.bukkit.ChatColor; import org.bukkit.configuration.file.YamlConfiguration; @@ -27,7 +27,7 @@ public class ConfigFile { plugin.saveResource(name + ".yml", false); try { - ConfigUpdater.update(PluginBase.getInstance(), name + ".yml", this.file); + ConfigUpdater.update(NaturalDisasters.getInstance(), name + ".yml", this.file); } catch (Exception exception) { exception.printStackTrace(); } diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/Cuboid.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/Cuboid.java similarity index 99% rename from src/main/java/com/loganmagnan/pluginbase/utils/cuboid/Cuboid.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/Cuboid.java index d5fe1b9..56ecc19 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/Cuboid.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/Cuboid.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.cuboid; +package com.loganmagnan.naturaldisasters.utils.cuboid; import com.google.common.base.Preconditions; import org.bukkit.*; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidBlockIterator.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidBlockIterator.java similarity index 97% rename from src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidBlockIterator.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidBlockIterator.java index 665be5d..fd1e6cc 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidBlockIterator.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidBlockIterator.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.cuboid; +package com.loganmagnan.naturaldisasters.utils.cuboid; import org.bukkit.World; import org.bukkit.block.Block; diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidDirection.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidDirection.java similarity index 94% rename from src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidDirection.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidDirection.java index 0298b22..9e54213 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidDirection.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidDirection.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.cuboid; +package com.loganmagnan.naturaldisasters.utils.cuboid; public enum CuboidDirection { diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidLocationIterator.java b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidLocationIterator.java similarity index 97% rename from src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidLocationIterator.java rename to src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidLocationIterator.java index aa3cd18..2e835af 100644 --- a/src/main/java/com/loganmagnan/pluginbase/utils/cuboid/CuboidLocationIterator.java +++ b/src/main/java/com/loganmagnan/naturaldisasters/utils/cuboid/CuboidLocationIterator.java @@ -1,4 +1,4 @@ -package com.loganmagnan.pluginbase.utils.cuboid; +package com.loganmagnan.naturaldisasters.utils.cuboid; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/main/java/com/loganmagnan/pluginbase/commands/ExampleCommand.java b/src/main/java/com/loganmagnan/pluginbase/commands/ExampleCommand.java deleted file mode 100644 index 46f93d2..0000000 --- a/src/main/java/com/loganmagnan/pluginbase/commands/ExampleCommand.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.loganmagnan.pluginbase.commands; - -import com.loganmagnan.pluginbase.PluginBase; -import com.loganmagnan.pluginbase.utils.ColorUtils; -import com.loganmagnan.pluginbase.utils.CustomLocation; -import com.loganmagnan.pluginbase.utils.command.BaseCommand; -import com.loganmagnan.pluginbase.utils.command.Command; -import com.loganmagnan.pluginbase.utils.command.CommandArguments; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; - -public class ExampleCommand extends BaseCommand { - - private PluginBase main = PluginBase.getInstance(); - - @Command(name = "example", permission = "permission.example") - @Override - public void executeAs(CommandArguments command) { - Player player = command.getPlayer(); - - String[] args = command.getArgs(); - - if (args.length == 0) { - player.sendMessage(ColorUtils.getMessageType("&aThis is an example command.")); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/loganmagnan/pluginbase/utils/command/BaseCommand.java b/src/main/java/com/loganmagnan/pluginbase/utils/command/BaseCommand.java deleted file mode 100644 index 7225050..0000000 --- a/src/main/java/com/loganmagnan/pluginbase/utils/command/BaseCommand.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.loganmagnan.pluginbase.utils.command; - -import com.loganmagnan.pluginbase.PluginBase; - -public abstract class BaseCommand { - - public BaseCommand() { - PluginBase.getInstance().getCommandFramework().registerCommands(this, null); - } - - public abstract void executeAs(CommandArguments command); -} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index d712f52..48c9eea 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ -name: PluginBase +name: NaturalDisasters author: Trixkz version: 1.0 api-version: 1.13 -main: com.loganmagnan.pluginbase.PluginBase \ No newline at end of file +main: com.loganmagnan.naturaldisasters.NaturalDisasters \ No newline at end of file