mirror of
https://github.com/CodeMC/WorldGuardWrapper.git
synced 2024-11-10 13:15:19 +01:00
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 {
|
public class WorldGuardWrapper implements IWorldGuardImplementation {
|
||||||
|
|
||||||
|
private static WorldGuardWrapper instance;
|
||||||
|
|
||||||
|
public static WorldGuardWrapper getInstance() {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new WorldGuardWrapper();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
@Delegate
|
@Delegate
|
||||||
private IWorldGuardImplementation 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