Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

3
Plugins/Old/Autostart/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@@ -0,0 +1,9 @@
<component name="ArtifactManager">
<artifact type="jar" name="autostart">
<output-path>$USER_HOME$/Desktop</output-path>
<root id="archive" name="autostart.jar">
<element id="module-output" name="Autostart" />
<element id="file-copy" path="$PROJECT_DIR$/plugin.yml" />
</root>
</artifact>
</component>

View File

@@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="spigot-1.15.2">
<CLASSES>
<root url="jar://$PROJECT_DIR$/../Spigot Versions/spigot-1.15.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/../Spigot Versions/spigot-1.15.2.jar!/" />
</SOURCES>
</library>
</component>

6
Plugins/Old/Autostart/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
Plugins/Old/Autostart/.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Autostart.iml" filepath="$PROJECT_DIR$/Autostart.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Spigot Versions" level="project" />
</component>
</module>

View File

@@ -0,0 +1,4 @@
name: Autostart
main: de.welovemcskript.autostart.Autostart
version: 1.0.0
api-version: 1.15

View File

@@ -0,0 +1,40 @@
package de.welovemcskript.autostart;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
public class Autostart extends JavaPlugin {
@Override
public void onEnable() {
}
@Override
public void onDisable() {
if(Bukkit.getServer().getPluginManager().getPlugins() == null) {
startServer();
}
}
public static void startServer() {
Process p = null;
try {
p = Runtime.getRuntime().exec("cmd /c ../start.sh");
InputStream is = p.getInputStream();
int i = 0;
StringBuffer sb = new StringBuffer();
while ((i = is.read()) != -1) {
sb.append((char)i);
}
System.out.println(sb.toString());
} catch (IOException e) {
e.printStackTrace();
}
}
}