The parameter of the mouseClicked() method requres an actor, how would I use the World as an actor?
public void add() { MouseInfo mouse = Greenfoot.getMouseInfo(); if(mouse==null)return; int x = mouse.getX(); int y = mouse.getY(); if(Greenfoot.mouseClicked(getWorld())){ getWorld().addObject(new Point(),x,y); } }