This repository was archived by the owner on Dec 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f857176
commit 42587aa
Showing
6 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
.idea/libraries/Maven__io_papermc_paper_paper_api_1_18_1_R0_1_SNAPSHOT.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/me/xiaozhangup/natunology/commands/Commands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package me.xiaozhangup.natunology.commands; | ||
|
||
import me.xiaozhangup.natunology.Main; | ||
import me.xiaozhangup.natunology.api.Message; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.entity.Player; | ||
|
||
public class Commands { | ||
|
||
public static void regCommands() { | ||
Bukkit.getPluginCommand("natunology").setExecutor((commandSender, command, s, inside) -> { | ||
Player p = (Player) commandSender; | ||
try { | ||
if (inside[0].equals("version")) { | ||
Message.send(p , " ", | ||
" &7&lNatunology HAPPYLAND" , | ||
" &f运行时版本: &7" + Bukkit.getPluginManager().getPlugin("Natunology").getDescription().getVersion() , | ||
" &f详细信息: &7" + Bukkit.getPluginManager().getPlugin("Natunology").getDescription().toString(), | ||
" &c&l开放源代码 &7https://github.com/xiaozhangup/Natunology", | ||
" "); | ||
} else if (inside[0].equals("help")) { | ||
Message.send(p , " ", | ||
" &f&lNatunology 命令帮助", | ||
" &7Code By HAPPYLAND Team", | ||
" ", | ||
" &7/ntg help - 显示本页面", | ||
" &7/ntg version - 显示版本信息", | ||
" &7/ntg guide - 打开指导页面", | ||
" &7/ntg book - 获取指导书本", | ||
" "); | ||
} | ||
} catch (Exception e) { | ||
Message.send(p , "&f[&7科技&f] 执行命令时遇到错误! 内容: &c" + e.getMessage()); | ||
} | ||
return false; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
name: Natunology | ||
main: me.xiaozhangup.natunology.Main | ||
version: 1.0.8 | ||
version: 1.1.0 | ||
api-version: 1.13 | ||
authors: | ||
- xiaozhangup | ||
description: Happyland pack | ||
description: Happyland pack | ||
commands: | ||
natunology: | ||
aliases: [ntg] |