mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-25 10:07:35 +01:00
Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 358-encryptn-mthd-refactor
This commit is contained in:
commit
571cb6d36b
@ -7,3 +7,7 @@ general:
|
||||
test:
|
||||
override:
|
||||
- mvn clean install -B
|
||||
|
||||
notify:
|
||||
webhooks:
|
||||
- url: https://webhooks.gitter.im/e/7b92ac1a1741748b26bf
|
||||
|
19
pom.xml
19
pom.xml
@ -229,6 +229,25 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eluder.coveralls</groupId>
|
||||
<artifactId>coveralls-maven-plugin</artifactId>
|
||||
<version>4.1.0</version>
|
||||
<!-- Token is provided by mvn command -->
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.7.5.201505241946</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare-agent</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -222,7 +222,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPreLogin(AsyncPlayerPreLoginEvent event) {
|
||||
PlayerAuth auth = plugin.database.getAuth(event.getName());
|
||||
if (auth != null && !auth.getRealName().equals("Player") && !auth.getRealName().equals(event.getName())) {
|
||||
if (auth != null && auth.getRealName() != null && !auth.getRealName().isEmpty() && !auth.getRealName().equals("Player") && !auth.getRealName().equals(event.getName())) {
|
||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
|
||||
event.setKickMessage("You should join using username: " + ChatColor.AQUA + auth.getRealName() +
|
||||
ChatColor.RESET + "\nnot: " + ChatColor.RED + event.getName()); // TODO: write a better message
|
||||
|
@ -24,7 +24,6 @@ public final class ListenerConsistencyTest {
|
||||
AuthMePlayerListener.class, AuthMePlayerListener16.class, AuthMePlayerListener18.class,
|
||||
AuthMeServerListener.class };
|
||||
|
||||
// TODO #368: Ensure that these exceptions are really intentional, if not fix them and remove them here
|
||||
private static final Set<String> CANCELED_EXCEPTIONS = Sets.newHashSet("AuthMePlayerListener#onPlayerJoin",
|
||||
"AuthMePlayerListener#onPreLogin", "AuthMePlayerListener#onPlayerLogin",
|
||||
"AuthMePlayerListener#onPlayerQuit", "AuthMeServerListener#onPluginDisable",
|
||||
@ -57,7 +56,7 @@ public final class ListenerConsistencyTest {
|
||||
Set<String> events = new HashSet<>();
|
||||
for (Class<?> listener : LISTENERS) {
|
||||
for (Method method : listener.getDeclaredMethods()) {
|
||||
if (events.contains(method.getName())) {
|
||||
if (isTestableMethod(method) && events.contains(method.getName())) {
|
||||
fail("More than one method '" + method.getName() + "' exists (e.g. class: " + listener + ")");
|
||||
}
|
||||
events.add(method.getName());
|
||||
@ -103,9 +102,10 @@ public final class ListenerConsistencyTest {
|
||||
}
|
||||
|
||||
private static boolean isTestableMethod(Method method) {
|
||||
// A method like "access$000" is created by the compiler when a private member is being accessed by an inner
|
||||
// class, so we need to ignore such methods
|
||||
return !Modifier.isPrivate(method.getModifiers()) && !method.getName().startsWith("access$");
|
||||
// Exclude any methods with "$" in it: jacoco creates a "$jacocoInit" method we want to ignore, and
|
||||
// methods like "access$000" are created by the compiler when a private member is being accessed by an inner
|
||||
// class, which is not of interest for us
|
||||
return !Modifier.isPrivate(method.getModifiers()) && !method.getName().contains("$");
|
||||
}
|
||||
|
||||
}
|
||||
|
45798
xenforo.sql
Normal file
45798
xenforo.sql
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user