Older plugin not working with spigot version?

Discussion in 'Spigot Plugin Help' started by UXS, May 1, 2017.

  1. UXS

    UXS

    I'm trying to get this plugin to work with 1.7.10 spigot (as that is the best version for pvp) but it is saying that there is no method to go with setCollidesWithEntities() and its not firing the playerjoinevent? How would I fix this?

    Errors
    Code (Text):
    01.05 19:21:09 [Server] ERROR Could not pass event PlayerJoinEvent to plugin
    01.05 19:21:09 [Server] INFO org.bukkit.event.EventException
    01.05 19:21:09 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:509) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:494) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerList.c(PlayerList.java:265) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerList.a(PlayerList.java:152) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.LoginListener.c(LoginListener.java:119) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.LoginListener.a(LoginListener.java:44) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:189) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:734) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.setCollidesWithEntities(Z)V
    01.05 19:21:09 [Server] INFO at me.uxs.player.PlayerManager.spawn(PlayerManager.java:163) ~[?:?]
    01.05 19:21:09 [Server] INFO at me.uxs.practice.player.PlayerManager.spawn(PlayerManager.java:157) ~[?:?]
    01.05 19:21:09 [Server] INFO at me.uxs.practice.player.PlayerManager.handleLogin(PlayerManager.java:98) ~[?:?]
    01.05 19:21:09 [Server] INFO at me.uxs.practice.player.PlayerListener.onPlayerJoin(PlayerListener.java:37) ~[?:?]
    01.05 19:21:09 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    01.05 19:21:09 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
    01.05 19:21:09 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
    01.05 19:21:09 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
    01.05 19:21:09 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:298) ~[spigot-1.7.10-1.8.9.jar:git-Spigot-1.7.9-R0.2-208-ge0f2e95]
    01.05 19:21:09 [Server] INFO ... 14 more
    Code
    Code (Text):
     public void spawn(final Player player, boolean teleport)
      {
        player.setAllowFlight(false);
       
        player.setCollidesWithEntities(true);
        if (teleport) {
          player.teleport(((World)Bukkit.getWorlds().get(0)).getSpawnLocation().add(0.0D, 2.0D, 0.0D));
        }
        User user = Practice.getInstance().getPlayerManager().getUser(player);
        if ((user != null) && (user.getSpectatedMatch() != null)) {
          user.getSpectatedMatch().getSpectatoers().remove(player);
        }
        PlayerUtils.clearInventory(player);
        new BukkitRunnable()
        {
          public void run()
          {
            for (Player other : )
            {
              player.showPlayer(other);
              other.showPlayer(player);
            }
            if (PlayerManager.this.plugin.getTeamManager().isInTeam(player))
            {
              PlayerManager.this.plugin.getTeamManager().setInventory(player);
            }
            else
            {
              player.getInventory().setItem(0, ItemStackUtils.setItemTitle(new ItemStack(Material.BOOK), ItemConstants.KIT_EDITOR));
              player.getInventory().setItem(2, ItemStackUtils.setItemTitle(new ItemStack(Material.IRON_SWORD), ItemConstants.UBRANKED_1V1));
             
              player.getInventory().setItem(6, ItemStackUtils.setItemTitle(new ItemStack(Material.DIAMOND_SWORD), ItemConstants.RANKED_1V1));
              player.getInventory().setItem(8, ItemStackUtils.setItemTitle(new ItemStack(Material.PAPER), ItemConstants.PARTY));
            }
            for (PotionEffect effect : player.getActivePotionEffects()) {
              player.removePotionEffect(effect.getType());
            }
            if (!player.isDead()) {
              player.setHealth(20.0D);
            }
            player.setFoodLevel(20);
            player.setSaturation(12.0F);
            PlayerUtils.updateInventory(player);
          }
        }
       
          .runTaskLater(this.plugin, 3L);
        this.plugin.getScoreboardManager().resendTab(player);
      }
     
      private Result<Record> fetch(DSLContext create, UUID uuid)
      {
        return create.select((Field[])new Field[0]).from("users").where(new Condition[] { DSL.fieldByName(new String[] { "uuid" }).equal(uuid.toString()) }).limit(1).fetch();
      }
     
      public PlayerManager(Practice plugin)
      {
        this.playerUserWeakHashMap = new WeakHashMap();
        this.plugin = plugin;
      }
    }
     
     
  2. Please read the stacktrace.
    Code (Text):
    01.05 19:21:09 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.setCollidesWithEntities(Z)V
    The method setCollidesWithEntities no longer exists. Use: setCollidable.