Jump to content

myPlayer().getName().equals("Bla Bla")


Recommended Posts

Posted

好了,所以当我做了以下内容:

myPlayer()的getName()。等于(“喇嘛喇嘛”)

它不能识别的名字,但是当我做任何其他的名字没有名称内部空间等;

myPlayer()的getName()。等于(“布拉布拉”)

它的工作原理,任何想法是什么样的巫术是什么?

If you solve this problem. You can paste a solution, to help other people, including me

Posted (edited)

Actually, I did some debugging myself for fun and I figured out that some names do have normal spaces, or more likely, they don't seem to be non-breaking spaces.

 

[INFO][Bot #1][03/30 09:45:02 AM]: Player : Lil Slurp = Lil Slurp
[INFO][Bot #1][03/30 09:45:02 AM]: Player : king ammar x = king ammar x
[INFO][Bot #1][03/30 09:45:02 AM]: Player : 66�Atlas�998 = 66�Atlas�998
[INFO][Bot #1][03/30 09:45:02 AM]: Player : Item�Robber = Item�Robber
Something is different, no clue what.

EDIT:

Alright.

Itz�PRADA Itz PRADA
[INFO][Bot #1][03/30 10:01:06 AM]: Player : Stanklin Stanklin
[INFO][Bot #1][03/30 10:01:06 AM]: Player : EpezuWnBnoob EpezuWnBnoob
[INFO][Bot #1][03/30 10:01:06 AM]: Player : NatusVincere NatusVincere
[INFO][Bot #1][03/30 10:01:06 AM]: Player : JollyJJoker JollyJJoker
[INFO][Bot #1][03/30 10:01:06 AM]: Player : Kitten_Dance Kitten_Dance
[INFO][Bot #1][03/30 10:01:06 AM]: Player : king ammar x king ammar x
[INFO][Bot #1][03/30 10:01:06 AM]: Player : Inneva Inneva
[INFO][Bot #1][03/30 10:01:06 AM]: Player : Erza Kagura Erza Kagura
[INFO][Bot #1][03/30 10:01:06 AM]: Player : SG Editz SG Editz
[INFO][Bot #1][03/30 10:01:06 AM]: Player : Lil Slurp Lil Slurp
[INFO][Bot #1][03/30 10:01:06 AM]: Player : mag3king6424 mag3king6424
[INFO][Bot #1][03/30 10:01:06 AM]: Player : 39�Bork�Roc 39 Bork Roc
[INFO][Bot #1][03/30 10:01:06 AM]: Player : 54ancient428 54ancient428
Done with the following code

for (Player player : ctx.players.getAll()) {
            if (player != null) {
                String orginal_name = player.getName().replaceAll("\\u00A0", " ");
                ctx.log("Player : " + player.getName() + " " + orginal_name);

            }

        }
\\u00A0
Good luck. Edited by Psvxe
Posted

Actually, I did some debugging myself for fun and I figured out that some names do have normal spaces, or more likely, they don't seem to be non-breaking spaces.

 

[INFO][Bot #1][03/30 09:45:02 AM]: Player : Lil Slurp = Lil Slurp
[INFO][Bot #1][03/30 09:45:02 AM]: Player : king ammar x = king ammar x
[INFO][Bot #1][03/30 09:45:02 AM]: Player : 66�Atlas�998 = 66�Atlas�998
[INFO][Bot #1][03/30 09:45:02 AM]: Player : Item�Robber = Item�Robber
Something is different, no clue what.

 

 

Print the bytes

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...