Add ftp4j
This commit is contained in:
parent
4aabd95c59
commit
9148914873
3
.gitignore
vendored
3
.gitignore
vendored
@ -21,4 +21,5 @@
|
|||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
.gradle/4.3.1/
|
.gradle/4.3.1/
|
||||||
.idea
|
.idea
|
||||||
target
|
target
|
||||||
|
TabooLib.iml
|
9
pom.xml
9
pom.xml
@ -10,9 +10,6 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compile.source>1.5</maven.compile.source>
|
|
||||||
<maven.compile.target>1.5</maven.compile.target>
|
|
||||||
<maven.compile.deprecation>off</maven.compile.deprecation>
|
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean install package</defaultGoal>
|
<defaultGoal>clean install package</defaultGoal>
|
||||||
@ -33,8 +30,10 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.7.0</version>
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>8</source>
|
<source>1.8</source>
|
||||||
<target>8</target>
|
<target>1.8</target>
|
||||||
|
<showDeprecation>false</showDeprecation>
|
||||||
|
<useIncrementalCompilation>true</useIncrementalCompilation>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
BIN
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.jar
Normal file
BIN
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.jar
Normal file
Binary file not shown.
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.jar.md5
Normal file
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.jar.md5
Normal file
@ -0,0 +1 @@
|
|||||||
|
9b5971848287cbe7b44cbd65030bb8a6
|
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.jar.sha1
Normal file
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.jar.sha1
Normal file
@ -0,0 +1 @@
|
|||||||
|
abd6a2ba75b142926052c4538611efda49e0b0e2
|
8
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.pom
Normal file
8
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.pom
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>it.sauronsoftware</groupId>
|
||||||
|
<artifactId>ftp4j</artifactId>
|
||||||
|
<version>1.7.2</version>
|
||||||
|
<name>ftp4j</name>
|
||||||
|
</project>
|
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.pom.md5
Normal file
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.pom.md5
Normal file
@ -0,0 +1 @@
|
|||||||
|
c65d8fbb7a85cc5155f3ad9cddca4e90
|
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.pom.sha1
Normal file
1
repo/it/sauronsoftware/ftp4j/1.7.2/ftp4j-1.7.2.pom.sha1
Normal file
@ -0,0 +1 @@
|
|||||||
|
c972043028bd8b4f5f0194708e04346204ee95e9
|
1
repo/it/sauronsoftware/ftp4j/maven-metadata.md5
Normal file
1
repo/it/sauronsoftware/ftp4j/maven-metadata.md5
Normal file
@ -0,0 +1 @@
|
|||||||
|
715cfdd442aaaf1af0b4c8ee10bfa74e
|
1
repo/it/sauronsoftware/ftp4j/maven-metadata.sha1
Normal file
1
repo/it/sauronsoftware/ftp4j/maven-metadata.sha1
Normal file
@ -0,0 +1 @@
|
|||||||
|
6337fb920f4b00fa9eeca55b2345322181a3ac32
|
12
repo/it/sauronsoftware/ftp4j/maven-metadata.xml
Normal file
12
repo/it/sauronsoftware/ftp4j/maven-metadata.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<groupId>it.sauronsoftware</groupId>
|
||||||
|
<artifactId>ftp4j</artifactId>
|
||||||
|
<versioning>
|
||||||
|
<release>1.7.2</release>
|
||||||
|
<versions>
|
||||||
|
<version>1.7.2</version>
|
||||||
|
</versions>
|
||||||
|
<lastUpdated>20120412000000</lastUpdated>
|
||||||
|
</versioning>
|
||||||
|
</metadata>
|
@ -5,9 +5,35 @@ import com.ilummc.tlib.bean.Property;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import java.lang.management.GarbageCollectorMXBean;
|
||||||
|
import java.lang.management.ManagementFactory;
|
||||||
|
import java.lang.management.MemoryMXBean;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@TConfig(name = "cfg.yml", charset = "GBK")
|
@TConfig(name = "cfg.yml", charset = "GBK")
|
||||||
public class ExampleMain extends JavaPlugin {
|
public class ExampleMain extends JavaPlugin {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
MemoryMXBean bean = ManagementFactory.getMemoryMXBean();
|
||||||
|
System.out.println(bean.getHeapMemoryUsage().toString());
|
||||||
|
System.out.println(bean.getNonHeapMemoryUsage().toString());
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
for (GarbageCollectorMXBean mxBean : ManagementFactory.getGarbageCollectorMXBeans()) {
|
||||||
|
System.out.println(mxBean.getName());
|
||||||
|
System.out.println(mxBean.getCollectionCount());
|
||||||
|
System.out.println(mxBean.getCollectionTime());
|
||||||
|
for (String s : mxBean.getMemoryPoolNames()) {
|
||||||
|
System.out.println(s);
|
||||||
|
}
|
||||||
|
System.out.println(mxBean.getObjectName().toString());
|
||||||
|
}
|
||||||
|
System.gc();
|
||||||
|
}
|
||||||
|
for (String s : ManagementFactory.getRuntimeMXBean().getInputArguments()) {
|
||||||
|
System.out.println(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Property<Boolean> update = Property.of(false);
|
private Property<Boolean> update = Property.of(false);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -31,4 +57,58 @@ public class ExampleMain extends JavaPlugin {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class CD {
|
||||||
|
|
||||||
|
final long start, period;
|
||||||
|
final TimeUnit unit;
|
||||||
|
final Runnable onStart, onFinish, onTimer;
|
||||||
|
|
||||||
|
CD(long start, long period, TimeUnit unit, Runnable onStart, Runnable onFinish, Runnable onTimer) {
|
||||||
|
this.start = start;
|
||||||
|
this.period = period;
|
||||||
|
this.unit = unit;
|
||||||
|
this.onStart = onStart;
|
||||||
|
this.onFinish = onFinish;
|
||||||
|
this.onTimer = onTimer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
CD.builder().setOnStart(() -> {
|
||||||
|
}).setOnFinish(() -> {
|
||||||
|
}).setOnTimer(1000, TimeUnit.MILLISECONDS, () -> {
|
||||||
|
}).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CdBuilder builder() {
|
||||||
|
return new CdBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class CdBuilder {
|
||||||
|
private long start, period;
|
||||||
|
private TimeUnit unit;
|
||||||
|
private Runnable onStart, onFinish, onTimer;
|
||||||
|
|
||||||
|
public CdBuilder setOnStart(Runnable runnable) {
|
||||||
|
this.onStart = runnable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CdBuilder setOnFinish(Runnable runnable) {
|
||||||
|
this.onFinish = runnable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CdBuilder setOnTimer(long period, TimeUnit timeUnit, Runnable runnable) {
|
||||||
|
this.period = period;
|
||||||
|
this.unit = timeUnit;
|
||||||
|
this.onTimer = runnable;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CD build() {
|
||||||
|
return new CD(start, period, unit, onStart, onFinish, onTimer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user