Inactive [FUN] GolfCraft v1.5.3 - Play golf with a bow and golf(snow)balls! [1.2.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Musaddict, Apr 11, 2012.

  1. Offline

    norsac321

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Suggestion:Automaticly teleport to were ever the Ball landed. Because I have a survival server that runs this plugin but no one likes having to try and find there Ball, Let alone walking to it. So please make it so that it teleports people to were there ball landed.
  2. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Instead I was planning on having monsters despawn when they walk on green or lime wool (configurable). The point of this plugin is to walk and experience golf courses. If you'd like them to teleport, you can just give them the "golf.tp" permission, and they will be able to use "/golf tp". Simple enough :)
  3. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ok. I'm not at home at the moment, so I wont be able to release 1.3.1 until later tonight. I plan to add a configuration, fix the hazard scoring, and **maybe** add a /golf drop command (take a drop).

    I had an epiphany this morning on how to manage different clubs, but it will take me a while to prove my theory and work it out. I will let everyone know if my planned theory works, and hopefully release something on Saturday (I'm pretty swamped for today and tomorrow).


    Edit: I was thinking of making water hazards +1 penalty, and lava +2 penalty. Do you agree with this? Or would you rather keep lava +1 penalty?


    To answer your questions, spaces are not supported in hole names (but underscores are), I plan to incorporate signs to begin each hole as an alternative, and GolfCraft is multi-world compatible! You can have "Hole1" on world, and "Hole1" on GolfWorld, ergo you can have the same named hole multiple times, once on each world. In order to start a hole on a different world, you must first be in that world, otherwise "/golf start" will give you an error, or port you to a hole with that name on your world if it exists.

    This post has been edited 3 times. It was last edited by Musaddict Apr 13, 2012.
  4. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've seen the console get spammed with this often, but it doesnt seem to affect anything:

    2012-04-12 20:36:59 [SEVERE] Could not pass event ProjectileLaunchEvent to Golfcraft
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileLaunchEvent(CraftEventFactory.java:504)
    at net.minecraft.server.World.addEntity(World.java:897)
    at net.minecraft.server.World.addEntity(World.java:864)
    at net.minecraft.server.PathfinderGoalArrowAttack.f(PathfinderGoalArrowAttack.java:80)
    at net.minecraft.server.PathfinderGoalArrowAttack.e(PathfinderGoalArrowAttack.java:69)
    at net.minecraft.server.PathfinderGoalSelector.a(SourceFile:55)
    at net.minecraft.server.EntityLiving.z_(EntityLiving.java:1229)
    at net.minecraft.server.EntityLiving.e(EntityLiving.java:1109)
    at net.minecraft.server.EntityMonster.e(EntityMonster.java:21)
    at net.minecraft.server.EntitySkeleton.e(EntitySkeleton.java:67)
    at net.minecraft.server.EntityLiving.F_(EntityLiving.java:447)
    at net.minecraft.server.EntityMonster.F_(EntityMonster.java:25)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1264)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1246)
    at net.minecraft.server.World.tickEntities(World.java:1153)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:542)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NullPointerException
    at musaddict.golfcraft.GcEntityListener.onProjectileLaunch_Func(GcEntityListener.java:73)
    at musaddict.golfcraft.GcEntityListener.onProjectileLaunch(GcEntityListener.java:37)
    at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 21 more
  5. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hazard penalty should stay at +1 for both lava and water.

    Looking forward to seeing the updates.
  6. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah, looks like I forgot to account for the fact that skeletons aren't players :p will be fixed in the next update.
  7. Offline

    Niff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    So, awesome plugin, I love golf and would love to try this out, but I have a question: is there any way you could set up an option to require someone to be within 50 or so tiles of the hole they want to start (or some other way to allow people to start golfing without needing a teleport)? I run a PVP server that this would still be fun to have, but I can't have people running around teleporting to various holes to avoid being attacked.

    -Niff
  8. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I will be adding sign-selecting capabilities so that players can right click them to start that hole. That wont be till 1.4.0, which will probably be released saturday night. Tonight, im releasing 1.3.1, which contains some minor additions.
  9. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Updated to 1.3.1 :) fixed hazards and their penalty points, added configuration with a few options, included distance of shots in broadcast messages, and fixed some aesthetic errors.

    This post has been edited 1 time. It was last edited by Musaddict Apr 13, 2012.
  10. Offline

    jvps3

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Nice plug-in.

    Been running it on a server I play on, and it's really fun. I'd also like to request a drop function. One of the holes on the server I play on is pretty high up and if someone misses the shot, they have to walk all the way back down. We'd rather this be a penalty for missing the green anyways. Maybe have a third item spawn with the player, and right clicking it would drop the ball at your previous ball location.

    This post has been edited 2 times. It was last edited by jvps3 Apr 13, 2012.
  11. Offline

    orange451

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Your video doesn't keep score accurately. I don't know if it's been fixed yet, but a water hazard is one in, two out (and you're supposed to drop along/near the bank on a line form where it went in, to where you initially hit it, unless you're hitting from the tee box).
    :)

    This post has been edited 1 time. It was last edited by orange451 Apr 13, 2012.
  12. Offline

    liralmogadi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey, Like I requested before, Please add the feature to add regions. I don't want this getting out of hand and going everywhere around my server, that would simply be annoying. I need the most basic region possible, please, and I'll get this plugin =]
  13. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If a ball is found in a water hazard or if it is known or virtually certain that a ball that has not been found is in the water hazard (whether the ball lies in water or not), the player may under penalty of one stroke:
    a. Proceed under the stroke and distance provision of Rule 27-1 by playing a ball as nearly as possible at the spot from which the original ball was last played (see Rule 20-5); or
    b. Drop a ball behind the water hazard, keeping the point at which the original ball last crossed the margin of the water hazard directly between the hole and the spot on which the ball is dropped, with no limit to how far behind the water hazard the ball may be dropped; or
    c. As additional options available only if the ball last crossed the margin of a lateral water hazard, drop a ball outside the water hazard within two club-lengths of and not nearer the hole than (i) the point where the original ball last crossed the margin of the water hazard or (ii) a point on the opposite margin of the water hazard equidistant from the hole.


    The penalty looks like 1 in, and 1 to drop.
  14. Offline

    orange451

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    regardless, there is no penalty in the plugin :p!
    Thank you for the info however.
  15. Offline

    Niff

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Ah, that would work just as well, since they have to be at one of the holes to teleport then.

    thanks :D
  16. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    awesome job
    Just grabbed 1.3.1 and I'll let you know what I find.
  17. Offline

    orange451

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You've inspired me to try to make a golf plugin :)
  18. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've made holes savable locations. The only way you can generate signs is if you're playing a hole. Once you're done golfing, or the server reloads, all of the signs magically disappear :) Keep in mind that each player can only have 1 sign at a time. They cant spam new signs.

    1.3.1 fixes the hazard scoring. Im going to be working on a "take a drop" command soon, but for now, the player stays where he last shot the ball.

    This post has been edited 3 times. It was last edited by Musaddict Apr 13, 2012.
  19. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Turns out I'm free today. I'll be working on 1.4.0 (Signs to begin holes as an alternative to teleporting to each hole, different clubs (still theoretical)).

    Edit: I have proven my theory :) so 1.4.0 WILL include clubs. If you dont want clubs, you will be able to disable them in the config.

    Edit 2: would anyone be so kind as to give me a list of basic clubs, and their estimated velocity variances? I'm having a hard time really finding anything online. While I wait for an answer, I'll begin working on signs starting holes.

    This post has been edited 2 times. It was last edited by Musaddict Apr 13, 2012.
  20. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The rules of golf allow for a maximum of 14 clubs.
    Not everyone actually carries 14 clubs around, but that is the most you can have.



    The Clubs listed are longest hitting to shortest hitting.

    The ones I carry are:

    Driver ( 1 wood )
    Longest hitting club in the bag. Used off the tee. Very seldom used on the fairway unless your lie is perfect.

    3 wood : Used for very long shots from the fairway. Sometimes used off the tee.
    5 wood : Used for long shots on the fairway. its also a good utility club from the rough as long as your ball has a good lie.


    4 iron : Long shot club that goes about as far as a 5 wood, but used if your lie is bad ( rough )
    5 Iron :
    6 Iron :
    7 Iron :
    8 Iron :
    9 Iron :

    Pitching Wedge: Used for chipping onto the green ( when very close ) and getting out of sand traps.

    Sand wedge : used for getting out of a trap. Goes almost as far as a pitching wedge

    Putter: Used only on the green

    As far as giving a velocity goes, it's a little tricky.
    Theoretically, every time you swing a club it should be the same speed. The club length, and angle of the striking surface ( loft ) determine how far the ball will actually go.


    I think the best thing to do in the GolfCraft world would be to evenly stagger the arrow velocitys ( giving the driver the highest and putter the lowest.

    arrow distance is always going to be a changing variable since we can modify our clubs ' loft' by the angle in which we aim the bow.

    On a side note, looks like im going to have to build a practice range now to get a feel of how far each club will go. and then I'll have to hit the course and place some 200 150 and 100 yard markers.

    EDIT:
    I found a nice chart here:
    http://www.vaughns-1-pagers.com/sports/golf-club-data.htm

    This post has been edited 1 time. It was last edited by jeffro1001 Apr 13, 2012.
  21. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awesome thanks :)
  22. Offline

    orange451

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    What you could always do, is check when a player fires an arrow, and only use the Yaw of the camera for the Vector of the arrow. You can then completely change the y-vector of the Arrow depending on the loft of the "club" :)
  23. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That is an interesting idea.

    Keep in mind that clubhead speed ( arrow velocity ) will be lower though as you progress through the clubs.
    A driver will have a faster club head speed than your wedge will have, with the same swing, since the club length is different.
    It wouldn't be a good idea to have your pitching wedge shoot the arrow as fast as your driver does.

    Also, we should definitely keep the ability to 'hit softly' by having the club selection set only the maximum velocity the arrow will go with a fully charged bow.

    I don't want to lose the ability to do ' tap shots '

    This post has been edited 1 time. It was last edited by jeffro1001 Apr 13, 2012.
  24. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I agree, plus I only discovered changing velocities by accident :p I dont really know much about vectors and such.

    On a side note, play-signs are up to par (no pun intended). I made sure that players cant spam chat with "<player> has begun <hole>", instead it just sends the player "You have restarted <hole>." Due to the mechanics of everything, I had to reorganize permissions.

    Code:
    golf.play - allows players to use play signs, and enter golf mode
     
    golf.tp.play - allows players to use "/golf play [hole]" (teleport to the hole)
     
    golf.tp.sign - allows players to TP to their ball
     
    golf.tp.sign.others - allows players to TP other players to their ball
    I then added a new one for creating and destroying play signs "golf.sign". Keep in mind that play signs still teleport the player, so you can place them at spawn, or on the teeing ground, and they will be ported to the exact starting block.

    Now to work on clubs :)

    This post has been edited 2 times. It was last edited by Musaddict Apr 13, 2012.
  25. Offline

    jeffro1001

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I just had an idea, but I have no idea if it's even possible.

    It is possible to change the projectile type to a snowball while in golf mode?

    Meaning it would behave just like an arrow, but have the sprite of a snowball.
  26. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I thought of this too, but have no idea how. I can ask my friend if he knows. I think that you can, but it's quite the work-around.
  27. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @jeffro1001 i got clubs to work, but it seems that if I use the exact estimates from that chart you gave me, then arrows from 1 wood - 7 iron at full strength despawn before they hit the ground (not registering a hit). I know for sure that arrows can be launhed 135m and still register a hit. You want me to set the driver to that and move the other speed accordingly?

    This post has been edited 1 time. It was last edited by Musaddict Apr 14, 2012.
  28. Offline

    Freakdk

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Musaddict

    If you make so that everything is configurable, like how much decrease / boost in power the bow would get when ladning on the fairway, rough, sand-trap and from the tee-spot, it would be REALLY awesome.

    As it is now, you would have to create gigantic golf courses if you wanted players to be unable just to "cheat" and shoot the arrow over mountains and stuff. I would really love you for adding this, because if you don't I'll the course will be way too big for players to walk to distance, if I wanted it to feel like real golf where you follow a specific "line".

    I hope you get what I mean, not natively english speaking ;)
  29. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm in the middle of upgrading the speed boost system. The overall speed of the ball will be configurable in the next update :)
  30. Offline

    Musaddict

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I think I fully understand what you're sayin' now. Do you mean the pitch? Cause I try setting the pitch of the arrows and it's not working. Mind if you take a look at this thread I posted, see if you can spot the issue?

    http://forums.bukkit.org/threads/setting-the-pitch-of-an-arrow.70513/#post-1073217

Share This Page