This commit is contained in:
Telesphoreo 2020-08-05 02:01:21 -05:00
parent ca8758cbb1
commit 880b78e528
21 changed files with 197 additions and 59 deletions

2
.idea/misc.xml generated
View File

@ -7,5 +7,5 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="adopt-openj9-1.8" project-jdk-type="JavaSDK" />
</project>

View File

@ -1,6 +1,5 @@
package me.totalfreedom.totalfreedommod;
import com.sk89q.worldedit.bukkit.BukkitConfiguration;
import java.io.File;
import me.totalfreedom.totalfreedommod.banning.PermbanList;
import me.totalfreedom.totalfreedommod.config.YamlConfig;
@ -9,7 +8,6 @@ import me.totalfreedom.totalfreedommod.punishments.PunishmentList;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.util.FileUtil;
import org.yaml.snakeyaml.Yaml;
public class BackupManager extends FreedomService
{

View File

@ -20,7 +20,6 @@ import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.metadata.MetadataValue;
public class AdminList extends FreedomService
{

View File

@ -11,13 +11,21 @@ import org.bukkit.Material;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.block.data.AnaloguePowerable;
import org.bukkit.block.data.BlockData;
import org.bukkit.block.data.Powerable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Tameable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.*;
import org.bukkit.event.block.BlockBurnEvent;
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockGrowEvent;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.event.block.BlockRedstoneEvent;
import org.bukkit.event.block.LeavesDecayEvent;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDeathEvent;
@ -27,7 +35,6 @@ import org.bukkit.event.entity.FireworkExplodeEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.material.Redstone;
public class EventBlocker extends FreedomService
{

View File

@ -5,7 +5,6 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Biome;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -12,6 +12,7 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandMap;
import org.bukkit.command.CommandSender;
@ -19,7 +20,6 @@ import org.bukkit.command.SimpleCommandMap;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.Bukkit;
import org.bukkit.plugin.SimplePluginManager;
public class CommandBlocker extends FreedomService

View File

@ -1,16 +1,15 @@
package me.totalfreedom.totalfreedommod.bridge;
import me.libraryaddict.disguise.BlockedDisguises;
import me.libraryaddict.disguise.DisguiseAPI;
import me.libraryaddict.disguise.LibsDisguises;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.libraryaddict.disguise.BlockedDisguises;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
public class LibsDisguisesBridge extends FreedomService
{
private LibsDisguises libsDisguisesPlugin = null;
@Override

View File

@ -6,12 +6,12 @@ import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
public class VanishBridge extends FreedomService
{
@Override
public void onStart()
{
@ -29,7 +29,11 @@ public class VanishBridge extends FreedomService
Displayable display = plugin.rm.getDisplay(player);
String tag = display.getColoredTag();
if (!event.isSilent())
if (event.isSilent())
{
plugin.al.messageAllAdmins(ChatColor.GOLD + player.getName() + " silently unvanished.");
}
else
{
FUtil.bcastMsg(plugin.rm.craftLoginMessage(event.getPlayer(), null));
plugin.dc.messageChatChannel("**" + player.getName() + " joined the server" + "**");
@ -47,7 +51,11 @@ public class VanishBridge extends FreedomService
public void onPlayerVanish(PlayerHideEvent event)
{
Player player = event.getPlayer();
if (!event.isSilent())
if (event.isSilent())
{
plugin.al.messageAllAdmins(ChatColor.GOLD + player.getName() + " silently vanished.");
}
else
{
plugin.dc.messageChatChannel("**" + player.getName() + " left the server" + "**");
}

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;

View File

@ -16,13 +16,13 @@ public class Command_linkreddit extends FreedomCommand
{
if (!plugin.rd.enabled)
{
msg("The reddit system is currently disabled.", ChatColor.RED);
msg("The Reddit system is currently disabled.", ChatColor.RED);
return true;
}
if (getData(playerSender).getRedditUsername() != null)
{
msg("Your reddit account is already linked.");
msg("Your Reddit account is already linked.");
return true;
}
@ -38,11 +38,11 @@ public class Command_linkreddit extends FreedomCommand
try
{
plugin.rd.sendModMessage(username, "Link Code", "Please run the following in-game to link your reddit account: /linkreddit code " + code);
plugin.rd.sendModMessage(username, "Link Code", "Please run the following in-game to link your Reddit account: /linkreddit code " + code);
}
catch (ApiException e)
{
msg("Could not find a reddit account by the name of " + args[0], ChatColor.RED);
msg("Could not find a Reddit account by the name of " + args[0], ChatColor.RED);
return true;
}
@ -59,7 +59,7 @@ public class Command_linkreddit extends FreedomCommand
return true;
}
msg("Successfully linked the reddit account " + username + " to your Minecraft account.", ChatColor.GREEN);
msg("Successfully linked the Reddit account " + username + " to your Minecraft account.", ChatColor.GREEN);
if (plugin.rd.updateFlair(playerSender))
{
msg("Your flair has been updated.", ChatColor.GREEN);

View File

@ -4,7 +4,6 @@ import de.myzelyam.api.vanish.VanishAPI;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.rank.Rank;

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;

View File

@ -1,6 +1,5 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;

View File

@ -1,11 +1,9 @@
package me.totalfreedom.totalfreedommod.command;
import java.nio.channels.FileLock;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;

View File

@ -11,7 +11,6 @@ import static org.bukkit.event.player.PlayerResourcePackStatusEvent.Status;
public class CurseListener extends FreedomService
{
public HashMap<Player, Player> cursedPlayers = new HashMap<Player, Player>();
@Override

View File

@ -26,7 +26,6 @@ import org.bukkit.entity.Player;
public class Reddit extends FreedomService
{
private final String SUBREDDIT_NAME = ConfigEntry.REDDIT_SUBREDDIT_NAME.getString();
private final String USERNAME = ConfigEntry.REDDIT_USERNAME.getString();
private final String PASSWORD = ConfigEntry.REDDIT_PASSWORD.getString();
@ -53,7 +52,7 @@ public class Reddit extends FreedomService
@Override
public void onStart()
{
enabled = !Strings.isNullOrEmpty(ConfigEntry.REDDIT_CLIENT_ID.getString());
enabled = ConfigEntry.REDDIT_CLIENT_ID.getString() == null;
if (!enabled)
{
return;
@ -68,14 +67,14 @@ public class Reddit extends FreedomService
}
catch (NoClassDefFoundError e)
{
FLog.warning("The JRAW plugin is not installed, therefore the reddit service cannot start.");
FLog.warning("The JRAW plugin is not installed, therefore the Reddit service cannot start.");
FLog.warning("To resolve this error, please download the latest JRAW from: https://github.com/TFPatches/Minecraft-JRAW/releases");
enabled = false;
return;
}
catch (NullPointerException e)
{
FLog.warning("Invalid reddit credentials specified, please double check everything in the config.");
FLog.warning("Invalid Reddit credentials specified, please double check everything in the config.");
enabled = false;
return;
}
@ -163,7 +162,7 @@ public class Reddit extends FreedomService
Displayable display = plugin.rm.getDisplay(player);
if (username == null)
{
FLog.debug("No reddit account");
FLog.debug("No Reddit account");
return false;
}
@ -222,5 +221,4 @@ public class Reddit extends FreedomService
flairNameList.put(Title.MASTER_BUILDER, "Master Builder");
flairNameList.put(Title.DONATOR, "Premium");
}
}

View File

@ -7,6 +7,7 @@ import java.util.List;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Material;
@ -19,7 +20,6 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.inventory.meta.ItemMeta;
@ -28,7 +28,6 @@ import org.bukkit.scheduler.BukkitTask;
public class Shop extends FreedomService
{
private BukkitTask reactions;
public String reactionString = "";
public Date reactionStartTime;
@ -48,7 +47,6 @@ public class Shop extends FreedomService
public void startReactionTimer()
{
long interval = ConfigEntry.SHOP_REACTIONS_INTERVAL.getInteger() * 20L;
reactions = new BukkitRunnable()
@ -70,6 +68,12 @@ public class Shop extends FreedomService
public void startReaction()
{
if (!ConfigEntry.SHOP_ENABLED.getBoolean())
{
FLog.debug("The shop is not enabled, therefore a reaction did not start.");
return;
}
reactionString = FUtil.randomString(ConfigEntry.SHOP_REACTIONS_STRING_LENGTH.getInteger());
FUtil.bcastMsg(prefix + ChatColor.AQUA + "Enter the code above to win " + ChatColor.GOLD + coinsPerReactionWin + ChatColor.AQUA + " coins!", false);
@ -86,6 +90,7 @@ public class Shop extends FreedomService
{
double seconds = 30;
double max = seconds;
@Override
public void run()
{
@ -259,18 +264,6 @@ public class Shop extends FreedomService
return itemStack;
}
public ItemStack getMagicalSaddle()
{
ItemStack itemStack = new ItemStack(Material.SADDLE);
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.setDisplayName(ChatColor.DARK_GREEN + "Magical Saddle");
itemMeta.setLore(Arrays.asList(ChatColor.GREEN + "Ride anything you want..."));
itemMeta.addEnchant(Enchantment.DURABILITY, 1, true);
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
itemStack.setItemMeta(itemMeta);
return itemStack;
}
public boolean canAfford(int price, int coins)
{
if (coins >= price)
@ -355,7 +348,6 @@ public class Shop extends FreedomService
{
player.sendMessage(ChatColor.GREEN + "Run " + shopItem.getCommand() + " to get one!");
}
}
public ShopItem getShopItem(int slot)

View File

@ -2,17 +2,13 @@ package me.totalfreedom.totalfreedommod.world;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.weather.ThunderChangeEvent;
import org.bukkit.event.weather.WeatherChangeEvent;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;

View File

@ -1,5 +1,5 @@
#
# TotalFreedomMod 5.5 Permissions
# TotalFreedomMod 2020.9 Permissions
# by ZeroEpoch1969
#
@ -11,9 +11,146 @@
remove:
- "voxelsniper"
- "bending"
- "essentials"
- "sv"
# Operator permission nodes
operators:
# Essentials
- "essentials.afk"
- "essentials.afk.message"
- "essentials.afk.auto"
- "essentials.back"
- "essentials.back.*"
- "essentials.balance"
- "essentials.balance.others"
- "essentials.balancetop"
- "essentials.bigtree"
- "essentials.book"
- "essentials.book.title"
- "essentials.book.others"
- "essentials.commandcooldowns.bypass"
- "essentials.compass"
- "essentials.condense"
- "essentials.createkit"
- "essentials.delkit"
- "essentials.delwarp"
- "essentials.depth"
- "essentials.disposal"
- "essentials.eco"
- "essentials.eco.loan"
- "essentials.enderchest"
- "essentials.exp"
- "essentials.exp.give"
- "essentials.exp.others"
- "essentials.exp.set"
- "essentials.ext"
- "essentials.feed"
- "essentials.feed.cooldown.bypass"
- "essentials.firework"
- "essentials.firework.fire"
- "essentials.firework.multiple"
- "essentials.fly"
- "essentials.fly.safelogin"
- "essentials.gc"
- "essentials.getpos"
- "essentials.give"
- "essentials.give.item-all"
- "essentials.god"
- "essentials.god.pvp" # Handled by TFM
- "essentials.hat"
- "essentials.heal"
- "essentials.heal.cooldown.bypass"
- "essentials.help"
- "essentials.home.compass"
- "essentials.home.bed"
- "essentials.ignore"
- "essentials.item"
- "essentials.itemlore"
- "essentials.itemdb"
- "essentials.itemname"
- "essentials.jump"
- "essentials.jump.lock"
- "essentials.kit"
- "essentials.kits.*"
- "essentials.beezooka"
- "essentials.mail"
- "essentials.mail.send"
- "essentials.me"
- "essentials.more"
- "essentials.motd"
- "essentials.msg"
- "essentials.msgtoggle"
- "essentials.near"
- "essentials.near.maxexempt"
- "essentials.nick"
- "essentials.nick.blacklist.bypass"
- "essentials.nick.changecolors"
- "essentials.nick.changecolors.bypass"
- "essentials.nick.rgb"
- "essentials.nocommandcost.all"
- "essentials.oversizedstacks"
- "essentials.pay"
- "essentials.pay.multiple"
- "essentials.payconfirmtoggle"
- "essentials.paytoggle"
- "essentials.ping"
- "essentials.ptime"
- "essentials.pweather"
- "essentials.rtoggle"
- "essentials.realname"
- "essentials.recipe"
- "essentials.remove"
- "essentials.repair"
- "essentials.repair.*"
- "essentials.rest"
- "essentials.rules"
- "essentials.seen"
- "essentials.sell"
- "essentials.sell.*"
- "essentials.home"
- "essentials.sethome"
- "essentials.sethome.bed"
- "essentials.sethome.multiple"
- "essentials.sethome.multiple.unlimited"
- "essentials.delhome"
- "essentials.setwarp"
- "essentials.setworth"
- "essentials.showkit"
- "essentials.skull"
- "essentials.skull.*"
- "essentials.spawn"
- "essentials.spawner"
- "essentials.speed"
- "essentials.speed.fly"
- "essentials.speed.walk"
- "essentials.suicide"
- "essentials.top"
- "essentials.tp"
- "essentials.tp.position"
- "essentials.tpoffline"
- "essentials.tpa"
- "essentials.tpacancel"
- "essentials.tpaccept"
- "essentials.tpahere"
- "essentials.tpdeny"
- "essentials.tppos"
- "essentials.tptoggle"
- "essentials.tree"
- "essentials.unlimited"
- "essentials.unlimited.item-all"
- "essentials.unlimited.others"
- "essentials.warp"
- "essentials.warp.list"
- "essentials.whois"
- "essentials.workbench"
- "essentials.world"
- "essentials.worth"
- "essentials.signs.*"
- "essentials.editsign"
- "essentials.editsign.rgb"
- "essentials.editsign.color"
# WorldEdit
- "worldedit.help"
- "worldedit.history.undo.self"
@ -66,9 +203,21 @@ super_admins:
- "worldedit.*"
- "worldguard.*"
- "bending.*"
- "essentials.chat.ignoreexempt"
- "essentials.chat.spy"
- "essentials.seen.ip"
- "essentials.seen.ipsearch"
- "essentials.setspawn"
- "essentials.socialspy"
- "essentials.tphere"
- "essentials.tpo"
- "essentials.tpohere"
- "sv.use"
- "sv.toggleitems"
# Telnet Admin permission nodes
telnet_admins: []
# Senior Admin permission nodes
senior_admins: []
senior_admins:
- "sv.others"

View File

@ -2,6 +2,6 @@ name: TotalFreedomMod
main: me.totalfreedom.totalfreedommod.TotalFreedomMod
version: ${project.version}
description: Plugin for the Total Freedom server.
softdepend: [BukkitTelnet, Essentials, LibsDisguises, WorldEdit, WorldGuard, WorldGuardExtraFlags, TFGuilds, SuperVanish, PremiumVanish]
#softdepend: [BukkitTelnet, Essentials, LibsDisguises, WorldEdit, WorldGuard, WorldGuardExtraFlags, TFGuilds]
authors: [Madgeek1450, Prozza]
api-version: 1.16