Skip to content

Commit

Permalink
Cleanup work
Browse files Browse the repository at this point in the history
  • Loading branch information
RenanMsV committed Sep 19, 2024
1 parent 4874812 commit 89afbf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 2 additions & 7 deletions src/main/java/com/xmooncorp/magic8ball/Magic8Ball.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public class Magic8Ball extends JavaPlugin implements SlimefunAddon {
private static Magic8Ball instance;
private ConfigBasedLocalization localization;
private Config config;
private String selectedLanguage;

@Override
public void onEnable() {

instance = this;
config = new Config(this);

Expand All @@ -39,8 +39,6 @@ public void onEnable() {

log(localization().getString("console.addon-enabled"));

log("Here, it should give error: " + localization().getString("console.something-that-does-not-exist"));

}

@Override
Expand Down Expand Up @@ -71,6 +69,7 @@ public static Magic8Ball instance(){
return instance;
}

@SuppressWarnings("deprecation")
private void tryAutoUpdate() {
if (getConfig().getBoolean("options.auto-update") && getDescription().getVersion().startsWith("Dev")) {
new BlobBuildUpdater(this, getFile(), "Magic8Ball", "Dev").start();
Expand All @@ -81,10 +80,6 @@ public static void log(@Nonnull String message) {
instance().getLogger().info(message);
}

public static void log(@Nonnull String message, @Nonnull Level logLevel) {
instance().getLogger().log(logLevel, message);
}

private void loadItems() {
try {
ItemSetup.setup(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
import io.github.thebusybiscuit.slimefun4.core.handlers.BlockUseHandler;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.*;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
Expand All @@ -22,7 +25,6 @@

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Objects;
import java.util.Optional;
import java.util.Random;

Expand Down

0 comments on commit 89afbf8

Please sign in to comment.