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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...