mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-10 12:59:45 +01:00
Added generic reload command for addons to use
This command just runs the onReload method so that individual addons can reload their stuff.
This commit is contained in:
parent
a7f99e2a65
commit
96bf67eb19
@ -0,0 +1,33 @@
|
||||
package world.bentobox.bentobox.api.commands.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
/**
|
||||
* Generic reload command for addons to use that will just call the onReload() method
|
||||
* after checking permissions
|
||||
* @author tastybento
|
||||
*
|
||||
*/
|
||||
public class AdminReloadCommand extends CompositeCommand {
|
||||
|
||||
public AdminReloadCommand(CompositeCommand adminCommand) {
|
||||
super(adminCommand, "reload");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
// Permission
|
||||
setPermission("admin.reload");
|
||||
setDescription("commands.admin.reload.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
getAddon().onReload();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -140,7 +140,7 @@ commands:
|
||||
description: "set the range of player's island"
|
||||
range-updated: "Island range updated to [number]"
|
||||
reload:
|
||||
description: "reload the plugin"
|
||||
description: "reload"
|
||||
tp:
|
||||
parameters: "<player>"
|
||||
description: "teleport to a player's island"
|
||||
|
@ -135,7 +135,7 @@ commands:
|
||||
description: "プレイヤーの島の範囲を設定する"
|
||||
range-updated: "&2島の範囲は、[number]に更新"
|
||||
reload:
|
||||
description: "プラグインをリロードする"
|
||||
description: "リロードする"
|
||||
tp:
|
||||
parameters: "<プレーヤー>"
|
||||
description: "プレイヤーの島にテレポート"
|
||||
|
@ -108,7 +108,7 @@ commands:
|
||||
description: "ustaw zasięg wyspy gracza"
|
||||
range-updated: "Zaktualizowano zasięg wyspy do [number]"
|
||||
reload:
|
||||
description: "ponownie załaduj plugin"
|
||||
description: "ponownie załaduj"
|
||||
tp:
|
||||
parameters: "<gracz>"
|
||||
description: "teleportuj się na wyspę gracza"
|
||||
|
Loading…
Reference in New Issue
Block a user