Skip to content

Commit

Permalink
chore: spotless apply
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Oct 15, 2023
1 parent ba81441 commit edf84a0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand;
import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;

import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;

/**
* This is our class for the /sf banitem subcommand.
Expand Down Expand Up @@ -36,9 +35,16 @@ public void onExecute(@Nonnull CommandSender sender, @Nonnull String[] args) {
Slimefun.getLocalization().sendMessage(sender, "commands.banitem.success", true);
return;
}
Slimefun.getLocalization().sendMessage(sender, "messages.invalid-item", true, msg -> msg.replace(PLACEHOLDER_ITEM, args[1]));
Slimefun.getLocalization()
.sendMessage(
sender, "messages.invalid-item", true, msg -> msg.replace(PLACEHOLDER_ITEM, args[1]));
}
Slimefun.getLocalization().sendMessage(sender, "messages.usage", true, msg -> msg.replace("%usage%", "/sf banitem <Slimefun Item>"));
Slimefun.getLocalization()
.sendMessage(
sender,
"messages.usage",
true,
msg -> msg.replace("%usage%", "/sf banitem <Slimefun Item>"));
} else {
Slimefun.getLocalization().sendMessage(sender, "messages.no-permission", true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand;
import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import io.github.thebusybiscuit.slimefun4.core.commands.SlimefunCommand;
import io.github.thebusybiscuit.slimefun4.core.commands.SubCommand;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;

import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;

/**
* This is our class for the /sf unbanitem subcommand.
Expand Down Expand Up @@ -36,9 +35,16 @@ public void onExecute(@Nonnull CommandSender sender, @Nonnull String[] args) {
Slimefun.getLocalization().sendMessage(sender, "commands.unbanitem.success", true);
return;
}
Slimefun.getLocalization().sendMessage(sender, "messages.invalid-item", true, msg -> msg.replace(PLACEHOLDER_ITEM, args[1]));
Slimefun.getLocalization()
.sendMessage(
sender, "messages.invalid-item", true, msg -> msg.replace(PLACEHOLDER_ITEM, args[1]));
}
Slimefun.getLocalization().sendMessage(sender, "messages.usage", true, msg -> msg.replace("%usage%", "/sf unbanitem <Slimefun Item>"));
Slimefun.getLocalization()
.sendMessage(
sender,
"messages.usage",
true,
msg -> msg.replace("%usage%", "/sf unbanitem <Slimefun Item>"));
} else {
Slimefun.getLocalization().sendMessage(sender, "messages.no-permission", true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ private void tickChunk(ChunkPosition chunk, Set<BlockTicker> tickers, Set<Locati

private void tickLocation(@Nonnull Set<BlockTicker> tickers, @Nonnull Location l) {
var blockData = StorageCacheUtils.getBlock(l);
if (blockData == null || !blockData.isDataLoaded() || blockData.isPendingRemove() || SlimefunItem.getById(blockData.getSfId()).isDisabledIn(l.getWorld())) {
if (blockData == null
|| !blockData.isDataLoaded()
|| blockData.isPendingRemove()
|| SlimefunItem.getById(blockData.getSfId()).isDisabledIn(l.getWorld())) {
return;
}
SlimefunItem item = SlimefunItem.getById(blockData.getSfId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ public void register(@Nonnull SlimefunAddon addon) {
if (getCapacity() > 0 && getEnergyConsumption() > 0 && getSpeed() > 0) {
super.register(addon);
}

}

/**
Expand Down Expand Up @@ -465,7 +464,7 @@ public void disable() {

@Override
public void postRegister() {
if(getState() == ItemState.ENABLED){
if (getState() == ItemState.ENABLED) {
registerDefaultRecipes();
}
}
Expand Down

0 comments on commit edf84a0

Please sign in to comment.