public static void KeyPressed(KeyEvent e) {
		int KeyCode = e.getKeyCode();
		if (intrfce.Menu.runMenu == false) {
			if (!editMode) {
				if (KeyCode == KeyEvent.VK_E) {
					if (!mb.MOBS[0].inv.isShown) {
						mb.MOBS[0].inv.showInventory();
						frozen=true;
					} else {
						mb.MOBS[0].inv.stopShowingInventory();
						frozen=false;
					}
				}
				if (!frozen) {
					if (KeyCode == KeyEvent.VK_W) {
						mb.MOBS[0].move(Frame.UP);
					}
					if (KeyCode == KeyEvent.VK_S) {
						mb.MOBS[0].move(Frame.DOWN);
					}
					if (KeyCode == KeyEvent.VK_A) {
						mb.MOBS[0].move(Frame.LEFT);
					}
					if (KeyCode == KeyEvent.VK_D) {
						mb.MOBS[0].move(Frame.RIGHT);
					}
				}else{
					mb.MOBS[0].dx=0;
					mb.MOBS[0].dy=0;
				}
			} else {
				if (KeyCode == KeyEvent.VK_W) {
					cam.move(Frame.UP);
				}
				if (KeyCode == KeyEvent.VK_S) {
					cam.move(Frame.DOWN);
				}
				if (KeyCode == KeyEvent.VK_A) {
					cam.move(Frame.LEFT);
				}
				if (KeyCode == KeyEvent.VK_D) {
					cam.move(Frame.RIGHT);
				}
			}
		}
		if (KeyCode == KeyEvent.VK_O) {
			SoundFileHandler.sound1.stop();
		}
		if (KeyCode == KeyEvent.VK_ESCAPE) {
			intrfce.Menu.runMenu = true;
		}
		if (editMode) {
			if (KeyCode == KeyEvent.VK_1) {
				if (currentmap > 0) {
					currentmap -= 1;
					canUpdateMap = true;
				}
			}
			if (KeyCode == KeyEvent.VK_2) {
				if (currentmap < mfo.WFH.length - 1) {
					currentmap += 1;
					canUpdateMap = true;
				}
			}
			if (KeyCode == KeyEvent.VK_UP) {
				if (mb.MOBS[0].Layer < Engine.mb.BLOCKS.length - 1) {
					mb.MOBS[0].Layer += 1;
				} else {
					mb.MOBS[0].Layer = mb.BLOCKS.length - 2;
				}
			}
			if (KeyCode == KeyEvent.VK_DOWN) {
				if (mb.MOBS[0].Layer > 0 + 1) {
					mb.MOBS[0].Layer -= 1;
				} else {
					mb.MOBS[0].Layer = 0 + 1;
				}
			}
		}
		if (KeyCode == KeyEvent.VK_RIGHT) {
			if (Mouse.blockToChangeTo < Mouse.maxBlock) {
				Mouse.blockToChangeTo += 1;
				Mouse.currentBlock = Mouse.bl[Mouse.blockToChangeTo].name;
			}
		}
		if (KeyCode == KeyEvent.VK_LEFT) {
			if (Mouse.blockToChangeTo > 0) {
				Mouse.blockToChangeTo -= 1;
				Mouse.currentBlock = Mouse.bl[Mouse.blockToChangeTo].name;
			}
		}
	}