Golfcraft
GlfCraft
Version 1.6.0
CB 1.6.2-R0.1
Golfcraft lets you play golf! Simply type /golf, and you will be given a bow and arrow. You can hit (shoot) the ball (arrow), and it will generate a sign where it lands (unless you hit the ball into the water, or the trees).
There are anti-griefing parameters in place, so each golfer needs to destroy their own sign before their arrow will generate a new sign.
Materials of recognition:
- Green Wool: the Fairway (main material)
- Lime Wool: the Green (putting material)
- Sand: Sand Trap (stops balls from bouncing)
- Glowstone: the Cup
- Grass: the Rough (reduces ball's bounce velocity)
- Fence: the Flag
- Wood: Teeing Ground ( start of the course, gives your driver a boost)
Features:
- Clubs!
- Up to 12 clubs to chose from
- Each club has its own advantage
- Snowballs!
- Arrows are converted to snowballs when you shoot!
- Create a golf course by adding holes
- Creating holes set their par
- The par is used for per-hole scoring
- Per-hole golf-info chat channels
- Any players in the same hole will know what happens with the other players
- If the ball landed on a valid block, a sign with the player's name is placed, marking where the ball landed
- This sign MUST be destroyed in order for another sign to generate
- Once destroyed, the player cannot move more than one block away until their next ball lands in a valid location
- Per hole scoring
- Uses that hole's par to compare how many hits the player took.
- Prints the score via number of hits, as well as golf lingo (Bogie, Eagle, etc)
- SuperPerms
- Plenty of anti-griefing parameters
- I try my best to make sure players arent spammed with text or signs. I've spent most of my time coding making sure they cant.
Permissions: (overridden by OP's)
- golf.spectate
- (allows the player to simulate golf (no scoring, or messages))
- golf.play
- (allows the player to play golf use hole-start signs)
- golf.tp.play
- (allows the player to TP to a hole via command)
- golf.tp.sign
- (allows the player to teleport to their sign)
- golf.tp.sign.others
- (allows the player to teleport other players to their sign)
- golf.create
- (allows the player to create new holes)
- golf.sign
- (allows the player to create/destroy hole-start signs)
- golf.ref
- (allows the player to destroy other players' signs)
Source Code is currently Unavailable
Anything happening to this plugin anymore? There are a lot of open tickets...
@FeedDante: OK, will start entering bug reports to you :)
@Etsija
@carbine781
I'm not 'developing' this plugin per se. I know there are a few command that need adding but I haven't bothered to make them yet. My primary goal is just maintenance. To eliminate show-stopping bugs. (I'll add commands and simple things [like config options] and fix bugs, but I'm not going to develop complex new features.)
If you have a specific bug, please please please make a ticket for each bug.
Players using the hole of another course to win? (bug) ticket.
Don't want it bouncing when putting? (feature request) ticket.
Please also include steps to reproduce the bug you report. I only play 'golf' with this plugin in-so-far-as I just test it to make sure it works. I need to know how to reproduce the bug in order to know how to fix it.
The plugin has a great idea, but needs a lot of polishing. One of the most annoying bugs is screwing things up when more than 1 player are on the course. We've tested a few hours now, and I have been left in a "limbo" 5 times already, meaning I can hit the sign where the ball landed, it won't let me move without taking my next swing, the plugin even lets me choose the club -> but it won't let me take the next swing. It's just like it thinks "the bow's there but no arrows".
The only way to overcome this is to stop playing the hole with /golf. This works, but as I said, is annoying.
GREAT PLUGIN, BUT STILL NEEDS MORE COMMANDS. This plugin is awesome. i love it, and i think it can become amazing. however, there are many faults that still need to be dealt with. Let me just list them for you.
@WOLF81au
Wow, I can't believe that was left out. I'll see if I can get a version up later to day that has that but it's unlikely. (I'm moving Sunday and probably wont have a fixed version till next week)
In the mean time you could manually alter the holes.xml file (when the server is off) to remove the course/hole.
One issue I find needs to be added, I can't seem to remove/delete a course. I created one and had made a mistake and now I cant remove it. Also Not sure if it was cause I am op, but the tee off point does not set me back. I can walk straight up to the hole and put the ball in and get a hole in one
Can another upload an World for this plugin???? I have no time to build an course!! PLS? =D
Hello!! I'm a golfer and I work in holidays as a greenkeeper, and your plugin is realistic! But I've got an idea. Can you implent Handicaps? Naturally, we had to change the signs of the holes, and add infos about the normal hitrates for an middle hcp... It's just an suggestion. And i've got a problem on my server, we use Moarrows and it's not funny when a player shots with teleports/ tnt arrows on the hole.. Can you make a bridge to Moarrows to deny any arrowtypes when playing golf?
@avondale1718
Alright, checked the plugin.yml. It is in fact missing the soft-depend line so the fact that it is unloading in the correct order is just coincidence.
Until I can get a fix out you can add this part yourself:
Just open the jar (with 7z or something) and alter plugin.yml and add the line:
That should fix the load order problem. (I honestly thought this was there. I wonder how it got left out.)
@FeedDante
I'm using multiverse. I just stopped the server and looked at the log, and GC unloaded before MV. However, it loads GC before MV when I start it back up, so I'm assuming that's the issue. The worlds aren't loaded when it loads the holes so it can't find them. Do you know of an easy way to change the load order in bukkit?
@avondale1718
What plugin do you use for multiple worlds [MW]? I'm thinking the MW plugin might be unloading (and taking the worlds with it) before GC saves and unloads. (When shutting the server down)
If you able to create holes on those other worlds and restart the GC plugin (not the server) and have the holes file save and load successfully then that would lend further evidence to my theory.
@FeedDante
I was able to fix this problem by downloading plugman and reloading the plugin after the server started. I don't know if that helps you diagnose the error or not, but I figured I'd let you/everyone else know.
@FeedDante
server runs on windows, so yeah, probably not that one.
@avondale1718
I highly doubt that's it. It's been (as far as I know) designed to handle multiple worlds. It might have something to do with the GolfCraft/Golfcraft case problem, but not if you're on windows. I know the plugin uses a bunch of hashmaps and the most likely problem is that one of them is null for some reason.
I know I said I'd do stuff and between what I've found in the comments and what's in the ticket section, I've got a pretty good idea of where to look and what to fix. I've just been sick and haven't felt like doing much.
@FeedDante
I was curious if my issues could be because I'm trying to run multiple worlds simultaneously. Could this be a possibility?
I am having the same problem and I believe that it has something to do with an error in the case of the plug-in folder name. Apparently the hole.xml and config file is put in a folder called "Golfcraft", but the plug-in is looking for them in a folder called "GolfCraft", which is the name of the jar file. The log generates the following error message on restart: "While loading Golfcraft (plugins/GolfCraft.jar) found old-data folder: plugins/GolfCraft next to the new one: plugins/Golfcraft". Hopefully this will give you a clue as to how to fix this problem?
@FeedDante
here's the error. I completely deleted the plugin and reinstalled. Then I went into a course and created a hole, which worked, then restarted the server. Attempting to play the hole yields the message in the format "[hole] doesn't exist in world: [world]". I get the error when I try to make the hole again.
20:18:26 [INFO] [Golfcraft] Saving 2 holes... 20:18:26 [SEVERE] [Golfcraft] Unknown error saving Holes. 20:18:26 [SEVERE] java.lang.NullPointerException 20:18:26 [SEVERE] at musaddict.golfcraft.GcFiles.save(GcFiles.java:154) 20:18:26 [SEVERE] at musaddict.golfcraft.GcCommands.onCommand(GcCommands.j ava:288) 20:18:26 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginComman d.java:40) 20:18:26 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo mmandMap.java:166) 20:18:26 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(Cr aftServer.java:473) 20:18:26 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(N etServerHandler.java:821) 20:18:26 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerH andler.java:781) 20:18:26 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand ler.java:764) 20:18:26 [SEVERE] at net.minecraft.server.Packet3Chat.handle(Packet3Chat.j ava:34) 20:18:26 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager. java:229) 20:18:26 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand ler.java:113) 20:18:26 [SEVERE] at net.minecraft.server.NetworkListenThread.a(NetworkLis tenThread.java:78) 20:18:26 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServe r.java:551) 20:18:26 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer ver.java:449) 20:18:26 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour ceFile:492)
@avondale1718
@DailyTroll
I'm not sure what's going on but "java.io.UnixFileSystem.createFileExclusively(Native Method)" seems a very interesting error that I've never seen before.
I don't know if you (avondale1718) have the same issue though as in your case I thinks it's a problem loading maybe?
I'll see if I can get the current code from Jase and do some local testing on my linux machines.
(My best guess right now is a permission (filesystem, not Bukkit) issue.)
@DailyTroll
I'm currently having the same issue. The holes stay in the xml file but they won't read in-game. You can re-make the holes but it won't realize it's already there and it will say that it saved one more than it has but it won't actually do it.
I hope there's a fix for this, it's a pain re-labeling the holes since I have 3 courses.