Fix Readme.MD

This commit is contained in:
TheTrouper
2023-02-17 22:53:32 -06:00
committed by GitHub
parent e9c516fad4
commit 6efea4c5ac
4 changed files with 18 additions and 13 deletions

View File

@@ -1,22 +1,25 @@
# ExamplePluginTemplate # SlashWelcome
An example plugin template for beginners! A simple way to welcome new players
----------------------------------------------------- -----------------------------------------------------
Trying to create your first plugin? Use this template to get started easily! Make poeple feel welcomed with one command!
- Comments to guide you - Multiple welcome messages
- Made some example classes - Randomization
- Added some useful utils - Delay (Humanization)
----------------------------------------------------- -----------------------------------------------------
## How to use ## How to use
Download this template -\> Load it into your IDE or development environment. [Check out IntelliJ](https://www.jetbrains.com/idea/download/?fromIDE=#section=windows) -\> Get Creative! Download the latest realease or build it in gradle
- To build your jar file simply go into the terminal and run `./gradlew build` - To build your jar file simply go into the terminal and run `gradlew build`
- Your finished jar should appear in `build/libs`! - Your finished jar should appear in `build/libs`!
Install the plugin by dropping it in your plugins
- if you have [PlugManX](https://www.spigotmc.org/resources/plugmanx.88135/)
- - Do `/plugman load SlashWelcome`
- - Then `/plugman reload SlashWelcome`
- Otherwise do `/reload confirm` or restart the server
----------------------------------------------------- -----------------------------------------------------
Have a nice day, happy coding!

View File

@@ -35,7 +35,6 @@ public class CommandExample implements CommandExecutor {
int random = Config.choice(0,options.size()); int random = Config.choice(0,options.size());
List<String> messages = Config.config.getStringList("config.plugin.messages." + options.get(random)); List<String> messages = Config.config.getStringList("config.plugin.messages." + options.get(random));
Integer delay = Config.Plugin.delay; Integer delay = Config.Plugin.delay;
P.chat(options.toString() + " " + random);
new BukkitRunnable() { new BukkitRunnable() {
int i = 0; int i = 0;
@Override @Override

View File

@@ -33,7 +33,7 @@ public class CmdExHandler {
if (exception instanceof NullPointerException) msg += "Command contains a null value!"; if (exception instanceof NullPointerException) msg += "Command contains a null value!";
else if (exception instanceof IndexOutOfBoundsException) msg += "Unknown or incomplete command!"; else if (exception instanceof IndexOutOfBoundsException) msg += "Unknown or incomplete command!";
else msg += exception.getMessage(); else msg += exception.getMessage();
return msg + "\nc§cCorrect usage: §7" + command.getUsage(); return msg + "\n§cCorrect usage: §7" + command.getUsage();
} }
public Exception getException() { public Exception getException() {

View File

@@ -14,3 +14,6 @@ config:
B: B:
- "Have fun, %player%!" - "Have fun, %player%!"
- "Feel free to do /daily for a key and /kit for gear!" - "Feel free to do /daily for a key and /kit for gear!"
C:
- "Good luck, %player%!"
- "Make sure to pick up your /daily key and your kit!"