Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
🚨 fix some broken java things
Browse files Browse the repository at this point in the history
  • Loading branch information
2D committed Jun 29, 2021
1 parent 1fb4ab7 commit e7a852f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/main/java/lol/dimensional/cheese/Cheese.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
Expand Down Expand Up @@ -45,7 +46,7 @@ public void onEnable() {
this.getLogger().info("Lol fucking cheese boy");

/* get and set the cheese boy value */
var rawCheeseBoy = this
String rawCheeseBoy = this
.getConfig()
.getString("cheese-boy", Cheese.DEFAULT_CHEESE_BOY);

Expand Down Expand Up @@ -90,7 +91,7 @@ public boolean startTheCheese(Player player) {
if (this.taskId == null) {
this
.getLogger()
.info("Starting the cheese for %s".formatted(player.getName()));
.info("Starting the cheese for " + player.getName());

this.taskId = Bukkit
.getScheduler()
Expand All @@ -115,7 +116,7 @@ public boolean stopTheCheese() {
}

private void useExecutor(String command, CommandExecutor executor) {
var cmd = this.getCommand(command);
PluginCommand cmd = this.getCommand(command);
if (cmd != null) {
cmd.setExecutor(executor);
}
Expand Down Expand Up @@ -154,7 +155,9 @@ public static void sendCheeseTitle(Player player) {
* @return true, if the player is the cheese boy.
*/
public static boolean isCheeseBoy(Player player) {
return player.getUniqueId() != Cheese.getInstance().getCheeseBoyId();
return player.getUniqueId() != Cheese
.getInstance()
.getCheeseBoyId();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/lol/dimensional/cheese/commands/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
return false;
}

var started = Cheese
boolean started = Cheese
.getInstance()
.startTheCheese(player);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/lol/dimensional/cheese/commands/Stop.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
return false;
}

var stopped = Cheese.getInstance().stopTheCheese();
boolean stopped = Cheese.getInstance().stopTheCheese();
sender.sendMessage(stopped ? "Stopped sending the cheese" : "I did nothing lol");

return true;
Expand Down

0 comments on commit e7a852f

Please sign in to comment.