Ocelot Snowball

Discussion in 'Archived: Plugin Requests' started by Famous Guy, Nov 16, 2013.

  1. Offline

    Famous Guy

    Plugin category: Fun

    Suggested name: OcelotBall

    What I want: I want a plugin where you get snowballs and you throw them they make an ocelot purr and when it hits a player it does a heart.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: OcelotBall.Use - Can use the snowball.

    When I'd like it by: ASAP, but take your time :D
  2. Offline


    So what you want is:
    - Throw a snowball on the ground and there wil spawn a ocelot.
    - Throw a snowball on a player and the player wil heart.
  3. Offline


    - throw a snowball and generate an ocelot purr sound
    - throw a snowball at a player death 1 heart worth of damage
  4. Offline


  5. Offline

    Famous Guy

  6. Offline


  7. Offline


  8. Offline

    Famous Guy


    Zarko Do you have to have the permissions if you're OP? Because it isn't working for me.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 5, 2016
  9. Offline


    on my test server it seems to work fine for the ops
  10. Offline

    Famous Guy

    12:42:17 [SEVERE] Could not load 'plugins/OcelotSnowBall.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/zarko/OcelotSnowball/Main : Unsupported major.minor version 51.0
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugins(CraftServer.java:241)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.reload(CraftServer.java:613)
        at org.bukkit.Bukkit.reload(Bukkit.java:277)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchCommand(CraftServer.java:528)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchServerCommand(CraftServer.java:515)
        at net.minecraft.server.v1_6_R3.DedicatedServer.as(DedicatedServer.java:263)
        at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:228)
        at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
        at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
        at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    Caused by: java.lang.UnsupportedClassVersionError: me/zarko/OcelotSnowball/Main : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:249)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
        ... 14 more
  11. Offline


    Server version?
  12. Offline

    Famous Guy

    1.6.2 I think let me update
  13. Online

    timtower Administrator Administrator Moderator

    Think he was talking about java, you are probably running java 6 while compiled with java 7
  14. Offline

    Famous Guy

    13:08:13 [INFO] This server is running CraftBukkit version git-Bukkit-1.6.4-R2.0-b2918jnks (MC: 1.6.4) (Implementing API version 1.6.4-R2.0)
    13:08:13 [SEVERE] Could not load 'plugins/OcelotSnowBall.jar' in folder 'plugins'
    timtower Zarko http://prntscr.com/24u61u
  15. Offline


  16. Offline

    Famous Guy

    Hmm :s
  17. Offline

    Famous Guy

  18. Offline


    Just update java.
    I tested it as well, and I'm fully updated on Java. It works fine.
  19. Offline

    Famous Guy

    I tried it, It isn't what I wanted tho :( Zarko
  20. Offline


    What do you want then?
  21. Offline

    Famous Guy

    When you throw a ball at a player, it makes a ocelot pur and when it hits the player it makes a heart emotion thingy as if you were breeding animals :p
  22. Offline


    Hm, you could use packets and use happy_villager. There's a little library for that.
    Or, you can spawn a temp wolf that is happy at the players location.
  23. Offline


    You need to be more clear next time on what you want. Most people would think this means it takes away a heart.
    Kinda like
    *in old man voice*
    done me leg in!
    Would mean he has hurt it..
    L33m4n123 and Famous Guy like this.
  24. o.o

    Alternatively, just use in the ProjectileHitListener and EntityDamageListener,
    1. for(Player player : Bukkit.getOnlinePlayers())
    2. player.playSound(event.getEntity().getLocation(), Sound.CAT_PURR, 1, 1);

    You can play mob sounds without actually spawning the mob in o.o
    Commander9292 likes this.
  25. Offline


    It was exactly what you asked... anyway here is my code if anyone wants to continue with the villager effects:
    1. package me.zark:confused:celotSnowball;
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.Sound;
    5. import org.bukkit.World;
    6. import org.bukkit.entity.EntityType;
    7. import org.bukkit.entity.LivingEntity;
    8. import org.bukkit.entity.Player;
    9. import org.bukkit.event.EventHandler;
    10. import org.bukkit.event.Listener;
    11. import org.bukkit.event.entity.ProjectileHitEvent;
    12. import org.bukkit.plugin.java.JavaPlugin;
    13. import org.bukkit.potion.PotionEffect;
    14. import org.bukkit.potion.PotionEffectType;
    16. public class Main extends JavaPlugin implements Listener {
    17. @Override
    18. public void onEnable() {
    19. Bukkit.getServer().getPluginManager().registerEvents(this, this);
    20. }
    22. @EventHandler
    23. public void Snowball(ProjectileHitEvent event)
    24. {
    25. LivingEntity player = event.getEntity().getShooter();
    26. if (event.getEntity().getType() == EntityType.SNOWBALL) {
    27. World w = player.getWorld();
    29. if (((Player)player).hasPermission("OcelotSnowBall.Use"))
    30. {
    32. if (event.getEntityType() == EntityType.PLAYER);
    33. player.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 80, 1), true);
    34. w.playSound(player.getLocation(), Sound.CAT_PURR, 2, 1);
    35. }
    36. }
    37. }
    38. }
  26. Offline

    Famous Guy

  27. Offline


    Famous Guy
    I would help but I don't know how to spawn particle effects or anything like that.
  28. Offline

    Famous Guy

  29. Offline


    Again, I challenge you to do this :)
    This is a simple plugin that Im sure you could do.
    Famous Guy likes this.
  30. Offline


    I would like to try .. but no guarantees. If someone beats me to it before I complete then I'll give up.

    Uhm something to clarify ..

    Do you want the 'purr-ing' to happen even if the snowball missed anyone ?
    Do you want 'any' snowball to have the asked effects and sounds , named snowballs , or specific snowballs with special data values or meta values ?

    So far these is what I understood :
    - You require 'OcelotBall.Use' permission to have the effect .
    - You want the snowball to create a heart effects as if breeding animals when it hits players .
    - You want the snowball to play a 'purr-ing' sound when it hits players .

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 5, 2016
    Famous Guy likes this.

Share This Page