Compare commits
No commits in common. "ea705c879fbee01a30e0b4af4074903522474eaa" and "9bd9e2132104bac308a633ea4fc0d82b0e6a642a" have entirely different histories.
ea705c879f
...
9bd9e21321
|
|
@ -424,7 +424,6 @@ public final class Config {
|
||||||
public static String mailUnread = "<green><click:run_command:/mail list unread>You have <amount> unread mail, click to view it.</click></green>";
|
public static String mailUnread = "<green><click:run_command:/mail list unread>You have <amount> unread mail, click to view it.</click></green>";
|
||||||
public static String mailSent = "<green>Successfully send mail to <player_name></green>: <#2e8b57><message></#2e8b57>";
|
public static String mailSent = "<green>Successfully send mail to <player_name></green>: <#2e8b57><message></#2e8b57>";
|
||||||
public static List<String> mailCommandAlias = new ArrayList<>();
|
public static List<String> mailCommandAlias = new ArrayList<>();
|
||||||
public static int mailDisplayDelay = 5;
|
|
||||||
private static void mailSettings() {
|
private static void mailSettings() {
|
||||||
mailHeader = getString("settings.mail.header", mailHeader);
|
mailHeader = getString("settings.mail.header", mailHeader);
|
||||||
mailBody = getString("settings.mail.message", mailBody);
|
mailBody = getString("settings.mail.message", mailBody);
|
||||||
|
|
@ -433,7 +432,6 @@ public final class Config {
|
||||||
mailReceived = getString("settings.mail.mail-received", mailReceived);
|
mailReceived = getString("settings.mail.mail-received", mailReceived);
|
||||||
mailUnread = getString("settings.mail.mail-unread", mailUnread);
|
mailUnread = getString("settings.mail.mail-unread", mailUnread);
|
||||||
mailSent = getString("settings.mail.mail-sent", mailSent);
|
mailSent = getString("settings.mail.mail-sent", mailSent);
|
||||||
mailDisplayDelay = getInt("settings.mail.delay", mailDisplayDelay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HashMap<String, Long> serverChannelId = new HashMap<>();
|
public static HashMap<String, Long> serverChannelId = new HashMap<>();
|
||||||
|
|
@ -505,7 +503,7 @@ public final class Config {
|
||||||
public static String NICK_TOO_SOON = "<red>Please wait <time><red> until requesting a new nickname";
|
public static String NICK_TOO_SOON = "<red>Please wait <time><red> until requesting a new nickname";
|
||||||
public static String NICK_REQUEST_PLACED = "<green>Replaced your previous request <oldrequestednick><green> with <newrequestednick><green>.";
|
public static String NICK_REQUEST_PLACED = "<green>Replaced your previous request <oldrequestednick><green> with <newrequestednick><green>.";
|
||||||
public static String NICK_REQUEST_NEW = "<green>New nickname request by <player><green>!";
|
public static String NICK_REQUEST_NEW = "<green>New nickname request by <player><green>!";
|
||||||
public static String NICK_TRYOUT = "<white><prefix><white> <nick><gray>: <white><click:suggest_command:/nick request <nickrequest>>Hi, this is what my new nickname could look like! Click this message to request.";
|
public static String NICK_TRYOUT = "<white><prefix><white> <nick><gray>: <white>Hi, this is what my new nickname could look like!";
|
||||||
public static String NICK_REQUESTED = "<green>Your requested to be nicknamed <nick><green> has been received. Staff will accept or deny this request asap!";
|
public static String NICK_REQUESTED = "<green>Your requested to be nicknamed <nick><green> has been received. Staff will accept or deny this request asap!";
|
||||||
public static String NICK_REVIEW_WAITING = "<green>There are <amount> nicknames waiting for review!";
|
public static String NICK_REVIEW_WAITING = "<green>There are <amount> nicknames waiting for review!";
|
||||||
public static String NICK_TAKEN = "<red>Someone else already has this nickname, or has this name as their username.";
|
public static String NICK_TAKEN = "<red>Someone else already has this nickname, or has this name as their username.";
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,7 @@ public class Nicknames implements CommandExecutor, TabCompleter {
|
||||||
sender.sendMessage(Utility.parseMiniMessage(Config.NICK_TRYOUT,
|
sender.sendMessage(Utility.parseMiniMessage(Config.NICK_TRYOUT,
|
||||||
Placeholder.component("prefix", Utility.applyColor(api.getUserManager().getUser(player.getUniqueId())
|
Placeholder.component("prefix", Utility.applyColor(api.getUserManager().getUser(player.getUniqueId())
|
||||||
.getCachedData().getMetaData().getPrefix())), // TODO pull this from chatuser?
|
.getCachedData().getMetaData().getPrefix())), // TODO pull this from chatuser?
|
||||||
Placeholder.component("nick", Utility.applyColor(args[1])),
|
Placeholder.component("nick", Utility.applyColor(args[1]))));
|
||||||
Placeholder.unparsed("nickrequest", args[1])));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(Utility.parseMiniMessage(Config.NICK_NO_LUCKPERMS));
|
sender.sendMessage(Utility.parseMiniMessage(Config.NICK_NO_LUCKPERMS));
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,8 @@ import com.velocitypowered.api.proxy.server.RegisteredServer;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
import net.kyori.adventure.title.Title;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
public class ProxyPlayerListener {
|
public class ProxyPlayerListener {
|
||||||
|
|
||||||
|
|
@ -70,17 +68,9 @@ public class ProxyPlayerListener {
|
||||||
List<Mail> unReadMail = chatUser.getUnReadMail();
|
List<Mail> unReadMail = chatUser.getUnReadMail();
|
||||||
if (unReadMail.isEmpty())
|
if (unReadMail.isEmpty())
|
||||||
return;
|
return;
|
||||||
VelocityChat plugin = VelocityChat.getPlugin();
|
player.sendMessage(Utility.parseMiniMessage(Config.mailUnread,
|
||||||
plugin.getProxy().getScheduler().buildTask(plugin, () -> {
|
Placeholder.unparsed("amount", String.valueOf(unReadMail.size()))
|
||||||
if (!player.isActive())
|
));
|
||||||
return;
|
|
||||||
|
|
||||||
Component message = Utility.parseMiniMessage(Config.mailUnread,
|
|
||||||
Placeholder.unparsed("amount", String.valueOf(unReadMail.size())));
|
|
||||||
player.sendMessage(message);
|
|
||||||
player.showTitle(Title.title(message, Component.empty()));
|
|
||||||
}).delay(Config.mailDisplayDelay * 50L, TimeUnit.MILLISECONDS).schedule();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user