#Buenny Help Chat

1 messages · Page 1 of 1 (latest)

sullen harness
#

ok

fiery wasp
#

🤡

dire obsidian
#

bruv

#

@cloud roost

cloud roost
#

what now

sullen harness
#

so

#

your player 1 var is the null right?

#

we established this

cloud roost
#

uhh i don't remember the error message but i think yes

sullen harness
#

could you dm me the class if you don’t want it to be in the open?

#

it’s just… hard without more code

cloud roost
#

i don't trust nobody

sullen harness
#

honestly - i have no need for your code. if the plugin exists why would i copy it

cloud roost
#

can you just tell me what the possibilites are of why this is happening and then we can eliminate them one by one until we find what it is

dire obsidian
sullen harness
#

ok

#

so

dire obsidian
#

no one will steal your code

sullen harness
#

you are calling the method that uses the player1 field before it is assigned

cloud roost
#

i defined it before tho

#

and the method that sets it is before the usage

sullen harness
#

public void gamerulesGetPlayer(Player player2) {
player1 = player2;

#

so this is ur code right?

cloud roost
#

it was that

#

now it's this

    public void gamerulesOpenInvAndSetPlayerVariable(Player player2) {
        player1 = player2;
        player2.openInventory(this.getInventory());
        System.out.println("banana " + player1);
        System.out.println("banana2 " + player2);
    }```
#

i tried changing it up to see if i can fix it

#

also it doesn't print out anything

sullen harness
#

hmm

cloud roost
#

so maybe it's never called?

sullen harness
#

which ide do you use

cloud roost
#

IntelliJ

sullen harness
#

ok so the method name

#

is it grey

#

or like yellow

cloud roost
#

nop, it's used

sullen harness
#

k

cloud roost
#

i guess that's one option eliminated

#

what's next

sullen harness
#

where do you call the method

cloud roost
#

command class

sullen harness
#

hmm is there if statements that could lead to it not being called

cloud roost
#

there are, but i realise that it's working since it's sending the error when i do the command

sullen harness
#

the null pointer error?

cloud roost
#

the open gui thing is inside the gamerulesOpenInvAndSetPlayerVariable

#

so it has to be run for it to send an error, which it is

sullen harness
cloud roost
#

yes

sullen harness
#

ok

cloud roost
#

there's only 1 error

sullen harness
#

maybe try player1 = Bukkit.getPlayerExact(player2.getUuid());

#

see if it causes the same error

cloud roost
sullen harness
#

i may have spelt it wrong

#

it’s the one that gets the uuid

cloud roost
#

fixed it

#

it says required type string and provided uuid

sullen harness
#

.toString()

cloud roost
#

lemme try this out 1 sec

fiery wasp
#

?learnjava

cloud roost
#

please leave

#

thanks

sullen harness
#

doesn’t work in threads

fiery wasp
#

rip

sullen harness
#

now you look like a fool

fiery wasp
cloud roost
#

anyways still doesn't sout and same error

sullen harness
#

what line does it error on

cloud roost
#

wdym

fiery wasp
#

this would be done in 5 minutes if u sent code

spice cairn
fiery wasp
#

lolololol

spice cairn
#

bingie just leave it to him

#

It's funny to watch

fiery wasp
#

ye lol ill still watch

#

cause its funny

cloud roost
#

do you guys exist just to make fun of people and be toxic

fiery wasp
#

yes

cloud roost
#

yeah ok that makes sense

fiery wasp
#

thats exactly it actually

spice cairn
#

tbh im not making fun of you

#

YOU are making fun of yourself by that

cloud roost
#

logic

spice cairn
#

and ive been doing that for a month, so i know pretty good

#

bye, leaving da thread

cloud roost
#

i removed the parts where it checks for gamerules then does stuff and it works now, just without the items i need

#

also it does sout now, and it says that 1 is null and 2 is correct

#

like player1 and player2

#

k i fixed it