added a reload command
This commit is contained in:
parent
4eb1af4636
commit
dbf7de4d52
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,7 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'org.twipnetwork'
|
||||
version = '1.5-1.21'
|
||||
version = '1.6-1.21'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
name: RocketJumping
|
||||
version: '1.4-1.21'
|
||||
main: org.twipnetwork.rocketJumping.RocketJumping
|
||||
api-version: '1.21'
|
||||
commands:
|
||||
rocketlauncher:
|
||||
description: Reloads the RocketJumping configuration.
|
||||
usage: /<command> reload
|
||||
permission: rocketlauncher.reload
|
||||
permission-message: You do not have permission to execute this command.
|
Binary file not shown.
Binary file not shown.
@ -1,8 +1,7 @@
|
||||
package org.twipnetwork.rocketJumping;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.*;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -14,6 +13,8 @@ import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public final class RocketJumping extends JavaPlugin implements Listener {
|
||||
|
||||
private double boostPower;
|
||||
@ -35,7 +36,6 @@ public final class RocketJumping extends JavaPlugin implements Listener {
|
||||
boostPower = config.getDouble("boostPower", 4.0);
|
||||
damageShooter = config.getBoolean("damageShooter", false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onProjectileHit(ProjectileHitEvent event) {
|
||||
Projectile projectile = event.getEntity();
|
||||
@ -56,15 +56,16 @@ public final class RocketJumping extends JavaPlugin implements Listener {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (command.getName().equalsIgnoreCase("rocketlauncher")) {
|
||||
if (command.getName().equalsIgnoreCase("rocketjumping")) {
|
||||
if (args.length > 0 && args[0].equalsIgnoreCase("reload")) {
|
||||
reloadConfig();
|
||||
loadConfigValues();
|
||||
sender.sendMessage("§aRocketLauncher config reloaded!");
|
||||
sender.sendMessage("§aRocketJumping config reloaded!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
name: RocketJumping
|
||||
version: '1.5-1.21'
|
||||
version: '1.6-1.21'
|
||||
main: org.twipnetwork.rocketJumping.RocketJumping
|
||||
api-version: 1.21
|
||||
commands:
|
||||
rocketlauncher:
|
||||
rocketjumping:
|
||||
description: Reloads the RocketJumping configuration.
|
||||
usage: /<command> reload
|
||||
permission: rocketlauncher.reload
|
||||
permission: rocketjumpingo.reload
|
||||
permission-message: You do not have permission to execute this command.
|
Loading…
Reference in New Issue
Block a user