uwu
This commit is contained in:
		
					parent
					
						
							
								b0b395f068
							
						
					
				
			
			
				commit
				
					
						e46929b4b4
					
				
			
		
					 8 changed files with 260 additions and 148 deletions
				
			
		|  | @ -10,6 +10,7 @@ import org.bukkit.entity.Player; | |||
| import org.bukkit.event.inventory.InventoryType; | ||||
| import org.bukkit.inventory.Inventory; | ||||
| import org.bukkit.inventory.ItemStack; | ||||
| import org.jetbrains.annotations.NotNull; | ||||
| import com.google.common.base.Preconditions; | ||||
| import de.iani.cubesidestats.api.PlayerStatistics; | ||||
| import de.iani.cubesidestats.api.PlayerStatisticsQueryKey; | ||||
|  | @ -86,6 +87,20 @@ public class MinecleanerManager { | |||
|         return confirmPlayingInventory; | ||||
|     } | ||||
| 
 | ||||
|     public void handleFieldClick(@NotNull Player player, int x, int y, boolean hasRightClicked) { | ||||
|         MinecleanerArena arena = plugin.getArenaList().getPlayerArena(player); | ||||
|         Preconditions.checkArgument(arena != null, "player is in no arena"); | ||||
|         Preconditions.checkState(arena.getArenaStatus() == ArenaStatus.PLAYING, "not running"); | ||||
| 
 | ||||
|         if(hasRightClicked) { | ||||
|             // flag | ||||
|             arena.flagCell(x, y); | ||||
|         } else { | ||||
|             // reveal | ||||
|             arena.revealCell(x, y); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public void getStatisticsForPlayer(OfflinePlayer player, Consumer<PlayerStatisticsData> callback) { | ||||
|         List<StatisticsQueryKey> keys = new ArrayList<>(); | ||||
|         PlayerStatistics pStatistics = plugin.getCubesideStatistics().getStatistics(player.getUniqueId()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue