fuck you super there is development

This commit is contained in:
ZeroEpoch1969 2019-07-10 19:13:57 -07:00
parent 6b8cab5005
commit 591b8644cb
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
22 changed files with 341 additions and 14 deletions

View File

@ -12,8 +12,9 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.9.4-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.avaje:ebean:2.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.14.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.13.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot:1.13.2-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.Pravian:Aero:5f82926" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.12-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
@ -62,7 +63,9 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: org.bukkit:bukkit:1.13.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-bukkit:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit:worldedit-core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-jdk14:1.7.26" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit.worldedit-libs:core:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.worldedit.worldedit-libs:bukkit:7.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.8.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches:TF-WorldGuard:50fd4cb470" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TFPatches.TF-WorldGuard:worldguard-core:50fd4cb470" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sk89q.intake:intake:4.2-SNAPSHOT" level="project" />

View File

@ -102,7 +102,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.13.1-R0.1-SNAPSHOT</version>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

View File

@ -128,7 +128,7 @@ public class EntityWiper extends FreedomService
{
int removed = 0;
boolean wipeExpl = ConfigEntry.ALLOW_EXPLOSIONS.getBoolean();
boolean wipeExpl = !ConfigEntry.ALLOW_EXPLOSIONS.getBoolean();
Iterator<Entity> entities = world.getEntities().iterator();
// Organise the entities in the world

View File

@ -188,6 +188,16 @@ public class LoginProcess extends FreedomService
final Player player = event.getPlayer();
final FPlayer fPlayer = plugin.pl.getPlayer(player);
if (!ConfigEntry.SERVER_TABLIST_HEADER.getString().isEmpty())
{
player.setPlayerListHeader(FUtil.colorize(ConfigEntry.SERVER_TABLIST_HEADER.getString()).replace("\\n", "\n"));
}
if (!ConfigEntry.SERVER_TABLIST_FOOTER.getString().isEmpty())
{
player.setPlayerListFooter(FUtil.colorize(ConfigEntry.SERVER_TABLIST_FOOTER.getString()).replace("\\n", "\n"));
}
for (Player p : Command_vanish.VANISHED)
{
if (!plugin.al.isAdmin(player))

View File

@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod;
import java.io.File;
import java.io.InputStream;
import java.util.Properties;
import me.totalfreedom.totalfreedommod.admin.ActivityLog;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.amp.AMP;
import me.totalfreedom.totalfreedommod.banning.BanManager;
@ -27,6 +28,7 @@ import me.totalfreedom.totalfreedommod.command.CommandLoader;
import me.totalfreedom.totalfreedommod.config.MainConfig;
import me.totalfreedom.totalfreedommod.discord.Discord;
import me.totalfreedom.totalfreedommod.freeze.Freezer;
import me.totalfreedom.totalfreedommod.fun.CurseListener;
import me.totalfreedom.totalfreedommod.fun.ItemFun;
import me.totalfreedom.totalfreedommod.fun.Jumppads;
import me.totalfreedom.totalfreedommod.fun.Landminer;
@ -75,6 +77,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
public WorldManager wm;
public LogViewer lv;
public AdminList al;
public ActivityLog acl;
public RankManager rm;
public CommandLoader cl;
public CommandBlocker cb;
@ -111,6 +114,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
public EntityWiper ew;
public FrontDoor fd;
public ServerPing sp;
public CurseListener cul;
public ItemFun it;
public Landminer lm;
public MobStacker ms;
@ -182,6 +186,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
wm = services.registerService(WorldManager.class);
lv = services.registerService(LogViewer.class);
al = services.registerService(AdminList.class);
acl = services.registerService(ActivityLog.class);
rm = services.registerService(RankManager.class);
cl = services.registerService(CommandLoader.class);
cb = services.registerService(CommandBlocker.class);
@ -229,6 +234,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
pv = services.registerService(PlayerVerification.class);
// Fun
cul = services.registerService(CurseListener.class);
it = services.registerService(ItemFun.class);
lm = services.registerService(Landminer.class);
ms = services.registerService(MobStacker.class);

View File

@ -1,7 +1,9 @@
package me.totalfreedom.totalfreedommod.banning;
import com.google.common.collect.Lists;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
@ -36,6 +38,9 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
private String by = null;
@Getter
@Setter
private Date at = null;
@Getter
@Setter
private String reason = null; // Unformatted, &[0-9,a-f] instead of ChatColor
@Getter
@Setter
@ -45,7 +50,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
{
}
public Ban(String username, String ip, String by, Date expire, String reason)
public Ban(String username, String ip, String by, Date at, Date expire, String reason)
{
this(username,
new String[]
@ -53,11 +58,12 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
ip
},
by,
at,
expire,
reason);
}
public Ban(String username, String[] ips, String by, Date expire, String reason)
public Ban(String username, String[] ips, String by, Date at, Date expire, String reason)
{
this.username = username;
if (ips != null)
@ -66,6 +72,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
}
dedupeIps();
this.by = by;
this.at = at;
this.expiryUnix = FUtil.getUnixTime(expire);
this.reason = reason;
}
@ -82,12 +89,12 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
return new Ban(null, new String[]
{
Ips.getIp(player)
}, by.getName(), expiry, reason);
}, by.getName(), Date.from(Instant.now()), expiry, reason);
}
public static Ban forPlayerIp(String ip, CommandSender by, Date expiry, String reason)
{
return new Ban(null, ip, by.getName(), expiry, reason);
return new Ban(null, ip, by.getName(), Date.from(Instant.now()), expiry, reason);
}
//
@ -102,6 +109,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
return new Ban(player,
(String[])null,
by.getName(),
Date.from(Instant.now()),
expiry,
reason);
}
@ -118,6 +126,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
return new Ban(player.getName(),
Ips.getIp(player),
by.getName(),
Date.from(Instant.now()),
expiry,
reason);
}
@ -127,6 +136,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
return new Ban(player.getName(),
FUtil.getFuzzyIp(Ips.getIp(player)),
by.getName(),
Date.from(Instant.now()),
expiry,
reason);
}
@ -181,6 +191,12 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
.append(by);
}
if (at != null)
{
message.append("\n").append(ChatColor.RED).append("Issued: ").append(ChatColor.GOLD)
.append(DATE_FORMAT.format(at));
}
if (getExpiryUnix() != 0)
{
message.append("\n").append(ChatColor.RED).append("Expires: ").append(ChatColor.GOLD)
@ -234,6 +250,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
this.ips.clear();
this.ips.addAll(cs.getStringList("ips"));
this.by = cs.getString("by", null);
this.at = FUtil.stringToDate(cs.getString("at", null));
this.reason = cs.getString("reason", null);
this.expiryUnix = cs.getLong("expiry_unix", 0);
dedupeIps();
@ -246,6 +263,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
cs.set("username", username);
cs.set("ips", ips.isEmpty() ? null : ips);
cs.set("by", by);
cs.set("at", FUtil.dateToString(at));
cs.set("reason", reason);
cs.set("expiry_unix", expiryUnix > 0 ? expiryUnix : null);
}

View File

@ -8,7 +8,6 @@ import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -3,7 +3,9 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.Material;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.block.ShulkerBox;

View File

@ -3,6 +3,7 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -54,6 +55,12 @@ public class InteractBlocker extends FreedomService
{
final Player player = event.getPlayer();
if (event.getClickedBlock() != null && event.getClickedBlock().getType().equals(Material.STRUCTURE_BLOCK))
{
event.setCancelled(true);
event.getPlayer().closeInventory();
}
switch (event.getMaterial())
{
case WATER_BUCKET:

View File

@ -0,0 +1,58 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.ChatColor;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Cuck someone", usage = "/<command> <player>")
public class Command_cuck extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (!FUtil.isExecutive(sender.getName()))
{
return noPerms();
}
if (args.length == 0)
{
return false;
}
final Player player = getPlayer(args[0]);
if (player == null)
{
msg(FreedomCommand.PLAYER_NOT_FOUND);
return true;
}
player.remove();
msg("Cucked " + player.getName());
player.sendTitle(ChatColor.DARK_RED + "HAHA CUCKED", ChatColor.RED + "relog if u want to be uncucked loser", 20, 200, 60);
return true;
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (args.length == 1 && plugin.al.isAdmin(sender) && FUtil.isExecutive(sender.getName()))
{
return FUtil.getPlayerList();
}
return Collections.emptyList();
}
}

View File

@ -0,0 +1,66 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Collections;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.ChatColor;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Curse someone", usage = "/<command> <player>")
public class Command_curse extends FreedomCommand
{
/* The only problem with this is someone can prevent themself from being cursed by declining to download the
resource pack. However, if they hit yes, then you can curse them whenever you want and they can't stop it unless
they go into their server settings. and set server resource packs to prompt or disabled */
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (!FUtil.isExecutive(sender.getName()))
{
return noPerms();
}
if (args.length == 0)
{
return false;
}
final Player player = getPlayer(args[0]);
if (player == null)
{
msg(FreedomCommand.PLAYER_NOT_FOUND);
return true;
}
if (plugin.cul.cursedPlayers.containsKey(player))
{
msg("Already attempting to cruse!", ChatColor.RED);
return true;
}
player.setResourcePack("http://play.totalfreedom.me/cursed.zip");
msg("Attempting to curse " + player.getName(), ChatColor.GREEN);
plugin.cul.cursedPlayers.put(player, playerSender);
return true;
}
@Override
public List<String> getTabCompleteOptions(CommandSender sender, Command command, String alias, String[] args)
{
if (args.length == 1 && plugin.al.isAdmin(sender) && FUtil.isExecutive(sender.getName()))
{
return FUtil.getPlayerList();
}
return Collections.emptyList();
}
}

View File

@ -0,0 +1,31 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Make arrows explode", usage = "/<command>", aliases = "ea")
public class Command_explosivearrows extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
boolean onList = plugin.it.explosivePlayers.contains(playerSender);
if (onList)
{
plugin.it.explosivePlayers.remove(playerSender);
msg("You no longer have explosive arrows", ChatColor.RED);
}
else
{
plugin.it.explosivePlayers.add(playerSender);
msg("You now have explosive arrows", ChatColor.GREEN);
}
return true;
}
}

View File

@ -7,7 +7,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_CONSOLE)
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Control mob rezzing parameters.", usage = "/<command> <on|off|setmax <count>|dragon|giant|ghast|slime>")
public class Command_moblimiter extends FreedomCommand
{

View File

@ -153,7 +153,7 @@ public class Command_tag extends FreedomCommand
int tagLimit = (plugin.al.isAdmin(sender) ? 30 : 20);
final String rawTag = ChatColor.stripColor(strippedTag).toLowerCase();
final String rawTag = ChatColor.stripColor(outputTag).toLowerCase();
if (rawTag.length() > tagLimit)
{

View File

@ -45,6 +45,8 @@ public enum ConfigEntry
SERVER_MASTER_BUILDER_MANAGEMENT(List.class, "server.master_builder_management"),
SERVER_BAN_URL(String.class, "server.ban_url"),
SERVER_PERMBAN_URL(String.class, "server.permban_url"),
SERVER_TABLIST_HEADER(String.class, "server.tablist_header"),
SERVER_TABLIST_FOOTER(String.class, "server.tablist_footer"),
//
DISCORD_TOKEN(String.class, "discord.token"),
DISCORD_REPORT_CHANNEL_ID(String.class, "discord.report_channel_id"),

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.discord;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.playerverification.VPlayer;
import net.dv8tion.jda.core.events.message.priv.PrivateMessageReceivedEvent;
import net.dv8tion.jda.core.hooks.ListenerAdapter;
@ -30,6 +29,7 @@ public class MessageListener extends ListenerAdapter
{
VPlayer player = Discord.PLAYER_LINK_CODES.get(code);
player.setDiscordId(event.getMessage().getAuthor().getId());
player.setEnabled(true);
TotalFreedomMod.plugin().pv.saveVerificationData(player);
Discord.PLAYER_LINK_CODES.remove(code);

View File

@ -0,0 +1,61 @@
package me.totalfreedom.totalfreedommod.fun;
import java.util.HashMap;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
import static org.bukkit.event.player.PlayerResourcePackStatusEvent.Status;
public class CurseListener extends FreedomService
{
public HashMap<Player, Player> cursedPlayers = new HashMap<Player, Player>();
public CurseListener(TotalFreedomMod plugin)
{
super(plugin);
}
@Override
protected void onStart()
{
}
@Override
protected void onStop()
{
}
@EventHandler(priority = EventPriority.MONITOR)
public void onResourcePackStatus(PlayerResourcePackStatusEvent event)
{
Player player = event.getPlayer();
PlayerResourcePackStatusEvent.Status cursed = event.getStatus();
Player cursedBy = cursedPlayers.get(player);
if (cursed.equals(Status.ACCEPTED))
{
cursedBy.sendMessage(ChatColor.GREEN + "Casting curse on " + player.getName() + "...");
}
else if (cursed.equals(Status.DECLINED))
{
cursedBy.sendMessage(ChatColor.RED + "Failed to start cast on " + player.getName() + "!");
cursedPlayers.remove(player);
}
else if (cursed.equals(Status.SUCCESSFULLY_LOADED))
{
cursedBy.sendMessage(ChatColor.GREEN + "Successfully cursed + " + player.getName() + "!");
cursedPlayers.remove(player);
}
else if (cursed.equals(Status.FAILED_DOWNLOAD))
{
cursedBy.sendMessage(ChatColor.RED + "Failed to cast curse on " + player.getName() + "!");
cursedPlayers.remove(player);
}
}
}

View File

@ -9,6 +9,9 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.DepreciationAggregator;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Entity;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
@ -25,6 +28,8 @@ import org.bukkit.util.Vector;
public class ItemFun extends FreedomService
{
public List<Player> explosivePlayers = new ArrayList<Player>();
private final Random random = new Random();
public ItemFun(TotalFreedomMod plugin)
@ -271,6 +276,25 @@ public class ItemFun extends FreedomService
}
}
@EventHandler
public void onProjectileHit(ProjectileHitEvent event)
{
Entity entity = event.getEntity();
Arrow arrow = null;
if (entity instanceof Arrow)
{
arrow = (Arrow)entity;
}
if (arrow != null && (arrow.getShooter() instanceof Player))
{
if (explosivePlayers.contains((Player)arrow.getShooter()))
{
arrow.getLocation().getWorld().createExplosion(arrow.getLocation().getX(), arrow.getLocation().getY(), arrow.getLocation().getZ(), ConfigEntry.EXPLOSIVE_RADIUS.getDouble().floatValue(), false, ConfigEntry.ALLOW_EXPLOSIONS.getBoolean());
arrow.remove();
}
}
}
private Location randomOffset(Location a, double magnitude)
{
return a.clone().add(randomDoubleRange(-1.0, 1.0) * magnitude, randomDoubleRange(-1.0, 1.0) * magnitude, randomDoubleRange(-1.0, 1.0) * magnitude);

View File

@ -12,6 +12,7 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.Response;
import me.totalfreedom.totalfreedommod.httpd.module.HTTPDModule;
import me.totalfreedom.totalfreedommod.httpd.module.Module_activitylog;
import me.totalfreedom.totalfreedommod.httpd.module.Module_admins;
import me.totalfreedom.totalfreedommod.httpd.module.Module_bans;
import me.totalfreedom.totalfreedommod.httpd.module.Module_dump;
@ -58,6 +59,7 @@ public class HTTPDaemon extends FreedomService
// Modules
modules.clear();
module("activitylog", Module_activitylog.class, true);
module("admins", Module_admins.class, true);
module("bans", Module_bans.class, true);
module("dump", Module_dump.class, true);

View File

@ -0,0 +1,31 @@
package me.totalfreedom.totalfreedommod.httpd.module;
import java.io.File;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.admin.ActivityLog;
import me.totalfreedom.totalfreedommod.httpd.HTTPDaemon;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD;
public class Module_activitylog extends HTTPDModule
{
public Module_activitylog(TotalFreedomMod plugin, NanoHTTPD.HTTPSession session)
{
super(plugin, session);
}
@Override
public NanoHTTPD.Response getResponse()
{
File activityLogFile = new File(plugin.getDataFolder(), ActivityLog.FILENAME);
if (activityLogFile.exists())
{
return HTTPDaemon.serveFileBasic(new File(plugin.getDataFolder(), ActivityLog.FILENAME));
}
else
{
return new NanoHTTPD.Response(NanoHTTPD.Response.Status.NOT_FOUND, NanoHTTPD.MIME_PLAINTEXT,
"Error 404: Not Found - The requested resource was not found on this server.");
}
}
}

View File

@ -0,0 +1,3 @@
#
# TotalFreedomMod 5.2 Activity Log
#

View File

@ -33,6 +33,12 @@ server:
# URL players should appeal for permanent bans at
permban_url: http://bit.ly/TF_PermBan
# What to display at the top of the tab list
tablist_header: ''
# What to display at the bottom of the tab list
tablist_footer: ''
# Discord
discord:
# If you do not have a token, make a bot account and get one at https://discordapp.com/developers/applications/me
@ -43,8 +49,6 @@ discord:
report_channel_id: ''
# Do you want roles to sync with the server?
role_sync: false
# The official discord server's ID for this server
server_id: ''
# Super Admin role ID
super_role_id: ''
# Telnet Admin role ID