Skip to content

Commit

Permalink
GH-487 Fix warp inventory operator cooldown. (#560)
Browse files Browse the repository at this point in the history
* Fix warp inventory operator cooldown.

* Removed command description in ConfigItem class.
  • Loading branch information
vLuckyyy authored Nov 20, 2023
1 parent ccd7244 commit b1977d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class ConfigItem {
public String texture = "none";
public boolean glow = false;
public int slot = 0;
@Description("What command should be executed when the item is clicked? If it is not to be performed, leave it blank")
public List<String> commands = new ArrayList<>();

public ConfigItem(String name, List<String> lore, Material material, String texture, boolean glow, int slot, List<String> commands) {
Expand Down
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 b1977d8

Please sign in to comment.