Set maximum line length to 100 characters
This commit is contained in:
parent
0184867a61
commit
e28e4aa47a
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE module PUBLIC
|
||||||
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||||
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||||
|
|
||||||
|
<module name="Checker">
|
||||||
|
<module name="LineLength">
|
||||||
|
<property name="max" value="100"/>
|
||||||
|
</module>
|
||||||
|
</module>
|
5
pom.xml
5
pom.xml
|
@ -41,9 +41,8 @@
|
||||||
<goal>check</goal>
|
<goal>check</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<suppressionsLocation>
|
<configLocation>checkstyle.xml</configLocation>
|
||||||
suppressions.xml
|
<suppressionsLocation>suppressions.xml</suppressionsLocation>
|
||||||
</suppressionsLocation>
|
|
||||||
<failOnViolation>true</failOnViolation>
|
<failOnViolation>true</failOnViolation>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
|
@ -35,7 +35,8 @@ class Tick extends BukkitRunnable {
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
for (int i = 0; i < controller.getInventory().getSize(); i++) {
|
for (int i = 0; i < controller.getInventory().getSize(); i++) {
|
||||||
if (controller.getInventory().getItem(i) != null) {
|
if (controller.getInventory().getItem(i) != null) {
|
||||||
if (!controller.getInventory().getItem(i).equals(target.getInventory().getItem(i))) {
|
if (!controller.getInventory().getItem(i).equals(
|
||||||
|
target.getInventory().getItem(i))) {
|
||||||
target.getInventory().setItem(i, controller.getInventory().getItem(i));
|
target.getInventory().setItem(i, controller.getInventory().getItem(i));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -120,7 +121,8 @@ class ControlPlayer implements Listener {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
target.chat("§iControlUChat§" + event.getMessage()); // Add prefix to prevent messages from being cancelled
|
// Add prefix to prevent messages from being cancelled
|
||||||
|
target.chat("§iControlUChat§" + event.getMessage());
|
||||||
}
|
}
|
||||||
}.runTask(JavaPlugin.getPlugin(Main.class));
|
}.runTask(JavaPlugin.getPlugin(Main.class));
|
||||||
|
|
||||||
|
@ -216,7 +218,8 @@ class ControlPlayer implements Listener {
|
||||||
allPlayers.showPlayer(JavaPlugin.getPlugin(Main.class), controller);
|
allPlayers.showPlayer(JavaPlugin.getPlugin(Main.class), controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Scoreboard scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
|
final Scoreboard scoreboard = Bukkit.getScoreboardManager()
|
||||||
|
.getMainScoreboard();
|
||||||
final Team team = scoreboard.getTeam("icuCollision");
|
final Team team = scoreboard.getTeam("icuCollision");
|
||||||
|
|
||||||
if (team != null
|
if (team != null
|
||||||
|
@ -229,7 +232,8 @@ class ControlPlayer implements Listener {
|
||||||
}
|
}
|
||||||
}.runTaskLater(JavaPlugin.getPlugin(Main.class), tickDelay);
|
}.runTaskLater(JavaPlugin.getPlugin(Main.class), tickDelay);
|
||||||
|
|
||||||
otherPlayer.sendMessage("The player you were controlling has disconnected. You are invisible for 10 seconds.");
|
otherPlayer.sendMessage("The player you were controlling has disconnected. "
|
||||||
|
+ "You are invisible for 10 seconds.");
|
||||||
|
|
||||||
} else if (PlayerList.getTarget(player.getUniqueId()) != null
|
} else if (PlayerList.getTarget(player.getUniqueId()) != null
|
||||||
&& PlayerList.getTarget(player.getUniqueId()).equals(otherPlayer)) {
|
&& PlayerList.getTarget(player.getUniqueId()).equals(otherPlayer)) {
|
||||||
|
|
|
@ -45,7 +45,8 @@ public final class Main extends JavaPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
controller.removePotionEffect(PotionEffectType.INVISIBILITY);
|
controller.removePotionEffect(PotionEffectType.INVISIBILITY);
|
||||||
controller.sendMessage("You are no longer controlling \"" + target.getName() + "\" due to server reload");
|
controller.sendMessage("You are no longer controlling \"" + target.getName()
|
||||||
|
+ "\" due to server reload");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,11 +33,14 @@ public final class CommandIcu implements CommandExecutor {
|
||||||
if (target == controller) {
|
if (target == controller) {
|
||||||
controller.sendMessage("You are already controlling yourself");
|
controller.sendMessage("You are already controlling yourself");
|
||||||
} else if (PlayerList.getTarget(controller.getUniqueId()) != null) {
|
} else if (PlayerList.getTarget(controller.getUniqueId()) != null) {
|
||||||
controller.sendMessage("You are already controlling \"" + target.getName() + "\"");
|
controller.sendMessage("You are already controlling \""
|
||||||
|
+ target.getName() + "\"");
|
||||||
} else if (PlayerList.getController(target.getUniqueId()) != null) {
|
} else if (PlayerList.getController(target.getUniqueId()) != null) {
|
||||||
controller.sendMessage("Player \"" + target.getName() + "\" is already being controlled");
|
controller.sendMessage("Player \"" + target.getName()
|
||||||
|
+ "\" is already being controlled");
|
||||||
} else if (PlayerList.getTarget(target.getUniqueId()) != null) {
|
} else if (PlayerList.getTarget(target.getUniqueId()) != null) {
|
||||||
controller.sendMessage("Player \"" + target.getName() + "\" is already controlling another player");
|
controller.sendMessage("Player \"" + target.getName()
|
||||||
|
+ "\" is already controlling another player");
|
||||||
} else if (!controller.canSee(target)) {
|
} else if (!controller.canSee(target)) {
|
||||||
controller.sendMessage("You may not control this player");
|
controller.sendMessage("You may not control this player");
|
||||||
} else {
|
} else {
|
||||||
|
@ -85,14 +88,16 @@ public final class CommandIcu implements CommandExecutor {
|
||||||
|
|
||||||
final int seconds = tickDelay / 20;
|
final int seconds = tickDelay / 20;
|
||||||
|
|
||||||
controller.sendMessage("You are no longer controlling \"" + target.getName() + "\". You are invisible for " + seconds + " seconds.");
|
controller.sendMessage("You are no longer controlling \"" + target.getName()
|
||||||
|
+ "\". You are invisible for " + seconds + " seconds.");
|
||||||
} else {
|
} else {
|
||||||
controller.sendMessage("You are not controlling anyone at the moment");
|
controller.sendMessage("You are not controlling anyone at the moment");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(final CommandSender sender, final Command command, final String label, final String[] args) {
|
public boolean onCommand(final CommandSender sender, final Command command, final String label,
|
||||||
|
final String[] args) {
|
||||||
if (sender instanceof ConsoleCommandSender) {
|
if (sender instanceof ConsoleCommandSender) {
|
||||||
sender.sendMessage("Command has to be run by a player");
|
sender.sendMessage("Command has to be run by a player");
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<!DOCTYPE suppressions PUBLIC
|
<!DOCTYPE suppressions PUBLIC
|
||||||
"-//Puppy Crawl//DTD Suppressions 1.0//EN"
|
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
||||||
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
|
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
||||||
|
|
||||||
<suppressions>
|
<suppressions>
|
||||||
<suppress checks="Javadoc" files="."/>
|
<suppress checks="Javadoc" files="."/>
|
||||||
<suppress checks="LineLength" files="."/>
|
|
||||||
</suppressions>
|
</suppressions>
|
||||||
|
|
Loading…
Reference in New Issue