我遇到了这个错误:Type mismatch: cannot convert from ImmutableList<Object> to ImmutableList<String>
下面是出错的代码:在COMPLETIONS = ImmutableList.of((Object)"all");
行中
public class FactionWithdrawArgument extends CommandArgument
{
private static final ImmutableList<String> COMPLETIONS;
private final HCF plugin;
public FactionWithdrawArgument(final HCF plugin) {
super("withdraw", "Withdraws money from the faction balance.", new String[] { "w" });
this.plugin = plugin;
}
public String getUsage(final String label) {
return '/' + label + ' ' + this.getName() + " <all|amount>";
}
static {
COMPLETIONS = ImmutableList.of((Object)"all");
}
}
我不知道这个。这是bukkit的一个类
如果这很容易的话,我需要帮助。但我不知道
发布于 2018-07-28 08:19:29
我不相信你能做到。有一件事,你有它作为最终决定。第二,不可变对象,如果一个对象在构造后状态不能改变,那么它就被认为是不可变的。
https://stackoverflow.com/questions/51566839
复制相似问题