Jump to content

Zer0HD2

Members
  • Posts

    127
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    UK

Zer0HD2's Achievements

Creeper Killer

Creeper Killer (4/8)

8

Reputation

  1. Still no luck on this - anyone got any ideas on how to do it?
  2. For some reason I can't change the syntax highlighting of the gist, it keeps reverting to plaintext. No idea what's going on there.
  3. The fields I posted in my first reply return integer values for the bottom and right edges.
  4. Can you show some code first? :L
  5. Right, sorry it's taken so long for me to respond to this, been busy at work. Anyway, here is the code for my PlayerTickEvent: Gist: https://gist.github.com/Zer0HD/9c2b3a54a8e6b61b2d07
  6. You want to get the X position relative to the centre of the screen, and the Y position relative to the bottom. That way it doesn't mess up when you resize the window. You can do this using event.resolution.getScaledHeight() and event.resolution.getScaledWidth(). The Y position of the top-left corner of the health bar region is 91 pixels to the left of the centre of the screen, the X position is around 40 pixels up from the bottom.
  7. Are all the other attributes working correctly? And you did @Override the method, right?
  8. This. Also, sorry, didn't realise people had replied to this - I'll post source code (both in a spoiler and in a gist ) when I get home from work.
  9. Anyone have any idea how to do this, or an alternate method of doing it?
  10. Ah, that'll be pretty useful. I'll take a look at pulling class names from that for each field/function.
  11. Editing fields and functions is done. There's a little edit link on the right hand side of the row for each entry now.
  12. Search function is working (need to sort out searching within a category, but that can wait). Working on deleting and editing entries now.
  13. Yep, that's one thing I noticed - I'll be getting that sorted as soon as I finish the search function.
  14. Is there any event in 1.7.2 which allows you to execute code when the player switches what item they're holding? I'm trying to create a system whereby a player needs to meet certain requirements to use certain items/tools. So far I've been using PlayerTickEvent, and using dropOneItem() to make the player drop the item, and give them a chat message, but they receive the message ~5 times and drop the previous item they were holding too.
  15. The PHP script for grabbing new entries from the CSV file is done, and I've run it manually once to populate the database. I'll set up the cron job to run once every few hours. I'll be making the search function today as well, since there are no categories in the CSV file, so I've had to drop everything into an "undefined" category.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.