Skip to content

Commit

Permalink
Make separate branch for Autorank
Browse files Browse the repository at this point in the history
  • Loading branch information
Staartvin committed Jan 20, 2021
1 parent a0bbc5b commit 9fad76c
Show file tree
Hide file tree
Showing 37 changed files with 89 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.staartvin.utils.pluginlibrary;
package me.staartvin.utils.pluginlibrary.autorank;

import me.staartvin.utils.pluginlibrary.hooks.*;
import me.staartvin.utils.pluginlibrary.autorank.hooks.*;
import org.bukkit.Bukkit;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.staartvin.utils.pluginlibrary;
package me.staartvin.utils.pluginlibrary.autorank;

import me.staartvin.utils.pluginlibrary.hooks.LibraryHook;
import me.staartvin.utils.pluginlibrary.autorank.hooks.LibraryHook;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.plugin.ServicePriority;
Expand All @@ -17,7 +17,7 @@
*/
public class PluginLibrary {

private final static List<me.staartvin.utils.pluginlibrary.Library> loadedLibraries = new ArrayList<>();
private final static List<Library> loadedLibraries = new ArrayList<>();
public HashMap<UUID, Long> requestTimes = new HashMap<>();

/**
Expand All @@ -29,7 +29,7 @@ public class PluginLibrary {
* @throws IllegalArgumentException When no plugin with the given name was found.
*/
public static Optional<LibraryHook> getLibrary(String pluginName) throws IllegalArgumentException {
return me.staartvin.utils.pluginlibrary.Library.getEnum(pluginName).getHook();
return Library.getEnum(pluginName).getHook();
}

/**
Expand All @@ -39,7 +39,7 @@ public static Optional<LibraryHook> getLibrary(String pluginName) throws Illegal
* @return {@link Library} class or an error.
* @see #getLibrary(String)
*/
public static Optional<LibraryHook> getLibrary(me.staartvin.utils.pluginlibrary.Library lib) {
public static Optional<LibraryHook> getLibrary(Library lib) {
return lib.getHook();
}

Expand All @@ -49,7 +49,7 @@ public static Optional<LibraryHook> getLibrary(me.staartvin.utils.pluginlibrary.
* @param lib Library to check.
* @return true if the library is loaded; false otherwise.
*/
public static boolean isLibraryLoaded(me.staartvin.utils.pluginlibrary.Library lib) {
public static boolean isLibraryLoaded(Library lib) {
return loadedLibraries.contains(lib);
}

Expand All @@ -67,7 +67,7 @@ public static PluginLibrary getPluginLibrary(JavaPlugin plugin) {
if (library == null) {
loadNewInstance = true;
} else {
System.out.println("Found PluginLibrary instance and using that");
plugin.getLogger().info("Found PluginLibrary instance and using that");
}
} else {
// It hasn't loaded, so we should definitely create a new one.
Expand All @@ -78,7 +78,7 @@ public static PluginLibrary getPluginLibrary(JavaPlugin plugin) {
if (loadNewInstance) {
library = new PluginLibrary();

System.out.println("Generating new PluginLibrary instance");
plugin.getLogger().info("Generating new PluginLibrary instance");

// Also register this so we don't have to create one again.
Bukkit.getServer().getServicesManager().register(PluginLibrary.class, library, plugin,
Expand Down Expand Up @@ -121,7 +121,7 @@ public void disablePluginLibrary() {
public int loadLibraries() {
int count = 0;

for (me.staartvin.utils.pluginlibrary.Library l : me.staartvin.utils.pluginlibrary.Library.values()) {
for (Library l : Library.values()) {
if (LibraryHook.isPluginAvailable(l)) {
try {
Optional<LibraryHook> libraryHook = l.getHook();
Expand Down Expand Up @@ -154,15 +154,15 @@ public void logMessage(String message) {
*
* @return a list of loaded libraries.
*/
public List<me.staartvin.utils.pluginlibrary.Library> getLoadedLibraries() {
public List<Library> getLoadedLibraries() {
return Collections.unmodifiableList(loadedLibraries);
}

private String getLoadedLibrariesAsString() {
StringBuilder builder = new StringBuilder();

for (int i = 0, l = loadedLibraries.size(); i < l; i++) {
me.staartvin.utils.pluginlibrary.Library library = loadedLibraries.get(i);
Library library = loadedLibraries.get(i);

String addedString = ChatColor.DARK_AQUA + library.getHumanPluginName() + ChatColor.DARK_GREEN + " (by " +
library
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.staartvin.utils.pluginlibrary.events;
package me.staartvin.utils.pluginlibrary.autorank.events;

import org.bukkit.entity.Player;
import org.bukkit.event.Event;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.edge209.afkTerminator.AfkDetect;
import me.edge209.afkTerminator.AfkDetect.AFKMACHINES;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.hooks.afkmanager.AFKManager;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.hooks.afkmanager.AFKManager;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.wasteofplastic.askyblock.ASkyBlock;
import com.wasteofplastic.askyblock.ASkyBlockAPI;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.wasteofplastic.acidisland.ASkyBlock;
import com.wasteofplastic.acidisland.ASkyBlockAPI;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.hm.achievement.AdvancedAchievements;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.archyx.aureliumskills.api.AureliumAPI;
import com.archyx.aureliumskills.skills.Skill;
import com.archyx.aureliumskills.stats.Stat;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.armar.plugins.autorank.Autorank;
import me.armar.plugins.autorank.pathbuilder.requirement.AbstractRequirement;
import me.armar.plugins.autorank.pathbuilder.result.AbstractResult;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.entity.Player;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.robin.battlelevels.api.BattleLevelsAPI;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.Zrips.CMI.CMI;
import com.Zrips.CMI.Containers.CMIUser;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.hooks.afkmanager.AFKManager;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.hooks.afkmanager.AFKManager;

import java.util.UUID;

Expand All @@ -14,7 +14,7 @@
*
* @author Staartvin
*/
public class CMIHook extends me.staartvin.utils.pluginlibrary.hooks.LibraryHook implements AFKManager {
public class CMIHook extends LibraryHook implements AFKManager {


@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.hooks.afkmanager.AFKManager;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.hooks.afkmanager.AFKManager;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.massivecraft.factions.Factions;
import com.massivecraft.factions.entity.BoardColl;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.ps.PS;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.Location;
import org.bukkit.plugin.Plugin;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.ryanhamshire.GriefPrevention.Claim;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
import me.ryanhamshire.GriefPrevention.PlayerData;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.Location;

import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.gamingmesh.jobs.Jobs;
import com.gamingmesh.jobs.container.Job;
import com.gamingmesh.jobs.container.JobProgression;
import com.gamingmesh.jobs.container.JobsPlayer;
import com.gamingmesh.jobs.container.PlayerPoints;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.util.Util;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.util.Util;
import org.bukkit.entity.Player;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.PluginLibrary;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.PluginLibrary;
import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.plugin.Plugin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.gmail.nossr50.api.*;
import com.gmail.nossr50.api.exceptions.InvalidFormulaTypeException;
Expand All @@ -7,7 +7,7 @@
import com.gmail.nossr50.api.exceptions.InvalidXPGainReasonException;
import com.gmail.nossr50.datatypes.party.Party;
import com.gmail.nossr50.mcMMO;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import us.eunoians.mcrpg.players.McRPGPlayer;
import us.eunoians.mcrpg.players.PlayerManager;
import us.eunoians.mcrpg.types.Skills;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.vexsoftware.votifier.NuVotifierBukkit;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.listeners.VoteListener;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.listeners.VoteListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.edge209.OnTime.DataIO;
import me.edge209.OnTime.OnTimeAPI;
import me.edge209.OnTime.OnTimeAPI.topData;
import me.edge209.OnTime.PlayingTime;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.black_ixx.playerpoints.PlayerPoints;

import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;


import com.leonardobishop.quests.Quests;
import com.leonardobishop.quests.player.QPlayer;
import com.leonardobishop.quests.player.questprogressfile.QuestProgress;
import com.leonardobishop.quests.quests.Quest;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.plugin.Plugin;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.blackvein.quests.Quester;
import me.blackvein.quests.Quests;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.plugin.Plugin;

import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import net.flamedek.rpgme.RPGme;
import net.flamedek.rpgme.player.RPGPlayer;
import net.flamedek.rpgme.skills.SkillType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.hooks.afkmanager.AFKManager;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import me.staartvin.utils.pluginlibrary.autorank.hooks.afkmanager.AFKManager;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import com.massivecraft.factions.*;
import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import org.bukkit.Location;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.Plugin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.staartvin.utils.pluginlibrary.hooks;
package me.staartvin.utils.pluginlibrary.autorank.hooks;

import me.staartvin.utils.pluginlibrary.Library;
import me.staartvin.utils.pluginlibrary.autorank.Library;
import nl.lolmewn.stats.BukkitMain;
import nl.lolmewn.stats.Util;
import nl.lolmewn.stats.player.PlayerManager;
Expand Down
Loading

0 comments on commit 9fad76c

Please sign in to comment.