mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 20:47:01 +01:00
Fix gamerule tabe complete.
This commit is contained in:
parent
611af12ba6
commit
538cdb1a69
@ -21,6 +21,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameRule;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@CommandAlias("mv")
|
||||
@ -61,11 +62,12 @@ public class GameRuleCommand extends MultiverseCommand {
|
||||
@Subcommand("set")
|
||||
@CommandPermission("multiverse.core.gamerule.set")
|
||||
@Syntax("<rule> <value> [world]")
|
||||
@CommandCompletion("@gameRules @MVWorlds")
|
||||
@CommandCompletion("@gameRules @empty @MVWorlds")
|
||||
@Description("Allows a player to set a gamerule for a given world.")
|
||||
public void onGameRuleChangeCommand(@NotNull CommandSender sender,
|
||||
@NotNull GameRuleProperty property,
|
||||
@NotNull @Flags("other,defaultself") MultiverseWorld world) {
|
||||
public <T> void onGameRuleChangeCommand(@NotNull CommandSender sender,
|
||||
@NotNull Player player,
|
||||
@NotNull GameRuleProperty<T> property,
|
||||
@NotNull @Flags("other,defaultself") MultiverseWorld world) {
|
||||
|
||||
if (world.getCBWorld().setGameRule(property.getGameRule(), property.getValue())) {
|
||||
sender.sendMessage(ChatColor.GREEN + "Success!" + ChatColor.WHITE + " Gamerule " + ChatColor.AQUA
|
||||
|
Loading…
Reference in New Issue
Block a user