Skip to content

Commit

Permalink
#623 Updated loading session.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shynixn committed Oct 11, 2024
1 parent 2424dd4 commit bbe5144
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ class PetBlocksPlugin : JavaPlugin() {
val petListener = mainModule.getService<PetListener>()
Bukkit.getPluginManager().registerEvents(petListener, this)
if (Bukkit.getPluginManager().getPlugin(PluginDependency.HEADDATABASE.pluginName) != null) {
Bukkit.getPluginManager().registerEvents(mainModule.getService<DependencyHeadDatabaseService>(), this)
val headDatabaseService = mainModule.getService<DependencyHeadDatabaseService>()
Bukkit.getPluginManager().registerEvents(headDatabaseService, this)
Bukkit.getServicesManager()
.register(DependencyHeadDatabaseService::class.java, headDatabaseService, this, ServicePriority.Normal)
}

// Register CommandExecutor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class DependencyHeadDatabaseServiceImpl @Inject constructor(
val petName = applyPlayers[player]
applyPlayers.remove(player)
player.closeInventory()
event.isCancelled = true

plugin.launch {
try {
Expand Down

0 comments on commit bbe5144

Please sign in to comment.