mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
v4.5: Bulk delete, regex customization, QoL & API work (#486)
* Improve validator error specificity, fix #481 * Add more sanity-checking to cluster IDs, close #482 * Add bulk/player-delete command, close #484, close #257 * Fix checkstyle formatting in tests * Add missing strings to other locale files * Use morepaperlib for runtime command registration on spigot * api: make creation methods return a future, close #473 * Add name/description restriction regex customization * docs: Update config file with new regex options * bump version number to 4.5 * fix typo, correct command confirmation logic * Make confirmation locales more clear * Fix confirmation checking logic
This commit is contained in:
1 parent
e2c9a52911
commit
6bfd69f232
38 files changed
+1161
-692
No files matched your search
@@ -65,6 +65,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
import space.arim.morepaperlib.MorePaperLib;
|
||||
import space.arim.morepaperlib.commands.CommandRegistration;
|
||||
import space.arim.morepaperlib.scheduling.GracefulScheduling;
|
||||
|
||||
import java.io.File;
|
||||
@@ -177,11 +178,11 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
}
|
||||
});
|
||||
|
||||
// Register events
|
||||
initialize("events", (plugin) -> this.eventListener = new BukkitEventListener(this));
|
||||
// Register event listener
|
||||
initialize("events", (plugin) -> this.eventListener = registerListener());
|
||||
|
||||
// Register commands
|
||||
initialize("commands", (plugin) -> this.commands = registerCommands());
|
||||
initialize("commands", (plugin) -> this.commands = BukkitCommand.Type.getCommands(this));
|
||||
|
||||
// Initialize the API
|
||||
initialize("API", (plugin) -> HuskHomesAPI.register(this));
|
||||
@@ -191,9 +192,10 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
this.checkForUpdates();
|
||||
}
|
||||
|
||||
// Register the event listener
|
||||
@NotNull
|
||||
public List<Command> registerCommands() {
|
||||
return BukkitCommand.Type.getCommands(this);
|
||||
protected EventListener registerListener() {
|
||||
return new BukkitEventListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -242,15 +244,6 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
cancelTasks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the adventure Bukkit audiences.
|
||||
*
|
||||
* @return The adventure Bukkit audiences
|
||||
*/
|
||||
public BukkitAudiences getAudiences() {
|
||||
return audiences;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public ConsoleUser getConsole() {
|
||||
@@ -482,11 +475,21 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes, BukkitTask
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public BukkitAudiences getAudiences() {
|
||||
return audiences;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public GracefulScheduling getScheduler() {
|
||||
return paperLib.scheduling();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public CommandRegistration getCommandRegistrar() {
|
||||
return paperLib.commandRegistration();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public HuskHomes getPlugin() {
|
||||
|
||||
Reference in new issue
Block a user