mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +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
|
# by Madgeek1450
|
||||||
|
|
||||||
# Block placement prevention:
|
# 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.
|
# SuperAwesomeAdmins - Because normal superadmin just isn't awesome enough. These users can do even more awesomey admin shit.
|
||||||
super_awesome_admins:
|
super_awesome_admins:
|
||||||
|
- console
|
||||||
- markbyron
|
- markbyron
|
||||||
- mark
|
- mark
|
||||||
- madgeek1450
|
- madgeek1450
|
||||||
- madgeek
|
- madgeek
|
||||||
- darthsalamon
|
- darthsalamon
|
||||||
- darth
|
- 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.net.URI;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
@ -686,24 +684,29 @@ public class TFM_Util
|
|||||||
return "an " + ChatColor.YELLOW + ChatColor.UNDERLINE + "impostor" + ChatColor.RESET + ChatColor.AQUA + "!";
|
return "an " + ChatColor.YELLOW + ChatColor.UNDERLINE + "impostor" + ChatColor.RESET + ChatColor.AQUA + "!";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sender.getName().equalsIgnoreCase("markbyron"))
|
// if (sender.getName().equalsIgnoreCase("markbyron"))
|
||||||
{
|
// {
|
||||||
return "the " + ChatColor.LIGHT_PURPLE + "owner" + ChatColor.AQUA + ".";
|
// 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 + ".";
|
return ChatColor.translateAlternateColorCodes('&', TotalFreedomMod.customUserTitles.get(sender.getName().toLowerCase()));
|
||||||
}
|
|
||||||
|
|
||||||
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 (TFM_Util.isUserSuperadmin(sender))
|
if (TFM_Util.isUserSuperadmin(sender))
|
||||||
|
@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import me.StevenLawson.TotalFreedomMod.Commands.TFM_Command;
|
import me.StevenLawson.TotalFreedomMod.Commands.TFM_Command;
|
||||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_BlockListener;
|
import me.StevenLawson.TotalFreedomMod.Listener.TFM_BlockListener;
|
||||||
import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener;
|
import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener;
|
||||||
@ -198,6 +199,7 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
public static boolean protectedAreasEnabled = true;
|
public static boolean protectedAreasEnabled = true;
|
||||||
public static boolean autoProtectSpawnpoints = true;
|
public static boolean autoProtectSpawnpoints = true;
|
||||||
public static double autoProtectRadius = 25.0D;
|
public static double autoProtectRadius = 25.0D;
|
||||||
|
public static Map<String, String> customUserTitles = new HashMap<String, String>();
|
||||||
|
|
||||||
public void loadMainConfig()
|
public void loadMainConfig()
|
||||||
{
|
{
|
||||||
@ -239,6 +241,17 @@ public class TotalFreedomMod extends JavaPlugin
|
|||||||
protectedAreasEnabled = config.getBoolean("protected_areas_enabled", protectedAreasEnabled);
|
protectedAreasEnabled = config.getBoolean("protected_areas_enabled", protectedAreasEnabled);
|
||||||
autoProtectSpawnpoints = config.getBoolean("auto_protect_spawnpoints", autoProtectSpawnpoints);
|
autoProtectSpawnpoints = config.getBoolean("auto_protect_spawnpoints", autoProtectSpawnpoints);
|
||||||
autoProtectRadius = config.getDouble("auto_protect_radius", autoProtectRadius);
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: TotalFreedomMod
|
name: TotalFreedomMod
|
||||||
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
main: me.StevenLawson.TotalFreedomMod.TotalFreedomMod
|
||||||
version: 2.8
|
version: 2.9
|
||||||
description: Plugin for the Total Freedom server.
|
description: Plugin for the Total Freedom server.
|
||||||
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
authors: [StevenLawson / Madgeek1450, JeromSar / DarthSalamon]
|
||||||
commands:
|
commands:
|
||||||
|
Loading…
Reference in New Issue
Block a user