在范围内无法访问TObjectHash <t>类型的封闭实例。插头插件

时间:2017-02-08 01:00:33

标签: java plugins error-handling minecraft bukkit

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

  

在范围

中无法访问TObjectHash类型的封闭实例

之后会有对插头插件的引用

  

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();
    }
  }

我在这里缺少什么?