Jump to content
  • 0

Question

Posted

Hello friends, I have a problem about sending party to a fakeplayer, I am sending it and java recognizes the fake as target null "if (target == null)".
However, fake receives trade normally, and the trade uses the same party code, I will make available the party and trade code below.

 

I used the "+" to show where the code stops, identifying the target as nullo, however it should go to the end and send the invite to fake equal the trade.

 

RequestJoinParty.java (acis374)

  Reveal hidden contents

 

 

TradeRequest.java(acis 374)

  Reveal hidden contents

Text generated by google translate.

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
  On 10/8/2018 at 6:49 PM, N0K3 said:

Hello friends, I have a problem about sending party to a fakeplayer, I am sending it and java recognizes the fake as target null "if (target == null)".
However, fake receives trade normally, and the trade uses the same party code, I will make available the party and trade code below.

 

I used the "+" to show where the code stops, identifying the target as nullo, however it should go to the end and send the invite to fake equal the trade.

 

RequestJoinParty.java (acis374)

  Reveal hidden contents

 

 

TradeRequest.java(acis 374)

  Reveal hidden contents

Text generated by google translate.

Expand  

If you get an error in console the only "null" that can cause it is the getKnownType which might return a null list.

Check your getKnownType method to see why it return null list.

Edited by Kara`
  • 0
Posted
  On 10/8/2018 at 10:08 PM, Kara` said:

If you get an error in console the only "null" that can cause it is the getKnownType which might return a null list.

Check your getKnownType method to see why it return null list.

Expand  

It returns the message that is intended "requestor.sendMessage (" This is incorrect target or is in refusal mode. "); however, I'd like it to go to the end of the code and send the party invite, I do not get null on the console.

  • 0
Posted

My politic is to avoid null when I can, getKnownType / getKnownTypeInRadius never show null. The list is at best a static List or a new ArrayList, but in the end there is a List, so any action on this List is ok. An iteration on it, without any check, is fully ok.

 

The idea is more about if a Fake player is supposed to be a Player or if there is a specific instance for it (ake, if it's a FakePlayer, you have to check this instance type).

 

You got a specific admin command to check your current knownlist and associated types around you, //knownlist, for that purpose.

 

mv2jv7.jpg

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