Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit d737d8f

Browse files
author
BuildTools
committed
A perfect arena resetter and builder for your Minigames
0 parents  commit d737d8f

File tree

14 files changed

+832
-0
lines changed

14 files changed

+832
-0
lines changed

.gitignore

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# User-specific stuff
2+
.idea/
3+
4+
*.iml
5+
*.ipr
6+
*.iws
7+
8+
# IntelliJ
9+
out/
10+
11+
# Compiled class file
12+
*.class
13+
14+
# Log file
15+
*.log
16+
17+
# BlueJ files
18+
*.ctxt
19+
20+
# Package Files #
21+
*.jar
22+
*.war
23+
*.nar
24+
*.ear
25+
*.zip
26+
*.tar.gz
27+
*.rar
28+
29+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
30+
hs_err_pid*
31+
32+
*~
33+
34+
# temporary files which can be created if a process still has a handle open of a deleted file
35+
.fuse_hidden*
36+
37+
# KDE directory preferences
38+
.directory
39+
40+
# Linux trash folder which might appear on any partition or disk
41+
.Trash-*
42+
43+
# .nfs files are created when an open file is removed but is still being accessed
44+
.nfs*
45+
46+
# General
47+
.DS_Store
48+
.AppleDouble
49+
.LSOverride
50+
51+
# Icon must end with two \r
52+
Icon
53+
54+
# Thumbnails
55+
._*
56+
57+
# Files that might appear in the root of a volume
58+
.DocumentRevisions-V100
59+
.fseventsd
60+
.Spotlight-V100
61+
.TemporaryItems
62+
.Trashes
63+
.VolumeIcon.icns
64+
.com.apple.timemachine.donotpresent
65+
66+
# Directories potentially created on remote AFP share
67+
.AppleDB
68+
.AppleDesktop
69+
Network Trash Folder
70+
Temporary Items
71+
.apdisk
72+
73+
# Windows thumbnail cache files
74+
Thumbs.db
75+
Thumbs.db:encryptable
76+
ehthumbs.db
77+
ehthumbs_vista.db
78+
79+
# Dump file
80+
*.stackdump
81+
82+
# Folder config file
83+
[Dd]esktop.ini
84+
85+
# Recycle Bin used on file shares
86+
$RECYCLE.BIN/
87+
88+
# Windows Installer files
89+
*.cab
90+
*.msi
91+
*.msix
92+
*.msm
93+
*.msp
94+
95+
# Windows shortcuts
96+
*.lnk
97+
98+
target/
99+
100+
pom.xml.tag
101+
pom.xml.releaseBackup
102+
pom.xml.versionsBackup
103+
pom.xml.next
104+
105+
release.properties
106+
dependency-reduced-pom.xml
107+
buildNumber.properties
108+
.mvn/timing.properties
109+
.mvn/wrapper/maven-wrapper.jar
110+
.flattened-pom.xml
111+
112+
# Common working directory
113+
run/

pom.xml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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>online.bingulhan</groupId>
8+
<artifactId>extentedbukkit</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<packaging>jar</packaging>
11+
12+
<name>ExtentedBukkit</name>
13+
14+
<properties>
15+
<java.version>1.8</java.version>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
</properties>
18+
19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-compiler-plugin</artifactId>
24+
<version>3.8.1</version>
25+
<configuration>
26+
<source>${java.version}</source>
27+
<target>${java.version}</target>
28+
</configuration>
29+
</plugin>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-shade-plugin</artifactId>
33+
<version>3.2.4</version>
34+
<executions>
35+
<execution>
36+
<phase>package</phase>
37+
<goals>
38+
<goal>shade</goal>
39+
</goals>
40+
<configuration>
41+
<createDependencyReducedPom>false</createDependencyReducedPom>
42+
</configuration>
43+
</execution>
44+
</executions>
45+
</plugin>
46+
</plugins>
47+
<resources>
48+
<resource>
49+
<directory>src/main/resources</directory>
50+
<filtering>true</filtering>
51+
</resource>
52+
</resources>
53+
</build>
54+
55+
<repositories>
56+
<repository>
57+
<id>spigotmc-repo</id>
58+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
59+
</repository>
60+
<repository>
61+
<id>sonatype</id>
62+
<url>https://oss.sonatype.org/content/groups/public/</url>
63+
</repository>
64+
</repositories>
65+
66+
<dependencies>
67+
<dependency>
68+
<groupId>org.spigotmc</groupId>
69+
<artifactId>spigot-api</artifactId>
70+
<version>1.12.2-R0.1-SNAPSHOT</version>
71+
<scope>provided</scope>
72+
</dependency>
73+
<dependency>
74+
<groupId>org.projectlombok</groupId>
75+
<artifactId>lombok</artifactId>
76+
<version>RELEASE</version>
77+
<scope>compile</scope>
78+
</dependency>
79+
</dependencies>
80+
</project>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package online.bingulhan.extentedbukkit;
2+
3+
import lombok.Getter;
4+
import online.bingulhan.extentedbukkit.bll.FileArenaManager;
5+
import online.bingulhan.extentedbukkit.bll.IArenaManager;
6+
import online.bingulhan.extentedbukkit.cmd.CMDArena;
7+
import online.bingulhan.extentedbukkit.listener.ArenaListener;
8+
import org.bukkit.plugin.java.JavaPlugin;
9+
10+
import java.io.File;
11+
12+
/**
13+
* @author BingulHan
14+
*/
15+
public final class HanArenaAPI extends JavaPlugin {
16+
17+
private static HanArenaAPI instance;
18+
19+
@Getter
20+
private IArenaManager arenaManager;
21+
22+
@Getter
23+
File mapsFolder;
24+
25+
26+
27+
@Override
28+
public void onEnable() {
29+
instance=this;
30+
31+
getConfig().options().copyDefaults(true);
32+
saveConfig();
33+
34+
mapsFolder= new File(HanArenaAPI.getInstance().getServer().getWorldContainer(), "maps");
35+
36+
arenaManager = new FileArenaManager();
37+
getCommand("arenaapi").setExecutor(new CMDArena());
38+
39+
arenaManager.removerStartup();
40+
41+
if (getConfig().getBoolean("test-listeners")) {
42+
getServer().getPluginManager().registerEvents(new ArenaListener(), this);
43+
}
44+
}
45+
@Override
46+
public void onDisable() {
47+
arenaManager.clearAll();
48+
}
49+
50+
public static HanArenaAPI getInstance() {
51+
return instance;
52+
}
53+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package online.bingulhan.extentedbukkit.arena;
2+
3+
import lombok.Getter;
4+
import lombok.Setter;
5+
import org.bukkit.World;
6+
7+
import java.io.File;
8+
import java.util.ArrayList;
9+
10+
@Getter
11+
@Setter
12+
public class Arena {
13+
14+
public static ArrayList<Arena> ARENA_LIST = new ArrayList<>();
15+
16+
private String name;
17+
18+
private World world;
19+
20+
private String sourceWorldFolder;
21+
22+
private File activeWorldFolder;
23+
24+
25+
public Arena(String name, String sourceWorldFolder) {
26+
this.name = name;
27+
this.sourceWorldFolder = sourceWorldFolder;
28+
}
29+
}

0 commit comments

Comments
 (0)