|
| 1 | +package xyz.refinedev.phoenix; |
| 2 | + |
| 3 | +import com.velocitypowered.api.proxy.Player; |
| 4 | +import com.velocitypowered.api.proxy.server.RegisteredServer; |
| 5 | +import lombok.experimental.UtilityClass; |
| 6 | +import net.kyori.adventure.text.TextComponent; |
| 7 | +import org.bukkit.plugin.IllegalPluginAccessException; |
| 8 | +import xyz.refinedev.phoenix.profile.Profile; |
| 9 | +import xyz.refinedev.phoenix.server.ServerData; |
| 10 | +import xyz.refinedev.phoenix.utils.Pair; |
| 11 | + |
| 12 | +import java.util.List; |
| 13 | + |
| 14 | +/** |
| 15 | + * This Project is the property of Refine Development © 2023 |
| 16 | + * Redistribution of this Project is not allowed |
| 17 | + * |
| 18 | + * @author Creaxx |
| 19 | + * Created At: 15/12/2022 |
| 20 | + * Project: Phoenix |
| 21 | + */ |
| 22 | + |
| 23 | +@UtilityClass |
| 24 | +public class VelocityAPI { |
| 25 | + public boolean isUuid(String string) { |
| 26 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 27 | + } |
| 28 | + |
| 29 | + /** |
| 30 | + * Get a Random Server for the Player |
| 31 | + * |
| 32 | + * @param player {@link RegisteredServer} Player |
| 33 | + * @return {@link Player} Server |
| 34 | + */ |
| 35 | + public RegisteredServer getRandomServer(Player player) { |
| 36 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * Get a Random Auth Server for the Player |
| 41 | + * |
| 42 | + * @param player {@link Player} Player |
| 43 | + * @return {@link RegisteredServer} Server |
| 44 | + */ |
| 45 | + public RegisteredServer getRandomAuthServer(Player player) { |
| 46 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Get a Player's UUID by Fake Name |
| 51 | + * |
| 52 | + * @param fakeName {@link String} Fake Name |
| 53 | + * @return {@link String} UUID |
| 54 | + */ |
| 55 | + public String getUuidByFakeName(String fakeName) { |
| 56 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * Kick unwhitelisted Players |
| 61 | + */ |
| 62 | + public void kickUnwhitelistedUsers() { |
| 63 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * Get a Result for if a Profile can |
| 68 | + * join with current whitelist settings |
| 69 | + * |
| 70 | + * @param profile {@link Profile} Profile |
| 71 | + * @return {@link Pair<Boolean, TextComponent>} Can Join, Kick Message |
| 72 | + */ |
| 73 | + public Pair<Boolean, TextComponent> canJoinWhitelist(Profile profile) { |
| 74 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * Get a Result for if a Profile can join |
| 79 | + * a server with current whitelist settings |
| 80 | + * |
| 81 | + * @param profile {@link Profile} Profile |
| 82 | + * @param serverData {@link ServerData} Server |
| 83 | + * @return {@link Boolean} Can Join |
| 84 | + */ |
| 85 | + public boolean canJoinWhitelist(Profile profile, ServerData serverData) { |
| 86 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 87 | + } |
| 88 | + |
| 89 | + |
| 90 | + /** |
| 91 | + * Format a List in to a Kick Message |
| 92 | + * |
| 93 | + * @param source {@link List<String>} Source |
| 94 | + * @return {@link String} Kick Message |
| 95 | + */ |
| 96 | + public String getKickMessage(List<String> source) { |
| 97 | + throw new IllegalPluginAccessException("You need to install the plugin."); |
| 98 | + } |
| 99 | +} |
0 commit comments