Skip to content

Commit

Permalink
change type of instance from JavaPlugin to Main
Browse files Browse the repository at this point in the history
  • Loading branch information
BoltyDawg committed Jan 28, 2021
1 parent 16527c5 commit 5589bd0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
sender.sendMessage("Reloading HorseOverhaul...");

//unitialize any existing listeners
((Main) Main.instance).removeListeners();
Main.instance.removeListeners();

//reload the config and necessary listeners
CustomConfig.reload();
Expand Down Expand Up @@ -75,7 +75,7 @@ else if (param.equalsIgnoreCase("reload")) {
player.sendMessage("Reloading HorseOverhaul...");

//unitialize any existing listeners
((Main) Main.instance).removeListeners();
Main.instance.removeListeners();

//reload the config and necessary listeners
CustomConfig.reload();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static void save() {
*/
public static void reload() {
customFile = YamlConfiguration.loadConfiguration(file);
((Main) Main.instance).readConfig(customFile);
Main.instance.readConfig(customFile);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/boltydawg/horseoverhaul/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class Main extends JavaPlugin{

public static DecimalFormat df = new DecimalFormat("0.00");

public static JavaPlugin instance;
public static Main instance;

private BreedingListener breeding;
private StatsListener stats;
Expand Down

0 comments on commit 5589bd0

Please sign in to comment.