gpt4 book ai didi

java - 在范围内无法访问 TObjectHash 类型的封闭实例。插口插件

转载 作者:行者123 更新时间:2023-11-30 06:54:30 24 4
gpt4 key购买 nike

当我加载服务器时,控制台给出了启用插件的唯一错误。

No enclosing instance of the type TObjectHash is accessible in scope

然后是对 spigot 插件的引用

at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-PaperSpigot-a925999]

这个 TObjectHash 来自 trove 存储库,文件中包含以下代码:

package gnu.trove.impl.hash;

import gnu.trove.impl.hash.TObjectHash;
import gnu.trove.strategy.HashingStrategy;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

public abstract class TCustomObjectHash < T >
extends TObjectHash < T > {
static final long serialVersionUID = 8766048185963756400L;
protected HashingStrategy <? super T > strategy;

public TCustomObjectHash() {}

public TCustomObjectHash(HashingStrategy <? super T > strategy) {
this.strategy = strategy;
}

public TCustomObjectHash(HashingStrategy <? super T > strategy, int initialCapacity) {
super(initialCapacity);
this.strategy = strategy;
}

public TCustomObjectHash(HashingStrategy <? super T > strategy, int initialCapacity, float loadFactor) {
super(initialCapacity, loadFactor);
this.strategy = strategy;
}

@Override
protected int hash(Object obj) {
return this.strategy.computeHashCode(obj);
}

@Override
protected boolean equals(Object one, Object two) {
return two != REMOVED && this.strategy.equals(one, two);
}

@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeByte(0);
TObjectHash.super.writeExternal(out);
out.writeObject(this.strategy);
}

@Override
public void readExternal(ObjectInput in ) throws IOException, ClassNotFoundException { in .readByte();
TObjectHash.super.readExternal( in );
this.strategy = (HashingStrategy) in .readObject();
}
}

我在这里缺少什么?

最佳答案

关于java - 在范围内无法访问 TObjectHash<T> 类型的封闭实例。插口插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42102841/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com