Examples of FuzzyMethodContract


Examples of com.comphenix.protocol.reflect.fuzzy.FuzzyMethodContract

  public static EquivalentConverter<Material> getBlockConverter() {
    // Initialize if we have't already
    if (GET_BLOCK == null || GET_BLOCK_ID == null) {
      Class<?> block = MinecraftReflection.getBlockClass();
     
      FuzzyMethodContract getIdContract = FuzzyMethodContract.newBuilder().
          parameterExactArray(block).
          requireModifier(Modifier.STATIC).
          build();
      FuzzyMethodContract getBlockContract = FuzzyMethodContract.newBuilder().
          parameterExactArray(int.class).
          requireModifier(Modifier.STATIC).
          build();
      GET_BLOCK = Accessors.getMethodAccessor(FuzzyReflection.fromClass(block).getMethod(getBlockContract));
      GET_BLOCK_ID = Accessors.getMethodAccessor(FuzzyReflection.fromClass(block).getMethod(getIdContract));
View Full Code Here

Examples of com.comphenix.protocol.reflect.fuzzy.FuzzyMethodContract

      return getMinecraftClass("ChunkPosition");
    } catch (RuntimeException e) {
      Class<?> normalChunkGenerator = getCraftBukkitClass("generator.NormalChunkGenerator");
     
      // ChunkPosition a(net.minecraft.server.World world, String string, int i, int i1, int i2) {
      FuzzyMethodContract selected = FuzzyMethodContract.newBuilder().
           banModifier(Modifier.STATIC).
           parameterMatches(getMinecraftObjectMatcher(), 0).
           parameterExactType(String.class, 1).
           parameterExactType(int.class, 2).
           parameterExactType(int.class, 3).
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.