Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions PhantomVoting/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
<configuration>
<minimizeJar>true</minimizeJar>
<relocations>
<relocation>
<pattern>dev.jorel.commandapi</pattern>
<shadedPattern>me.fergs.commandapi</shadedPattern>
</relocation>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>me.bstats</shadedPattern>
Expand All @@ -50,14 +46,14 @@
</plugins>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>maven-central</id>
<url>https://oss.sonatype.org/content/groups/public</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>bencodez repo</id>
<url>https://nexus.bencodez.com/repository/maven-public/</url>
Expand Down Expand Up @@ -90,12 +86,6 @@
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.jorel</groupId>
<artifactId>commandapi-bukkit-core</artifactId>
<version>10.1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
Expand Down
24 changes: 4 additions & 20 deletions PhantomVoting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
<configuration>
<minimizeJar>true</minimizeJar>
<relocations>
<!-- Relocate CommandAPI -->
<relocation>
<pattern>dev.jorel.commandapi</pattern>
<shadedPattern>me.fergs.commandapi</shadedPattern>
</relocation>
<!-- Relocate bStats -->
<relocation>
<pattern>org.bstats</pattern>
Expand All @@ -66,14 +61,14 @@
</build>

<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>maven-central</id>
<url>https://oss.sonatype.org/content/groups/public</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>bencodez repo</id>
<url>https://nexus.bencodez.com/repository/maven-public/</url>
Expand Down Expand Up @@ -107,17 +102,6 @@
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.jorel</groupId>
<artifactId>commandapi-bukkit-core</artifactId>
<version>10.1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.jorel</groupId>
<artifactId>commandapi-bukkit-shade</artifactId>
<version>10.1.2</version>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package me.fergs.phantomvoting;

import dev.jorel.commandapi.CommandAPI;
import dev.jorel.commandapi.CommandAPIBukkitConfig;
import me.fergs.phantomvoting.commands.AdminCommands;
import me.fergs.phantomvoting.commands.PlayerCommands;
import me.fergs.phantomvoting.commands.impl.CommandManager;
import me.fergs.phantomvoting.config.ConfigurationManager;
import me.fergs.phantomvoting.database.VoteStorage;
import me.fergs.phantomvoting.inventories.LeaderboardInventory;
Expand Down Expand Up @@ -35,16 +32,8 @@ public final class PhantomVoting extends JavaPlugin {
private VoteReminderManager<PhantomVoting> voteReminderManager;
private MilestonesInventory milestonesInventory;
private StreaksInventory streaksInventory;
/**
* Called when the plugin is loaded.
* This is where we register the Command API if it is not already loaded.
*/
@Override
public void onLoad() {
if (!CommandAPI.isLoaded()) {
CommandAPI.onLoad(new CommandAPIBukkitConfig(this).verboseOutput(false));
}
}
private CommandManager commandManager;

@Override
public void onEnable() {
instance = this;
Expand Down Expand Up @@ -89,8 +78,8 @@ public void onEnable() {
new PlaceholderManager(voteStorage, votePartyManager).register();
}

new PlayerCommands().register(this);
new AdminCommands().register(this);
commandManager = new CommandManager(this);
commandManager.registerCommands();

if (configurationManager.isModuleEnabled("bossbar")) {
bossbarManager = new BossbarManager<>(this);
Expand All @@ -109,6 +98,7 @@ public void onEnable() {

new Metrics(this, 23888);
}

@Override
public void onDisable() {
try {
Expand All @@ -123,21 +113,25 @@ public void onDisable() {
voteReminderManager.cancelAllTasks();
}
}

/**
* Gets the plugin instance.
*
* @return the plugin instance
*/
public static PhantomVoting getInstance() {
return instance;
}/**
}

/**
* Gets the configuration manager.
*
* @return the configuration manager
*/
public ConfigurationManager<PhantomVoting> getConfigurationManager() {
return configurationManager;
}

/**
* Gets the message manager.
*
Expand All @@ -146,6 +140,7 @@ public ConfigurationManager<PhantomVoting> getConfigurationManager() {
public MessageManager<PhantomVoting> getMessageManager() {
return messageManager;
}

/**
* Gets the vote storage.
*
Expand All @@ -154,6 +149,7 @@ public MessageManager<PhantomVoting> getMessageManager() {
public VoteStorage getVoteStorage() {
return voteStorage;
}

/**
* Gets the vote party manager.
*
Expand All @@ -162,6 +158,7 @@ public VoteStorage getVoteStorage() {
public VotePartyManager getVotePartyManager() {
return votePartyManager;
}

/**
* Gets the listener manager.
*
Expand All @@ -170,6 +167,7 @@ public VotePartyManager getVotePartyManager() {
public ListenerManager<PhantomVoting> getListenerManager() {
return listenerManager;
}

/**
* Gets the player manager.
*
Expand All @@ -178,6 +176,7 @@ public ListenerManager<PhantomVoting> getListenerManager() {
public PlayerManager<PhantomVoting> getPlayerManager() {
return playerManager;
}

/**
* Gets the bossbar manager.
*
Expand All @@ -186,6 +185,7 @@ public PlayerManager<PhantomVoting> getPlayerManager() {
public BossbarManager<PhantomVoting> getBossbarManager() {
return bossbarManager;
}

/**
* Gets the leaderboard inventory.
*
Expand All @@ -194,6 +194,7 @@ public BossbarManager<PhantomVoting> getBossbarManager() {
public LeaderboardInventory<PhantomVoting> getLeaderboardInventory() {
return leaderboardInventory;
}

/**
* Gets the vote reminder manager.
*
Expand All @@ -202,6 +203,7 @@ public LeaderboardInventory<PhantomVoting> getLeaderboardInventory() {
public VoteReminderManager<PhantomVoting> getVoteReminderManager() {
return voteReminderManager;
}

/**
* Gets the milestones inventory.
*
Expand All @@ -210,6 +212,7 @@ public VoteReminderManager<PhantomVoting> getVoteReminderManager() {
public MilestonesInventory getMilestonesInventory() {
return milestonesInventory;
}

/**
* Gets the streaks inventory.
*
Expand Down
Loading