-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
BuildTools
committed
Nov 22, 2021
1 parent
75be876
commit 5fb66d7
Showing
45 changed files
with
2,112 additions
and
1,552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.metadata/.plugins/org.eclipse.core.resources/.history/2d/102ec61f304a001c12ab9f22518c2a8d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
main: logdel8.Main | ||
name: LogDel8 | ||
version: 1.0 | ||
author: PokeMichele | ||
description: Log File Remover | ||
api-version: 1.14 |
5 changes: 5 additions & 0 deletions
5
.metadata/.plugins/org.eclipse.core.resources/.history/45/d083f11f304a001c12ab9f22518c2a8d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package logdel8; | ||
|
||
public class LogDelCommand { | ||
|
||
} |
89 changes: 89 additions & 0 deletions
89
.metadata/.plugins/org.eclipse.core.resources/.history/56/a092de30f949001c12ab9f22518c2a8d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package logdel8; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import org.apache.commons.*; | ||
import org.apache.commons.io.FileUtils; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
import org.bukkit.command.CommandExecutor; | ||
@SuppressWarnings("unused") | ||
|
||
public class Main extends JavaPlugin { | ||
|
||
public static Main plugin; | ||
|
||
|
||
//get plugin instance | ||
public static Main getInstance() { | ||
return plugin; | ||
|
||
} | ||
|
||
//define directory | ||
File LogDir = new File("/logs/"); | ||
|
||
|
||
|
||
//Delete Logs Method | ||
public void LogDelete() { | ||
|
||
// TODO Auto-generated method stub | ||
|
||
|
||
//log file remove | ||
System.out.println("Removing Logs...."); | ||
|
||
|
||
if(LogDir.exists()) { | ||
//wait x minutes | ||
try { | ||
Thread.sleep(Main.getInstance().getConfig().getInt("settings.time-between-log-removing-in-ms")); | ||
} catch (InterruptedException ex) { | ||
System.out.println(ex); | ||
} | ||
|
||
try { | ||
FileUtils.cleanDirectory(LogDir); | ||
} catch (IOException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
System.out.println("Logs Removed :D"); | ||
|
||
//repeat | ||
LogDelete(); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
//OnEnable | ||
public void onEnable() { | ||
plugin = this; | ||
System.out.println("LogDel8 is now Enabled"); | ||
|
||
//crea cartella del config.yml | ||
saveDefaultConfig(); | ||
|
||
this.getClassLoader(); | ||
|
||
//delete Logs | ||
LogDelete(); | ||
|
||
|
||
} | ||
|
||
//OnDisable | ||
public void onDisable() { | ||
System.out.println("LogDel8 is now Disabled"); | ||
} | ||
|
||
|
||
} |
94 changes: 94 additions & 0 deletions
94
.metadata/.plugins/org.eclipse.core.resources/.history/74/304f8071b94b001c1936d4e0d78cb6c2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
package logdel8; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import org.apache.commons.*; | ||
import org.apache.commons.io.FileUtils; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
import org.bukkit.command.CommandExecutor; | ||
@SuppressWarnings("unused") | ||
|
||
public class Main extends JavaPlugin { | ||
|
||
public static Main plugin; | ||
|
||
|
||
//get plugin instance | ||
public static Main getInstance() { | ||
return plugin; | ||
|
||
} | ||
|
||
//define directory | ||
File LogDir = new File("/logs/"); | ||
|
||
|
||
|
||
//Delete Logs Method | ||
public void LogDelete() { | ||
|
||
// TODO Auto-generated method stub | ||
|
||
|
||
//log file remove | ||
System.out.println("Removing Logs...."); | ||
|
||
|
||
if(LogDir.exists()) { | ||
try { | ||
FileUtils.cleanDirectory(LogDir); | ||
} catch (IOException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
//wait 10 minutes or x minutes | ||
try { | ||
Thread.sleep(Main.getInstance().getConfig().getInt("settings.time-between-log-removing-in-ms")); | ||
} catch (InterruptedException ex) { | ||
System.out.println(ex); | ||
} | ||
System.out.println("Logs Removed :D"); | ||
|
||
//repeat | ||
LogDelete(); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
//OnEnable | ||
public void onEnable() { | ||
plugin = this; | ||
System.out.println("LogDel8 is now Enabled"); | ||
|
||
//crea cartella del config.yml | ||
saveDefaultConfig(); | ||
|
||
this.getClassLoader(); | ||
|
||
//delete Logs | ||
//wait 10 minutes or x minutes | ||
try { | ||
Thread.sleep(Main.getInstance().getConfig().getInt("settings.time-between-log-removing-in-ms")); | ||
} catch (InterruptedException ex) { | ||
System.out.println(ex); | ||
} | ||
LogDelete(); | ||
|
||
|
||
} | ||
|
||
//OnDisable | ||
public void onDisable() { | ||
System.out.println("LogDel8 is now Disabled"); | ||
} | ||
|
||
|
||
} |
Empty file.
8 changes: 8 additions & 0 deletions
8
.metadata/.plugins/org.eclipse.core.resources/.history/9e/40f66df0fb49001c12ab9f22518c2a8d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
main: logdel8.Main | ||
name: LogDel8 | ||
version: '1.0' | ||
author: PokeMichele | ||
description: Log File Remover | ||
api-version: 1.14 | ||
commands: [] | ||
|
Oops, something went wrong.