Resource [1.8] MoreProjectiles

Discussion in 'Plugin Help/Development/Requests' started by stirante, Sep 1, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    stirante

    Don't compare strings by == operator. Use string1.equals(string2) instead;
     
  2. Offline

    BungeeTheCookie

  3. Offline

    IceBeast

    stirante How can I check hit shooted projectile's face when it hits an entity?
     
  4. Offline

    stirante

    I don't get it. Can you explain? (I'm from Poland, my english isn't very good)
     
  5. Offline

    coco5843

    You plugins is it incompatible with spigot ?
     
  6. Offline

    stirante

    Haven't tested but it should work with spigot. Btw it's lib not plugin.
     
  7. Invisible

    MineCrashKoen

    Hello, I am having trouble installing the LIB.

    When I try to use it while the JAR is in the external JARs in eclipse it gives me this error:
    Code:
    Could not pass event PlayerInteractEvent to test v1.0
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:471) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:195) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:165) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:988) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PacketPlayInArmAnimation.a(SourceFile:43) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PacketPlayInArmAnimation.handle(SourceFile:9) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NoClassDefFoundError: com/stirante/MoreProjectiles/projectile/ItemProjectile
        at me.MineCrashKoen.ExerosisTest.Main.onPlayerClick(Main.java:24) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0]
        at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        ... 15 more
    Caused by: java.lang.ClassNotFoundException: com.stirante.MoreProjectiles.projectile.ItemProjectile
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372) ~[?:1.8.0]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.8.0]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360) ~[?:1.8.0]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0]
        at me.MineCrashKoen.ExerosisTest.Main.onPlayerClick(Main.java:24) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0]
        at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        ... 15 more
    [20:46:19] [Server thread/INFO]: [WorldEdit] Using inbuilt NmsBlock for this version.
    
    When I try to copy the package with all the classes in it, I get over 600 errors which all refer to the imports. I doesn't import anything. If I try to import Entity, which imports fine in the main class it doesn't give an option to import from bukkit

    This is the main class:
    Code:java
    1. package me.MineCrashKoen.ExerosisTest;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.Material;
    5. import org.bukkit.event.EventHandler;
    6. import org.bukkit.event.Listener;
    7. import org.bukkit.event.player.PlayerInteractEvent;
    8. import org.bukkit.inventory.ItemStack;
    9. import org.bukkit.plugin.java.JavaPlugin;
    10.  
    11. import com.stirante.MoreProjectiles.projectile.ItemProjectile;
    12.  
    13. public class Main extends JavaPlugin implements Listener
    14. {
    15. @Override
    16. public void onEnable()
    17. {
    18. Bukkit.getPluginManager().registerEvents(this, this);
    19. }
    20.  
    21. @EventHandler
    22. public void onPlayerClick(PlayerInteractEvent e)
    23. {
    24. ItemProjectile p = new ItemProjectile("Helleu", e.getPlayer(), new ItemStack(Material.IRON_AXE), 5);
    25. }
    26. }
    27.  


    Thank you for reading!
     
  8. Offline

    stirante

    You're not using craftbukkit version which i used to compile lib. I used craftbukkit 1.7.5 which have diffrent packages.
     
  9. Invisible

    MineCrashKoen

    Thank you so much! Maybe add this information to the post? Just a suggestion :)
     
  10. Offline

    robbo5899

    stirante
    Eclipse tells me this
    Code:
    Type safety: The expression of type new TypedRunnable(){} needs unchecked conversion to conform to TypedRunnable<? extends CustomProjectile>
    When I try to use the code in the MainTest that makes Happy Villager particles follow the ItemProjectile, Can you help
     
  11. Offline

    stirante

    robbo5899 You're probably using decompiled version of it, becouse You don't have generic parameters (i think it's called like this, but i mean paramteres in these < >). It's just a warning you can ignore.
     
  12. Offline

    robbo5899

    Thanks I fixed it by importing the files into eclipse instead of referencing them :)
     
  13. Invisible

    MineCrashKoen

    Hello, I am working with the LIB and I'm trying to make some kind of spears.
    Is there a way the spear could have a little random offset?

    Thank you!

    EDIT: Fixed it! Made my own location of the player and changed the pitch and yaw :)
     
  14. Offline

    stirante

    MineCrashKoen You can spawn projectile in BukkitRunnabe with random delay.
     
  15. Invisible

    MineCrashKoen

    Thank you, already fixed it. Thank you though :)
     
  16. Offline

    Phasesaber

    Now we can have the item cannon from OpenBlocks in Bukkit! :D
     
  17. Offline

    stirante

    Updated to 1.7.10
     
  18. Offline

    shohouku

    I'm getting an error:

    I'm using craftbukkit 1.7.10/bukkit1.7.10

    I'v registered my events and I have listeners.

    Code:java
    1. [17:29:57 ERROR]: Could not pass event PlayerInteractEvent to Spawn v0.1
    2. org.bukkit.event.EventException
    3. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    4. va:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    5. at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    6. a:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    7. at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    8. ava:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    9. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    10. ava:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    11. at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPlayerInte
    12. ractEvent(CraftEventFactory.java:225) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-
    13. g37c7969-b3105jnks]
    14. at net.minecraft.server.v1_7_R4.PlayerInteractManager.interact(PlayerInt
    15. eractManager.java:374) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105j
    16. nks]
    17. at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java
    18. :630) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    19. at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.a(SourceFile:60)
    20. [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    21. at net.minecraft.server.v1_7_R4.PacketPlayInBlockPlace.handle(SourceFile
    22. :9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    23. at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157
    24. ) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    25. at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [craf
    26. tbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    27. at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:6
    28. 67) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    29. at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:2
    30. 58) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    31. at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:5
    32. 58) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    33. at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    34. :469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    35. at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    36. 28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    37. Caused by: java.lang.NoClassDefFoundError: com/stirante/MoreProjectiles/projecti
    38. le/ItemProjectile
    39. at plugin.spawning.onPlayerInteract(spawning.java:440) ~[?:?]
    40. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    41. _51]
    42. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    43. _51]
    44. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    45. .7.0_51]
    46. at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
    47. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    48. va:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    49. ... 15 more
    50. Caused by: java.lang.ClassNotFoundException: com.stirante.MoreProjectiles.projec
    51. tile.ItemProjectile
    52. at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
    53. at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
    54. at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_
    55. 51]
    56. at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_51]
    57. at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    58. java:77) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    59. at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    60. java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    61. at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
    62. at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
    63. at plugin.spawning.onPlayerInteract(spawning.java:440) ~[?:?]
    64. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0
    65. _51]
    66. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0
    67. _51]
    68. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
    69. .7.0_51]
    70. at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
    71. at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    72. va:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    73. ... 15 more
    74. >


    Line 440:

    Code:java
    1. ItemProjectile projectile = new ItemProjectile("name", p, new ItemStack(Material.WATER), 1);
     
  19. Offline

    stirante

    shohouku You have to add sources to your plugin instead of just referencing it.
     
  20. Offline

    stirante

    Updated to spigot 1.8, converted project to Maven, made Maven repo, uploaded code to GitHub, rewrote half of the lib.
     
  21. Offline

    mgone

  22. Offline

    mgone

  23. Offline

    stirante

    @mgone Fixing it :D

    EDIT: Fixed
     
    Last edited: Dec 17, 2014
  24. Offline

    ClassifiedLife

    Nevermind I figured it out :p
     
  25. stirante I am getting 2 errors in ItemProjectile class:

    1.
    Code:
        @Override
        public boolean isInvulnerable() {
            return getEntity().spigot().isInvulnerable();
        }
    The method spigot() is undefined for the type Entity.

    2.
    Code:
        @Override
        public void s_() {
            K();
            BlockPosition blockposition = new BlockPosition(locX, locY, locZ);
            IBlockData iblockdata = world.getType(blockposition);
            Block block = iblockdata.getBlock();
    public void is giving me error on void: The return type is incompatible with EntityItem.s_()
     
  26. Offline

    mrCookieSlime

    Moved to Alternatives Section since this requires an Alternative to be used.
     
Thread Status:
Not open for further replies.

Share This Page