There is a form of humour which is called “cocky funny”. It’s the type of humour in which you make a joke at somebody elses expense, without being rude. Confident guys excel in this. Both at giving it and at receiving it. This type of humour is very often used when guys hang out with their best friends or when they are trying to pick up women. If you are a confident guy you are probably pretty good at cracking these types of jokes.
However, there are situations when you should avoid using this kind of humour. When managing people is one of them. If you are in a power position, like being somebodys boss, jokes work differently. A joke that in a bar would be “cocky funny” will be “sleazy rude” in the office.
The receiver of the jokes might still laugh but will start harboring a bad feeling inside. Your joke will be re-told to the co-workers and the HR department as an example of you being a bad boss.
Being management means being professional and treating coworkers in a professional way. You are no longer their buddy. You are their manager.
Be professional. Save the Cocky Funny for your friends and the Tinder-date. Avoid it when talking to your co-workers.