mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-14 06:23:54 +00:00
Mavenized project
This commit is contained in:
@ -0,0 +1,27 @@
|
||||
package me.totalfreedom.totalfreedommod.httpd;
|
||||
|
||||
import java.io.File;
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
|
||||
public class Module_permbans extends HTTPDModule
|
||||
{
|
||||
public Module_permbans(NanoHTTPD.HTTPSession session)
|
||||
{
|
||||
super(session);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NanoHTTPD.Response getResponse()
|
||||
{
|
||||
File permbanFile = new File(TotalFreedomMod.plugin.getDataFolder(), TotalFreedomMod.PERMBAN_FILENAME);
|
||||
if (permbanFile.exists())
|
||||
{
|
||||
return HTTPDaemon.serveFileBasic(new File(TotalFreedomMod.plugin.getDataFolder(), TotalFreedomMod.PERMBAN_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.");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user