File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed 
src/main/java/team/devblook/akropolis/module/modules/hotbar Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11org.gradle.caching =true
22org.gradle.parallel =true
33org.gradle.jvmargs =' -Dfile.encoding=UTF-8' 
4- projectVersion =1.6 .0
4+ projectVersion =1.7 .0
55libsPackage =team.devblook.akropolis.libs
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ public void giveItem(Player player) {
121121        }
122122
123123        player .getInventory ().setItem (slot , newItem );
124+         hotbarManager .getPlayers ().add (player .getUniqueId ());
124125    }
125126
126127    public  void  removeItem (Player  player ) {
@@ -135,6 +136,8 @@ public void removeItem(Player player) {
135136        if  (keyValueInItem  != null  && keyValueInItem .equals (keyValue )) {
136137            inventory .remove (itemInSlot );
137138        }
139+ 
140+         hotbarManager .getPlayers ().remove (player .getUniqueId ());
138141    }
139142
140143    @ EventHandler 
Original file line number Diff line number Diff line change @@ -129,14 +129,12 @@ public void giveItemsToPlayer(Player player) {
129129        if  (inDisabledWorld (player .getLocation ())) return ;
130130
131131        hotbarItems .forEach (hotbarItem  -> hotbarItem .giveItem (player ));
132-         players .add (player .getUniqueId ());
133132    }
134133
135134    public  void  removeItemsFromPlayer (Player  player ) {
136135        if  (inDisabledWorld (player .getLocation ())) return ;
137136
138137        hotbarItems .forEach (hotbarItem  -> hotbarItem .removeItem (player ));
139-         players .remove (player .getUniqueId ());
140138    }
141139
142140    public  boolean  hasHotbar (UUID  playerUuid ) {
@@ -146,4 +144,8 @@ public boolean hasHotbar(UUID playerUuid) {
146144    public  List <HotbarItem > getHotbarItems () {
147145        return  hotbarItems ;
148146    }
147+ 
148+     public  Set <UUID > getPlayers () {
149+         return  players ;
150+     }
149151}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments