Class PlayerWrapper

java.lang.Object
redempt.redlib.misc.PlayerWrapper

public class PlayerWrapper extends Object
  • Constructor Details

    • PlayerWrapper

      public PlayerWrapper()
  • Method Details

    • wrap

      public static org.bukkit.entity.Player wrap(org.bukkit.entity.Player player, String... disable)
      Wraps a player using a Proxy, disabling some methods from being called. Very hacky, do not use if it can be avoided. Meant for when you want to send a fake event to test if it will be cancelled, but don't want the plugins to be able to do certain things with the player based on the event.
      Parameters:
      player - The player to wrap
      disable - The names of the methods to disable
      Returns:
      The wrapped player