Multiverse-Inventories

878k Downloads

Per world group advancements

aescraftbr opened this issue ยท 8 comments

commented

A way to prevent players from getting advancements in certain worlds would be really nice.

commented

Want to revive this because this just makes sense. Achievement messages bring community together as players use them as conversation starters or simply a reason to congratulate each other on their progress. I just had the realization (which lead to the finding of this issue) that the addition of my server's creative world will no doubt dilute the meaning behind achievements.

commented

Want to revive this because this just makes sense. Achievement messages bring community together as players use them as conversation starters or simply a reason to congratulate each other on their progress. I just had the realization (which lead to the finding of this issue) that the addition of my server's creative world will no doubt dilute the meaning behind achievements.

You can use /mvrule announceAdvancements false in your Creative World, but the ideal solution would be to be able to disable advancements per world as suggested by OP

commented

I need this feature too. Separating advancements ( and also statisitcs) is important when a server has both creative worlds and survival worlds. Since getting advancements in creative mode is much more easily, if all worlds share them, they will be worthless in survival worlds.

commented

@SupppRabit I've made a skript that revokes the advancement when the player gets them in the creative mode.

To avoid loops (grant -> revoke ->grant -> revoke and so on), the advancement is revoked when the player leaves the creative world.

Be aware that this code looks for the player name, as my server is in off-line mode. If you use on-line mode, you need to use player's UUID

import:
  org.bukkit.event.player.PlayerAdvancementDoneEvent

on PlayerAdvancementDoneEvent:
  set {_p} to event.getPlayer()
  if {_p}.getWorld() = "Creative":
    set {_adv} to event.getAdvancement()
    set {_name} to {_adv}.getKey()
    set {revokeadvancement::%{_p}%} to true
    add {_name} to {revokeadvancement::%{_p}%::*}

on player world change:
  if world is "world", "world_nether" or "world_the_end":
    loop {revokeadvancement::%player%::*}:
      execute console command "/advancement revoke %player% only %{revokeadvancement::%player%::%loop-index%}%"
    delete {revokeadvancement::%player%::*}

You need skript and skript mirror.

commented

so how do I separate Advancements between Groups? I've tried /mvinvadds advancements survival and it doesn't work...

commented
commented

So I have to use that specific version of multiverse-inventories? Not the official one?

commented

Yes.