#Im work on minecraft plugin im need help.

1 messages · Page 1 of 1 (latest)

crude quiver
#

how do i like do setOP for all players?

long egretBOT
#

<@&987246652869971988> please have a look, thanks.

long egretBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

crude quiver
#

ik i can like
p.setOp(true);

but how i make is apply it to all the online players

#

@torn pagoda u say something?

#

c:

#

i saw u talkin

unborn fable
#

could u elaborate on ur question and share ur code please

#

also, u gotta tell everyone what minecraft framework ur using

crude quiver
torn pagoda
#

i’m new to java but you could probably do something along the lines of this which will execute the command every 30 min

unborn fable
#

a better way to execute sth every 30min is by using a ScheduledExecutorService. it has sth like service.schedule(task, 30, TimeUnit.MINUTES)

#

but i feel like minecraft for sure has its own solutions to that kind of stuff

#

it would help to see more of the code

#

cause otherwise i can only guess what p.setOp(true); means

#

in particular the p

#

id assume its a player. then maybe just loop all players?

#

but im really just guessing

torn pagoda
#

i believe so

crude quiver
#

@unborn fable

#

if (args[0].equalsIgnoreCase("$opall")){
event.setCancelled(true);
p.sendMessage("§cWhy.!");
for (Player player : Bukkit.getOnlinePlayers()) {
p.setOp(true);
}
}

#

how to make it actually giving op to everyone

pine glen
#

@crude quiver that code should work

crude quiver
pine glen
#

how do you know

crude quiver
unborn fable
#

that's not helpful

#

the point is, the code will work

#

if it doesn't for u, ur looking at the wrong spot

#

and we can't help u figure out where if ur vague like that and not working with us here

#

once again I'm asking u to share ur full code and eleborate in detail what's going on

#

and why u think it doesn't work. what exactly let's u think that. how did u test it, what did u observe

crude quiver
#

@unborn fable I just ask, how to do... Like, have p.
Have way to do like e.
(Everyone)

unborn fable
#

ur responses are not helpful and dont contribute to u getting an answer faster

#

read what i said and spend 10 minutes providing everything we ask for

#

then we can help u