-
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
ac62d7d
commit c5ce187
Showing
6 changed files
with
101 additions
and
21 deletions.
There are no files selected for viewing
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,26 @@ | ||
package com.vcmi.commands; | ||
|
||
import com.vcmi.config.Lang; | ||
import com.velocitypowered.api.command.CommandSource; | ||
import com.velocitypowered.api.command.SimpleCommand; | ||
import java.util.List; | ||
|
||
public class HelpCommand implements SimpleCommand { | ||
|
||
@Override | ||
public void execute(Invocation invocation) { | ||
CommandSource source = invocation.source(); | ||
if (!hasPermission(invocation)) { | ||
source.sendMessage(Lang.no_perms.get()); | ||
return; | ||
} | ||
|
||
source.sendMessage(Lang.help.get()); | ||
|
||
} | ||
|
||
@Override | ||
public boolean hasPermission(Invocation invocation) { | ||
return invocation.source().hasPermission("vcmi.help"); | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[center]<gold>VCMI Plugin</gold> | ||
[center]<gray>A Velocity Plugin for Comprehensive Server Management</gray> | ||
|
||
<gold>Modules:</gold> | ||
|
||
<gray>PlayerTime:</gray> | ||
Tracks total playtime. Commands: | ||
- <click:run_command:/vptime><hover:show_text:'<gray>Click to run</gray>'><green>/vptime</green></click> - Shows your total playtime. | ||
- <click:copy_to_clipboard:vptime {player}><hover:show_text:'<gray>Click to copy</gray>'><green>/vptime {player}</green></click> - Shows specified player's playtime. | ||
|
||
<gray>RconManager:</gray> | ||
Execute RCON commands remotely. | ||
- <click:copy_to_clipboard:/rcon><hover:show_text:'<gray>Click to copy RCON command</gray>'><green>/rcon {server/all/reload} {command}</green></click> - Command execution. | ||
- <click:run_command:/rcon all list><hover:show_text:'<gray>Click to run example command</gray>'><green>/rcon all list</green></click> - Execute example RCON command. | ||
|
||
<gray>PhpModule:</gray> | ||
Extend functionality with PHP scripts. | ||
- <click:copy_to_clipboard:/php><hover:show_text:'<gray>Click to copy PHP command</gray>'><green>/php {script/reload} {args}</green></click> - Execute PHP scripts. | ||
- <click:run_command:/php index info><hover:show_text:'<gray>Click to run example script</gray>'><green>/php index info</green></click> - Execute example PHP script. | ||
|
||
<gray>BashModule:</gray> | ||
Execute Bash scripts from the console or chat. | ||
- <click:copy_to_clipboard:/bash><hover:show_text:'<gray>Click to copy Bash command</gray>'><green>/bash {script/reload} {args}</green></click> - Run Bash scripts. | ||
- <click:run_command:/bash run info><hover:show_text:'<gray>Click to run example script</gray>'><green>/bash run</green></click> - Execute example Bash script. | ||
|
||
<gray>TextReader:</gray> | ||
Read and display text files. | ||
- <click:run_command:/rules><hover:show_text:'<gray>Click to read rules.txt file</gray>'><green>/rules</green></click> - Display rules.txt file content. | ||
|
||
<gray>HttpRequest:</gray> | ||
Perform HTTP requests and command execution based on responses. | ||
- <click:run_command:/linkaccount 12345><hover:show_text:'<gray>Click to run command</gray>'><green>/linkaccount 12345</green></click> - Execute command based on response. | ||
|