package info.u_team.u_team_core.menu;

import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuType;

public abstract class UAbstractContainerMenu extends AbstractContainerMenu {
	
	protected ServerPlayer synchronizerPlayer;
	
	protected UAbstractContainerMenu(MenuType<?> menuType, int containerId) {
		super(menuType, containerId);
	}
	
	public final void setSynchronizerPlayer(ServerPlayer player) {
		synchronizerPlayer = player;
	}
	
	public void initMenu(ServerPlayer player) {
	}
	
}

@@ -188,16 +188,248 @@
 uType;%0A%0A
+/**%0A * Enhanced version of %7B@link AbstractContainerMenu%7D with the benefit that the player that opened the container is known%0A * and a method is called when the container is opened on the logical server.%0A * %0A * @author HyCraftHD%0A */%0A
 public a
@@ -502,23 +502,21 @@
  %7B%0A%09%0A%09pr
-otected
+ivate
  ServerP
@@ -548,218 +548,1040 @@
 %0A%09%0A%09
-protected UAbstractContainerMenu(MenuType%3C?%3E menuType, int containerId) %7B%0A%09%09super(menuType, containerId);%0A%09%7D%0A%09%0A%09public final void setSynchronizerPlayer(ServerPlayer player) %7B%0A%09%09synchronizerPlayer = player;%0A%09%7D%0A%09
+/**%0A%09 * Creates an container menu. Must be implemented by a sub class to be used.%0A%09 * %0A%09 * @param menuType Menu type%0A%09 * @param containerId Container id%0A%09 */%0A%09protected UAbstractContainerMenu(MenuType%3C?%3E menuType, int containerId) %7B%0A%09%09super(menuType, containerId);%0A%09%7D%0A%09%0A%09/**%0A%09 * Do not call your self. Will be called from an asm hook inside %7B@link ServerPlayer#initMenu(AbstractContainerMenu)%7D.%0A%09 * This method sets player that has the container opened.%0A%09 * %0A%09 * @param player Server player that opened the container%0A%09 */%0A%09public final void setSynchronizerPlayer(ServerPlayer player) %7B%0A%09%09synchronizerPlayer = player;%0A%09%7D%0A%09%0A%09/**%0A%09 * Returns the player that opened the container and should be used for synchronizing purposes.%0A%09 * %0A%09 * @return Server player that opened the container%0A%09 */%0A%09public final ServerPlayer getSynchronizerPlayer() %7B%0A%09%09return synchronizerPlayer;%0A%09%7D%0A%09%0A%09/**%0A%09 * Will be called immediately after the %7B@link #setSynchronizerPlayer(ServerPlayer)%7D.%0A%09 * %0A%09 * @param player Server player that openend the container%0A%09 */
 %0A%09pu

Document abstract container menu