Skip to content

Commit

Permalink
Fix warp inventory operator cooldown.
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy committed Nov 20, 2023
1 parent ccd7244 commit c27134f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import com.eternalcode.annotations.scan.command.DescriptionDocs;
import com.eternalcode.core.configuration.implementation.PluginConfiguration;
import com.eternalcode.core.feature.teleport.TeleportTaskService;
import com.eternalcode.core.injector.annotations.Inject;
import com.eternalcode.core.notice.NoticeService;
import com.eternalcode.core.shared.PositionAdapter;
import com.eternalcode.core.feature.teleport.TeleportTaskService;
import com.eternalcode.core.user.User;
import dev.rollczi.litecommands.argument.Arg;
import dev.rollczi.litecommands.command.execute.Execute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ private Gui createInventory(Language language) {

player.closeInventory();

if (player.hasPermission("eternalcore.warp.bypass")) {
this.teleportTaskService.createTeleport(player.getUniqueId(), PositionAdapter.convert(player.getLocation()), warp.getPosition(), Duration.ZERO);
return;
}

this.teleportTaskService.createTeleport(
player.getUniqueId(),
PositionAdapter.convert(player.getLocation()),
Expand Down

0 comments on commit c27134f

Please sign in to comment.