mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-01 05:57:54 +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"
|
description: "set the range of player's island"
|
||||||
range-updated: "Island range updated to [number]"
|
range-updated: "Island range updated to [number]"
|
||||||
reload:
|
reload:
|
||||||
description: "reload the plugin"
|
description: "reload"
|
||||||
tp:
|
tp:
|
||||||
parameters: "<player>"
|
parameters: "<player>"
|
||||||
description: "teleport to a player's island"
|
description: "teleport to a player's island"
|
||||||
|
@ -135,7 +135,7 @@ commands:
|
|||||||
description: "プレイヤーの島の範囲を設定する"
|
description: "プレイヤーの島の範囲を設定する"
|
||||||
range-updated: "&2島の範囲は、[number]に更新"
|
range-updated: "&2島の範囲は、[number]に更新"
|
||||||
reload:
|
reload:
|
||||||
description: "プラグインをリロードする"
|
description: "リロードする"
|
||||||
tp:
|
tp:
|
||||||
parameters: "<プレーヤー>"
|
parameters: "<プレーヤー>"
|
||||||
description: "プレイヤーの島にテレポート"
|
description: "プレイヤーの島にテレポート"
|
||||||
|
@ -108,7 +108,7 @@ commands:
|
|||||||
description: "ustaw zasięg wyspy gracza"
|
description: "ustaw zasięg wyspy gracza"
|
||||||
range-updated: "Zaktualizowano zasięg wyspy do [number]"
|
range-updated: "Zaktualizowano zasięg wyspy do [number]"
|
||||||
reload:
|
reload:
|
||||||
description: "ponownie załaduj plugin"
|
description: "ponownie załaduj"
|
||||||
tp:
|
tp:
|
||||||
parameters: "<gracz>"
|
parameters: "<gracz>"
|
||||||
description: "teleportuj się na wyspę gracza"
|
description: "teleportuj się na wyspę gracza"
|
||||||
|
Loading…
Reference in New Issue
Block a user