mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-28 12:47:36 +00:00
Fix discrepancies.
This commit is contained in:
parent
ee39e6f534
commit
c26e05c392
@ -15,7 +15,7 @@ public class Command_loginmessage extends FreedomCommand
|
||||
@Override
|
||||
public boolean run(final CommandSender sender, final Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
if (plugin.sh == null || !plugin.pl.getData(playerSender).hasItem(ShopItem.LOGIN_MESSAGES) && !isAdmin(playerSender))
|
||||
if (plugin.sh == null && !sender.hasPermission("tfm.loginmessage.custom") || !plugin.pl.getData(playerSender).hasItem(ShopItem.LOGIN_MESSAGES) && !isAdmin(playerSender))
|
||||
{
|
||||
msg("You did not purchase the ability to use login messages, or the shop is not present! Purchase the ability from the shop.", ChatColor.RED);
|
||||
return true;
|
||||
|
@ -2,6 +2,8 @@ name: TotalFreedomMod
|
||||
main: me.totalfreedom.totalfreedommod.TotalFreedomMod
|
||||
version: ${project.version}
|
||||
description: Plugin for the Total Freedom server.
|
||||
depend:
|
||||
- LuckPerms
|
||||
softdepend:
|
||||
- BukkitTelnet
|
||||
- Essentials
|
||||
|
@ -33,7 +33,7 @@
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-core</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<version>3.5.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -16,6 +16,7 @@ import me.totalfreedom.totalfreedommod.rank.GroupProvider;
|
||||
import me.totalfreedom.totalfreedommod.rank.Title;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import net.kyori.adventure.text.format.TextColor;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
@ -33,7 +34,7 @@ public class AdminChatListener
|
||||
this.bot = tfd4j.getBot();
|
||||
}
|
||||
|
||||
public static net.md_5.bungee.api.ChatColor getColor(Displayable display)
|
||||
public static TextColor getColor(Displayable display)
|
||||
{
|
||||
return display.getColor();
|
||||
}
|
||||
@ -90,9 +91,9 @@ public class AdminChatListener
|
||||
if (!Strings.isNullOrEmpty(format))
|
||||
{
|
||||
Displayable display = getDisplay(member);
|
||||
net.md_5.bungee.api.ChatColor color = getColor(display);
|
||||
TextColor color = getColor(display);
|
||||
String m1 = format.replace("%name%", member.getDisplayName())
|
||||
.replace("%rank%", display.getAbbr())
|
||||
.replace("%rank%", FUtil.miniMessage(display.getAbbr()))
|
||||
.replace("%rankcolor%", color.toString())
|
||||
.replace("%msg%", FUtil.colorize(msg.getContent()));
|
||||
builder.append(FUtil.colorize(m1));
|
||||
|
Loading…
Reference in New Issue
Block a user