Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed settings handler to never be null, similar to the other handles
- Loading branch information
1 parent
bc437eb
commit 784634e
Showing
18 changed files
with
619 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/com/bgsoftware/superiorskyblock/config/SettingsContainerHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.bgsoftware.superiorskyblock.config; | ||
|
||
public abstract class SettingsContainerHolder { | ||
|
||
private SettingsContainer container; | ||
|
||
protected SettingsContainerHolder() { | ||
|
||
} | ||
|
||
public void setContainer(SettingsContainer container) { | ||
this.container = container; | ||
} | ||
|
||
protected SettingsContainer getContainer() { | ||
if (this.container == null) | ||
throw new IllegalStateException("Cannot access SettingsManager before initialization"); | ||
return this.container; | ||
} | ||
|
||
} |
Oops, something went wrong.