Jump to content
Dally

Improved Teleport System using Enums

Recommended Posts

I haven't done much lately so I made this small system using enums. I've made other systems in the past but not as good as this one. This can be useful for the most part to some users and I have tested it.

Teleports.java

Please login or register to see this code.

To use, replace the bold and underlined areas in this code with Teleports.Modern.LUMBRIDGE or whatever city name.

Please login or register to see this code.

 


 
 

        

 

Share this post


Link to post
Share on other sites

This isn't a teleport 'System'. This is teleport data.

Share this post


Link to post
Share on other sites

This isn't a teleport 'System'. This is teleport data.

Actually, it teleports, so it's not just data. But this code is broken. It teleports in the constructor of an enum, it uses a static field for the player. Those are nono.

Edited by Arix

Share this post


Link to post
Share on other sites

Actually, it teleports, so it's not just data. But this code is broken. It teleports in the constructor of an enum, it uses a static field for the player. Those are nono.

I am not saying it doesn't 'teleport'. I am just saying it's teleport data. The code is horrible though. It makes no sense

Share this post


Link to post
Share on other sites

I am not saying it doesn't 'teleport'. I am just saying it's teleport data. The code is horrible though. It makes no sense

True enough.

Share this post


Link to post
Share on other sites

Horrible.

 

You should learn about the definition of static cus its clear that you improperly use it.

Regardless, it's not even a proper teleportation system, probably top basic stuff, I wouldn't recommend anyone using it but up to you.

If you're looking to improve, yet again, you should maybe take some java courses online to avoid those mistakes.

Share this post


Link to post
Share on other sites
On 12/14/2016 at 10:49 AM, Tyrantito said:

Horrible.

 

You should learn about the definition of static cus its clear that you improperly use it.

Regardless, it's not even a proper teleportation system, probably top basic stuff, I wouldn't recommend anyone using it but up to you.

If you're looking to improve, yet again, you should maybe take some java courses online to avoid those mistakes.

 

Just looking at this now.

I don't work with this no longer except for designing functioning login screens implementing gfx into code. I don't need java courses, as ive improved quite a lot since. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×