use of io.github.nucleuspowered.nucleus.modules.home.events.ModifyHomeEvent in project Nucleus by NucleusPowered.
the class HomeHandler method modifyHomeInternal.
public void modifyHomeInternal(Cause cause, Home home, Location<World> location, Vector3d rotation) throws NucleusException {
ModifyHomeEvent event = new ModifyHomeEvent(cause, home, location);
postEvent(event);
// Just in case.
if (!Nucleus.getNucleus().getUserDataManager().getUnchecked(home.getUser()).get(HomeUserDataModule.class).setHome(home.getName(), location, rotation, true)) {
throw new NucleusException(Nucleus.getNucleus().getMessageProvider().getTextMessageWithFormat("command.sethome.seterror", home.getName()), NucleusException.ExceptionType.UNKNOWN_ERROR);
}
}
Aggregations