Stop when Storage full, Execute Plugin during Script

1st: Hello, i was wondering if there a way to tell the Bot to stop if the Storage is full, because my bot keep using reverse and return when inventory is full and then use reverse and so on.

2nd: is it possible to make the Bot execute a Plugin during Script ? like sorting the storage or the inventory from xItemManager?

Thanks alot in Advance