This commit is contained in:
@@ -103,10 +103,12 @@ public class ScoreKeeperPlugin extends JavaPlugin {
|
||||
public void onEnable() {
|
||||
Objects.requireNonNull(getCommand("score-get")).setExecutor(new ScoreGetCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-add")).setExecutor(new ScoreAddCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-subtract")).setExecutor(new ScoreSubtractCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-subtract"))
|
||||
.setExecutor(new ScoreSubtractCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-reset")).setExecutor(new ScoreResetCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-archive")).setExecutor(new ScoreArchiveCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-archive-list")).setExecutor(new ScoreArchiveListCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-archive-list"))
|
||||
.setExecutor(new ScoreArchiveListCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-bucket")).setExecutor(new ScoreBucketCommand(this));
|
||||
Objects.requireNonNull(getCommand("score-run")).setExecutor(new ScoreRunCommand(this));
|
||||
|
||||
@@ -711,7 +713,8 @@ public class ScoreKeeperPlugin extends JavaPlugin {
|
||||
} else if (reporting == ScoreReporting.ADMIN) {
|
||||
logInfo(text);
|
||||
for (Player recipient : getServer().getOnlinePlayers()) {
|
||||
if (Objects.requireNonNull(recipient).isOp() || recipient.hasPermission("scorekeeper.admin")) {
|
||||
if (Objects.requireNonNull(recipient).isOp()
|
||||
|| recipient.hasPermission("scorekeeper.admin")) {
|
||||
sendMessage(recipient, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@ along with ScoreKeeper. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
||||
|
||||
package com.majinnaibu.minecraft.plugins.scorekeeper.commands;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreKeeperPlugin;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -78,7 +78,8 @@ public class ScoreAddCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void echoError(CommandSender sender, boolean rcon, String string) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void echoUsage(CommandSender sender, boolean rcon) {
|
||||
|
||||
@@ -17,13 +17,13 @@ along with ScoreKeeper. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
||||
|
||||
package com.majinnaibu.minecraft.plugins.scorekeeper.commands;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreKeeperPlugin;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -70,7 +70,8 @@ public class ScoreArchiveCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void sendError(CommandSender sender, String message) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(message)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(message)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void sendUsage(CommandSender sender) {
|
||||
|
||||
@@ -17,6 +17,8 @@ along with ScoreKeeper. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
||||
|
||||
package com.majinnaibu.minecraft.plugins.scorekeeper.commands;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreBucket;
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreKeeperPlugin;
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreReporting;
|
||||
@@ -24,8 +26,6 @@ import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreReporting;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -123,7 +123,8 @@ public class ScoreBucketCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void sendError(CommandSender sender, String message) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(message)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(message)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void sendUsage(CommandSender sender) {
|
||||
|
||||
@@ -17,13 +17,13 @@ along with ScoreKeeper. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
||||
|
||||
package com.majinnaibu.minecraft.plugins.scorekeeper.commands;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreKeeperPlugin;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -86,7 +86,8 @@ public class ScoreGetCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void echoError(CommandSender sender, boolean rcon, String string) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void echoUsage(CommandSender sender, boolean rcon) {
|
||||
|
||||
@@ -17,13 +17,13 @@ along with ScoreKeeper. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
||||
|
||||
package com.majinnaibu.minecraft.plugins.scorekeeper.commands;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreKeeperPlugin;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -64,7 +64,8 @@ public class ScoreResetCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void echoError(CommandSender sender, boolean rcon, String string) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void echoUsage(CommandSender sender, boolean rcon) {
|
||||
|
||||
@@ -110,7 +110,8 @@ public class ScoreRunCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void sendError(CommandSender sender, String message) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(message)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(message)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void sendUsage(CommandSender sender) {
|
||||
|
||||
@@ -17,13 +17,13 @@ along with ScoreKeeper. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
||||
|
||||
package com.majinnaibu.minecraft.plugins.scorekeeper.commands;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.majinnaibu.minecraft.plugins.scorekeeper.ScoreKeeperPlugin;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -78,7 +78,8 @@ public class ScoreSubtractCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private void echoError(CommandSender sender, boolean rcon, String string) {
|
||||
_plugin.sendMessage(sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
_plugin.sendMessage(
|
||||
sender, Component.text(Objects.requireNonNull(string)).color(NamedTextColor.RED));
|
||||
}
|
||||
|
||||
private void echoUsage(CommandSender sender, boolean rcon) {
|
||||
|
||||
Reference in New Issue
Block a user