forked from clone/WorldGuardWrapper
Actually make API class a singleton
(Don't know what I even thought earlier)
This commit is contained in:
parent
35e1d50c25
commit
7e0ba6d8e7
|
@ -6,6 +6,15 @@ import lombok.experimental.Delegate;
|
|||
|
||||
public class WorldGuardWrapper implements IWorldGuardImplementation {
|
||||
|
||||
private static WorldGuardWrapper instance;
|
||||
|
||||
public static WorldGuardWrapper getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new WorldGuardWrapper();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Delegate
|
||||
private IWorldGuardImplementation delegate;
|
||||
|
||||
|
@ -19,8 +28,4 @@ public class WorldGuardWrapper implements IWorldGuardImplementation {
|
|||
}
|
||||
}
|
||||
|
||||
public WorldGuardWrapper getInstance() {
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user