Skip to content

Commit 94907cd

Browse files
committed
Back location revoking on player leaving added.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 74f768e commit 94907cd

File tree

1 file changed

+6
-0
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/core

1 file changed

+6
-0
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/core/EntryPoint.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.mairwunnx.projectessentials.core
22

33
import com.mairwunnx.projectessentials.core.api.v1.commands.CommandAPI
44
import com.mairwunnx.projectessentials.core.api.v1.commands.CommandProcessor
5+
import com.mairwunnx.projectessentials.core.api.v1.commands.back.BackLocationAPI
56
import com.mairwunnx.projectessentials.core.api.v1.configuration.ConfigurationProcessor
67
import com.mairwunnx.projectessentials.core.api.v1.events.ModuleEventAPI.subscribeOn
78
import com.mairwunnx.projectessentials.core.api.v1.events.forge.FMLCommonSetupEventData
@@ -132,6 +133,11 @@ For support project you can also put an star on the Project Essentials repositor
132133
ProcessorAPI.getProcessorByName("command").postProcess()
133134
}
134135

136+
@SubscribeEvent
137+
fun onPlayerLeave(event: PlayerEvent.PlayerLoggedOutEvent) {
138+
BackLocationAPI.revoke(event.player as ServerPlayerEntity)
139+
}
140+
135141
@SubscribeEvent
136142
fun onPlayerJoin(event: PlayerEvent.PlayerLoggedInEvent) {
137143
if (!dudeFuckedOff) {

0 commit comments

Comments
 (0)