This commit is contained in:
Gabriele C 2016-10-09 23:46:07 +02:00
parent 87f88cb32a
commit 700ab5f3e4
10 changed files with 7 additions and 16 deletions

View File

@ -1,7 +1,6 @@
package fr.xephi.authme.command.executable.authme;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.command.CommandService;
import fr.xephi.authme.command.ExecutableCommand;
import fr.xephi.authme.service.BukkitService;
import org.bukkit.ChatColor;
@ -17,9 +16,6 @@ public class VersionCommand implements ExecutableCommand {
@Inject
private BukkitService bukkitService;
@Inject
private CommandService commandService;
@Override
public void executeCommand(CommandSender sender, List<String> arguments) {
// Show some version info
@ -40,7 +36,7 @@ public class VersionCommand implements ExecutableCommand {
sender.sendMessage(ChatColor.GOLD + "License: " + ChatColor.WHITE + "GNU GPL v3.0"
+ ChatColor.GRAY + ChatColor.ITALIC + " (See LICENSE file)");
sender.sendMessage(ChatColor.GOLD + "Copyright: " + ChatColor.WHITE
+ "Copyright (c) Xephi 2015. All rights reserved.");
+ "Copyright (c) AuthMe-Team 2016. All rights reserved.");
}
/**

View File

@ -4,8 +4,6 @@ import net.ricecode.similarity.LevenshteinDistanceStrategy;
import net.ricecode.similarity.StringSimilarityService;
import net.ricecode.similarity.StringSimilarityServiceImpl;
import java.io.File;
/**
* Utility class for String operations.
*/

View File

@ -1,9 +1,6 @@
package fr.xephi.authme.util;
import fr.xephi.authme.ConsoleLogger;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import java.util.regex.Pattern;
/**

View File

@ -52,7 +52,7 @@ public class ClassCollector {
* @param <T> the parent type
* @return list of matching classes
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
public <T> List<Class<? extends T>> collectClasses(Class<T> parent) {
List<Class<?>> classes = collectClasses(parent::isAssignableFrom);
return new ArrayList<>((List) classes);

View File

@ -38,6 +38,7 @@ public class HelpMessagesServiceTest {
@Mock
private MessageFileHandlerProvider messageFileHandlerProvider;
@SuppressWarnings("unchecked")
@BeforeInjecting
public void initializeHandler() {
MessageFileHandler handler = new MessageFileHandler(getJarFile(TEST_FILE), "messages/messages_en.yml");

View File

@ -493,7 +493,7 @@ public class OnJoinVerifierTest {
return player;
}
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
private void returnOnlineListFromBukkitServer(Collection<Player> onlineList) {
// Note ljacqu 20160529: The compiler gets lost in generics because Collection<? extends Player> is returned
// from getOnlinePlayers(). We need to uncheck onlineList to a simple Collection or it will refuse to compile.

View File

@ -247,7 +247,7 @@ public class AsynchronousLoginTest {
return player;
}
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
private void mockOnlinePlayersInBukkitService() {
// 127.0.0.4: albania (online), brazil (offline)
Player playerA = mockPlayer("albania");

View File

@ -190,7 +190,7 @@ public class AntiBotServiceTest {
}
@Test
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
public void shouldInformPlayersOnActivation() {
// given - listening antibot
runSyncDelayedTaskWithDelay(bukkitService);

View File

@ -6,8 +6,6 @@ import org.junit.BeforeClass;
import org.junit.Test;
import java.util.UUID;
import java.util.regex.Pattern;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.BDDMockito.given;

View File

@ -32,6 +32,7 @@ public class PermissionNodesGatherer {
*
* @return Ordered map whose keys are the permission nodes and the values the associated JavaDoc
*/
@SuppressWarnings("unchecked")
public <T extends Enum<T> & PermissionNode> Map<String, String> gatherNodesWithJavaDoc() {
Map<String, String> result = new TreeMap<>();
result.put("authme.admin.*", "Give access to all admin commands.");