mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +00:00
Add basic /spy support
This commit is contained in:
1 parent
53d9086939
commit
b3dded7852
10 files changed
+237
-27
No files matched your search
@@ -109,7 +109,7 @@ public abstract class ChatChannel {
|
|||||||
*/
|
*/
|
||||||
public abstract boolean canPlayerUse(ChatUser user);
|
public abstract boolean canPlayerUse(ChatUser user);
|
||||||
|
|
||||||
public abstract boolean canPlayerSee(ChatUser sender, ChatUser target);
|
public abstract boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying);
|
||||||
|
|
||||||
public abstract List<ChatUser> getAudience(ChatUser user);
|
public abstract List<ChatUser> getAudience(ChatUser user);
|
||||||
|
|
||||||
@@ -133,6 +133,8 @@ public abstract class ChatChannel {
|
|||||||
|
|
||||||
public abstract void processDiscordMessage(MessageCreateEvent event);
|
public abstract void processDiscordMessage(MessageCreateEvent event);
|
||||||
|
|
||||||
|
public String processPlaceholders(ChatUser user, String input) { return input; }
|
||||||
|
|
||||||
public static abstract class Builder {
|
public static abstract class Builder {
|
||||||
public abstract ChatChannel build(SimpleChat simpleChat);
|
public abstract ChatChannel build(SimpleChat simpleChat);
|
||||||
public abstract ChatChannel.Builder setColor(TextColor color);
|
public abstract ChatChannel.Builder setColor(TextColor color);
|
||||||
|
|||||||
@@ -18,8 +18,14 @@ public class AllianceChatChannel extends SimpleChatChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayerSee(ChatUser sender, ChatUser target) {
|
public boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying) {
|
||||||
if (super.canPlayerSee(sender, target) && sender != null) {
|
if (checkSpying && target.asPlayer().hasPermission("simplechat.spy." + getName())) {
|
||||||
|
if (target.getChannelSettings(this).isSpying()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (super.canPlayerSee(sender, target, false) && sender != null) {
|
||||||
try {
|
try {
|
||||||
Resident resident = TownyAPI.getInstance().getDataSource().getResident(target.asPlayer().getName());
|
Resident resident = TownyAPI.getInstance().getDataSource().getResident(target.asPlayer().getName());
|
||||||
Resident targetResident = TownyAPI.getInstance().getDataSource().getResident(sender.asPlayer().getName());
|
Resident targetResident = TownyAPI.getInstance().getDataSource().getResident(sender.asPlayer().getName());
|
||||||
|
|||||||
@@ -19,8 +19,33 @@ public class NationChatChannel extends SimpleChatChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayerSee(ChatUser sender, ChatUser target) {
|
public String processPlaceholders(ChatUser user, String input) {
|
||||||
if (super.canPlayerSee(sender, target) && sender != null) {
|
return input.replace("<nation>", getNation(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getNation(ChatUser user) {
|
||||||
|
try {
|
||||||
|
Resident resident = TownyAPI.getInstance().getDataSource().getResident(user.asPlayer().getName());
|
||||||
|
|
||||||
|
if (resident.hasNation()) {
|
||||||
|
return resident.getTown().getNation().getFormattedName();
|
||||||
|
}
|
||||||
|
} catch (NotRegisteredException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying) {
|
||||||
|
if (checkSpying && target.asPlayer().hasPermission("simplechat.spy." + getName())) {
|
||||||
|
if (target.getChannelSettings(this).isSpying()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (super.canPlayerSee(sender, target, false) && sender != null) {
|
||||||
try {
|
try {
|
||||||
Resident resident = TownyAPI.getInstance().getDataSource().getResident(sender.asPlayer().getName());
|
Resident resident = TownyAPI.getInstance().getDataSource().getResident(sender.asPlayer().getName());
|
||||||
|
|
||||||
@@ -52,6 +77,11 @@ public class NationChatChannel extends SimpleChatChannel {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isNationChat() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static NationChatChannel.Builder nationBuilder(String name) {
|
public static NationChatChannel.Builder nationBuilder(String name) {
|
||||||
return new NationChatChannel.Builder(name);
|
return new NationChatChannel.Builder(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,27 @@ public class PartyChatChannel extends SimpleChatChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayerSee(ChatUser sender, ChatUser target) {
|
public String processPlaceholders(ChatUser user, String input) {
|
||||||
if (super.canPlayerSee(sender, target) && sender != null) {
|
System.out.println("??????");
|
||||||
|
|
||||||
|
String partyName = PartyAPI.getPartyName(user.asPlayer());
|
||||||
|
|
||||||
|
if (partyName == null) {
|
||||||
|
partyName = "NotLoaded";
|
||||||
|
}
|
||||||
|
|
||||||
|
return input.replace("<party>", partyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying) {
|
||||||
|
if (checkSpying && target.asPlayer().hasPermission("simplechat.spy." + getName())) {
|
||||||
|
if (target.getChannelSettings(this).isSpying()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (super.canPlayerSee(sender, target, false) && sender != null) {
|
||||||
return PartyAPI.inSameParty(sender.asPlayer(), target.asPlayer());
|
return PartyAPI.inSameParty(sender.asPlayer(), target.asPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,6 +52,11 @@ public class PartyChatChannel extends SimpleChatChannel {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPartyChat() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static PartyChatChannel.Builder partyBuilder(String name) {
|
public static PartyChatChannel.Builder partyBuilder(String name) {
|
||||||
return new PartyChatChannel.Builder(name);
|
return new PartyChatChannel.Builder(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class SimpleChatChannel extends ChatChannel {
|
|||||||
List<ChatUser> audience = new ArrayList<>();
|
List<ChatUser> audience = new ArrayList<>();
|
||||||
|
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
if (canPlayerSee(user, simpleChat.getUserService().wrap(player))) {
|
if (canPlayerSee(user, simpleChat.getUserService().wrap(player), false)) {
|
||||||
audience.add(simpleChat.getUserService().wrap(player));
|
audience.add(simpleChat.getUserService().wrap(player));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,18 +166,49 @@ public class SimpleChatChannel extends ChatChannel {
|
|||||||
Bukkit.getPluginManager().callEvent(componentEvent);
|
Bukkit.getPluginManager().callEvent(componentEvent);
|
||||||
|
|
||||||
// Send message as normal
|
// Send message as normal
|
||||||
for (ChatUser chatUser : componentEvent.getRecipients()) {
|
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||||
|
ChatUser chatUser = simpleChat.getUserService().wrap(onlinePlayer);
|
||||||
|
|
||||||
TextColor userColor = chatUser.getChannelSettings(this).getColor();
|
TextColor userColor = chatUser.getChannelSettings(this).getColor();
|
||||||
|
|
||||||
if (userColor == null) {
|
String prefix;
|
||||||
chatUser.sendMessage(componentEvent.getComponent());
|
|
||||||
|
if (isNationChat()) {
|
||||||
|
prefix = simpleChat.getConfig().getString("spy-prefix-nation");
|
||||||
|
} else if (isTownChat()) {
|
||||||
|
prefix = simpleChat.getConfig().getString("spy-prefix-town");
|
||||||
|
} else if (isPartyChat()) {
|
||||||
|
prefix = simpleChat.getConfig().getString("spy-prefix-mcmmo");
|
||||||
} else {
|
} else {
|
||||||
TextComponent newFormat = (TextComponent)MiniMessage.get().parse(formatEvent.getFormat(),
|
prefix = simpleChat.getConfig().getString("spy-prefix");
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix = processPlaceholders(user, prefix);
|
||||||
|
|
||||||
|
if (userColor == null) {
|
||||||
|
if (isUserSpying(user, chatUser)) {
|
||||||
|
prefix = prefix.replace("<color>", "<color:" + getColor() + ">");
|
||||||
|
|
||||||
|
chatUser.sendMessage(MiniMessage.get().parse(prefix).append(componentEvent.getComponent()));
|
||||||
|
} else if (componentEvent.getRecipients().contains(chatUser)) {
|
||||||
|
chatUser.sendMessage(componentEvent.getComponent());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
prefix = prefix.replace("<color>", "<color:" + chatUser.getChannelSettings(this).getColor().asHexString() + ">");
|
||||||
|
String format = formatEvent.getFormat();
|
||||||
|
|
||||||
|
TextComponent newFormat = (TextComponent)MiniMessage.get().parse(format,
|
||||||
"color", "<color:" + userColor.toString() + ">",
|
"color", "<color:" + userColor.toString() + ">",
|
||||||
"phase", Long.toString(System.currentTimeMillis() % 25),
|
"phase", Long.toString(System.currentTimeMillis() % 25),
|
||||||
"server", simpleChat.getConfig().getString("server-name", "Server"),
|
"server", simpleChat.getConfig().getString("server-name", "Server"),
|
||||||
"message", formatEvent.getMessage());
|
"message", formatEvent.getMessage());
|
||||||
|
|
||||||
|
if (isUserSpying(user, chatUser)) {
|
||||||
|
newFormat = (TextComponent)MiniMessage.get().parse(prefix).append(newFormat);
|
||||||
|
} else if (!componentEvent.getRecipients().contains(chatUser)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ChatComponentEvent newEvent = new ChatComponentEvent(user, this, newFormat, formatEvent.getMessage(), Collections.singletonList(chatUser));
|
ChatComponentEvent newEvent = new ChatComponentEvent(user, this, newFormat, formatEvent.getMessage(), Collections.singletonList(chatUser));
|
||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(newEvent);
|
Bukkit.getPluginManager().callEvent(newEvent);
|
||||||
@@ -187,10 +218,8 @@ public class SimpleChatChannel extends ChatChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Log message to console
|
// Log message to console
|
||||||
//String sm = user.isShadowMuted() ? "[SM] " : "";
|
String sm = user.isShadowMuted() ? "[SM] " : "";
|
||||||
//System.out.println(sm + LegacyComponentSerializer.legacy().serialize(componentEvent.getComponent()));
|
System.out.println(sm + LegacyComponentSerializer.legacy().serialize(componentEvent.getComponent()));
|
||||||
|
|
||||||
//System.out.println(GsonComponentSerializer.gson().serialize(componentEvent.getComponent()));
|
|
||||||
|
|
||||||
// Route message to bungee / discord (if message originates from this server)
|
// Route message to bungee / discord (if message originates from this server)
|
||||||
// Use instanceof and not isOnline, if this message originates from another then the instanceof will
|
// Use instanceof and not isOnline, if this message originates from another then the instanceof will
|
||||||
@@ -206,6 +235,16 @@ public class SimpleChatChannel extends ChatChannel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isUserSpying(ChatUser sender, ChatUser target) {
|
||||||
|
if (!canPlayerSee(sender, target, false)) {
|
||||||
|
if (target.getChannelSettings(this).isSpying()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendComponent(ChatUser player, Component component) {
|
public void sendComponent(ChatUser player, Component component) {
|
||||||
for (ChatUser user : getAudience(player)) {
|
for (ChatUser user : getAudience(player)) {
|
||||||
@@ -268,9 +307,15 @@ public class SimpleChatChannel extends ChatChannel {
|
|||||||
return getFormat(group);
|
return getFormat(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlayerSee(ChatUser sender, ChatUser target) {
|
public boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying) {
|
||||||
Player targetPlayer = target.asPlayer();
|
Player targetPlayer = target.asPlayer();
|
||||||
|
|
||||||
|
if (checkSpying && targetPlayer.hasPermission("simplechat.spy." + getName())) {
|
||||||
|
if (target.getChannelSettings(this).isSpying()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!targetPlayer.hasPermission("simplechat.channels." + getName() + ".see")) {
|
if (!targetPlayer.hasPermission("simplechat.channels." + getName() + ".see")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,33 @@ public class TownChatChannel extends SimpleChatChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayerSee(ChatUser sender, ChatUser target) {
|
public String processPlaceholders(ChatUser user, String input) {
|
||||||
if (super.canPlayerSee(sender, target) && sender != null) {
|
return input.replace("<town>", getTown(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getTown(ChatUser user) {
|
||||||
|
try {
|
||||||
|
Resident resident = TownyAPI.getInstance().getDataSource().getResident(user.asPlayer().getName());
|
||||||
|
|
||||||
|
if (resident.hasTown()) {
|
||||||
|
return resident.getTown().getFormattedName();
|
||||||
|
}
|
||||||
|
} catch (NotRegisteredException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayerSee(ChatUser sender, ChatUser target, boolean checkSpying) {
|
||||||
|
if (checkSpying && target.asPlayer().hasPermission("simplechat.spy." + getName())) {
|
||||||
|
if (target.getChannelSettings(this).isSpying()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (super.canPlayerSee(sender, target, false) && sender != null) {
|
||||||
try {
|
try {
|
||||||
Resident resident = TownyAPI.getInstance().getDataSource().getResident(target.asPlayer().getName());
|
Resident resident = TownyAPI.getInstance().getDataSource().getResident(target.asPlayer().getName());
|
||||||
|
|
||||||
@@ -47,6 +72,11 @@ public class TownChatChannel extends SimpleChatChannel {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isTownChat() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static TownChatChannel.Builder townBuilder(String name) {
|
public static TownChatChannel.Builder townBuilder(String name) {
|
||||||
return new TownChatChannel.Builder(name);
|
return new TownChatChannel.Builder(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package net.draycia.simplechat.commands;
|
||||||
|
|
||||||
|
import co.aikar.commands.BaseCommand;
|
||||||
|
import co.aikar.commands.annotation.CommandAlias;
|
||||||
|
import co.aikar.commands.annotation.CommandCompletion;
|
||||||
|
import co.aikar.commands.annotation.Conditions;
|
||||||
|
import co.aikar.commands.annotation.Default;
|
||||||
|
import net.draycia.simplechat.SimpleChat;
|
||||||
|
import net.draycia.simplechat.channels.ChatChannel;
|
||||||
|
import net.draycia.simplechat.storage.ChatUser;
|
||||||
|
import net.draycia.simplechat.storage.UserChannelSettings;
|
||||||
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@CommandAlias("spych|spychannel|spy")
|
||||||
|
public class SpyChannelCommand extends BaseCommand {
|
||||||
|
|
||||||
|
private SimpleChat simpleChat;
|
||||||
|
|
||||||
|
public SpyChannelCommand(SimpleChat simpleChat) {
|
||||||
|
this.simpleChat = simpleChat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Default
|
||||||
|
@CommandCompletion("@channel")
|
||||||
|
public void baseCommand(Player player, @Conditions("exists:true") ChatChannel channel) {
|
||||||
|
ChatUser user = simpleChat.getUserService().wrap(player);
|
||||||
|
|
||||||
|
String message;
|
||||||
|
|
||||||
|
UserChannelSettings settings = user.getChannelSettings(channel);
|
||||||
|
|
||||||
|
if (settings.isSpying()) {
|
||||||
|
settings.setSpying(false);
|
||||||
|
message = simpleChat.getConfig().getString("language.spy-toggled-off");
|
||||||
|
} else {
|
||||||
|
settings.setSpying(true);
|
||||||
|
message = simpleChat.getConfig().getString("language.spy-toggled-on");
|
||||||
|
}
|
||||||
|
|
||||||
|
user.sendMessage(MiniMessage.get().parse(message,
|
||||||
|
"color", "<color:" + channel.getColor().toString() + ">", "channel", channel.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -35,6 +35,16 @@ public class CommandManager {
|
|||||||
return completions;
|
return completions;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
commandManager.getCommandCompletions().registerCompletion("channel", (context) -> {
|
||||||
|
ArrayList<String> completions = new ArrayList<>();
|
||||||
|
|
||||||
|
for (ChatChannel chatChannel : simpleChat.getChannels()) {
|
||||||
|
completions.add(chatChannel.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
return completions;
|
||||||
|
});
|
||||||
|
|
||||||
commandManager.getCommandContexts().registerContext(ChatChannel.class, (context) -> {
|
commandManager.getCommandContexts().registerContext(ChatChannel.class, (context) -> {
|
||||||
String name = context.popFirstArg();
|
String name = context.popFirstArg();
|
||||||
|
|
||||||
@@ -63,6 +73,12 @@ public class CommandManager {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
commandManager.getCommandConditions().addCondition(ChatChannel.class,"exists", (context, execution, value) -> {
|
||||||
|
if (value == null) {
|
||||||
|
throw new ConditionFailedException(simpleChat.getConfig().getString("language.cannot-use-channel"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
setupCommands(commandManager);
|
setupCommands(commandManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +95,7 @@ public class CommandManager {
|
|||||||
manager.registerCommand(new MuteCommand(simpleChat));
|
manager.registerCommand(new MuteCommand(simpleChat));
|
||||||
manager.registerCommand(new ChannelColorCommand(simpleChat));
|
manager.registerCommand(new ChannelColorCommand(simpleChat));
|
||||||
manager.registerCommand(new SetColorCommand(simpleChat));
|
manager.registerCommand(new SetColorCommand(simpleChat));
|
||||||
|
manager.registerCommand(new SpyChannelCommand(simpleChat));
|
||||||
}
|
}
|
||||||
|
|
||||||
public co.aikar.commands.CommandManager getCommandManager() {
|
public co.aikar.commands.CommandManager getCommandManager() {
|
||||||
|
|||||||
@@ -97,20 +97,25 @@ public class MySQLUserService extends UserService {
|
|||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<DbRow> ignoredChannels = database.getResults("SELECT * from sc_channel_settings WHERE uuid = ?;", uuid.toString());
|
List<DbRow> channelSettings = database.getResults("SELECT * from sc_channel_settings WHERE uuid = ?;", uuid.toString());
|
||||||
List<DbRow> ignoredUsers = database.getResults("SELECT * from sc_ignored_users WHERE uuid = ?;", uuid.toString());
|
List<DbRow> ignoredUsers = database.getResults("SELECT * from sc_ignored_users WHERE uuid = ?;", uuid.toString());
|
||||||
|
|
||||||
user.setSelectedChannel(simpleChat.getChannel(users.getString("channel")));
|
user.setSelectedChannel(simpleChat.getChannel(users.getString("channel")));
|
||||||
user.setMuted(users.<Boolean>get("muted"));
|
user.setMuted(users.<Boolean>get("muted"));
|
||||||
user.setShadowMuted(users.<Boolean>get("shadowmuted"));
|
user.setShadowMuted(users.<Boolean>get("shadowmuted"));
|
||||||
|
|
||||||
for (DbRow ignoredChannel : ignoredChannels) {
|
for (DbRow channelSetting : channelSettings) {
|
||||||
ChatChannel chatChannel = simpleChat.getChannel(ignoredChannel.getString("channel"));
|
ChatChannel chatChannel = simpleChat.getChannel(channelSetting.getString("channel"));
|
||||||
UserChannelSettings settings = user.getChannelSettings(chatChannel);
|
UserChannelSettings settings = user.getChannelSettings(chatChannel);
|
||||||
|
|
||||||
settings.setSpying(ignoredChannel.<Boolean>get("spying"));
|
settings.setSpying(channelSetting.<Boolean>get("spying"));
|
||||||
settings.setIgnoring(ignoredChannel.<Boolean>get("ignored"));
|
settings.setIgnoring(channelSetting.<Boolean>get("ignored"));
|
||||||
settings.setColor(TextColor.fromHexString(ignoredChannel.getString("color")));
|
|
||||||
|
String color = channelSetting.getString("color");
|
||||||
|
|
||||||
|
if (color != null) {
|
||||||
|
settings.setColor(TextColor.fromHexString(color));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (DbRow ignoredUser : ignoredUsers) {
|
for (DbRow ignoredUser : ignoredUsers) {
|
||||||
@@ -127,7 +132,6 @@ public class MySQLUserService extends UserService {
|
|||||||
SimpleChatUser user = notification.getValue();
|
SimpleChatUser user = notification.getValue();
|
||||||
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
System.out.println("null");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,12 +71,14 @@ language:
|
|||||||
message-to-other: '<green>[<gray>Me <gold>-> <gray><target><green>] <message>'
|
message-to-other: '<green>[<gray>Me <gold>-> <gray><target><green>] <message>'
|
||||||
message-from-other: '<green>[<gray><sender> <gold>-> <gray>Me<green>] <message>'
|
message-from-other: '<green>[<gray><sender> <gold>-> <gray>Me<green>] <message>'
|
||||||
no-reply-target: '<red>You have no one to reply to!'
|
no-reply-target: '<red>You have no one to reply to!'
|
||||||
|
channel-color-set: "<green>You have set <color><channel> <green>color to <hex>!"
|
||||||
|
spy-toggled-on: '<gray>You are now spying on <color><channel> <gray>chat!'
|
||||||
|
spy-toggled-off: '<gray>You are no longer spying on <color><channel> <gray>chat!'
|
||||||
# The following messages are not MiniMessage compatible
|
# The following messages are not MiniMessage compatible
|
||||||
player-left: '%player_displayname% has left <server>!'
|
player-left: '%player_displayname% has left <server>!'
|
||||||
player-joined: '%player_displayname% has joined <server>!'
|
player-joined: '%player_displayname% has joined <server>!'
|
||||||
vote-received: '<name> has voted on <service>!'
|
vote-received: '<name> has voted on <service>!'
|
||||||
cannot-use-channel: "You cannot use that channel!"
|
cannot-use-channel: "You cannot use that channel!"
|
||||||
channel-color-set: "<green>You have set <color><channel> <green>color to <hex>!"
|
|
||||||
|
|
||||||
server-name: 'Server'
|
server-name: 'Server'
|
||||||
|
|
||||||
@@ -87,6 +89,11 @@ item-link-placeholders:
|
|||||||
- '[item]' # cursed placeholder do not use
|
- '[item]' # cursed placeholder do not use
|
||||||
- '%item%'
|
- '%item%'
|
||||||
|
|
||||||
|
spy-prefix: '<color>[SPY] '
|
||||||
|
spy-prefix-nation: '<color>[SPY <nation>] '
|
||||||
|
spy-prefix-town: '<color>[SPY <town>] '
|
||||||
|
spy-prefix-mcmmo: '<color>[SPY <party>] '
|
||||||
|
|
||||||
pings:
|
pings:
|
||||||
enabled: true
|
enabled: true
|
||||||
source: 'PLAYER'
|
source: 'PLAYER'
|
||||||
|
|||||||
Reference in new issue
Block a user