[15$] HubCore - Special Hub Plugin | 1.7-1.13 Support | Custom Tab | Multiple Configurable Menus |

Status
This thread has been locked.

Allen Zhang

Not Developer
Banned
Feedback score
18
Posts
16
Reactions
178
Resources
0
Introduction
Well today I brought my custom hub core plugin to this community. I'm not sure if this plugin can change the current hub core position of entire MC-Market, but I will try my best here.

Features
  • Queue Plugin Support (EzQueue & Portal)
  • Permission Plugin Support (LuckPerms, PermissionsEx, Nucleus, Vault, and Bukkit[Not Plugin, but Supported])
  • RedisBungee & BungeeCord Support (For Cross Server)
  • The ability to customize Scoreboard [Assemble and Sidebar API Integrated]
  • TabList Support (1.7-1.13 without ProtocolLib or any other dependencies) [Ziggurat Integrated]
  • Multiple Toggle-able Modules. (Basic Protections, Player Visibility, EnderButts, Double Jumps, Basics, Scoreboard, Tablist) [If you do not like it, just change the "Enable" value to false.
  • Global Placeholders (Variables) and supports MVdWPlaceholderAPI and PlaceholderAPI that can be used at almost every single text messages / descriptions.
  • Supports Reloading Specific Modules or All Modules via Command at once.
  • Multiple Configurable Custom Menu Integrated with Buttons that can execute executions via specific execution patterns.
  • Chat Format without crashing even the message has "%"
  • Multi-Threaded in some necessary features like fetch server motd so in that way it won't block Main Thread to prevent lag.

Pricing
10 USD for Jars with Updates
30 USD for Sources without Updates
35 USD for Sources with Updates

Screenshots
3IxE4fr.png

hR9tDXG.png
gVn5ZM1.png
(I just copy pasted the lore from sammmmy's Hub Core Thread because I'm really really bad at designing.)
wB5cP7C.png


Commands
  • /hubcore reload (module) - Reload the HubCore Configurations & specific module, leave the (module) blank to reload all modules by once.
  • /setspawnlocation - Set the spawn location on login.

Configuration
Code:
License: License Here

#Don't Touch This
ConfigVersion: 1

#Available Fields: RedisBungee, BungeeCord, None
BungeeType: "BungeeCord"

#Available Fields: EzQueue, Portal
QueueType: "EzQueue"

#Available Fields: PermissionsEx, Core, Vault, LuckPerms, Nucleus
PermissionType: "PermissionsEx"

Intervals:
  Player-Count: 5

Protections:
  #Player Cannot Break Blocks
  No-Break: true
  #Player Cannot Build Blocks
  No-Build: true
  #No Damages
  No-Damage: true
  #No Hunger
  No-Hunger: true
  #No Drop
  No-Drop: true
  #No Pick
  No-Pick: true
  #No Weather Change
  No-Weather: true
  #Default GameMode on Join
  Game-Mode: ADVENTURE
  #No Creature Spawning
  No-Creature-Spawn: true
  #Teleport to Spawn Location
  TpLogin:
    Enabled: true
    Void-Teleport:
      Enabled: true
      Off-Set: 0
    Location: "world:0:0:0:0:0"
  #Force to Set Slot on Join
  Force-Join-Slot:
    Enabled: true
    Slot: 4

Modules:
  Tablist:
    Enabled: true
    Update-Ticks: 20 #In Bukkit Scheduler Ticks
    Header: "&6&lMC-Market Network" #Header
    Footer: "&6&lMC-Market Network" #Footer
    Slots:
      1: "&fHello"
      2: "&fHi"
      3: "&fThis is"
      4: "&fCustom Tablist"
  Scoreboard:
    Mode: "NO-FLICKER" #NO-FLICKER or 72-CHARS
    Enabled: true
    Update-Ticks: 2 #In Bukkit Scheduler Ticks
    Title: "&6&lMC-Market Network"
    Entries:
      Default:
        - "&7&m-----------------&r"
        - "&6Rank: &f<player_group>"
        - "&f"
        - "&6Online: &f<online_total>"
        - "&f"
        - "&6www.mc-market.org"
        - "&7&m-----------------&r"
      Queuing:
      - "&7&m-----------------&r"
      - "&6Rank: &f<player_group>"
      - "&f"
      - "&6Online: &f<online_total>"
      - "&f"
      - "&6Queuing &7(<queue_name>)"
      - "&6Position: &7#<queue_position>/<queue_amount>"
      - "&6www.mc-market.org"
      - "&7&m-----------------&r"

  EnderButt:
    Enabled: true
    Item:
      Material: ENDER_PEARL
      Amount: 1
      Name: "&e&lEnder Butt &7(Right-Click)"
      Slot: 0

  DoubleTap:
    Enabled: true
    Cooldown: 5
    Sound:
      Enabled: true
      Name: EXPLODE
      Volume1: 0.7
      Volume2: 1.5

  LobbySpeed:
    Enabled: true
    SpeedLevel: 2
    ItemSlot: 3
    Items:
      Speed:
        Name: "&6&lLobby Speed &7(Click to Toggle)"
        Amount: 1
        Data: 0
        Material: "REDSTONE_TORCH_ON"
        Lores:
          - "&7Right Click to remove your Speed Effects."

      Regular:
        Name: "&c&lLobby Speed &7(Click to Toggle)"
        Amount: 1
        Data: 0
        Material: "TORCH"
        Lores:
          - "&7Right Click to remove your Speed Effects."

  Visibility:
    Enabled: true
    Cooldown: 3
    Messages:
      Visible: "&aYou changed your personal visibility preference to &e&lVISIBLE!"
      Invisible: "&aYou changed your personal visibility preference to &e&lINVISIBLE!"
      Cooldown: "&ePlease wait %second% seconds before toggling player visibility!"
    Items:
      Visible:
        Name: "&a&lPlayer Visibility &7(Click to Toggle)"
        Amount: 1
        Data: 0
        Material: "COMPASS"
        Slot: 8
      Invisible:
        Name: "&c&lPlayer Visibility &7(Click to Toggle)"
        Amount: 1
        Data: 0
        Material: "COMPASS"
        Slot: 8
  NPC:
    Enabled: true
    NPCS:
      '1':
        Location: "world:0:0:0:0:0"
        Lines:
        - "&e&lCustom Line"
        - "&e&lWhatever You Want"
        Skin:
          Mode: "VANILLA" #Vanilla / MineSkin
          Value: "ThatKawaiiAllen"
        Executions:
        - "openmenu:serverselector"

  Basics:
    Join-Items: true
    Items:
      4:
        Name: "&6&lServer Selector"
        Amount: 1
        Data: 0
        Material: "COMPASS"
        Lores:
        - "&7Right click to view our servers."
        Executions:
        - "openmenu:Server-Selector"

    Whitelist:
      Enabled: false
      Bypass: "hubcore.whitelist.bypass"


    Chat-Format:
      Enabled: true
      Colored-Chat-For-Admin: true #Colored Chat (Chat Colored will be transferred)
      Colored-Chat-Permission: "hubcore.admin" #Permission for Colored Chat
      Format: "<player_prefix><player_name>&f: <message>" #Chat Format

    Block-Chat:
      Enabled: true
      Permission: "hubcore.bypasschat"
      Notifications:
      - "&7&m----------------------"
      - "&6&lYou cannot chat at this moment"
      - "&7&m----------------------"

    Join-Message:
      Enabled: true
      Entries:
        - "&7&m----------------------"
        - "&6&lHi <player_name>"
        - "&7&m----------------------"

Allow-Access-Menu-Via-Command: true

Placeholders:
  Server:
    Online: "&aOnline"
    Offline: "&cOffline"

Code:
Title: "&6&lMC-Market Hub Core"
Rows: 3
Buttons:
  Hi:
    Name: "&6&lUltra HardCore"
    Material: "GOLDEN_APPLE"
    Amount: 1
    Data: 0
    Slot: 13
    Lores:
    - "&7&m-----------------------------"
    - "&6Server Information:"
    - "&7* &eStatus&f: &aOnline"
    - "&7* &ePlayers&f: <online_players>/<max_players>"
    - ""
    - "&6Server Features:"
    - "&7* &eUHC Meetup with a twist!"
    - "&7* &eSolo, Team & Custom Games"
    - "&7&m-----------------------------"
    Executions:
    - "queue:UHCZone"

Execution Pattern in Menus and Hotbar Items (Only in Custom Join Items Module)
Currently I made a Execution Patterns for Menus & Hotbar Items, use given patterns to create your own executions easily :)
Executions:

  • playercommand:[command] - Execute [command] Command as player (Who clicked the button)
  • consolecommand:[command] - Execute [command] Command as console
  • queue:[queue] - Join [queue] Queue for player (Who clicked the button)
  • (tell / send / message):[message] - Send a specific message to player (Who clicked the button)
  • (connect / server):[server] - Make player (Who clicked the button) connect to bungeecord [server] Server
  • (sound / soundplay / playsound):[sound] - Play [sound] Sound to player (Who clicked the item) with Volume 1
  • (closemenu / close) - Close the current opening menu
  • (openmenu / open):[menu] - Open [menu] Menu for player
  • (previousmenu / previous) - Open a menu that the player (who clicked the button) recently closed

Placeholders (Variables) [Global Placeholders, can be used on nearly every messages & descriptions & executions]
  • Queue Category
    • <queue_name> - Get player's current queue name (If not queuing return null)
    • <queue_position> - Get player's current queue position (If not queuing return -1)
    • <queue_amount> - Get amount of players in player's current queue (If not queuing return -1)
    • <queue_maximum> - Get maximum amount of players can hold in player's current queue (If not queuing return -1)
    • <queue_online> - Get online amount of players in player's current queue (If not queuing return -1)
  • Player Info Category
    • <player_prefix> - Get player's current prefix
    • <player_suffix> - Get player's current suffix
    • <player_group> - Get player's current group name
    • <player_name> - Get player's current display name
    • <player_ping> - Get player's current ping
    • <player_level> - Get player's current level
    • <player_exp> - Get player's current experiences
  • Online (Proxy) Category
    • <online_total> - Get online amount of this entire proxy
  • Status Category
    • <status_valid_(server)> - Get the status (Online / Offline) of (server) Bungeecord Server, message is configurable in config.yml
    • <status_online_(server)> - Get online amount of (server) Server
    • <status_max_(server)> - Get max players limit of (server) Server
    • <status_motd_(server)> - Get MOTD of (server) Server
    • <status_host_(server)> - Get IP Address (without Port) of (server) Server
    • <status_port_(server)> - Get Port (without IP Address) of (server) Server

Proof of Ownership
eVp40ec.jpg

Code:
package me.allen.hubcore;


import lombok.Getter;
import me.allen.hubcore.annotations.handler.HubListenerAnnotationHandler;
import me.allen.hubcore.annotations.handler.HubModuleAnnotationHanlder;
import me.allen.hubcore.annotations.handler.InitAnnotationHandler;
import me.allen.hubcore.bungee.IBungee;
import me.allen.hubcore.bungee.impl.BungeeCordImpl;
import me.allen.hubcore.bungee.impl.RedisBungeeImpl;
import me.allen.hubcore.module.ModuleManager;
import me.allen.hubcore.permission.IPermission;
import me.allen.hubcore.permission.impl.*;
import me.allen.hubcore.placeholder.PlaceholderManager;
import me.allen.hubcore.player.HubPlayerManager;
import me.allen.hubcore.queue.IQueue;
import me.allen.hubcore.queue.impl.EzQueueImpl;
import me.allen.hubcore.queue.impl.PortalQueueImpl;
import me.allen.hubcore.util.C;
import me.allen.hubcore.util.config.ConfigUpdater;
import me.allen.hubcore.util.config.FileConfig;
import me.allen.hubcore.util.item.InteractableItemManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.spigotmc.SpigotConfig;

import java.io.UnsupportedEncodingException;

@Getter
public class HubCore extends JavaPlugin {

    @Getter
    private static HubCore instance;

    private IBungee bungee;

    private IQueue queue;

    private IPermission permission;

    private FileConfig general;

    private ModuleManager moduleManager;

    private PlaceholderManager placeholderManager;

    private InteractableItemManager interactableItemManager;

    private HubPlayerManager hubPlayerManager;

    @Override
    public void onEnable() {
        instance = this;
        loadConfig();
        loadPermissions();
        loadQueues();
        loadBungee();
        loadManagers();
        loadAnnotations();
    }

    private void loadConfig() {
        general = new FileConfig(this, "config.yml");
        try {
            new ConfigUpdater(this, "config.yml").updateConfig();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }

    private void loadBungee() {
        String type = this.getConfig().getString("BungeeType").toUpperCase();

        if (!SpigotConfig.bungee && !type.equals("NONE")) {
            Bukkit.getConsoleSender().sendMessage(C.C("&e[HubCore] Please Enable &6BungeeCord Mode &ein &6Spigot.yml &eto in order to make Hub Core to Work!"));
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        switch (type) {
            case "BUNGEECORD":
                bungee = new BungeeCordImpl();
                break;
            case "REDISBUNGEE":
                bungee = new RedisBungeeImpl();
                break;
            default:
                bungee = new BungeeCordImpl();
                break;
        }

        Bukkit.getConsoleSender().sendMessage(C.C("&e[HubCore] Registered \"" + bungee.getClass().getSimpleName().replace("Impl", "") + "\" (Bungee) System as the Implementation."));
    }

    private void loadPermissions() {
        String type = this.getConfig().getString("PermissionType").toUpperCase();

        switch (type) {
            case "PERMISSIONSEX":
                if (Bukkit.getPluginManager().isPluginEnabled("PermissionsEx")) {
                    permission = new PermissionsExPermissionImpl();
                } else {
                    permission = new BukkitPermissionImpl();
                }
                break;
            case "VAULT":
                if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
                    permission = new VaultPermissionImpl();
                } else {
                    permission = new BukkitPermissionImpl();
                }
                break;
            case "NUCLEUS":
                if (Bukkit.getPluginManager().isPluginEnabled("Nucleus")) {
                    permission = new NucleusPermissionImpl();
                } else {
                    permission = new BukkitPermissionImpl();
                }
                break;
            case "LUCKPERMS":
                if (Bukkit.getPluginManager().isPluginEnabled("LuckPerms")) {
                    permission = new LuckPermsPermissionImpl();
                } else {
                    permission = new BukkitPermissionImpl();
                }
                break;
            default:
                permission = new BukkitPermissionImpl();
                break;
        }

        Bukkit.getConsoleSender().sendMessage(C.C("&e[HubCore] Registered \"" + permission.getClass().getSimpleName().replace("PermissionImpl", "") + "\" (Permission) System as the Implementation."));
    }

    private void loadManagers() {
        moduleManager = new ModuleManager();
        placeholderManager = new PlaceholderManager();
        interactableItemManager = new InteractableItemManager();
        hubPlayerManager = new HubPlayerManager();
    }

    private void loadQueues() {
        String type = this.getConfig().getString("QueueType").toUpperCase();

        switch (type) {
            case "EZQUEUE":
                if (Bukkit.getPluginManager().isPluginEnabled("EzQueueSpigot")) {
                    queue = new EzQueueImpl();
                } else {
                    queue = null;
                }
                break;
            case "PORTAL":
                if (Bukkit.getPluginManager().isPluginEnabled("Portal")) {
                    queue = new PortalQueueImpl();
                } else {
                    queue = null;
                }
                break;
            default:
                queue = null;
                break;
        }

        if (queue == null) return;

        Bukkit.getConsoleSender().sendMessage(C.C("&e[HubCore] Registered \"" + queue.getClass().getSimpleName().replace("Impl", "") + "\" (Queue) System as the Implementation."));
    }

    private void loadAnnotations() {
        Bukkit.getScheduler().runTaskLater(this, () -> {
            InitAnnotationHandler.register();
            HubModuleAnnotationHanlder.register();
            HubListenerAnnotationHandler.register();
        }, 20L);
    }
}

Code:
package me.allen.hubcore.util;

import com.google.common.collect.Maps;
import lombok.AllArgsConstructor;
import lombok.Getter;
import me.allen.hubcore.HubCore;
import me.allen.hubcore.annotations.Init;
import me.allen.hubcore.placeholder.IPlaceholder;
import me.allen.hubcore.util.placeholder.Placeholder;
import me.allen.hubcore.util.placeholder.PlaceholderHandler;
import me.clip.placeholderapi.PlaceholderAPI;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

import java.util.Map;

@Init
public class MessageUtil {

    private static HubCore plugin = HubCore.getInstance();

    private static boolean placeholderapi, mvdwplaceholderapi;

    public void init() {
        placeholderapi = Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI");
        mvdwplaceholderapi = Bukkit.getPluginManager().isPluginEnabled("MVdWPlaceholderAPI");
    }

    public static String buildMessage(Player player, String text) {
        PlaceholderHandler placeholderHandler = new PlaceholderHandler();
        Placeholder placeholder = Placeholder.of(text);
        Map<String, String> replaceMap = Maps.newHashMap();
        replaceMap.put(buildVariable("name", VariableType.QUEUE), plugin.getQueue().getQueue(player));
        replaceMap.put(buildVariable("position", VariableType.QUEUE), String.valueOf(plugin.getQueue().getPosition(player, plugin.getQueue().getQueue(player))));
        replaceMap.put(buildVariable("amount", VariableType.QUEUE), String.valueOf(plugin.getQueue().getAmountInQueue(plugin.getQueue().getQueue(player))));
        replaceMap.put(buildVariable("maxmium", VariableType.QUEUE), String.valueOf(plugin.getQueue().getMaxmiumAmountInQueue(plugin.getQueue().getQueue(player))));
        replaceMap.put(buildVariable("online", VariableType.QUEUE), String.valueOf(plugin.getQueue().getAmountOnline(plugin.getQueue().getQueue(player))));
        replaceMap.put(buildVariable("prefix", VariableType.INFO), plugin.getPermission().getPrefix(player));
        replaceMap.put(buildVariable("suffix", VariableType.INFO), plugin.getPermission().getSuffix(player));
        replaceMap.put(buildVariable("group", VariableType.INFO), plugin.getPermission().getGroupName(player));
        replaceMap.put(buildVariable("name", VariableType.INFO), player.getDisplayName());
        replaceMap.put(buildVariable("ping", VariableType.INFO), String.valueOf(PlayerUtil.getPing(player)));
        replaceMap.put(buildVariable("level", VariableType.INFO), String.valueOf(player.getLevel()));
        replaceMap.put(buildVariable("exp", VariableType.INFO), String.valueOf(player.getExp()));

        if (plugin.getBungee() != null && plugin.getBungee().getServers() != null) {
            replaceMap.put(buildVariable("total", VariableType.ONLINE), String.valueOf(plugin.getBungee().getPlayerCount()));
            plugin.getBungee().getServers().forEach((server) -> {
                replaceMap.put(buildVariable(server, VariableType.STATUS), String.valueOf(plugin.getBungee().isServerOnline(server)));
                replaceMap.put(buildVariable(server, VariableType.ONLINE), String.valueOf(plugin.getBungee().getPlayerCount(server)));
            });
        }

        replaceMap.forEach(placeholderHandler::addPlaceholder);

        if (placeholderapi) {
            text = PlaceholderAPI.setPlaceholders(player, text);
        }

        if (mvdwplaceholderapi) {
            text = be.maximvdw.placeholderapi.PlaceholderAPI.replacePlaceholders(player, text);
        }

        for (IPlaceholder extensions : plugin.getPlaceholderManager().getPlaceholders()) {
            if (placeholder.getIdentifier().equalsIgnoreCase(extensions.getIdentifier())) {
                text = extensions.handle(placeholder.getKey(), player);
            }
        }

        return C.C(placeholderHandler.apply(text));
    }

    private static String buildVariable(String value, VariableType variableType) {
        return variableType.getName() + "_" + value;
    }

    @AllArgsConstructor
    enum VariableType {
        QUEUE("queue"),
        ONLINE("online"),
        INFO("player"),
        STATUS("status");

        @Getter
        private String name;

    }
}
(If that's not enough, PM me for more :tup:)

Test Servers
  • play.beastnw.club

Contact

Discord Server: Here
 
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Taisom

www.taisom.org
Premium
Feedback score
-2
Posts
25
Reactions
10
Resources
0
mm.. much
 

Allen Zhang

Not Developer
Banned
Feedback score
18
Posts
16
Reactions
178
Resources
0
It's a little costy at it's current price>features. But I know you will update it and make it overall better.

GLWS bro, my NPC Hologram thing is still something I'd be down for ;)
Yeah I'm working on it :D
Thanks :)[DOUBLEPOST=1543113627][/DOUBLEPOST]I just lowered a price a bit because it's overpricing.
Umm, a little bit better? ugh? ;-;
 
Last edited:
Banned forever. Reason: Leaking user products

Nykorrin

i-
Premium
Feedback score
6
Posts
812
Reactions
299
Resources
0
Does Nucleus' "/rank color" apply to the scoreboard & tablist? Or will you have to set the rank's name to the specified color to be shown on the scoreboard & tablist?
 

Allen Zhang

Not Developer
Banned
Feedback score
18
Posts
16
Reactions
178
Resources
0
Does Nucleus' "/rank color" apply to the scoreboard & tablist? Or will you have to set the rank's name to the specified color to be shown on the scoreboard & tablist?
I'm actually sorry but I cannot understand you when I'm collecting ideas.
Would you like to explain more?
 
Banned forever. Reason: Leaking user products

Nykorrin

i-
Premium
Feedback score
6
Posts
812
Reactions
299
Resources
0
I'm actually sorry but I cannot understand you when I'm collecting ideas.
Would you like to explain more?
The current hubcore I use, which supports Nucleus, on the tablist & scoreboard, I have player information such as the player's current rank, etc. However, executing the command for Nucleus, "/rank color <rank> <color>" the color does not apply to the tablist nor scoreboard and instead I have to do something like, "/rank create global &4&oOwner" so on the tablist & scoreboard it is seen as "&4&oOwner" because "/rank color <rank> <color>", the specified color for the rank is not applied to the tablist or scoreboard.
 

Allen Zhang

Not Developer
Banned
Feedback score
18
Posts
16
Reactions
178
Resources
0
The current hubcore I use, which supports Nucleus, on the tablist & scoreboard, I have player information such as the player's current rank, etc. However, executing the command for Nucleus, "/rank color <rank> <color>" the color does not apply to the tablist nor scoreboard and instead I have to do something like, "/rank create global &4&oOwner" so on the tablist & scoreboard it is seen as "&4&oOwner" because "/rank color <rank> <color>", the specified color for the rank is not applied to the tablist or scoreboard.
It should be translated with color codes right,
Anyways, let me checkout the Nucleus code[DOUBLEPOST=1543114100][/DOUBLEPOST]
you should add it as a resource.

I decided not to add it as a resource for purpose.
 
Last edited:
Banned forever. Reason: Leaking user products

Nykorrin

i-
Premium
Feedback score
6
Posts
812
Reactions
299
Resources
0
And can you post pictures of the tablist? :)
 

Nykorrin

i-
Premium
Feedback score
6
Posts
812
Reactions
299
Resources
0
I guess you could just make a copy-cat of Hylist's tablist as an example. :|
 

Allen Zhang

Not Developer
Banned
Feedback score
18
Posts
16
Reactions
178
Resources
0
Ok now it supports Waterfall

:)[DOUBLEPOST=1543114674][/DOUBLEPOST]
The current hubcore I use, which supports Nucleus, on the tablist & scoreboard, I have player information such as the player's current rank, etc. However, executing the command for Nucleus, "/rank color <rank> <color>" the color does not apply to the tablist nor scoreboard and instead I have to do something like, "/rank create global &4&oOwner" so on the tablist & scoreboard it is seen as "&4&oOwner" because "/rank color <rank> <color>", the specified color for the rank is not applied to the tablist or scoreboard.
I checked out the code in Nucleus, the color code should be translated I guess.
I do not have MongoDB so I cannot test it :(
 
Last edited:
Banned forever. Reason: Leaking user products
Status
This thread has been locked.
Top