public static void uninject(Player player, boolean dummy) throws Exception {

        // gets the players current permissible.
        PermissibleBase permissible = (PermissibleBase) PLAYER_PERMISSIBLE_FIELD.get(player);

        // only uninject if the permissible was a luckperms one.
        if (permissible instanceof LuckPermsPermissible) {
            LuckPermsPermissible lpPermissible = (LuckPermsPermissible) permissible;

            // clear all permissions
            lpPermissible.clearPermissions();

            // set to inactive
            lpPermissible.getActive().set(false);

            // handle the replacement permissible.
            if (dummy) {
                // just inject a dummy class. this is used when we know the player is about to quit the server.
                PLAYER_PERMISSIBLE_FIELD.set(player, DummyPermissibleBase.INSTANCE);

            } else {
                PermissibleBase newPb = lpPermissible.getOldPermissible();
                if (newPb == null) {
                    newPb = new PermissibleBase(player);
                }

                PLAYER_PERMISSIBLE_FIELD.set(player, newPb);
            }
        }
    }
Uninjects a {@link LuckPermsPermissible} from a {@link Player}.

@param player the player to uninject from
@param dummy if the replacement permissible should be a dummy.
@throws Exception propagates any exceptions which were thrown during uninjection
nukkit/src/main/java/me/lucko/luckperms/nukkit/inject/permissible/PermissibleInjector.java