// Path: src/main/java/org/spongepowered/common/service/pagination/SpongePaginationAccessor.java
// public class SpongePaginationAccessor {
// 
//     public static void replaceActivePagination(SpongePaginationService service, CommandSource oldSource, CommandSource newSource) {
//         SourcePaginations state = service.getPaginationState(oldSource, false);
//         ActivePagination active = state.get(state.getLastUuid());
//         state.keys().remove(state.getLastUuid());
//         service.getPaginationState(newSource, true).put(active);
//     }
// 
// }


import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.service.pagination.PaginationService;
import org.spongepowered.common.service.pagination.SpongePaginationAccessor;
import org.spongepowered.common.service.pagination.SpongePaginationService;

package com.simon816.chatui.impl;


public class ImplementationPagination {

    public static void modify(PaginationService service, CommandSource oldSource, CommandSource newSource) {
        if (Sponge.getPlatform().asMap().get("CommonName").equals("Sponge")) {
            if (service instanceof SpongePaginationService) {

// Path: src/main/java/org/spongepowered/common/service/pagination/SpongePaginationAccessor.java
// public class SpongePaginationAccessor {
// 
//     public static void replaceActivePagination(SpongePaginationService service, CommandSource oldSource, CommandSource newSource) {
//         SourcePaginations state = service.getPaginationState(oldSource, false);
//         ActivePagination active = state.get(state.getLastUuid());
//         state.keys().remove(state.getLastUuid());
//         service.getPaginationState(newSource, true).put(active);
//     }
// 
// }


// Path: src/main/java/com/simon816/chatui/impl/ImplementationPagination.java
import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.service.pagination.PaginationService;
import org.spongepowered.common.service.pagination.SpongePaginationAccessor;
import org.spongepowered.common.service.pagination.SpongePaginationService;

package com.simon816.chatui.impl;


public class ImplementationPagination {

    public static void modify(PaginationService service, CommandSource oldSource, CommandSource newSource) {
        if (Sponge.getPlatform().asMap().get("CommonName").equals("Sponge")) {
            if (service instanceof SpongePaginationService) {

                SpongePaginationAccessor.replaceActivePagination((SpongePaginationService) service, oldSource, newSource);
