Skip to content

Commit

Permalink
fix: 保護作成可能条件の間違いを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Feb 11, 2025
1 parent fef38ec commit c2652f5
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,15 @@ class BukkitRegionOperations[F[_]: Sync](
shape: SubjectiveRegionShape
): F[RegionCreationResult] = {
for {
regionCount <- regionCountRepository(player).get
world <- Sync[F].delay(player.getWorld)
wgManager = WorldGuardWrapper.getRegionManager(world)
_ = println(s"regionCount: ${regionCount.value}")
_ = println(s"worldMaxRegion: ${WorldGuardWrapper.getWorldMaxRegion(player.getWorld)}")
result <-
if (!SeichiAssist.seichiAssistConfig.isGridProtectionEnabled(world)) {
Sync[F].pure(RegionCreationResult.WorldProhibitsRegionCreation)
} else if (regionCount.value >= WorldGuardWrapper.getWorldMaxRegion(player.getWorld)) {
Sync[F].pure(RegionCreationResult.Error)
} else {
Sync[F].delay {
val selection = WorldEditWrapper.getSelection(player)
val applicableRegions = wgManager.getApplicableRegions(selection)
println(s"ApplicableRegions: ${applicableRegions.getRegions}")
println(s"ApplicableRegionsSize: ${applicableRegions.size()}")

val maxRegionCountPerWorld = WorldGuardWrapper.getWorldMaxRegion(world)
val regionCountPerPlayer = WorldGuardWrapper.getNumberOfRegions(player, world)
Expand Down

0 comments on commit c2652f5

Please sign in to comment.