-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements feature to disable Border per GameMode (#47)
* Implements feature to disable Border per GameMode Implements #39 as previously users were not able to disable it per gamemode. I have seen this was the way it was done in other addons, so I just implemented it here as well * Remove reference to Challenges Co-authored-by: tastybento <tastybento@users.noreply.github.com>
- Loading branch information
1 parent
cc95efe
commit fb73ec6
Showing
4 changed files
with
93 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package world.bentobox.border; | ||
|
||
import world.bentobox.bentobox.api.configuration.ConfigComment; | ||
import world.bentobox.bentobox.api.configuration.ConfigEntry; | ||
import world.bentobox.bentobox.api.configuration.ConfigObject; | ||
import world.bentobox.bentobox.api.configuration.StoreAt; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
@StoreAt(filename = "config.yml", path = "addons/Border") | ||
public class Settings implements ConfigObject { | ||
|
||
@ConfigComment("") | ||
@ConfigComment("This list stores GameModes in which Border addon should not work.") | ||
@ConfigComment("To disable addon it is necessary to write its name in new line that starts with -. Example:") | ||
@ConfigComment("disabled-gamemodes:") | ||
@ConfigComment(" - BSkyBlock") | ||
@ConfigEntry(path = "disabled-gamemodes") | ||
private Set<String> disabledGameModes = new HashSet<>(); | ||
|
||
/** | ||
* @param disabledGameModes new disabledGameModes value. | ||
*/ | ||
public void setDisabledGameModes(Set<String> disabledGameModes) | ||
{ | ||
this.disabledGameModes = disabledGameModes; | ||
} | ||
|
||
/** | ||
* @return disabledGameModes value. | ||
*/ | ||
public Set<String> getDisabledGameModes() | ||
{ | ||
return this.disabledGameModes; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# This list stores GameModes in which the addon should not work. | ||
# To disable the addon it is necessary to write its name in new line that starts with -. Example: | ||
# disabled-gamemodes: | ||
# - BSkyBlock | ||
disabled-gamemodes: [] |