Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
✨ 新增 /workbench 命令
Browse files Browse the repository at this point in the history
  • Loading branch information
WithLithum committed Sep 14, 2022
1 parent c71015f commit 288587d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

## Unreleased

### 新增

* 新增 `/anvil` 命令快速打开铁砧页面
* 新增 `/workbench` 命令快速打开9x9工作台页面
* 史莱姆不会再生成了
* 现在可以拦截并阻止部分爆炸了

### 修复

* 修复帮助信息未正确本地化的问题
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

<groupId>x.nexuskrop</groupId>
<artifactId>StackPun</artifactId>
<version>0.1.2-alpha</version>
<version>0.1.3-alpha</version>

<name>StackPun</name>
<url>https://bitbucket.org/nexuskrop/stackpun/</url>
<url>https://github.com/nexuskrop/stackpun/</url>

<inceptionYear>2022</inceptionYear>
<licenses>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2022.
* This file is part of StackPun.
* Licensed under GNU AGPL version 3 or later.
*/

package x.nexuskrop.stackpun.commands.impl;

import dev.jorel.commandapi.CommandAPICommand;
import org.bukkit.entity.Player;
import x.nexuskrop.stackpun.commands.PunCommand;
import x.nexuskrop.stackpun.commands.annotations.PunCommandInfo;

@PunCommandInfo(name = "workbench")
public class WorkbenchCommand implements PunCommand {
@Override
public void initialise(CommandAPICommand command) {
command.withAliases("wb", "ct", "craft")
.executesPlayer(this::execute);
}

public int execute(Player sender, Object[] args) {
sender.openWorkbench(null, true);
return 0;
}
}

0 comments on commit 288587d

Please sign in to comment.