Hyronic Friends

Hyronic Friends Hyronic Friends

HyronicFriends is a plugin that adds to your friend system. With this plugin, you can send friend requests, receive notifications when your friends are online, teleport instantly to your friends, and most importantly, you can send mail to your friends, including items as attachments.

Now available on marketplaces

Features

  • Support multiple server versions.
  • Support MySQL and SQLite database.
  • Support BungeeCord/Velocity for cross-server (see how to setup).
  • Support custom texture for GUI.
  • Support Oraxen and ItemsAdder.
  • Support multiple languages. You can translate it into your native language.
  • Add (or unfriend) a player.
  • Send an email to your friend. You can also attach your item before sending.
  • Immediately teleport to your friend (BungeeCord/Velocity support).
  • Blocking any player from requesting friend, teleporting, or sending email.
  • Each friend has different permissions. You can set it up on GUI.
  • Manage your friend list (or what your friend can do with you) on GUI.
  • Sending private message to your friend. If your server is BungeeCord, then it will be sent across the server.
  • Quickly reply to the most recent message.
  • Fully customizable.
  • And more…

Subsections of Hyronic Friends

Installation Guide

Download

This plugin is now available on these marketplaces as a premium plugin:

You can purchase it on those marketplaces. But we strongly recommend you to purchase on BuiltByBit, because it supports you more payment methods.

Prerequisites

  • Java version: 16 or newer
  • Server software: SpigotMC, PaperMC and PurpurMC
  • Server versions: 1.16 to 1.20.1

Soft-Dependencies

NameOpen SourcePaidRequired
HeadDatabaseNoPremiumNo
OraxenYesPremiumNo
ItemsAdderNoPremiumNo
PlaceholderAPIYesFreeNo
HyronicFriends-BungeeCordNoFreeNo
HyronicFriends-Velocity TODONoFreeNo

Install steps

It is very simple to install this plugin, just following these steps:

  • Step 1: Stop your server if it is running.
  • Step 2: Download the plugin via marketplaces we have metioned above.
  • Step 3: Copy the jar file you just downloaded (normally named HyronicFriends.jar) to your plugins folder.
  • Step 4: Start your server and enjoy.

Resource pack

Caution

If you’re SpigotMC user, you have to join our Discord in order to get the configuration for the texture pack (Oraxen/ItemsAdder Configuration).

Please follow these steps for the most accurate installation:

  • Step 1: Open your Downloads folder, where files are saved after downloading.
  • Step 2: Open the zip file you have downloaded.
  • Step 3: There is a folder named Texturepack, just open it.
  • Step 4: Drag & Drop 3 folders included there to your "/plugins/". If the system asks you about replacing files, just click “Yes to all”.
  • Step 5: This zip file contains the resource-pack of the Oraxen and ItemsAdder plugin. Depending on which one you want to use, reload its configuration.
  • Step 6: Reload the HyronicFriends configuration and enjoy.

BungeeCord/Velocity

Caution

HyronicFriends has two versions: one for bukkit and one for BungeeCord. The BungeeCord/Velocity version is just a middleware (I will also call it’s “middleware” in this instruction), it will not work if you don’t have the bukkit version in your server. Then, just follow our instructions for the most accurate installation.

Download middleware plugin

  • For HyronicFriends-BungeeCord plugin, it is available on SpigotMC for free.
  • For HyronicFriends-Velocity plugin, you can download it via this link.

Installation Guide

  • Step 1: Put the middleware jar file into /[BungeeCord/Velocity]/plugins/ folder.
  • Step 2: Load the BungeeCord/Velocity for the first time.
  • Step 3: Open the config.yml file and configure it. Any changes made after being officially used may result in data loss.
  • Step 4: Go to your HyronicFriends folder (start your server if you don’t see it) for bukkit/spigot/paper version. Open the config.yml file, then change the value of MultiNetworks to true, and Database.Type to MySQL. Make sure you stopped your server before changing.
  • Step 5: Start your BungeeCord/Velocity first, then your servers.

Commands & Permissions

Permissions

General permissions

PermissionsDefaultDescription
hyronicfriends.*FALSEAllows the player to access everything of the plugin.
hyronicfriends.mails.size.maximumOPAllows the player to have the maximum number of attached item slots.
hyronicfriends.friends.size.unlimitedOPAllows the player to have an unlimited list of friends.

Command permissions

PermissionsDefaultDescription
hyronicfriends.command.*FALSEAllows the player to access all commands of the plugin.
hyronicfriends.command.helpOPAllows the player to view the help page command.
hyronicfriends.command.friendsOPAllows the player to manage their friend list.
hyronicfriends.command.blockOPAllows the player to block (or unblock) a player.
hyronicfriends.command.teleportOPAllows the player to teleport to their friends.
hyronicfriends.command.mailOPAllows the player to send (or read) mail to their friends.
hyronicfriends.command.reloadOPAllows the player to reload the configuration.

Commands

Caution

We provide you with many commands. Some of them have been shortened, so we’ll split them up into different tables.

General commands

CommandsDescription
/friend help [page]View the help page command
/friendOpen main menu
/friend toggleToggle receive friend request
/friend notifyTurn on/off your friend online status
/friend add <player>Send a friend request
/friend accept <player>Accept a friend request
/friend decline <player>Decline a friend request
/friend cancel <player>Cancel the sent friend request
/friend listOpen your friend list
/friend reloadReload the configuration
/unfriend <player>Unfriend a player

Blocking commands

CommandsDescription
/blockedlistOpen your blocked list
/block <player>Block a player
/unblock <player>Unblock a player

Teleport commands

CommandsDescription
/ftp <player>Teleport to your friend
/toggletp <player>Allow/Disallow your friend to teleport to you

Private message commands

CommandsDescription
/togglemsg <player>Enable/Disable receiving your friend message
/fmsg <player> <message>Send private message to your friend
/freply <message>Quick reply to the most recent message

Mail commands

CommandsDescription
/mail helpView the list of mail commands
/mailboxOpen your mailbox
/mail <player>See all mails sent/received to/from a player
/mail send <player> <content>Send mail to your friend
/mail read <player>Read the recently received mail
/togglemail <player>Allow/Disallow your friend to send mail to you

Placeholders

We also provide you with a few placeholders. If you don’t find what you need, please join our Discord server and suggest it.

Caution

These placeholders require the PlaceholderAPI plugin to work.

PlaceholdersDescription
%hfriends_friendlist_size%Shows the number of players on your friend list.
%hfriends_friendlist_max%Shows the maximum number of friends a player can have on the list. -1 means unlimited.
%hfriends_friendlist_is_max%Shows whether the player has reached the maximum number of friends.
%hfriends_blockedlist_size%Shows the number of players on your blocked list.
%hfriends_has_unread_mail%Shows whether the player has unread mails.
%hfriends_has_waiting_requestShows whether the player has requests are waiting to respond.
%hfriends_is_friend_<player>%Checks whether a player is your friend.
%hfriends_is_blocked_<player>%Checks whether a player is blocked by you.
%hfriends_can_teleport_to_<player>%Checks whether you can teleport to a player.
%hfriends_can_send_msg_to_<player>%Checks whether you can send private message to a player.
%hfriends_can_send_mail_to_<player>%Checks whether you can send mail to a player.

Developer APIs

General player data

We provide you with a class named /api/user/User.java that gives you general player data, including the list of friends, the list of blocked players, mailbox, and more… You can use 2 methods provided from public class FriendAPI to get the player data:

Optional<User> FriendAPI.findUser(UUID);
Optional<User> FriendAPI.findUser(OfflinePlayer);

List of friends

To get the list of all your friends:

List<Friend> getList();

List of online friends

To get the list of online friends:

List<Friend> getOnlineFriends();

List of blocked players

To get the list of blocked players:

BlockedList getBlockedList();

Blocking a player

To block a player you are hating:

void block(UUID target);

Unblocking a player

To unblock a player:

void unblock(UUID target);

Friend request

To send a friend request to a player:

void sendRequest(UUID target);

Find pending friend request

To find a friend request you received recently but are waiting for response:

Optional<Request> findWaitingRequest(UUID target, boolean checkExpire);

Add new friend

To immediately add a player to your friend list:

void addFriend(UUID target);

Unfriend a player

To remove a player from your friend list:

void unfriend(UUID target);

Allow the player’s friends to teleport to them

Before teleporting to your friend, you should check whether your friend allows you to teleport to them by using the method below:

boolean canTeleportTo();

To check whether your friend can teleport to you, use this method:

boolean canTeleport();

To allow/disallow your friend to teleport to you, use this method:

boolean setCanTeleport(boolean canTeleport);

Allow to receive mail from friends

boolean canMail(); // Checks whether the player can receive the mail of their friend or not.
void setCanMail(boolean canMail); // Sets whether the player can receive the mail of their friend or not.

Mailbox

This mailbox will contain all mails, including mails you have sent and mails you have received from your friends. It can be invoked from the User class:

Mailbox getMailbox();

Send new mail

To send a mail to your friend:

Mail mail = new MailImpl(UUID sender, UUID target, String content, ItemStack... items);
mail.send();

Attached items

To get attached items from a letter:

List<ItemStack> getAttachedItem();

Sender - revoke items from mail

There are 2 methods that allow you to revoke your items from the letter:

boolean revokeItem(ItemStack item); // Revoke the specified item.
boolean revokeAllItems(); // Revoke all items contained in the letter.

Receiver - take items from mail

Same as revoke items, there are 2 methods that allow you to take items from the letter:

boolean takeItem(ItemStack item); // Take the specified item.
boolean takeAllItems(); // Take all items contained in the letter.

Events

We also provide you with some event classes, see details at: Events API.

Subsections of Developer APIs

Events

PreFriendRequestSendEvent

Called before a friend request is sent

public final class PreFriendRequestSendEvent extends BaseEvent implements Cancellable {
    private final Request request;
    private boolean cancelled;

    public PreFriendRequestSendEvent(Request request) {
        this.request = request;
        this.cancelled = false;
    }

    public Request getRequest() {
        return request;
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }

    @Override
    public void setCancelled(boolean cancel) {
        this.cancelled = cancel;
    }
}

PreFriendRequestRespondEvent

Called when a friend request is ready to respond (accept/decline/cancel)

public final class PreFriendRequestRespondEvent extends BaseEvent implements Cancellable {
    private final Request request;
    private Request.Status status;
    private boolean cancelled;

    public PreFriendRequestRespondEvent(Request request, Request.Status status) {
        this.request = request;
        this.status = status;
        this.cancelled = false;
    }

    public Request getRequest() {
        return request;
    }

    public Request.Status getStatus() {
        return status;
    }

    public void setStatus(Request.Status status) {
        this.status = status;
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }

    @Override
    public void setCancelled(boolean cancel) {
        this.cancelled = cancel;
    }
}

FriendTeleportEvent

Called before your friend teleports to you

public final class FriendTeleportEvent extends BaseEvent implements Cancellable {
    private final User user, target;
    private boolean cancelled;

    public FriendTeleportEvent(User user, User target) {
        this.user = user;
        this.target = target;
        this.cancelled = false;
    }

    public User getUser() {
        return user;
    }

    public User getTarget() {
        return target;
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }

    @Override
    public void setCancelled(boolean cancel) {
        this.cancelled = cancel;
    }
}

AttachingItemToMailEvent

Called before attaching items to your mail

public final class AttachingItemToMailEvent extends BaseEvent implements Cancellable {
    private ItemStack item;
    private boolean cancelled;

    public AttachingItemToMailEvent(ItemStack item) {
        this.item = item;
        this.cancelled = false;
    }

    public ItemStack getAttachedItem() {
        return item;
    }

    public void setAttachedItem(ItemStack item) {
        this.item = item;
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }

    @Override
    public void setCancelled(boolean cancel) {
        this.cancelled = cancel;
    }
}

PreMailSendEvent

Called before your mail is sent

public final class PreMailSendEvent extends BaseEvent implements Cancellable {
    private final Mail mail;
    private boolean cancelled;

    public PreMailSendEvent(Mail mail) {
        this.mail = mail;
        this.cancelled = false;
    }

    public Mail getMail() {
        return mail;
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }

    @Override
    public void setCancelled(boolean cancel) {
        this.cancelled = cancel;
    }
}

PreMailRespondEvent

Called when a mail is ready to respond (read/cancel)

public final class PreMailRespondEvent extends BaseEvent implements Cancellable {
    private final Mail mail;
    private Mail.Status status;
    private boolean cancelled;

    public PreMailRespondEvent(Mail mail, Mail.Status status) {
        this.mail = mail;
        this.status = status;
        this.cancelled = false;
    }

    public Mail getMail() {
        return mail;
    }

    public Mail.Status getStatus() {
        return status;
    }

    public void setStatus(Mail.Status status) {
        this.status = status;
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }

    @Override
    public void setCancelled(boolean cancel) {
        this.cancelled = cancel;
    }
}