Skip to content

Commit 9175d6e

Browse files
committed
loaded in project
0 parents  commit 9175d6e

11 files changed

Lines changed: 203 additions & 0 deletions

File tree

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/discord.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PluginInstaller.iml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module version="4">
3+
<component name="FacetManager">
4+
<facet type="minecraft" name="Minecraft">
5+
<configuration>
6+
<autoDetectTypes>
7+
<platformType>BUKKIT</platformType>
8+
</autoDetectTypes>
9+
</configuration>
10+
</facet>
11+
</component>
12+
</module>

pom.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>tech.nully</groupId>
8+
<artifactId>PrimCore</artifactId>
9+
<version>1.0.0</version>
10+
<packaging>jar</packaging>
11+
12+
<name>PrimCore</name>
13+
14+
<description>A custom coded plugin for primcraft written in Kotlin</description>
15+
<url>nully.tech</url>
16+
<properties>
17+
<java.version>1.8</java.version>
18+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19+
<maven.compiler.source>1.8</maven.compiler.source>
20+
<maven.compiler.target>1.8</maven.compiler.target>
21+
</properties>
22+
23+
<repositories>
24+
<repository>
25+
<id>PrimCoreRepos-repos</id>
26+
<url>https://github.com/darverdevs/EaglerMavenRepo/raw/main</url>
27+
</repository>
28+
</repositories>
29+
30+
<dependencies>
31+
<dependency>
32+
<groupId>com.github.EaglerMaven</groupId>
33+
<artifactId>craftbukkit</artifactId>
34+
<version>1.5.2-R1.0</version>
35+
</dependency>
36+
</dependencies>
37+
38+
39+
</project>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package tech.nully.PluginInstaller;
2+
3+
import org.bukkit.command.Command;
4+
import org.bukkit.command.CommandExecutor;
5+
import org.bukkit.command.CommandSender;
6+
import org.bukkit.craftbukkit.libs.org.ibex.nestedvm.util.Seekable;
7+
8+
import java.io.IOException;
9+
import java.io.InputStream;
10+
import java.net.MalformedURLException;
11+
import java.net.URI;
12+
import java.net.URL;
13+
import java.nio.file.Files;
14+
import java.nio.file.Paths;
15+
16+
public class InstallCommand implements CommandExecutor {
17+
@Override
18+
public boolean onCommand(CommandSender snder, Command cmd, String label, String[] args) {
19+
if (cmd.getName().equalsIgnoreCase("installpl")) {
20+
Installer ins = new Installer();
21+
String Install_Jar = cmd.getName();
22+
if (ins.JARURLs.containsKey(Install_Jar)) {
23+
try (InputStream in = URI.create(ins.JARURLs.get(Install_Jar)).toURL().openStream()) {
24+
ins.InstallPlugin(in);
25+
} catch (IOException e) {
26+
}
27+
28+
29+
}
30+
}
31+
return false;
32+
}
33+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package tech.nully.PluginInstaller;
2+
3+
import java.io.IOException;
4+
import java.io.InputStream;
5+
import java.nio.file.Files;
6+
import java.nio.file.StandardCopyOption;
7+
import java.util.HashMap;
8+
9+
public class Installer {
10+
public HashMap<String, String> JARURLs = new HashMap<>();
11+
12+
public static void SetupInstaller() {
13+
Installer ins = new Installer();
14+
ins.JARURLs.put("dynmap", "https://github.com/darverdevs/PluginInstallerRepo/raw/main/dynmap-1.9.1.jar");
15+
}
16+
17+
public void InstallPlugin(InputStream in) throws IOException {
18+
Files.copy(in, Main.getInstance().getDataFolder().toPath(), StandardCopyOption.REPLACE_EXISTING);
19+
}
20+
}

0 commit comments

Comments
 (0)