mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-30 04:27:50 +01:00
parent
92287cb5dd
commit
6abad1970c
@ -4,7 +4,9 @@ import fr.xephi.authme.AuthMe;
|
|||||||
import fr.xephi.authme.command.CommandService;
|
import fr.xephi.authme.command.CommandService;
|
||||||
import fr.xephi.authme.command.ExecutableCommand;
|
import fr.xephi.authme.command.ExecutableCommand;
|
||||||
import fr.xephi.authme.datasource.DataSource;
|
import fr.xephi.authme.datasource.DataSource;
|
||||||
|
import fr.xephi.authme.hooks.PluginHooks;
|
||||||
import fr.xephi.authme.task.PurgeTask;
|
import fr.xephi.authme.task.PurgeTask;
|
||||||
|
import fr.xephi.authme.util.BukkitService;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
@ -24,6 +26,12 @@ public class PurgeCommand implements ExecutableCommand {
|
|||||||
@Inject
|
@Inject
|
||||||
private DataSource dataSource;
|
private DataSource dataSource;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private PluginHooks pluginHooks;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BukkitService bukkitService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AuthMe plugin;
|
private AuthMe plugin;
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ class FieldInjection<T> implements Injection<T> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private static <T> Constructor<T> getDefaultConstructor(Class<T> clazz) {
|
private static <T> Constructor<T> getDefaultConstructor(Class<T> clazz) {
|
||||||
try {
|
try {
|
||||||
Constructor<?> defaultConstructor = clazz.getDeclaredConstructor();
|
Constructor<?> defaultConstructor = clazz.getDeclaredConstructor();
|
||||||
|
@ -9,6 +9,11 @@ import javax.inject.Inject;
|
|||||||
public abstract class InvalidPostConstruct {
|
public abstract class InvalidPostConstruct {
|
||||||
|
|
||||||
public static final class WithParams {
|
public static final class WithParams {
|
||||||
|
@Inject
|
||||||
|
private AlphaService alphaService;
|
||||||
|
@Inject
|
||||||
|
private ProvidedClass providedClass;
|
||||||
|
|
||||||
WithParams() { }
|
WithParams() { }
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
@ -36,6 +41,9 @@ public abstract class InvalidPostConstruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final class NotVoidReturnType {
|
public static final class NotVoidReturnType {
|
||||||
|
@Inject
|
||||||
|
private ProvidedClass providedClass;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public int returnsInt() {
|
public int returnsInt() {
|
||||||
return 42;
|
return 42;
|
||||||
@ -43,6 +51,9 @@ public abstract class InvalidPostConstruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final class MultiplePostConstructs {
|
public static final class MultiplePostConstructs {
|
||||||
|
@Inject
|
||||||
|
private ProvidedClass providedClass;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void postConstruct1() {
|
public void postConstruct1() {
|
||||||
// --
|
// --
|
||||||
|
Loading…
Reference in New Issue
Block a user