mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Increment to v2.9
Add "Login Title Message Customization"
This commit is contained in:
parent
40bfd059f1
commit
774ca0cf0a
@ -1,4 +1,4 @@
|
||||
# Total Freedom Mod v2.7 Configuration
|
||||
# Total Freedom Mod v2.9 Configuration
|
||||
# by Madgeek1450
|
||||
|
||||
# Block placement prevention:
|
||||
@ -61,9 +61,17 @@ auto_protect_radius: 25.0
|
||||
|
||||
# SuperAwesomeAdmins - Because normal superadmin just isn't awesome enough. These users can do even more awesomey admin shit.
|
||||
super_awesome_admins:
|
||||
- console
|
||||
- markbyron
|
||||
- mark
|
||||
- madgeek1450
|
||||
- madgeek
|
||||
- darthsalamon
|
||||
- darth
|
||||
|
||||
# Login Title Message Customization - Format: '&b<user_name> is <title_message>', where &b is a color code.
|
||||
user_titles:
|
||||
markbyron: the &downer&b.
|
||||
madgeek1450: the &5chief-developer&b and &6master-ass-kicker&b.
|
||||
darthsalamon: a &5developer&b!
|
||||
miwojedk: a &4master-builder&b.
|
||||
|
@ -5,8 +5,6 @@ import java.net.InetSocketAddress;
|
||||
import java.net.URI;
|
||||
import java.util.*;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
@ -686,24 +684,29 @@ public class TFM_Util
|
||||
return "an " + ChatColor.YELLOW + ChatColor.UNDERLINE + "impostor" + ChatColor.RESET + ChatColor.AQUA + "!";
|
||||
}
|
||||
|
||||
if (sender.getName().equalsIgnoreCase("markbyron"))
|
||||
{
|
||||
return "the " + ChatColor.LIGHT_PURPLE + "owner" + ChatColor.AQUA + ".";
|
||||
}
|
||||
// if (sender.getName().equalsIgnoreCase("markbyron"))
|
||||
// {
|
||||
// return "the " + ChatColor.LIGHT_PURPLE + "owner" + ChatColor.AQUA + ".";
|
||||
// }
|
||||
//
|
||||
// if (sender.getName().equalsIgnoreCase("madgeek1450"))
|
||||
// {
|
||||
// return "the " + ChatColor.DARK_PURPLE + "chief-developer" + ChatColor.AQUA + " and " + ChatColor.GOLD + "master-ass-kicker" + ChatColor.AQUA + ".";
|
||||
// }
|
||||
//
|
||||
// if (sender.getName().equalsIgnoreCase("darthsalamon"))
|
||||
// {
|
||||
// return "a " + ChatColor.DARK_PURPLE + "developer" + ChatColor.AQUA + "!";
|
||||
// }
|
||||
//
|
||||
// if (sender.getName().equalsIgnoreCase("miwojedk"))
|
||||
// {
|
||||
// return "a " + ChatColor.DARK_RED + "master-builder" + ChatColor.AQUA + "!";
|
||||
// }
|
||||
|
||||
if (sender.getName().equalsIgnoreCase("madgeek1450"))
|
||||
if (TotalFreedomMod.customUserTitles.containsKey(sender.getName().toLowerCase()))
|
||||
{
|
||||
return "the " + ChatColor.DARK_PURPLE + "chief-developer" + ChatColor.AQUA + " and " + ChatColor.GOLD + "master-ass-kicker" + ChatColor.AQUA + ".";
|
||||
}
|
||||
|
||||
if (sender.getName().equalsIgnoreCase("darthsalamon"))
|
||||
{
|
||||
return "a " + ChatColor.DARK_PURPLE + "developer" + ChatColor.AQUA + "!";
|
||||
}
|
||||
|
||||
if (sender.getName().equalsIgnoreCase("miwojedk"))
|
||||
{
|
||||
return "a " + ChatColor.DARK_RED + "master-builder" + ChatColor.AQUA + "!";
|
||||
return ChatColor.translateAlternateColorCodes('&', TotalFreedomMod.customUserTitles.get(sender.getName().toLowerCase()));
|
||||
}
|
||||
|
||||
if (TFM_Util.isUserSuperadmin(sender))
|
||||
|
@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import me.StevenLawson.TotalFreedomMod.Commands.TFM_Command;
|
||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_BlockListener;
|
||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener;
|
||||
@ -198,6 +199,7 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
public static boolean protectedAreasEnabled = true;
|
||||
public static boolean autoProtectSpawnpoints = true;
|
||||
public static double autoProtectRadius = 25.0D;
|
||||
public static Map<String, String> customUserTitles = new HashMap<String, String>();
|
||||
|
||||
public void loadMainConfig()
|
||||
{
|
||||
@ -239,6 +241,17 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
protectedAreasEnabled = config.getBoolean("protected_areas_enabled", protectedAreasEnabled);
|
||||
autoProtectSpawnpoints = config.getBoolean("auto_protect_spawnpoints", autoProtectSpawnpoints);
|
||||
autoProtectRadius = config.getDouble("auto_protect_radius", autoProtectRadius);
|
||||
|
||||
if (config.isConfigurationSection("user_titles"))
|
||||
{
|
||||
Map<String, Object> raw_titles = config.getConfigurationSection("user_titles").getValues(false);
|
||||
Iterator<Entry<String, Object>> it = raw_titles.entrySet().iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
Entry<String, Object> pair = it.next();
|
||||
customUserTitles.put(pair.getKey(), (String) pair.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: TotalFreedomMod
|
||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||
version: 2.8
|
||||
version: 2.9
|
||||
description: Plugin for the Total Freedom server.
|
||||
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
||||
commands:
|
||||
|
Loading…
Reference in New Issue
Block a user