简体   繁体   English

没有 TObjectHash 类型的封闭实例<T>可以在范围内访问。 龙头插件

[英]No enclosing instance of the type TObjectHash<T> is accessible in scope. Spigot plugin

As I load the Server, the console gives this only error to enabling the plugin.当我加载服务器时,控制台给出了启用插件的唯一错误。

No enclosing instance of the type TObjectHash is accessible in scope在范围内没有可访问 TObjectHash 类型的封闭实例

Then after that there is a reference to the spigot plugin然后在那之后有一个对spigot插件的引用

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

This TObjectHash is from the trove repository the following code is this inside the file:这个 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(); } }

What am I missing here?我在这里缺少什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM