Added command refresh after persmission change

This commit is contained in:
2023-10-01 18:11:32 +02:00
parent de79433c32
commit 8fddabe00f
4 changed files with 4 additions and 7 deletions

View File

@ -23,10 +23,7 @@ public class AddEntityToInstanceEventListener implements EventListener<AddEntity
@Override
public @NotNull Result run(@NotNull AddEntityToInstanceEvent event) {
if(event.getEntity() instanceof Player p) {
MinecraftServer.getSchedulerManager().scheduleNextTick(p::refreshCommands, ExecutionType.ASYNC);
new ActionBarMessage().appendStatic(Component.text("Instance: ", NamedTextColor.DARK_GRAY)).appendStatic(event.getInstance().getUniqueId().toString()).send(p);
new ChatMessage(Icon.SCIENCE).appendStatic(Component.text(event.getInstance().getUniqueId().toString())).send(p);
p.addEffect(new Potion(PotionEffect.BLINDNESS, (byte) 1, 20)); //TODO Uncomment, currently buggy causes disconnect see https://github.com/Minestom/Minestom/discussions/1302
}