Skip to content

Commit 3b1ade6

Browse files
committed
Fixed some bugs and removed useless stuff
1 parent 3094fcb commit 3b1ade6

File tree

148 files changed

+279
-4817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+279
-4817
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.iws
77
*.iml
88
*.ipr
9+
settings.xml
910

1011
### Eclipse ###
1112
.apt_generated
@@ -52,4 +53,3 @@ build/
5253
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
5354
hs_err_pid*
5455
replay_pid*
55-
.github/settings.xml

README.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BossBarAPI, ActionBarAPI & TitleAPI for 1.8.X (Very Lightweight)
1515
<dependency>
1616
<groupId>me.classy</groupId>
1717
<artifactId>ba-api</artifactId>
18-
<version>2.0</version>
18+
<version>2.1</version>
1919
</dependency>
2020
```
2121

@@ -39,6 +39,39 @@ actionBar.sendToAll(); // Send the actionbar to all the players online on the se
3939
Title title = new Title();
4040
title.sentToPlayer(p, "Hello World (Title)", "Hello World (Subtitle)", 10, 70, 20); // Hello World (title) and Hello World (subtitle) for 3.5 seconds (70 ticks)
4141
title.sentToAll("Hello World (Title)", "Hello World (Subtitle)", 10, 70, 20); // Hello World (title) and Hello World (subtitle) for 3.5 seconds (70 ticks) to all players
42+
43+
// Example Command
44+
package me.classy.baapi.commands;
45+
46+
import org.bukkit.entity.Player;
47+
import org.bukkit.command.CommandSender;
48+
49+
import me.classy.baapi.commandsapi.BaseCommand;
50+
import me.classy.baapi.utility.Util;
51+
52+
public class ECommand extends BaseCommand {
53+
54+
public ECommand() {
55+
super("example", new String[]{"ex", "e"}, "I made this command for example, if you want to make a command then use this for example.", "/example <message> OR /ex <message> OR /e <message>", "e.command");
56+
}
57+
58+
@Override
59+
public void execute(CommandSender sender, String[] args) {
60+
if (sender instanceof Player) {
61+
62+
Player p = (Player) sender;
63+
64+
if (args.length > 0) {
65+
String message = String.join(" ", args);
66+
p.sendMessage(Util.setColor("&b[TEST] &f" + message));
67+
} else {
68+
p.sendMessage(Util.setColor("&eUsage: &b" + getUsage()));
69+
}
70+
} else {
71+
sender.sendMessage("Nuh uh");
72+
}
73+
}
74+
} // This is just an example on how you can create commands using our api.
4275
```
4376
## Tested Versions
4477

pom.xml

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>me.classy</groupId>
66
<artifactId>ba-api</artifactId>
7-
<version>2.0</version>
7+
<version>2.1</version>
88
<packaging>jar</packaging>
99

1010
<name>BA-API</name>
@@ -23,7 +23,7 @@
2323
<name>Classy</name>
2424
<email>classycoder1@gmail.com</email>
2525
<roles>
26-
<role>commiter</role>
26+
<role>Owner</role>
2727
</roles>
2828
</developer>
2929
</developers>
@@ -53,10 +53,6 @@
5353
<id>enginehub-maven</id>
5454
<url>https://maven.enginehub.org/repo/</url>
5555
</repository>
56-
<repository>
57-
<id>citizens-repo</id>
58-
<url>https://maven.citizensnpcs.co/repo</url>
59-
</repository>
6056
</repositories>
6157

6258
<dependencies>

src/main/java/me/classy/baapi/BAAPI.java

+1-21
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
import me.classy.baapi.utility.*;
1010
import me.classy.baapi.holo.*;
1111
import me.classy.baapi.gui.*;
12-
import me.classy.baapi.staff.*;
13-
import me.classy.baapi.rank.*;
14-
import me.classy.baapi.listener.*;
15-
import me.classy.baapi.commands.*;
1612
import me.classy.baapi.commandsapi.*;
1713

1814
import java.util.List;
@@ -29,7 +25,6 @@ public class BAAPI extends JavaPlugin {
2925
public void onEnable() {
3026
loadConfig();
3127
scoreBoard();
32-
registerListeners();
3328
registerCommands();
3429

3530
getLogger().info(Util.setColor("&e&m----------------------------------"));
@@ -55,23 +50,8 @@ public void loadConfig() {
5550
saveConfig();
5651
}
5752

58-
private void registerListeners() {
59-
PluginManager pm = getServer().getPluginManager();
60-
pm.registerEvents(new PlayerJoin(), this);
61-
pm.registerEvents(new StaffJoinLeaveEvent(), this);
62-
}
63-
6453
private void registerCommands() {
65-
getCommand("sendtitle").setExecutor(new TitleCommand());
66-
getCommand("sendsubtitle").setExecutor(new SubtitleCommand());
67-
getCommand("staffchat").setExecutor(new StaffChatCommand());
68-
getCommand("staffinfo").setExecutor(new StaffInfoCommand());
69-
getCommand("staff").setExecutor(new StaffListCommand());
70-
getCommand("togglestaffchat").setExecutor(new ToggleStaffChatCommand());
71-
getCommand("donttouch").setExecutor(iCommandExecutor);
72-
73-
// Register commands that you created using our API
74-
commandRegistery.registerCommand(new ECommand());
54+
getCommand("ba-api").setExecutor(iCommandExecutor);
7555
}
7656

7757
public void scoreBoard() {

src/main/java/me/classy/baapi/commands/ECommand.java

-31
This file was deleted.

src/main/java/me/classy/baapi/commands/SubtitleCommand.java

-40
This file was deleted.

src/main/java/me/classy/baapi/commands/TitleCommand.java

-40
This file was deleted.

src/main/java/me/classy/baapi/listener/PlayerJoin.java

-51
This file was deleted.

0 commit comments

Comments
 (0)