public void keyPressed(KeyEvent e) {
        int c = e.getKeyCode();
        //if an animation is occurring, changing the currentFrame causes issues, thus this conitional
        if (!Animation.Animation) {
            //fire button, updates the image of the player and creates a fireball object 
            if (c == KeyEvent.VK_SPACE && player1type == 1) {
                if (!right) {
                    img[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Quade SS\\Needed Poses\\Blast 1.4.png").getImage();
                } else {
                    img[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Quade SS\\Flipped Poses\\Blast 1.4.png").getImage();
                }
                fire1();

            } //same stuff except for the diff player type 
            else if (c == KeyEvent.VK_SPACE && player1type == 2) {
                img2[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Hail SS\\Needed Poses\\kick3_0.png").getImage();
                fire2();
            }
            //action button
            if (!powUp) {
                if (c == KeyEvent.VK_E && player1type == 1) {
                    if (dy == 0 && dx == 0) {
                        //makes an animation using the Animation class
                        Animation powUp = new Animation(1, 10, 25);
                        this.powUp = true;
                        hp = 500;
                    }
                }
            }
            if (!powUp2) {
                if (c == KeyEvent.VK_E && player1type == 2) {
                    if (dy2 == 0 && dx2 == 0) {
                        //makes an animation using the Animation class
                        Animation p2powUp = new Animation(2, 9, 25);
                        this.powUp2 = true;
                        hp2 = 500;
                    }
                }
            }

            //gotta add one for hail
            if (!jump1) {
                if (c == KeyEvent.VK_W && player1type == 1) {
                    //if this jump is true then that calls the jump method in the gravity class
                    jump1 = true;
                    //this initial y value is used in that jump method
                    yInit = y;
                }
            }
            if (!jump2) {
                if (c == KeyEvent.VK_W && player1type == 2) {
                    jump2 = true;
                    yInit2 = y2;
                }
            }


            if (c == KeyEvent.VK_A && player1type == 1) {
                //updates direction 
                dx = -1 * speed;
                //updates position 
                right = false;
                //updates frame
                if (currentFrame > 5) {
                    currentFrame = 1;
                }
                currentFrame++;
                if (currentFrame == 4) {
                    currentFrame = 1;
                }

            } else if (c == KeyEvent.VK_A && player1type == 2) {
                dx2 = -1 * speed;
                right2 = false;
                if (currentFrame2 > 5) {
                    currentFrame2 = 1;
                }
                currentFrame2++;
                if (currentFrame2 == 4) {
                    currentFrame2 = 1;
                }
            }
            //same stuff for the other direction
            if (c == KeyEvent.VK_D && player1type == 1) {
                dx = speed;
                right = true;
                if (currentFrame < 5 || currentFrame > 9) {
                    currentFrame = 5;
                }
                currentFrame++;
                if (currentFrame == 9) {
                    currentFrame = 5;
                }
            } else if (c == KeyEvent.VK_D && player1type == 2) {
                dx2 = speed;
                right2 = true;
                if (currentFrame2 < 5 || currentFrame2 > 9) {
                    currentFrame2 = 5;
                }
                currentFrame2++;
                if (currentFrame2 == 9) {
                    currentFrame2 = 5;
                }

            }

        }
        //exactly the same code, except made compatible for multiplayer
        if (numPlayers == 2) {

            if (c == KeyEvent.VK_ENTER && player2type == 2) {
                if (!right) {
                    img2[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Hail SS\\Needed Poses\\kick3_0.png").getImage();
                } else {
                    img2[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Hail SS\\Flipped Poses\\kick3_0.png").getImage();
                }

                fire2();
            } else if (c == KeyEvent.VK_ENTER && player2type == 1) {
                if (!right) {
                    img[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Quade SS\\Custom Poses\\BackKick 1.1.png").getImage();
                } else {
                    img[0] = new ImageIcon(PATHWAY + "2D Fighter Quade Folder (Sprites and Shit)\\Quade SS\\Flipped Poses\\BackKick 1.1.png").getImage();
                }
                fire1();
            }

            //power up button
            if (!powUp) {
                if (c == KeyEvent.VK_SLASH && player2type == 1) {
                    if (dy == 0 && dx == 0) {
                        Animation powUp = new Animation(1, 10, 25);
                        this.powUp = true;
                        hp = 500;
                    }
                }
            }
            if (!powUp2) {
                if (c == KeyEvent.VK_SLASH && player2type == 2) {
                    if (dy2 == 0 && dx2 == 0) {
                        //makes an animation using the Animation class
                        Animation p2powUp = new Animation(2, 9, 25);
                        this.powUp2 = true;
                        hp2 = 500;
                    }
                }
            }
            if (!jump1) {
                if (c == KeyEvent.VK_UP && player2type == 1) {
                    jump1 = true;
                    yInit = y;
                }
            }
            if (!jump2) {
                if (c == KeyEvent.VK_UP && player2type == 2) {
                    jump2 = true;
                    yInit2 = y2;
                }
            }

            if (c == KeyEvent.VK_LEFT && player2type == 2) {
                dx2 = -1 * speed;
                right2 = false;
                if (currentFrame2 > 5) {
                    currentFrame2 = 1;
                }
                currentFrame2++;
                if (currentFrame2 == 4) {
                    currentFrame2 = 1;
                }
            } else if (c == KeyEvent.VK_LEFT && player2type == 1) {
                dx = -1 * speed;
                right = false;
                if (currentFrame > 5) {
                    currentFrame = 1;
                }
                currentFrame++;
                if (currentFrame == 4) {
                    currentFrame = 1;
                }
            }
            if (c == KeyEvent.VK_RIGHT && player2type == 2) {
                dx2 = speed;
                right2 = true;
                if (currentFrame2 > 9 || currentFrame2 < 5) {
                    currentFrame2 = 5;
                }
                currentFrame2++;
                if (currentFrame2 == 9) {
                    currentFrame2 = 5;
                }
            } else if (c == KeyEvent.VK_RIGHT && player2type == 1) {
                dx = speed;
                right = true;
                if (currentFrame < 5) {
                    currentFrame = 5;
                }
                currentFrame++;
                if (currentFrame == 9) {
                    currentFrame = 5;
                }
            }
        }

    }