Multiverse-Inventories icon indicating copy to clipboard operation
Multiverse-Inventories copied to clipboard

Per world group advancements

Open aescraftbr opened this issue 5 years ago • 8 comments

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

aescraftbr avatar Oct 16 '19 06:10 aescraftbr

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.

SupppRabit avatar Oct 18 '19 06:10 SupppRabit

@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.

aescraftbr avatar Oct 18 '19 12:10 aescraftbr

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

joex92 avatar May 28 '21 19:05 joex92

https://github.com/Multiverse/Multiverse-Inventories/pull/363#issuecomment-768765608

benwoo1110 avatar May 29 '21 03:05 benwoo1110

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

joex92 avatar May 29 '21 03:05 joex92

Yes.

benwoo1110 avatar May 29 '21 03:05 benwoo1110

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.

AutonomousCat avatar Mar 23 '24 06:03 AutonomousCat

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

v4rl1 avatar Apr 09 '24 14:04 v4rl1