mirror of
				https://github.com/proxiodev/RedisBungee.git
				synced 2025-11-04 09:38:03 +00:00 
			
		
		
		
	fix pages again.....
This commit is contained in:
		
							parent
							
								
									294a8a5031
								
							
						
					
					
						commit
						089c5d8e5f
					
				@ -134,7 +134,6 @@ public class CommandRedisBungee extends AdventureBaseCommand {
 | 
			
		||||
        } else currentPage = 1;
 | 
			
		||||
 | 
			
		||||
        var data = new ArrayList<>(plugin.proxyDataManager().eachProxyCount().entrySet());
 | 
			
		||||
 | 
			
		||||
        // there is no way this runs because there is always an heartbeat.
 | 
			
		||||
        // if not could be some shenanigans done by devs :P
 | 
			
		||||
        if (data.isEmpty()) {
 | 
			
		||||
@ -142,7 +141,7 @@ public class CommandRedisBungee extends AdventureBaseCommand {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        // compute the total pages
 | 
			
		||||
        int maxPages = data.size() < pageSize ? 1 : data.size() / pageSize ;
 | 
			
		||||
        int maxPages = (int) Math.ceil(data.size() / (double) pageSize);
 | 
			
		||||
        if (currentPage > maxPages) currentPage = maxPages;
 | 
			
		||||
        var subList = subListProxies(data, currentPage, pageSize);
 | 
			
		||||
        TextComponent.Builder builder = Component.text();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user