Skip to content

Commit 24704ef

Browse files
Im-FranTheProgramSrc
authored andcommitted
Removed Tests from SpigotPlugin.java
1 parent f4bcca6 commit 24704ef

File tree

2 files changed

+13
-44
lines changed

2 files changed

+13
-44
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

1212
<name>SuperCoreAPI</name>
Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,26 @@
11
package xyz.theprogramsrc.supercoreapi.plugin;
22

3-
import org.bukkit.entity.Player;
4-
import xyz.theprogramsrc.supercoreapi.spigot.commands.CommandResult;
5-
import xyz.theprogramsrc.supercoreapi.spigot.commands.SpigotCommand;
6-
import xyz.theprogramsrc.supercoreapi.spigot.guis.action.ClickAction;
7-
import xyz.theprogramsrc.supercoreapi.spigot.guis.precreated.MaterialBrowser;
8-
import xyz.theprogramsrc.supercoreapi.spigot.utils.SpigotConsole;
9-
import xyz.theprogramsrc.supercoreapi.spigot.utils.xseries.XMaterial;
10-
11-
public class SpigotPlugin extends xyz.theprogramsrc.supercoreapi.spigot.SpigotPlugin {
3+
import org.bukkit.Bukkit;
4+
import org.bukkit.ChatColor;
5+
import org.bukkit.plugin.java.JavaPlugin;
126

7+
public class SpigotPlugin extends JavaPlugin {
138

149
@Override
15-
public void onPluginLoad() {
16-
10+
public void onEnable() {
11+
this.log("&3SuperCoreAPI &awas loaded as .jar file");
1712
}
1813

1914
@Override
20-
public void onPluginEnable() {
21-
new Command();
15+
public void onDisable() {
16+
this.log("&3SuperCoreAPI &awas disabled");
2217
}
2318

24-
@Override
25-
public void onPluginDisable() {
26-
19+
private void log(String s){
20+
Bukkit.getConsoleSender().sendMessage(c(s));
2721
}
2822

29-
static class Command extends SpigotCommand {
30-
31-
@Override
32-
public String getCommand() {
33-
return "scapi";
34-
}
35-
36-
@Override
37-
public CommandResult onPlayerExecute(Player player, String[] args) {
38-
new MaterialBrowser(player){
39-
@Override
40-
public void onBack(ClickAction clickAction) {
41-
this.close();
42-
}
43-
44-
@Override
45-
public void onSelect(ClickAction clickAction, XMaterial xMaterial) {
46-
clickAction.getPlayer().getInventory().addItem(xMaterial.parseItem());
47-
}
48-
}.open();
49-
return CommandResult.COMPLETED;
50-
}
51-
52-
@Override
53-
public CommandResult onConsoleExecute(SpigotConsole console, String[] args) {
54-
return CommandResult.COMPLETED;
55-
}
23+
private String c(String s){
24+
return ChatColor.translateAlternateColorCodes('&', s);
5625
}
5726
}

0 commit comments

Comments
 (0)