Fix modifying other inventories in PersonalKitCreator
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
4252339d0b
Commit
ded764002f
@ -37,6 +37,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.inventory.InventoryAction;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -108,6 +109,15 @@ public class PersonalKitCreator implements Listener {
|
||||
backup.close();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onOpenEvent(InventoryOpenEvent e){
|
||||
InventoryBackup backup = openKitCreators.get(e.getPlayer());
|
||||
if(backup == null)
|
||||
return;
|
||||
|
||||
backup.close();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onInventoryClose(InventoryCloseEvent e) {
|
||||
InventoryBackup backup = openKitCreators.get(e.getPlayer());
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren