well by giving them the no IP, you are giving them your IP a simple ping should resolve host address to your IP the simplest way to think of this: can people join your server? if they can they can also hack it
Okay, Im thinking about making a server using pocketmine and portforwarding bc i dont want to speed money on a host. Is it safe and should i do it?
It's safeest if you have a firewall and proper security, but even the best lock can be picked. It's really simple to get someone's IP address from a hostname, and hackers might be able to use the hostname too. As if you should do it, that depends. Do you really want to for your server, and is your machine powerful enough to handle your specific server? If so, you could, although I'd still personally recommend using a VPS, but if you can't afford it than you could host it yourself if you really want to.
From a realistic standpoint it's highly unlikely that you get hacked, assuming your PocketMine server runs on an isolated, non-root user, there'd have to be an exploit in PocketMine, in the OS the server runs on and someone that actually attacks you using these hypothetical exploits. There might be other ports on your system that are already open and have security holes behind them (e.g unpatched routers or IoT devices that used UPnP to open a port for themselved), but those would already be exploitable. While running a popular server might make you a more interesting target, the holes are always there (or aren't). TLDR: It's not going to make you any more insecure than you already are, if you are using the internet.