mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +00:00
Remove HuskHomes exceptions
This commit is contained in:
1 parent
23a7b2a903
commit
6a8851a446
12 files changed
+32
-51
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package net.william278.huskhomes.hook;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.HuskHomesException;
|
||||
import net.william278.huskhomes.player.User;
|
||||
import net.william278.huskhomes.position.Home;
|
||||
import net.william278.huskhomes.position.SavedPosition;
|
||||
@@ -104,7 +103,7 @@ public abstract class MapHook extends PluginHook {
|
||||
|
||||
try {
|
||||
return position.server.equals(plugin.getServerName());
|
||||
} catch (HuskHomesException e) {
|
||||
} catch (IllegalStateException e) {
|
||||
return plugin.getWorlds().stream()
|
||||
.map(world -> world.uuid)
|
||||
.anyMatch(uuid -> uuid.equals(position.world.uuid));
|
||||
|
||||
@@ -3,7 +3,6 @@ package net.william278.huskhomes.hook;
|
||||
import com.djrapitops.plan.capability.CapabilityService;
|
||||
import com.djrapitops.plan.extension.ExtensionService;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.HuskHomesInitializationException;
|
||||
import net.william278.huskhomes.database.Database;
|
||||
import net.william278.huskhomes.util.Logger;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -25,7 +24,7 @@ public class PlanHook extends PluginHook {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean initialize() throws HuskHomesInitializationException {
|
||||
public boolean initialize() {
|
||||
if (!areAllCapabilitiesAvailable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.william278.huskhomes.hook;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.HuskHomesInitializationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -33,9 +32,8 @@ public abstract class PluginHook {
|
||||
* Initialize the hook and return {@code true} if it could be enabled
|
||||
*
|
||||
* @return {@code true} if the hook could be enabled
|
||||
* @throws HuskHomesInitializationException if an exception occurred enabling the hook
|
||||
*/
|
||||
public abstract boolean initialize() throws HuskHomesInitializationException;
|
||||
public abstract boolean initialize() ;
|
||||
|
||||
@NotNull
|
||||
public String getHookName() {
|
||||
|
||||
Reference in new issue
Block a user