mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Login messages
Last commit from me. Don't have the power but to me Packs is the new Lead Developer
This commit is contained in:
parent
2ecfd9610f
commit
6e84fdad23
@ -37,7 +37,7 @@ public class Command_loginmessage extends FreedomCommand
|
||||
msg("Your login message must contain your rank. Use either %rank% or %coloredrank% to specify where you want the rank", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
int length = message.replace("%name%", "").replace("%rank%", "").replace("%coloredrank%", "").replace("%det%", "").length();
|
||||
int length = message.replace("%name%", "").replace("%rank%", "").replace("%coloredrank%", "").replace("%art%", "").length();
|
||||
if (length > 100)
|
||||
{
|
||||
msg("Your login message cannot be more than 100 characters (excluding your rank and your name)", ChatColor.RED);
|
||||
|
@ -5,7 +5,7 @@ import net.md_5.bungee.api.ChatColor;
|
||||
public interface Displayable
|
||||
{
|
||||
|
||||
public String getDeterminer();
|
||||
public String getArticle();
|
||||
|
||||
public String getName();
|
||||
|
||||
|
@ -19,7 +19,7 @@ public enum Rank implements Displayable
|
||||
@Getter
|
||||
private final String abbr;
|
||||
@Getter
|
||||
private final String determiner;
|
||||
private final String article;
|
||||
@Getter
|
||||
private final String tag;
|
||||
@Getter
|
||||
@ -33,12 +33,12 @@ public enum Rank implements Displayable
|
||||
@Getter
|
||||
private final boolean hasDefaultLoginMessage;
|
||||
|
||||
Rank(String determiner, String name, Type type, String abbr, ChatColor color, org.bukkit.ChatColor teamColor, Boolean hasTeam, Boolean hasDefaultLoginMessage)
|
||||
Rank(String article, String name, Type type, String abbr, ChatColor color, org.bukkit.ChatColor teamColor, Boolean hasTeam, Boolean hasDefaultLoginMessage)
|
||||
{
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.abbr = abbr;
|
||||
this.determiner = determiner;
|
||||
this.article = article;
|
||||
this.tag = abbr.isEmpty() ? "" : "[" + abbr + "]";
|
||||
this.coloredTag = abbr.isEmpty() ? "" : ChatColor.DARK_GRAY + "[" + color + abbr + ChatColor.DARK_GRAY + "]" + color;
|
||||
this.color = color;
|
||||
@ -56,7 +56,7 @@ public enum Rank implements Displayable
|
||||
@Override
|
||||
public String getColoredLoginMessage()
|
||||
{
|
||||
return determiner + " " + color + name;
|
||||
return article + " " + color + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -271,7 +271,7 @@ public class RankManager extends FreedomService
|
||||
{
|
||||
if (display.hasDefaultLoginMessage())
|
||||
{
|
||||
message = "%name% is %det% %coloredrank%";
|
||||
message = "%name% is %art% %coloredrank%";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -281,7 +281,7 @@ public class RankManager extends FreedomService
|
||||
+ FUtil.colorize(message).replace("%name%", player.getName())
|
||||
.replace("%rank%", display.getName())
|
||||
.replace("%coloredrank%", display.getColoredName())
|
||||
.replace("%det%", display.getDeterminer()));
|
||||
.replace("%art%", display.getDeterminer()));
|
||||
return loginMessage;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ public enum Title implements Displayable
|
||||
OWNER("the", "Owner", ChatColor.of("#ff0000"), org.bukkit.ChatColor.DARK_RED, "Owner", true, true);
|
||||
|
||||
@Getter
|
||||
private final String determiner;
|
||||
private final String article;
|
||||
@Getter
|
||||
private final String name;
|
||||
@Getter
|
||||
@ -30,9 +30,9 @@ public enum Title implements Displayable
|
||||
private final boolean hasTeam;
|
||||
private final boolean hasDefaultLoginMessage;
|
||||
|
||||
Title(String determiner, String name, ChatColor color, org.bukkit.ChatColor teamColor, String tag, Boolean hasTeam, Boolean hasDefaultLoginMessage)
|
||||
Title(String article, String name, ChatColor color, org.bukkit.ChatColor teamColor, String tag, Boolean hasTeam, Boolean hasDefaultLoginMessage)
|
||||
{
|
||||
this.determiner = determiner;
|
||||
this.article = article;
|
||||
this.name = name;
|
||||
this.coloredTag = ChatColor.DARK_GRAY + "[" + color + tag + ChatColor.DARK_GRAY + "]" + color;
|
||||
this.abbr = tag;
|
||||
@ -64,6 +64,6 @@ public enum Title implements Displayable
|
||||
@Override
|
||||
public String getColoredLoginMessage()
|
||||
{
|
||||
return determiner + " " + color + name;
|
||||
return article + " " + color + name;
|
||||
}
|
||||
}
|
@ -148,8 +148,21 @@ shop:
|
||||
|
||||
# Login messages. Use %name% for usernames, and %rank% for ranks/titles
|
||||
login_messages:
|
||||
- '&b%name% is a terrible %coloredrank%'
|
||||
- '&bthat %name% dude is a shitty %coloredrank%'
|
||||
- '%name% is a terrible %coloredrank%'
|
||||
- 'that %name% dude is a shitty %coloredrank%'
|
||||
- 'Hi, my name is %name% and I'm %art% %coloredrank%&b that wasted coins on this login message.'
|
||||
- '&aDo not fear, %coloredrank% &b%name% &ais here!'
|
||||
- '%name% is %art% %coloredrank%&b, say hi to them before they gets banned for doing something stupid'
|
||||
- 'Oh. It's &l%name%&r&b the %coloredrank%&b again. Great.'
|
||||
- 'Make way for %name% the %coloredrank%&b!'
|
||||
- 'It's a bird! It's a plane! No, it's %art% %rank%! It's %name%'
|
||||
- '%rank% %name%'
|
||||
- '%coloredrank%&b %name%'
|
||||
- 'A wild %name%, %art% %coloredrank%&b, appeared!'
|
||||
- 'All in all, the %rank% %name% is just another brick in the wall'
|
||||
- '&a%name% &bis a a geeky &6%rank%'
|
||||
- '%name% is the %rank% who just exists'
|
||||
- '%name% based cringe poggers based based %rank%'
|
||||
|
||||
# Item prices
|
||||
prices:
|
||||
|
Loading…
Reference in New Issue
Block a user