mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-30 13:27:37 +00:00
add toggleable clear inventories on join feature, fix shop
This commit is contained in:
parent
f05d6a71ae
commit
d582398f93
@ -188,9 +188,15 @@ public class LoginProcess extends FreedomService
|
||||
final Player player = event.getPlayer();
|
||||
final FPlayer fPlayer = plugin.pl.getPlayer(player);
|
||||
|
||||
player.sendTitle(ChatColor.GRAY + "Welcome to " + ChatColor.YELLOW + "TotalFreedom!", ChatColor.GREEN + "Remember to vote and enable verification!", 20, 100, 60);
|
||||
player.sendTitle(ChatColor.GRAY + "Welcome to " + ChatColor.YELLOW + "TotalFreedom!", ChatColor.GREEN + "Celebrating 9 years!", 20, 100, 60);
|
||||
player.setOp(true);
|
||||
|
||||
if (ConfigEntry.ALLOW_CLEAR_ON_JOIN.getBoolean())
|
||||
{
|
||||
player.getInventory().clear();
|
||||
player.sendMessage(ChatColor.AQUA + "Your inventory has been cleared automatically.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ConfigEntry.SERVER_TABLIST_HEADER.getString().isEmpty())
|
||||
{
|
||||
|
@ -203,6 +203,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
|
||||
mbwr = services.registerService(MasterBuilderWorldRestrictions.class);
|
||||
|
||||
pl = services.registerService(PlayerList.class);
|
||||
sh = services.registerService(Shop.class);
|
||||
an = services.registerService(Announcer.class);
|
||||
cm = services.registerService(ChatManager.class);
|
||||
dc = services.registerService(Discord.class);
|
||||
|
@ -39,6 +39,7 @@ public class Command_toggle extends FreedomCommand
|
||||
msg("- unsafeenchs");
|
||||
msg("- bells");
|
||||
msg("- armorstands");
|
||||
msg("- clearonjoin");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -171,6 +172,11 @@ public class Command_toggle extends FreedomCommand
|
||||
toggle("The placement of armor stands is", ConfigEntry.ALLOW_ARMOR_STANDS);
|
||||
return true;
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("clearonjoin"))
|
||||
{
|
||||
toggle("The clearing of inventories on join is", ConfigEntry.ALLOW_CLEAR_ON_JOIN);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
@ -189,7 +195,7 @@ public class Command_toggle extends FreedomCommand
|
||||
{
|
||||
return Arrays.asList(
|
||||
"waterplace", "fireplace", "lavaplace", "fluidspread", "lavadmg", "firespread", "frostwalk",
|
||||
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives", "unsafeenchs", "bells", "armorstands");
|
||||
"firework", "prelog", "lockdown", "petprotect", "entitywipe", "nonuke", "explosives", "unsafeenchs", "bells", "armorstands", "clearonjoin");
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
|
@ -24,6 +24,7 @@ public enum ConfigEntry
|
||||
ALLOW_UNSAFE_ENCHANTMENTS(Boolean.class, "allow.unsafe_enchantments"),
|
||||
ALLOW_BELLS(Boolean.class, "allow.bells"),
|
||||
ALLOW_ARMOR_STANDS(Boolean.class, "allow.armorstands"),
|
||||
ALLOW_CLEAR_ON_JOIN(Boolean.class, "allow.clearonjoin"),
|
||||
//
|
||||
BLOCKED_CHATCODES(String.class, "blocked_chatcodes"),
|
||||
//
|
||||
|
@ -38,7 +38,7 @@ public class FUtil
|
||||
//
|
||||
public static final String SAVED_FLAGS_FILENAME = "savedflags.dat";
|
||||
// See https://github.com/TotalFreedom/License - None of the listed names may be removed.
|
||||
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "OxLemonxO", "Wild1145", "Catholic_Mario", "Arcaknight", "homeybee");
|
||||
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "OxLemonxO", "Wild1145", "Catholic_Mario", "Arcaknight", "RealIvan");
|
||||
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
|
||||
public static final Map<String, ChatColor> CHAT_COLOR_NAMES = new HashMap<>();
|
||||
public static final List<ChatColor> CHAT_COLOR_POOL = Arrays.asList(
|
||||
|
@ -117,6 +117,7 @@ allow:
|
||||
unsafe_enchantments: true
|
||||
bells: true
|
||||
armorstands: false
|
||||
clearonjoin: false
|
||||
|
||||
# Blocked commands:
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user