mirror of
https://github.com/BentoBoxWorld/Boxed.git
synced 2024-11-15 10:25:22 +01:00
Merge branch 'develop' into spigot_api
This commit is contained in:
commit
587ceccaf5
@ -57,6 +57,11 @@ public class Settings implements WorldSettings {
|
||||
@ConfigEntry(path = "boxed.broadcast-advancements")
|
||||
private boolean broadcastAdvancements;
|
||||
|
||||
@ConfigComment("Deny advancements for visitors.")
|
||||
@ConfigComment("Visitors cannot get an advancement. Note visitors will still get the reward, e.g., experience")
|
||||
@ConfigEntry(path = "boxed.deny-visitor-advancements")
|
||||
private boolean denyVisitorAdvancements = true;
|
||||
|
||||
/* WORLD */
|
||||
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
|
||||
@ConfigEntry(path = "world.friendly-name")
|
||||
|
@ -80,7 +80,7 @@ public class AdvancementListener implements Listener {
|
||||
if (Util.sameWorld(e.getPlayer().getWorld(), addon.getOverWorld())) {
|
||||
|
||||
// Only allow members or higher to get advancements in a box
|
||||
if (!addon.getIslands().getIslandAt(e.getPlayer().getLocation()).map(i -> i.getMemberSet().contains(e.getPlayer().getUniqueId())).orElse(false)) {
|
||||
if (addon.getSettings().isDenyVisitorAdvancements() && !addon.getIslands().getIslandAt(e.getPlayer().getLocation()).map(i -> i.getMemberSet().contains(e.getPlayer().getUniqueId())).orElse(false)) {
|
||||
// Remove advancement from player
|
||||
e.getAdvancement().getCriteria().forEach(c ->
|
||||
e.getPlayer().getAdvancementProgress(e.getAdvancement()).revokeCriteria(c));
|
||||
|
@ -18,6 +18,9 @@ boxed:
|
||||
# Announce advancements. We recommend you set the game rule `/gamerule announceAdvancements false`
|
||||
# but that blocks all new advancement announcements. This setting tells Boxed to broadcast new advancements.
|
||||
broadcast-advancements: false
|
||||
# Deny advancements for visitors.
|
||||
# Visitors cannot get an advancement. Note visitors will still get the reward, e.g., experience
|
||||
deny-visitor-advancements: true
|
||||
world:
|
||||
# Friendly name for this world. Used in admin commands. Must be a single word
|
||||
friendly-name: Boxed
|
||||
|
Loading…
Reference in New Issue
Block a user