mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-27 19:09:09 +00:00
Fixed using the wrong plugin instance
This commit is contained in:
@@ -46,7 +46,7 @@ import java.util.function.Supplier;
|
||||
public abstract class BukkitCustomCropsPlugin implements CustomCropsPlugin {
|
||||
|
||||
private static BukkitCustomCropsPlugin instance;
|
||||
private final Plugin boostrap;
|
||||
private final Plugin bootstrap;
|
||||
protected static boolean isReloading = false;
|
||||
|
||||
protected AbstractJavaScheduler<Location, World> scheduler;
|
||||
@@ -67,13 +67,13 @@ public abstract class BukkitCustomCropsPlugin implements CustomCropsPlugin {
|
||||
/**
|
||||
* Constructs a new BukkitCustomCropsPlugin instance.
|
||||
*
|
||||
* @param boostrap the plugin instance used to initialize this class
|
||||
* @param bootstrap the plugin instance used to initialize this class
|
||||
*/
|
||||
public BukkitCustomCropsPlugin(Plugin boostrap) {
|
||||
if (!boostrap.getName().equals("CustomCrops")) {
|
||||
public BukkitCustomCropsPlugin(Plugin bootstrap) {
|
||||
if (!bootstrap.getName().equals("CustomCrops")) {
|
||||
throw new IllegalArgumentException("CustomCrops plugin requires custom crops plugin");
|
||||
}
|
||||
this.boostrap = boostrap;
|
||||
this.bootstrap = bootstrap;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ public abstract class BukkitCustomCropsPlugin implements CustomCropsPlugin {
|
||||
*
|
||||
* @return the {@link Plugin} instance
|
||||
*/
|
||||
public Plugin getBoostrap() {
|
||||
return boostrap;
|
||||
public Plugin getBootstrap() {
|
||||
return bootstrap;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,7 +260,7 @@ public abstract class BukkitCustomCropsPlugin implements CustomCropsPlugin {
|
||||
* @return the data folder as a {@link File}
|
||||
*/
|
||||
public File getDataFolder() {
|
||||
return boostrap.getDataFolder();
|
||||
return bootstrap.getDataFolder();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,7 +58,7 @@ public class HologramManager implements Listener, Reloadable {
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin.getBoostrap());
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin.getBootstrap());
|
||||
this.cacheCheckTask = plugin.getScheduler().asyncRepeating(() -> {
|
||||
ArrayList<UUID> removed = new ArrayList<>();
|
||||
long current = System.currentTimeMillis();
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CoolDownManager implements Listener, Reloadable {
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin.getBoostrap());
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin.getBootstrap());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user