Add explict this checkstyle rule and fix violations
This commit is contained in:
parent
a6eb44376c
commit
d5259dfbe4
62 changed files with 195 additions and 192 deletions
|
|
@ -72,7 +72,7 @@ public final class BukkitBrigadierMapper<C> {
|
|||
/* Detect Minecraft Version Metadata */
|
||||
final String version = Bukkit.getServer().getClass().getPackage().getName();
|
||||
this.nmsVersion = version.substring(version.lastIndexOf(".") + 1);
|
||||
final int majorMinecraftVersion = Integer.parseInt(nmsVersion.split("_")[1]);
|
||||
final int majorMinecraftVersion = Integer.parseInt(this.nmsVersion.split("_")[1]);
|
||||
|
||||
try {
|
||||
/* UUID nms argument is a 1.16+ feature */
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ final class BukkitCommandPreprocessor<C> implements CommandPreprocessor<C> {
|
|||
*/
|
||||
@Override
|
||||
public void accept(final @NonNull CommandPreprocessingContext<C> context) {
|
||||
context.getCommandContext().store("BukkitCommandSender", mgr.getBackwardsCommandSenderMapper().apply(
|
||||
context.getCommandContext().store("BukkitCommandSender", this.mgr.getBackwardsCommandSenderMapper().apply(
|
||||
context.getCommandContext().getSender()));
|
||||
context.getCommandContext().store("CloudBukkitCapabilities", mgr.queryCapabilities());
|
||||
context.getCommandContext().store("CloudBukkitCapabilities", this.mgr.queryCapabilities());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ public abstract class BukkitCommandSender {
|
|||
return false;
|
||||
}
|
||||
final BukkitCommandSender that = (BukkitCommandSender) o;
|
||||
return Objects.equal(internalSender, that.internalSender);
|
||||
return Objects.equal(this.internalSender, that.internalSender);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return Objects.hashCode(internalSender);
|
||||
return Objects.hashCode(this.internalSender);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class BukkitPluginRegistrationHandler<C> implements CommandRegistrationHa
|
|||
final Field knownCommands = SimpleCommandMap.class.getDeclaredField("knownCommands");
|
||||
knownCommands.setAccessible(true);
|
||||
@SuppressWarnings("unchecked") final Map<String, org.bukkit.command.Command> bukkitCommands =
|
||||
(Map<String, org.bukkit.command.Command>) knownCommands.get(commandMap);
|
||||
(Map<String, org.bukkit.command.Command>) knownCommands.get(this.commandMap);
|
||||
this.bukkitCommands = bukkitCommands;
|
||||
this.bukkitCommandManager = bukkitCommandManager;
|
||||
Bukkit.getHelpMap().registerHelpTopicFactory(BukkitCommand.class, GenericCommandHelpTopic::new);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class CloudCommodoreManager<C> extends BukkitPluginRegistrationHandler<C> {
|
|||
));
|
||||
this.brigadierManager.brigadierSenderMapper(
|
||||
sender -> this.commandManager.getCommandSenderMapper().apply(
|
||||
commodore.getBukkitSender(sender)
|
||||
this.commodore.getBukkitSender(sender)
|
||||
)
|
||||
);
|
||||
new BukkitBrigadierMapper<>(this.commandManager, this.brigadierManager);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public class MultiplePlayerSelector extends MultipleEntitySelector {
|
|||
if (e.getType() != EntityType.PLAYER) {
|
||||
throw new IllegalArgumentException("Non-players selected in player selector.");
|
||||
} else {
|
||||
players.add((Player) e);
|
||||
this.players.add((Player) e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ public final class OfflinePlayerArgument<C> extends CommandArgument<C, OfflinePl
|
|||
* @return String value
|
||||
*/
|
||||
public @NonNull String getInput() {
|
||||
return input;
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ public final class PlayerArgument<C> extends CommandArgument<C, Player> {
|
|||
* @return String value
|
||||
*/
|
||||
public @NonNull String getInput() {
|
||||
return input;
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,13 +86,13 @@ public final class LocationCoordinate {
|
|||
return false;
|
||||
}
|
||||
final LocationCoordinate that = (LocationCoordinate) o;
|
||||
return Double.compare(that.coordinate, coordinate) == 0
|
||||
&& type == that.type;
|
||||
return Double.compare(that.coordinate, this.coordinate) == 0
|
||||
&& this.type == that.type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(type, coordinate);
|
||||
return Objects.hash(this.type, this.coordinate);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public final class SelectorParseException extends ParserException {
|
|||
* @return String value
|
||||
*/
|
||||
public @NonNull String getInput() {
|
||||
return input;
|
||||
return this.input;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue