Skip to content

Commit 1e4170a

Browse files
author
TheProgramSrc
committed
Change Log:
+ Added Custom Recipes + Added Custom Tasks + Added Item Utils - Removed TimerEvent • Update to 1.16 • Code Improvement • Bug Fixes
1 parent 600d177 commit 1e4170a

37 files changed

+2964
-1742
lines changed

SuperCoreAPI.iml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,27 @@
2222
</content>
2323
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
2424
<orderEntry type="sourceFolder" forTests="false" />
25-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT" level="project" />
25+
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT" level="project" />
26+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
27+
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
28+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-api:1.16-R0.2" level="project" />
29+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-config:1.16-R0.2" level="project" />
30+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-event:1.16-R0.2" level="project" />
31+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-protocol:1.16-R0.2" level="project" />
32+
<orderEntry type="library" scope="PROVIDED" name="Maven: se.llbit:jo-nbt:1.3.0" level="project" />
33+
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT" level="project" />
2634
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
2735
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.guava:guava:21.0" level="project" />
28-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.15-SNAPSHOT" level="project" />
29-
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
30-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-api:1.15-SNAPSHOT" level="project" />
31-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-config:1.15-SNAPSHOT" level="project" />
32-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-event:1.15-SNAPSHOT" level="project" />
33-
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-protocol:1.15-SNAPSHOT" level="project" />
36+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
37+
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
38+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-api:1.16-R0.2" level="project" />
39+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-config:1.16-R0.2" level="project" />
40+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-event:1.16-R0.2" level="project" />
41+
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-protocol:1.16-R0.2" level="project" />
3442
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:brigadier:1.0.16-SNAPSHOT" level="project" />
3543
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-codec:4.1.49.Final" level="project" />
3644
<orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.trove4j:core:3.1.0" level="project" />
45+
<orderEntry type="library" scope="PROVIDED" name="Maven: se.llbit:jo-nbt:1.3.0" level="project" />
3746
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-transport-native-unix-common:4.1.49.Final" level="project" />
3847
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-common:4.1.49.Final" level="project" />
3948
<orderEntry type="library" scope="PROVIDED" name="Maven: io.netty:netty-buffer:4.1.49.Final" level="project" />

dependency-reduced-pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>xyz.theprogramsrc</groupId>
55
<artifactId>SuperCoreAPI</artifactId>
66
<name>SuperCoreAPI</name>
7-
<version>3.4.0</version>
7+
<version>4.0.0_BETA1</version>
88
<build>
99
<sourceDirectory>src/main/java</sourceDirectory>
1010
<defaultGoal>clean package</defaultGoal>
@@ -64,7 +64,7 @@
6464
<dependency>
6565
<groupId>org.spigotmc</groupId>
6666
<artifactId>spigot-api</artifactId>
67-
<version>1.15.2-R0.1-SNAPSHOT</version>
67+
<version>1.16.1-R0.1-SNAPSHOT</version>
6868
<scope>provided</scope>
6969
<exclusions>
7070
<exclusion>
@@ -88,7 +88,7 @@
8888
<dependency>
8989
<groupId>net.md-5</groupId>
9090
<artifactId>bungeecord-api</artifactId>
91-
<version>1.15-SNAPSHOT</version>
91+
<version>1.16-R0.2</version>
9292
<scope>provided</scope>
9393
<exclusions>
9494
<exclusion>
@@ -142,7 +142,7 @@
142142
<dependency>
143143
<groupId>org.apache.logging.log4j</groupId>
144144
<artifactId>log4j-core</artifactId>
145-
<version>2.5</version>
145+
<version>2.13.2</version>
146146
<scope>provided</scope>
147147
<exclusions>
148148
<exclusion>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>xyz.theprogramsrc</groupId>
88
<artifactId>SuperCoreAPI</artifactId>
9-
<version>3.6.3</version>
9+
<version>4.0.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>SuperCoreAPI</name>
@@ -96,14 +96,14 @@
9696
<dependency>
9797
<groupId>org.spigotmc</groupId>
9898
<artifactId>spigot-api</artifactId>
99-
<version>1.15.2-R0.1-SNAPSHOT</version>
99+
<version>1.16.1-R0.1-SNAPSHOT</version>
100100
<scope>provided</scope>
101101
</dependency>
102102
<!-- BUNGEE -->
103103
<dependency>
104104
<groupId>net.md-5</groupId>
105105
<artifactId>bungeecord-api</artifactId>
106-
<version>1.15-SNAPSHOT</version>
106+
<version>1.16-R0.2</version>
107107
<scope>provided</scope>
108108
</dependency>
109109
<!-- NMS -->

src/main/java/xyz/theprogramsrc/supercoreapi/bungee/BungeeModule.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import net.md_5.bungee.api.plugin.Listener;
55
import xyz.theprogramsrc.supercoreapi.SuperModule;
66
import xyz.theprogramsrc.supercoreapi.bungee.storage.Settings;
7+
import xyz.theprogramsrc.supercoreapi.bungee.utils.tasks.BungeeTasks;
78

89
public class BungeeModule extends SuperModule<Listener> implements Listener {
910

@@ -38,4 +39,12 @@ protected ProxyServer getProxy(){
3839
return ((BungeePlugin)this.plugin).getProxy();
3940
}
4041

42+
/**
43+
* Gets the BungeeTasks util
44+
* @return the BungeeTasks util
45+
*/
46+
protected BungeeTasks getBungeeTasks(){
47+
return ((BungeePlugin)this.plugin).getBungeeTasks();
48+
}
49+
4150
}

src/main/java/xyz/theprogramsrc/supercoreapi/bungee/BungeePlugin.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import xyz.theprogramsrc.supercoreapi.bungee.events.BungeeEventManager;
99
import xyz.theprogramsrc.supercoreapi.bungee.storage.Settings;
1010
import xyz.theprogramsrc.supercoreapi.bungee.utils.BungeeUtils;
11+
import xyz.theprogramsrc.supercoreapi.bungee.utils.tasks.BungeeTasks;
1112
import xyz.theprogramsrc.supercoreapi.global.data.PluginDataStorage;
1213
import xyz.theprogramsrc.supercoreapi.global.dependencies.Dependencies;
1314
import xyz.theprogramsrc.supercoreapi.global.dependencies.DependencyManager;
@@ -34,6 +35,8 @@ public abstract class BungeePlugin extends Plugin implements SuperPlugin<Plugin>
3435

3536
private PluginDataStorage pluginDataStorage;
3637

38+
private BungeeTasks bungeeTasks;
39+
3740
@Override
3841
public void onLoad() {
3942
long start = System.currentTimeMillis();
@@ -53,6 +56,7 @@ public void onLoad() {
5356
public void onEnable() {
5457
if(this.emergencyStop) return;
5558
this.log("Enabling plugin &3v" + this.getPluginVersion());
59+
this.bungeeTasks = new BungeeTasks(this);
5660
this.settings = new Settings(this);
5761
this.translationsFolder = Utils.folder(new File(this.getDataFolder(), "translations/"));
5862
this.translationManager = new TranslationManager(this);
@@ -172,11 +176,15 @@ public DependencyManager getDependencyManager() {
172176
@Override
173177
public void emergencyStop() {
174178
this.emergencyStop = true;
175-
this.onDisable();
176179
this.getProxy().getPluginManager().unregisterCommands(this);
177180
this.getProxy().getPluginManager().unregisterListeners(this);
181+
this.onDisable();
178182
}
179183

184+
/**
185+
* Checks if this is an emergency stop
186+
* @return true if is an emergency stop, otherwise false
187+
*/
180188
public boolean isEmergencyStop() {
181189
return this.emergencyStop;
182190
}
@@ -185,4 +193,12 @@ public boolean isEmergencyStop() {
185193
public PluginDataStorage getPluginDataStorage() {
186194
return this.pluginDataStorage;
187195
}
196+
197+
/**
198+
* Gets the BungeeTasks util
199+
* @return the bungeetasks util
200+
*/
201+
public BungeeTasks getBungeeTasks() {
202+
return bungeeTasks;
203+
}
188204
}

src/main/java/xyz/theprogramsrc/supercoreapi/bungee/commands/BungeeCommand.java

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
import xyz.theprogramsrc.supercoreapi.global.translations.Base;
1111

1212
/**
13-
* A extension for easier control with commands
13+
* BungeeCommand is a representation of a {@link Command Command}
14+
* with ease of control and customization.
1415
*/
1516
public abstract class BungeeCommand extends BungeeModule {
1617

1718
/**
18-
* Creates a new command for BungeeCord and registers it
19+
* Create a new {@link BungeeCommand BungeeCommand}
1920
*
20-
* @param plugin The BungeeCord plugin
21+
* @param plugin The {@link BungeePlugin BungeeCord Plugin}
2122
*/
2223
public BungeeCommand(final BungeePlugin plugin){
2324
super(plugin);
@@ -53,40 +54,46 @@ private void onResult(CommandSender sender, CommandResult result){
5354
}
5455

5556
/**
56-
* Gets the command
57-
* @return the command
57+
* Gets the command executed to run the {@link BungeeCommand BungeeCommand}
58+
* @return The command
5859
*/
5960
public abstract String getCommand();
6061

6162
/**
6263
* Gets the permission to use the command
63-
* @return the permission
64+
*
65+
* @return The permission to use the command
66+
* @see #getCommand()
6467
*/
6568
public String getPermission(){
6669
return null;
6770
}
6871

6972
/**
70-
* Gets all the available aliases
71-
* @return the aliases
73+
* Gets all the available aliases.
74+
* The aliases are more commands to run the {@link BungeeCommand BungeeCommand}
75+
*
76+
* @return The aliases
7277
*/
7378
public String[] getAliases(){
7479
return new String[0];
7580
}
7681

7782
/**
7883
* Executed when a player executes the command
84+
*
7985
* @param player Who execute the command
80-
* @param args Arguments of the command
81-
* @return The CommandResult
86+
* @param args The arguments of the command
87+
* @return The {@link CommandResult Result} of the command
8288
*/
8389
public abstract CommandResult onPlayerExecute(ProxiedPlayer player, String[] args);
8490

8591
/**
8692
* Executed when the console executes the command
93+
*
8794
* @param console The console
88-
* @param args the arguments of the command
89-
* @return The CommandResult
95+
* @param args The arguments of the command
96+
* @return The {@link CommandResult Result} of the command
9097
*/
9198
public abstract CommandResult onConsoleExecute(BungeeConsole console, String[] args);
9299
}

src/main/java/xyz/theprogramsrc/supercoreapi/bungee/storage/Settings.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
import xyz.theprogramsrc.supercoreapi.bungee.utils.storage.BungeeYMLConfig;
66

77
/**
8-
* Basic BungeeCord Settings
9-
*
10-
* Use {@link #getConfig()} to get the Configuration File and modify it
8+
* Basic BungeeCord Settings used by the Plugin
119
*/
1210
public class Settings extends BungeeModule {
1311

0 commit comments

Comments
 (0)