Jump to content
  • 0

Help with 2 code checks


Question

Posted (edited)

Hello!
I added to my pack a multiservice NPC:

 

It allows to player to change his baseclass w.o cheking if he already have that class as a subclass, so this happens:

 

https://imgur.com/a/iYzQw
How can I fix it?

Edited by tiguz

1 answer to this question

Recommended Posts

  • 0
Posted

I tried something like this:
 

			else if (newClass.equals(player.getBaseClass()))
		{
			player.sendMessage("You already have that Baseclass! Choose a new one.");
			return false;
			
		}	
			else if (newClass.equals(player.getSubClasses().values()))
		{
			player.sendMessage("Delete your Subclass first!");
			return false;

 

 

But this is not working. Any help?

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


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock