-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
7 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
package app.shopmc.plugin.config; | ||
|
||
public class Config { | ||
public final String customer; | ||
public final String server; | ||
public final String key; | ||
|
||
public Config(final ConfigLoader loader) throws EmptyConfigFieldException { | ||
this.customer = loader.getString("customer"); | ||
this.server = loader.getString("server"); | ||
this.key = loader.getString("key"); | ||
this.checkValues(); | ||
} | ||
|
||
private void checkValues() throws EmptyConfigFieldException { | ||
if (this.customer == null || this.customer.isEmpty()) { | ||
throw new EmptyConfigFieldException("customer"); | ||
} | ||
|
||
if (this.server == null || this.server.isEmpty()) { | ||
throw new EmptyConfigFieldException("server"); | ||
if (this.key == null || this.key.isEmpty()) { | ||
throw new EmptyConfigFieldException("key"); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# Customer ID | ||
# You can find it https://shopmc.app/shop/[ID] | ||
customer: "" | ||
|
||
# Server ID | ||
# Plugin Key | ||
# You can find it in shopmc dashboard (edit server modal) | ||
server: "" | ||
key: "" |