Skip to content

Commit

Permalink
fix catch
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Jan 1, 2025
1 parent a13b9b4 commit b62f3f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import io.papermc.paper.event.player.AsyncChatEvent;
import me.xginko.aef.modules.AEFModule;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.entity.HumanEntity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
Expand Down Expand Up @@ -58,10 +57,8 @@ public IllegalGameMode() {
for (String world : worlds) {
try {
worldSettings.put(world, GameMode.valueOf(section.getString(world)));
} catch (NumberFormatException e) {
notRecognized(Integer.class, world);
} catch (IllegalArgumentException e) {
notRecognized(Material.class, world);
notRecognized(GameMode.class, world);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.github.thatsmusic99.configurationmaster.api.ConfigSection;
import me.xginko.aef.modules.AEFModule;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.entity.HumanEntity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
Expand Down Expand Up @@ -60,10 +59,8 @@ public IllegalGameMode() {
for (String world : worlds) {
try {
worldSettings.put(world, GameMode.valueOf(section.getString(world)));
} catch (NumberFormatException e) {
notRecognized(Integer.class, world);
} catch (IllegalArgumentException e) {
notRecognized(Material.class, world);
notRecognized(GameMode.class, world);
}
}

Expand Down

0 comments on commit b62f3f8

Please sign in to comment.