forked from TuxCoding/FastLogin
Add missing synchronized modifiers
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
package com.github.games647.fastlogin.bukkit;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
|
||||
@ -43,7 +41,7 @@ public class PremiumPlaceholder extends PlaceholderExpansion {
|
||||
|
||||
@Override
|
||||
public String getAuthor() {
|
||||
return plugin.getDescription().getAuthors().stream().collect(Collectors.joining(", "));
|
||||
return String.join(", ", plugin.getDescription().getAuthors());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -29,10 +29,11 @@ public class BungeeLoginSource implements LoginSource {
|
||||
public void kick(String message) {
|
||||
preLoginEvent.setCancelled(true);
|
||||
|
||||
if (message != null)
|
||||
preLoginEvent.setCancelReason(TextComponent.fromLegacyText(message));
|
||||
else
|
||||
if (message == null) {
|
||||
preLoginEvent.setCancelReason(new ComponentBuilder("Kicked").color(ChatColor.WHITE).create());
|
||||
} else {
|
||||
preLoginEvent.setCancelReason(TextComponent.fromLegacyText(message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,6 +23,7 @@ import java.nio.file.Path;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@ -231,7 +232,7 @@ public class FastLoginCore<P extends C, C, T extends PlatformPlugin<C>> {
|
||||
Path configFile = dataFolder.resolve(fileName);
|
||||
if (Files.notExists(configFile)) {
|
||||
try (InputStream defaultStream = getClass().getClassLoader().getResourceAsStream(fileName)) {
|
||||
Files.copy(defaultStream, configFile);
|
||||
Files.copy(Objects.requireNonNull(defaultStream), configFile);
|
||||
}
|
||||
}
|
||||
} catch (IOException ioExc) {
|
||||
|
@ -28,7 +28,7 @@ public abstract class LoginSession {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean needsRegistration() {
|
||||
public synchronized boolean needsRegistration() {
|
||||
return !registered;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user