mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add fabric builds for older MC versions & add checkstyle (#449)
* Remove instance getters, improve command logic, register APi * Publish multiple fabric builds, enforce checkstyle * Bump guava * Bump to 4.4.2
This commit is contained in:
1 parent
51baf196b3
commit
c9f5262292
219 files changed
+8032
-1392
No files matched your search
@@ -21,7 +21,7 @@ package net.william278.huskhomes.hook;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.BukkitHuskHomes;
|
||||
import net.william278.huskhomes.user.BukkitUser;
|
||||
import net.william278.huskhomes.user.OnlineUser;
|
||||
import net.william278.huskhomes.user.SavedUser;
|
||||
@@ -33,21 +33,21 @@ import java.util.List;
|
||||
|
||||
public class PlaceholderAPIHook extends Hook {
|
||||
|
||||
public PlaceholderAPIHook(@NotNull HuskHomes plugin) {
|
||||
public PlaceholderAPIHook(@NotNull BukkitHuskHomes plugin) {
|
||||
super(plugin, "PlaceholderAPI");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
new HuskHomesExpansion(plugin).register();
|
||||
new HuskHomesExpansion((BukkitHuskHomes) plugin).register();
|
||||
}
|
||||
|
||||
public static class HuskHomesExpansion extends PlaceholderExpansion {
|
||||
|
||||
@NotNull
|
||||
private final HuskHomes plugin;
|
||||
private final BukkitHuskHomes plugin;
|
||||
|
||||
private HuskHomesExpansion(@NotNull HuskHomes plugin) {
|
||||
private HuskHomesExpansion(@NotNull BukkitHuskHomes plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class PlaceholderAPIHook extends Hook {
|
||||
}
|
||||
|
||||
// Return the requested data
|
||||
final OnlineUser player = BukkitUser.adapt(offlinePlayer.getPlayer());
|
||||
final OnlineUser player = BukkitUser.adapt(offlinePlayer.getPlayer(), plugin);
|
||||
return switch (params) {
|
||||
case "homes_count" -> String.valueOf(plugin.getManager().homes()
|
||||
.getUserHomes()
|
||||
|
||||
Reference in new issue
Block a user