#help-development

1 messages · Page 1763 of 1

quaint mantle
#

but instead of not generate it

#

they use a packet system to send wrong ores to the client

#

i think that is the most advanced system ngl

pastel stag
#

thats how every basic anti xray system works

tardy delta
#

is it possible to make sure every player who joins the server gets teleported to the end or the nether? I was thinking about an idea where the "lobby" is located in another dimension and when you click the npc you get teleported to your logout location in the overworld

pastel stag
#

isnt that how the classic orefuscator plugin worked back in the day

#

"orebfuscator"

quaint mantle
pastel stag
#

yup sure is i just checked

quaint mantle
#

lol...

pastel stag
#

that would be an even more basic anti xray

quaint mantle
#

hmm but maybe they did some more advanced improvements for that

pastel stag
#

thats more xray detection than anti-xray

pastel stag
#

i would say anti-xray stops it before it happens and xray detection tries to detect it as its happening and stop it

ivory sleet
#

Could probably use PlayerLoginEvent or the PlayerJoinEvent

quaint mantle
#

that is what anti means in the first place

pastel stag
#

some do it with light levels or look at how 'lucky' people are getting so like how many stone they mine per diamond they find type thing

#

but anti-xray has always basically obfuscated blocks to the client pretty sure

quaint mantle
#

my luck is really bad ngl

#

i've only encounter this everyday...

hybrid spoke
#

xray detection is mostly bullshit

#

i mean what if i am getting lucky and find 3 diamond ore sources

pastel stag
#

ore obfuscation can easily be got around by xray'ers by knowing the world seed

hybrid spoke
#

and then there is this xray detection

quaint mantle
pastel stag
#

if you have the world seed you know where the ore is regardless of what packets the server sends your client

hybrid spoke
#

have to wait 3 hours to mine my diamonds

quaint mantle
#

but wait, is oreobfuscator even work or even got updated in the past 3 years?

quaint mantle
pastel stag
#

it says 1.17 on the spigot page @quaint mantle

quaint mantle
quaint mantle
#

i thought the dev abandoned it

#

if i remember right they said it was 2012

#

they start in

pastel stag
#

i have not used it since like 1.4 or something but im sure it works the same as it did before

#

its very server resource intensive if i remember correctly tho

#

not sure if they ever improved the efficiency of it or not

soft dragon
#

Me who started the argument...

quaint mantle
#

wait is that you?

#

i only see that guy above say dont generate

#

so i start it

#

oh lel

soft dragon
#

🥲 yes its me

pastel stag
#

@soft dragon why do you change your discord name every 5 seconds

soft dragon
#

I cant change my nickname

#

and my name is still NotHappyMan

tardy delta
#

whats the difference between the PlayerChatEvent and the AsyncPlayerChatEvent?

#

is the normal one not able to catch all the messages?

viscid edge
#

I have a cannot find main class error

glossy venture
viscid edge
#

How to fix?

glossy venture
#

the sync one can be cancelled

#

but it halts the server thread

#

i think

tardy delta
#

yes

glossy venture
#

yeah

#

thats all

tardy delta
#

the async one also implements cancellable

glossy venture
#

really

#

oh

viscid edge
glossy venture
#

maybe it removes the message then

glossy venture
#

in a plugin?

tardy delta
#

it just blocks the message i guess

viscid edge
#

Yes

glossy venture
#

or application

#

ok

#

check if you put the full path to your class

#

and check if it extends JavaPlugin

viscid edge
glossy venture
#

you have to

#

i think that will fix it

viscid edge
#

Ok cool

viscid edge
glossy venture
#
src // source directory
 - main // source set
   - java // java source set
     - com // actual package start
       - example
         - test
           - Test.java extends JavaPlugin
``` if you have this, the full path will be `com.example.test.Test`
#

because src/main/java is the source set

#

and everything after that is your package

#

just seperate all the package folders by . and then add .<classname>

viscid edge
#

Thanks

glossy venture
#

np

quaint mantle
#

maybe consider using intelliji with minecraft development for it

#

it will create most of the necessary things for you

glossy venture
#

yeah

#

but still

#

it doesnt autofill class path

valid solstice
#
private static float getPitch(Player player, Location loc){
        Double distance = player.getLocation().distance(loc);

        int change_pitch_per_blocks = 1;

        if(distance>minimum_distance_trigger){
            //nothing
        }else{
            float i = 0;
            while((int)ceil(distance) < minimum_distance_trigger){
                i++ // the pitch
                distance+=change_pitch_per_blocks;
                player.sendMessage(Integer.toString((int)i));
                if((int)ceil(distance)>minimum_distance_trigger){
                    return i; //pitch
                }
            }
        }
        return 1.0F;
    }
``` Anybody know what may be the problem in this func? I'm working on something that plays a noteblock harp sound with a specific pitch representing how far a player is from a particular location. This function returns the specific pitch, but for some reason, it's just giving 2 pitches. One of the pitches is 1.0F
#

and minimum_distance_trigger is a integer equal to 16

pastel stag
#

i mean at that point you're talking about randomizing the word generator

drowsy helm
#

and the first if distance>minimum distance trigger seems wrong? that statement would make sense if it was a max distance trigger

quaint mantle
#

maybe he knows what he wants to do but he dont know what to do it...

pastel carbon
#

I made a plugin that sets a random spawn point on respawn event. But how would i also set the random spawn when the player first joins the server? I cant find an event for it

chrome beacon
#

PlayerJoinEvent? (Check is first join on player)

drowsy helm
#

does it matter if its their first join if you are resetting it each respawn?

valid solstice
#

minimum distance trigger = the required minimum distance for the pitch to start triggering/playing

drowsy helm
#

so is pitch 1:1 with distance?

#

i.e 1 block away = pitch 1, etc etc

valid solstice
#

yup

drowsy helm
#

so why not just return ceil(distance) as pitch?

#

and then an if statement to check if its in bounds

valid solstice
#

there's a max pitch right?

drowsy helm
#

I'd assume so

quasi flint
#

90

valid solstice
quasi flint
#

thunk so

valid solstice
#

i didnt realize this at first, i thought the ceil of distance might surpassc the max pitch

drowsy helm
#

or even Math.min(ceil(distance), minimum_distance_trigger);

#

would do the trick

valid solstice
#

thanks, would try

merry pulsar
#

hey, i made my scoreboard refresh every 20 ticks, but the problem is the scoreboard disappear and appear again. code:

        new BukkitRunnable(){
            @Override
            public void run() {

                for(Player player : Bukkit.getOnlinePlayers()){
                    board(player);
                }
            }
        }.runTaskTimer(this, 20, 20);
    }```
#

any fixes?

pastel stag
#

refreshing online players every second seems kinda over the top

merry pulsar
#

my hub server is 50gb so i see no problems of refreshing the scoreboard every 20 ticks..

pastel stag
#

just seems kinda overkill to refresh once a second thats all i was saying if you see a need to do that then whatever

drowsy helm
#

what is board();

pastel stag
#

not super familiar w/ scoreboards but before you edited it you were just creating it ever 20 ticks

drowsy helm
#

you just give us a generic runnable we cant tell anything from it

merry pulsar
#

public void board(Player player) {

drowsy helm
#

yes but can we see the code?

merry pulsar
#

the scoreboard isn't the problem

#

the problem is the runnable

#

imma just change it to 4 secs

pastel stag
#

hes asking to see the code for your method board()

merry pulsar
#

okie 1 sec

#

i can't send it

#

i dont have nitro

#

-393 words

drowsy helm
#

?paste

undone axleBOT
quaint mantle
#

maybe try to see how titlemanager reloads without flicking?

#

other board flicking while titlemanager not

merry pulsar
drowsy helm
#

you should cache your boards

#

instead of making a new one each time

merry pulsar
#

wdym

drowsy helm
#

like instead of having to make a new board each time the method is called, just store it as a variable somewhere instead

#

orelse that method is going to hog a lot of mem

tardy delta
#

but that variable isnt going to refresh the scoreboard?

drowsy helm
#

wdym?

tardy delta
#

ah

#

so just storing the scoreboard

#

and when you need just changing the scores?

drowsy helm
#

yeah

merry pulsar
#

wait uuh

#

if i used player.setScoreboard(player.getScoreboard()); will it work?

drowsy helm
#

i think it will

#

but sorta redundant

merry pulsar
#

i'll try it 1 sec

drowsy helm
#

just use a hashmap and use HashMap#getOrDefault()

tardy delta
#

is it possible to teleport the player to the nether or the end on join without showing that nether/end screen

eternal oxide
#

nether/end screen?

tardy delta
#

well the screen that shows un when loading the new world

merry pulsar
drowsy helm
#

can we see how you tried it

eternal oxide
quaint mantle
quasi flint
merry pulsar
quaint mantle
#

i remember having a argument with someone about that

#

that

tardy delta
quaint mantle
#

load screen

quaint mantle
#

let me find that again

drowsy helm
#

give it a try im not 100% sure, havent worked with scoreboards in a while

merry pulsar
quaint mantle
#

yeah this

quasi flint
#

i hate those suckers

quaint mantle
#

@tardy delta that reply above

tardy delta
#

ok

#

just trying something out

merry pulsar
#

player.getScoreboard().getScores()?

#

getscore*

cunning mortar
#

To all using scoreboards, use packet scoreboards. More easy to use, do not flicker in any way and really efficient.

tardy delta
#

hehe

private static final String[] COLOR_CODES = Arrays.stream(ChatColor.values())
            .map(Object::toString)
            .toArray(String[]::new);
eternal oxide
#

for an Enum use .name() over toString()

cunning mortar
#

That toString doesn't return the name of the enum, it returns the color code e.g. §7, so it's just fine.

glossy venture
#

no but i think they want to get the color code

eternal oxide
#

it would be oddly pointless to just have an array of color codes with no reference

#

the whole thing is wierd

cunning mortar
#

Yes, I would agree, but thats not the point here.

glossy venture
#

maybe hes trying to create a rainbow effect or something?

#

cycling through the colors

#

in that case it would be a much better method than manually entering everything

cunning mortar
#

Yea sure but the ChatColor enum isn't sorted like rainbow, am I right?

eternal oxide
#

correct

edgy drum
#

Why it is not working?

if (vaultHook != null) {
            format = format.replace("\\{prefix\\}",
                    vaultHook.getChat().getPlayerPrefix(player));
            format = format.replace("\\{suffix\\}",
                    vaultHook.getChat().getPlayerSuffix(player));
        }else {
            format = format.replace("\\{prefix\\}", "");
            format = format.replace("\\{suffix\\}", "");
        }
        format = format.replace("\\{player\\}", player.getName());
        format = format.replace("\\{message\\}", message);
        return format;
ivory sleet
#

Doesn’t look like Java regex

#

Or well are you trying to do some regex thing?

#

Then replaceAll would be what you need

#

Else you probably just want to remove the \\

merry pulsar
#

how to update 1 line in a scoreboard?

#

is there a way easier than making teams?

quaint mantle
#

not really

#

You may use a ready solution like fastboard tho

cunning mortar
quaint mantle
#

no component support ☹️

cunning mortar
#

What do you mean?

glossy venture
#

text component?

#

idk

quaint mantle
#

Exactly

cunning mortar
#

Oh I see, yea than you have to use Spigots Scoreboard Framework I guess

glossy venture
#

wdym

#

you mean minecrafts ITextComponent

#

or like string building

quaint mantle
#

Have you heard about chat component api

glossy venture
#

nope

#

is it a plugin?

cunning mortar
chrome beacon
#

The md5 one

#

Not kyori adventure

glossy venture
#

minecraft itself has text components

quaint mantle
#

at least md_5 shit

#

but adventure would be nice

chrome beacon
#

Both work. Adventure is cross platform

glossy venture
#

net.md_5.bungee.api.TextComponent?

quaint mantle
#

aha

glossy venture
#

oh

cunning mortar
#

I mean you cant use HoverEvents or so in a scoreboard either way so you want to use the Components to build a String am I right?

glossy venture
#

so its formatting and text building

quaint mantle
#

What about translatables

glossy venture
#

kinda like a wrapper for minecrafts text components

cunning mortar
#

Ah okay I get it

#

Yea than I have no clue if this is even possible with the normal Scoreboard thingy

quaint mantle
#

definetly possible. Teams prefixes/display names/suffixes are components

glossy venture
#

everything in minecraft is a text component

#

well all text

#

everything is sent and received as a component

cunning mortar
#

Okay, I think FastBoard doesn't support this so you have to build a workaround or use the teams thing

quaint mantle
#

doesnt fastboard works using teams

cunning mortar
#

No FastBoard is using packets

#

Thats, why its so efficent

glossy venture
quaint mantle
#

Uhm

glossy venture
#

interesting resource

quaint mantle
#

we know right

chrome beacon
#

Scoreboards only accept string entries

#

So no components

glossy venture
#

there are only 2 packets

cunning mortar
#

You have to build a workaround which manages the translatables and shit and provides just a string to be inserted in the scoreboard

glossy venture
#

for scoreboards

#

nvm 3

quaint mantle
glossy venture
#

ok theres one huge packet Teams

quaint mantle
#

if you use entries only your scoreboard will flicker

glossy venture
#

i think its PacketPlayOutScoreboardTeam

#

to do the majority of the stuff

chrome beacon
#

Nvm

glossy venture
#
CHAT_COMPONENT_CLASS = FastReflection.nmsClass("network.chat", "IChatBaseComponent");
#

net.minecraft.network.chat.IChatBaseComponent

#

thats what i meant

#

by minecraft text component

chrome beacon
#

Yeah they exist in vanilla

quaint mantle
#

Ill probably just code my own sb library

#

when i add this to my main class, the plugin won't enable

#

wait

#

let me send error

eternal oxide
#

hikari will not exist at class instantiation

glossy venture
#

do it in onEnable

quaint mantle
glossy venture
#

if it doesnt exist

eternal oxide
#

as orby said, set it in onEnable

quaint mantle
#

ok wait

eternal oxide
#

and don;t use static

quaint mantle
#

ok

#

what should i use

eternal oxide
#

getters

quaint mantle
#

error

eternal oxide
#

javassist?

#

why?

quaint mantle
#

shadowJar ed hikari

eternal oxide
#

what version of Spigot are you using?

quaint mantle
#

plugin api 1.13

#

server 1.8.8

eternal oxide
#

good luck

quaint mantle
#

im sure he is about to explain why 1.8.8 is bad and you should use 1.17.1 on your test server

eternal oxide
#

I don;t support 1.8

worldly ingot
#

plugin api 1.13
server 1.8.8
I don't even know what this means

#

but yeah 1.8 hasn't been officially supported for about 5 years now

cunning mortar
#

So you want to use 1.13 blocks in 1.8? haha

quaint mantle
#

so no one can help me ?

quaint mantle
cunning mortar
#

yea I know it was a joke

#

but you should notice yourself, that server 1.8 and plugin 1.13 won't work

quaint mantle
#

why it worked for me till now

cunning mortar
#

I mean Spigot has backwards compatability but if you're using an 1.8 server you should define the 1.8 api-version too

worldly ingot
#

It will work until you use something that was added in 1.9 - 1.13 lol

#

Or removed for that matter

quaint mantle
#

im using 1.13 cause particles
and if there is no particle class it will use reflections

#

is there any ParticleUtil class thing that uses reflections and supports all versions ?

#

so i could use 1.8 api

cunning mortar
#

Not sure tho but I think EffectLib by slikey does

quaint mantle
#

i used something else

#

1.8.8 api

#

1.8.8 server

quasi flint
#

Let 1.8.8 die

zinc sedge
#

How can I get the message from an AsyncChatEvent. When I use event().message() I only get the component, but how can I get the actually content as a String? Im on 1.17

eternal oxide
#

thats not a Spigot event

zinc sedge
#

omg sorry, i forgot that Im working with paper sorry

zinc sedge
maiden briar
#

How can I get the item tag (the gray text) from an ItemStack?

#

And also from custom plugins?

#

Because I want to get the namespace

#

Plugins can have items like pluginname:myawesomeitem

#

You can

#

Also with mods

worldly ingot
#

Material#getKey()

#

Returns a NamespacedKey

maiden briar
#

Ok so getType().getKey()?

worldly ingot
#

Yes

maiden briar
#

Thank you!

worldly ingot
#

Plugins can't add new items though, so long as that's clear

#

Mods can, plugins cannot

#

(though Bukkit doesn't run on modded servers)

maiden briar
#

But the problem is that I am working with mods

#

My friend asked for a Spigot plugin on his modded spigot forge server

worldly ingot
#

Yikes. Good luck

quaint mantle
#

tell your friend that he should move to a proper server software like spong

maiden briar
#

Ok but he will not listen

hybrid spoke
#

so write it to him, then he have to read

dark osprey
vernal pier
#

.filter(a -> a instance of A)
or
.filter(A.class::isInstance)

#

which better

tawny horizon
#

the first i believe

vernal pier
#

any reason?

tawny horizon
#

because its orange and i like orange 🤤

hasty prawn
#

I mean they're effectively the same thing I'm pretty sure

#

I don't think it really matters

eternal night
#

You are saving yourself a single method call

#

^ it does not

hasty prawn
#

Yeah, it's mainly just kinda up to whichever one you think looks better KEKW

tawny horizon
#

as I said

#

orangeeeeee

hasty prawn
#

We do like orange NODDERS

tawny horizon
#

I believe so

eternal night
#

it should not

hasty prawn
#

It shouldn't

#

A player doesn't "spawn"

tawny horizon
#

they can respawn

hasty prawn
#

There's PlayerRespawnEvent for that

tawny horizon
#

ahh

#

np cutie 😄

ivory sleet
quaint mantle
#

i always trying to avoid the ugly ->

iron bobcat
#

@ivory sleet hello can u help me?

crimson terrace
iron bobcat
#

https://easyupload.io/z09s8o hello can i sent someone who knows good from plugins and tell me what plugin lags my server? the spects of the server is 100% fine but a plugin is the problem

#

the file is the error file

#

can someone check and tell me?

crimson terrace
#

?paste

undone axleBOT
crimson terrace
#

paste it here

iron bobcat
#

how i sent u the link wtf

crimson terrace
#

paste it in the paste thingy, save(on the top right), then send the link into here. it updates when you save

iron bobcat
#

bruh

#

Something went wrong!

eternal oxide
#

log is probably too big

iron bobcat
#

yep

crimson terrace
#

fair enough

iron bobcat
#

so what to do

#

just download it

#

i sent it the link

eternal oxide
#

drop file in chat

iron bobcat
#

bruh

#

this is the .txt

#

just download ..

eternal oxide
#

no thanks

iron bobcat
#

will u check it?

crimson terrace
#

I dont like downloading files from places I dont know

iron bobcat
#

omg

#

then tell me a site to upload

crimson terrace
#

honestly why the log file tho... what plugin are you using?

eternal oxide
#

drop the file in chat. See if it works

stone sinew
tacit drift
#

👍

stone sinew
iron bobcat
#

i dont

stone sinew
tacit drift
#

verify

iron bobcat
#

ok

eternal oxide
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

iron bobcat
#

wtf too much time

#

for 1 help

tacit drift
iron bobcat
#

i am

#

so now anyone can find what plugin causing lag

eternal oxide
#

There is insufficient memory for the Java Runtime Environment to continue.

stone sinew
#

Also I think you can copy the text paste it in discord and just click upload as txt or what ever.

eternal oxide
#

memory leak

iron bobcat
#

so its that

#

then why when i am using 1.15.2 it work fine

#

and in 1.16.5 lag

crimson terrace
#

what plugins are you running?

iron bobcat
#

differents

#

its not 1

quaint mantle
#

add more memory

crimson terrace
#

welp, then your 4 gigs or whatever wont cut it

iron bobcat
#

how much more

#

?

#

8 gb?

crimson terrace
#

cant tell you

quaint mantle
#

let me see ur plugin list

#

we can tell by that

iron bobcat
#

i will try different size and i will see if that work

crimson terrace
iron bobcat
#

guys my plugins for old setups i have 1.8 when i am updating to java 16 they won't work and when i am back o 8 java it work

quaint mantle
#

lol

iron bobcat
#

what can i do for that?

quaint mantle
#

update the plugins

#

lol

iron bobcat
#

bruh

#

only that way?

crimson terrace
#

java 16 I think doesnt work for anything below 1.17

young knoll
#

It works for 1.16.5

iron bobcat
#

so there is no way?

crimson terrace
stone sinew
#

Isn't java16 backwards compatible?

crimson terrace
#

possibly, my local 1.16 server told me no tho

crimson terrace
iron bobcat
#

of course they support

#

u didnt read my comment

stone sinew
#

Well I use java 8 for my plugins and java 16 for my server with no issues lol so IDK

iron bobcat
#

u have 2 different install javas?

stone sinew
#

Yes but I'm talking about my plugins specifically. (The ones I made)

eternal oxide
#

He means he builds for 8 but runs 16

stone sinew
#

^^^

iron bobcat
#

o ok

#

so what i can do for me?

eternal oxide
#

make sure all your plugins support your server 1.16.5

iron bobcat
#

install java 16 when i want to run server 1.17 and then uninstall it and stay with java 8 when i am running 1.16 versions and below?

eternal oxide
#

pretty sure I saw a 1.16.5 mentioned in that log

iron bobcat
#

yep

#

only for 1.17 wont work

stone sinew
#

He wants to update to 1.17 I think

iron bobcat
#

yep

stone sinew
#

If the plugins don't work on 1.17 contact their authors

iron bobcat
#

but i want also to can run my older setups servers

young knoll
#

Keep multiple java installs

iron bobcat
#

why mojang made it like that

young knoll
#

And run the server using the direct path to the install

iron bobcat
eternal oxide
#

yes it will work

iron bobcat
#

what servs

eternal oxide
#

No

#

everyone here is a plugin dev

iron bobcat
#

oh ok

stone sinew
iron bobcat
#

then i saw u from spigot user

eternal oxide
#

I doubt it

young knoll
#

I mean I play on some servers as well

iron bobcat
#

can anyone give me example what to put in the .bat

eternal oxide
#

C:\pathtojava\bin\java blah blah

iron bobcat
#

this is my current
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
java -noverify -Dfile.encoding=UTF-8 -Xmx8G -Xms8G -jar server.jar
PAUSE

#

is it good?

eternal oxide
#

replace java with the full path

iron bobcat
#

alr

#

so its like that
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
C:\pathtojava\bin\java blah blah -noverify -Dfile.encoding=UTF-8 -Xmx8G -Xms8G -jar server.jar
PAUSE

eternal oxide
#

not really

iron bobcat
#

then

eternal oxide
#

you need the actual file path to whichever java you want to use

iron bobcat
#

yes ikr

#

this is the example

#

so its like that but i will put the right path?

eternal oxide
#

C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin\java -noverify -Dfile.encoding=UTF-8 -Xmx8G -Xms8G -jar server.jar would be mine

iron bobcat
#

alr

#

is java 17 better than 16 right?

eternal oxide
#

impossible to give a yes or no

iron bobcat
#

so java 16 is more stable?

#

or both

eternal oxide
#

maybe

iron bobcat
#

or both in beta

#

k

young knoll
#

17 is meant to be LTS

#

So it will get updated for a while

iron bobcat
#

@eternal oxide

#

i try it but it give me error in the console

#

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

#

and i use this .bat

#

@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
C:\Program Files\Java\jre1.8.0_301\bin\java -noverify -Dfile.encoding=UTF-8 -Xmx8G -Xms8G -jar server.jar
PAUSE

stoic osprey
#

How can I make it so the boat a player is in will face the same direction as the player (i.e. make the boat turnable with the mouse, not the A and D keys)

eternal oxide
#

C:\Progra~1\ probably

tacit drift
#

for the path

#

"C:\Program Files\Java\jre1.8.0_301\bin\java"

eternal oxide
viscid edge
#

[16:49:15 ERROR]: Could not load 'plugins/MoltenSR.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.magma.moltensr'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:73) ~[patched_1.17.1.jar:git-Paper-338]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.17.1.jar:git-Paper-338]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.17.1.jar:git-Paper-338]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.17.1.jar:git-Paper-338]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:419) ~[patched_1.17.1.jar:git-Paper-338]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:287) ~[patched_1.17.1.jar:git-Paper-338]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1217) ~[patched_1.17.1.jar:git-Paper-338]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-338]
at java.lang.Thread.run(Thread.java:831) ~[?:?]
Caused by: java.lang.ClassNotFoundException: me.magma.moltensr
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:151) ~[patched_1.17.1.jar:git-Paper-338]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[patched_1.17.1.jar:git-Paper-338]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:466) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:71) ~[patched_1.17.1.jar:git-Paper-338]
... 8 more

#

pls help

eternal oxide
#

InvalidPluginException: Cannot find main class me.magma.moltensr

viscid edge
#

ik but how to fix?

eternal oxide
#

use the correct path for your main class

stoic osprey
viscid edge
eternal oxide
#

Neither have I

stoic osprey
#

oh

viscid edge
#

that is the files and code

eternal oxide
#

I just know thats how others have done it

tacit drift
#

me.magma.moltensr.MoltenSR

#

that's the path

viscid edge
#

ty

elfin talon
#
 public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        Player p = (Player) sender;
        if (command.getName().equalsIgnoreCase("stats")) {
            Inventory inv = Bukkit.createInventory(null, 9, "§aChosse a player");

            for (Player players : Bukkit.getOnlinePlayers()) {
                    ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
                    SkullMeta meta = (SkullMeta) skull.getItemMeta();
                    meta.setOwningPlayer(p);
                    meta.setDisplayName("§e§l" + players.getName());
                    skull.setItemMeta(meta);
                    inv.addItem(skull);
            }
            p.openInventory(inv);
        }
        return false;
    }```

Hey, the command works. But how can I find out if an item from this inventory has been clicked?
stoic osprey
eternal oxide
# stoic osprey oh

You could try the simple method. Not sure if it will work but vehicle.setRotation(player.getDirection().getYaw(), player.getDirection().getPitch()) In the move event for the player.

stoic osprey
#

I'll try but not sure itll work

eternal oxide
#

It shoudl but who knows with minecraft

#

you may want to maintain a -90 (I think) pitch

stoic osprey
#

k

viscid edge
#

same issue again

#

@eternal oxide

#

pls help

#

anyone?

crimson terrace
#

do we have a good tutorial on permissions here?

eternal oxide
fallen vortex
#

I need some help with mycommand

merry pulsar
#

hi, can someone please tell me how to update 1 line on a scoreboard?

#

i want to update my rank line every 30 seconds

#

but i don't know how, so i update the whole scoreboard and it flecker

tardy delta
#

Heh this color scheme is cool

crimson terrace
fallen vortex
#

Thats why i didnt spam

#

Or

#

Ping anyone

eternal oxide
#

when did you set it?

stoic osprey
#

wdym

eternal oxide
#

where does yrou code run to set it?

stoic osprey
#

its in my onPlayerMoveEvent method

eternal oxide
#

show your code

stoic osprey
#
            Boat vehicle = (Boat) player.getVehicle();
            Player player_ = event.getPlayer();
            assert vehicle != null;
            System.out.println(player_.getLocation().getDirection());
            vehicle.setRotation(player_.getLocation().getYaw(), -90);
eternal oxide
#

did you get teh sysout fine?

#

oih right

#

you set teh players location. yaw

#

you need his direction.getYaw()

#

all you did was set the boats yaw to its current yaw

young knoll
#

Add a false to setType

#

I think it's false anyway

stoic osprey
young knoll
stoic osprey
eternal oxide
#

getLocation().getDirection().getYaw()

young knoll
#

getLocation.getDirection

#

or getEyeLocation

eternal oxide
#

^

#

eyeLocation would be better

stoic osprey
#

thanks

#

ill try that

pastel mauve
#

Hey, i got a problem with the block populator, if i try to set x/z to 0 or 15, the server just crashes :/ Thats why i use x = 1; x<15 right now ...

world.getPopulators().add(populator);
@Override
public void populate(final World world, final Random random, final Chunk chunk) {
  for(int x = 1; x<15; x++)
    for(int z = 1; z<15; z++)
      for(int y = 1; y<64; y++)
        chunk.getBlock(x,y,z).setType(Material.REDSTONE_BLOCK);
 }
stoic osprey
#
Boat vehicle = (Boat) player.getVehicle();
            Player player_ = event.getPlayer();
            assert vehicle != null;
            vehicle.setRotation(player_.getEyeLocation().getYaw(), -90);
eternal oxide
#

if your code is actually running then it should work

stoic osprey
#

i'll put another print statement there to check

viscid edge
#

what about this is invalid?

stoic osprey
young knoll
viscid edge
#

ok that helps

stoic osprey
lean gull
#

i still need help with these, if someone can help me that would be great, thanks

viscid edge
#

now it says cannot find main class

stoic osprey
eternal oxide
#

that could be a problem

#

you'd have to use a repeatign timer

#

while in teh boat

stoic osprey
#

yeah Im using a rannuble

#

and imma test it now

#

runnable*

stoic osprey
viscid edge
#

@eternal oxide how to resolve cannot find main class

quaint mantle
#

hello im trying to use hikaricp and when the plugin enables,

[21:22:11 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[21:22:11 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[21:22:11 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

this will be logged in console
how can i fix this ?

#

i gone to the link it was not helpful

#

and im using gradle

ivory sleet
#

You need to provide a slf4j implementation at runtime

quaint mantle
#

how to do that

viscid edge
#

conclure i need help

ivory sleet
#

runtimeOnly 'ch.qos.logback:logback-classic:1.2.3'

#

I usually use log back

quaint mantle
#

i will try it

ivory sleet
#

Although there are better alternatives

#

But yeah

quaint mantle
#

so just add it to dependency ?

ivory sleet
#

Yuh

quaint mantle
#

no repo ?

#

mavenCentral ?

ivory sleet
#

Central

#

Ya

viscid edge
#

conclure?

ivory sleet
ivory sleet
#

Show me some code buddy

viscid edge
#

ok

quaint mantle
#

is this normal ?

viscid edge
#

bruh i closed it down

ivory sleet
#

Btw

#

You do use shadowJar right?

#

Such that you shade your dependencies

viscid edge
quaint mantle
#

and there is no log in console about hikaricp

#

for example lp

#

logs

ivory sleet
#

what does hikaricp have to do with it all

ivory sleet
#

?paste the classes

undone axleBOT
quaint mantle
#

idk luckperms logged hikari stuff

ivory sleet
#

Ask LuckPerms developers about that

viscid edge
#

Comclure Wdym

ivory sleet
#

Go to the link

#

Paste your code

viscid edge
#

Ok

ivory sleet
#

Save the paste

#

Copy the link and then provide the link here

stoic osprey
#

why is my boat not turning the same direction as the player?

Player player = Bukkit.getPlayer(uuid);
                    assert player != null;
                    Boat vehicle = (Boat) player.getVehicle();
                    assert vehicle != null;
                    Location location = vehicle.getLocation();
                    location.setYaw(player.getEyeLocation().getYaw());
                    vehicle.teleport(location);
eternal oxide
#

you are teleporting it to teh Location after you set its rotation

#

you reset its heading when you teleport it

stoic osprey
#

hmm

#

But the usual .setYaw() doesnt work for me

#

like you suggested

eternal oxide
#

you store teh boats location in location, you set its heading, then reset it back to its old location

#

location contains a directional vector

stoic osprey
#

yeah but I set the yaw

#

surely that sets the yaw in the directional vector

eternal oxide
#

and then you teleport it resetting the yaw

stoic osprey
#

why does teleporting reset the yaw

eternal oxide
#

location has a direction vector

stoic osprey
#

yes

eternal oxide
#

the direction is pitch and yaw

stoic osprey
#

ok

ivory sleet
eternal oxide
#

you are teleporting it back to its original location after you set the yaw. You wipe out the yaw change

stoic osprey
#

ok

#

so what can I do instead

eternal oxide
#

don't teleport

stoic osprey
#

and do what instead

#

just boat.setYaw() does nothing

#

@eternal oxide

eternal oxide
#

welp, seems you are correct

stoic osprey
#

ah

eternal oxide
stoic osprey
#

hmm

eternal oxide
#

You could try setting the players direction to his eyeLocation().getDirection()

#

the boat should follow

stoic osprey
#

ooh so set the player not boat

#

I'll try that when I get back home

merry pulsar
#

hi, i figured out how to make scoreboard teams, but i haven't figure out how to create a scoreboard per player, i guess i need to make a hashmap but im not familiar with it and im new at java developing, so can i get some help pls?

#

i wanted to make the rank line, but i need to make per player sb..

quaint mantle
#

that has lower size

#

cause its to big for silencing an error

undone axleBOT
tacit drift
#

Also, you can just google it

elfin talon
#
public static Inventory inv = Bukkit.createInventory(null, 9, "§aChosse a player");```

```java
 @EventHandler
    public void onClick(InventoryClickEvent e) {
        if (e.getCurrentItem().getType() == Material.SKULL_ITEM) {
            e.setCancelled(true);

            if (e.getClickedInventory() == StatsCommand.inv) {
                plugin.getServer().getConsoleSender().sendMessage("yeah");
            }
        }
    }```

why does the if function with e.getClickedInventory() doesn`t work?
iron bobcat
elfin talon
#

yes

#

1.12.2

#

in main class

#

pluginManager.registerEvents(new InventoryClickListener(this), this);

lavish wave
#

Can someone please explain me, how you can add a file to the classpath with code?

eternal oxide
#

depends on the file, your use case and what needs access to it

merry pulsar
#

and i didn't understand anything

#

i was searching and trying for the past about 7 hours

elfin talon
#

"§e§l" + players.getName()

how can i split this string?

eternal oxide
undone axleBOT
viscid edge
eternal oxide
#

show your plugin.yml

viscid edge
#

K

eternal oxide
#

no

#

that plugin.yml is fine

viscid edge
#

so wheres the error?

eternal oxide
#

you either didn't rebuild or you failed to upload a new copy to your server

viscid edge
#

rebuild?

eternal oxide
#

drop your jar in here

viscid edge
#

ok

eternal oxide
#

um, thats yoru whole project

#

I want the compiled jar

viscid edge
#

yes

#

that is compiled?

eternal oxide
#

thsi is source

#

this is not a project

#

it can;t find yoru main class because you've not compiled it

viscid edge
#

Ah

eternal oxide
#

you need to run build

#

InteliJ or Eclipse?

viscid edge
#

intellj

eternal oxide
#

then right side of screen

#

maven tab

#

goto lifecycles

viscid edge
#

Ok

eternal oxide
#

and package

viscid edge
#

K

eternal oxide
#

that shoudl spam you lots of log text and spit out a jar

viscid edge
#

Ok

eternal oxide
#

in a target folder

viscid edge
#

Ok

#

Thanks

glossy venture
#
public static final String VERSION = "${project.version}";
```will this work with gradle
#

ive been working with gradle for like a year now but i still dont understand how it works

#

only the basics of the basics

eternal oxide
#

why would you hard code the password?

glossy venture
#

i dont think theres really a way around this

glossy venture
#

otherwise you'd have to ship a resource with the jar

#

even if you retrieve it from a website, people could just http get it

eternal oxide
#

what is needing to be protected if you are shipping the jar?

#

I'm not understanding why you are trying to protect anything

#

are you shipping some database with the plugin?

glossy venture
#

what does afaik mean lmao

ivory sleet
#

google it

eternal oxide
#

as far as I know

crimson terrace
glossy venture
#

oh ok

ivory sleet
#

but you can use something like blossom to replace tokens in source files during compilation

#

(gradle plugin)

crimson terrace
#

afaik means afaik, afaik

ivory sleet
#

worth a try

young knoll
#

You can just replace in the plugin.yml and then get that in code

glossy venture
young knoll
#

Sure it can

glossy venture
#

oh no nvm

#

because the plugin.yml is loaded before the plugin itself

eternal oxide
#

not config

#

plugin.yml

glossy venture
#

yeah i fixed it

#

thats what i meant

subtle folio
#

In a player death event, if the killer hits them into the void and they die of the void, does the killer still get considered as the killer

#

or would it be the void

glossy venture
#

in vanilla the void iirc

young knoll
#

Depends how long it takes

subtle folio
#

rip is there any way I can work around this?

glossy venture
#

hypixel uses a timer

young knoll
#

So does vanilla

glossy venture
#

oh k

subtle folio
#

hm alright ig ill use some broadcast statements to see

wide creek
subtle folio
#

How do I delete a world from the server? my current code: java Bukkit.unloadWorld(world, false); Bukkit.broadcastMessage("unloading world"); world.getWorldFolder().delete(); Bukkit.broadcastMessage("deleting world"); dont mind the debug broadcasts

eternal oxide
#

unloading a world takes time, and you can not delete the main world

subtle folio
#

it is not the main world. and how long should I wait ?

#

its quite a small little map

#

only 25x25

eternal oxide
#

if you have to delete it, start a repeatign task

#

keep checking until you manage to delete it

subtle folio
#

that seems silly why repeating? why not just wait?

#

oh i see

eternal oxide
#

there is no specific time, its completely random

#

as you also need any file locks to be released

subtle folio
#

:/ multiverse doesnt have any issue deleteing when i use the delete command, im using basically the same code as the plugin uses so

#

¯_(ツ)_/¯

eternal oxide
#

I've not looked at the MV source I'd expect it to be doing it async

#

all MV commands use Runnables

subtle folio
#

im seeing that right now, i should just loop until its delete, thanks

grand flint
#

How can I change the 20/100 that player section of my server to say something like "maintance" I seen minemen do it when they are in maintance mode

ivory sleet
#

I believe you might have to use packets for that

grand flint
#

How so?

wide creek
ivory sleet
ivory sleet
grand flint
ivory sleet
#

thats not spigot api tho

wide creek
#

i copy-pasted the code present in the Vault API's README, in the main class and in the pom.xml

ivory sleet
#

but yeah you could use that for packets

ivory sleet
#

its not in spigot api

grand flint
#

Oh I missread

ivory sleet
wide creek
#

yes EssentialsX is installed

ivory sleet
#

make sure you plugin load after EssX and Vault

#

which can be specified by defining those as dependencies in plugin.yml

wide creek
#

can I add Essentials as softdepend?

ivory sleet
#

probably yeah

wide creek
#
depend:
  - WorldBorderAPI
  - Vault
softdepend:
  - Essentials
ivory sleet
#

if you use EssentialsX specify EssentialsX iirc

#

Whatever its called when u use /pl command

#

(case sensitive)

wide creek
#

yes i did the /pl command before and it was only Essentials

ivory sleet
#

ah okay

#

yeah then it's Essentials 👍

wide creek
#

nothing changed

ivory sleet
#

well share your code, and not only one single method

iron bobcat
#

help i am trying to launch 1.17.1 but it gives my this error i think is the java version i have?

ivory sleet
#

that's the old launcher, microsoft afaik dropped support ages ago for it

#

anyways

#

seems like you're using an invalid jvm flag

iron bobcat
ivory sleet
#

no you install the new launcher or the newest launcher

viscid edge
#

Hi

ivory sleet
#

it installs appropriate jdks for you

iron bobcat
#

k

viscid edge
#

I have issues

twilit wharf
#

for some reason, pp is null when it is returned from getProxy().getPlayer() java @EventHandler public void onPlayerJoin(PlayerHandshakeEvent e) { ProxiedPlayer pp = LobbySystem.getInstance().getProxy().getPlayer(e.getConnection().getUniqueId()); }

viscid edge
#

With my program

ivory sleet
#

?jd-bc

viscid edge
hasty prawn
ivory sleet
quaint mantle
undone axleBOT
ivory sleet
#

chances are you can use PendingConnection

#

also iirc no proxied player instance has been created when that event triggers

#

thus it returns null

twilit wharf
#

alright

ivory sleet
#

use ServerConnectEvent iirc

#

or PostLoginEvent

#

not the handshake one at least 😅

twilit wharf
twilit wharf
ivory sleet
#

username != ProxiedPlayer instance

twilit wharf
#

alright, postlogin event worked, but now i am getting this error trying to connect to the server: [15:31:18 ERROR]: [riches_exe|/127.0.0.1:54539] <-> ServerConnector [LOBBY2] - encountered exception: net.md_5.bungee.util.QuietException: Server is online mode!

ivory sleet
#

make the backend server LOBBY2 offline mode

#

since its going through the bungeecord proxy anyways

viscid edge
#

pls help

twilit wharf
#

also

#

I want a item, that you can interact with and open a menu, then have a list of items, the lore being lobby info, and when you click on one it will send you there, is there anyway I can do this without Redis, and just through a bungeecord/spigot plugin?

twilit wharf
# viscid edge

in java, you cant have a method like that return 2 values, remove the MoltenSR for the command to work

ivory sleet
# viscid edge

start with learning Java, yes I sound like all the other Java programmers but seriously, it will help you progress further, just give it some actual effort more than a glance, then you can always come back here to ask if your interpretation of something is correct or incorrect

mortal hare
#

How expensive is adding, removing channel handlers

mortal hare
#

from netty's pipeline

ivory sleet
#

why would you need redis in the first place

#

redis doesnt have a suitcase there

#

its a cache :p

twilit wharf
ivory sleet
#

nah

#

you can use plugin message channels

twilit wharf
#

so send a message from a spigot plugin to the bungeecord one?

ivory sleet
#

but if you want something more sophisticated, use something which is primarily made to be used as a message broker like kafka or rabbitmq

#

yeah

young knoll
#

You need a player online to use messaging channels

ivory sleet
ivory sleet
#

yeah shouldn't be an issue here

viscid edge
#

What is <identifier>

ivory sleet
#

as there will always be a player online on the lobby if he is going to use the lobby compass

viscid edge
#

Conclure?

ivory sleet
#

?

viscid edge
ivory sleet
#

Idk

#

context?

viscid edge
twilit wharf
#

you can remove that

viscid edge
#

Ok

mortal hare
#

is it bad to do that

ancient plank
#

learning java before trying to make plugins drake_nope
learning spigot plugins before java drake_dope

mortal hare
#

and instead add it whenever player joins

viscid edge
#

@twilit wharf?

ivory sleet
#

hmm unsure, I'd ask someone like retrooper who spent quite some time regarding netty and that

#

but probably not an issue

mortal hare
#

i just want to save some performance regarding bukkit listeners

#

which i would anyway need to delete

#

since im doing packet level stuff

ivory sleet
#

yeah

twilit wharf
mortal hare
#

i don't want to search a key in the map every time an event fires

viscid edge
#

ok

ancient plank
#

?learnjava

undone axleBOT
ancient plank
#

gg learn basic java and it'll fix all your issues @viscid edge

twilit wharf
#

@viscid edge there might be some free tutorials at code.org or code academy, there might also be some good youtube lessons.

ancient plank
#

the things you're doing show that you GLANCED over an image or smth and then went "ok, now I can make spigot plugins"

#

while having 0 idea what you're even doing

young knoll
mortal hare
#

this works fine

young knoll
#

Map lookups are fast

mortal hare
#

with listeners

#

ik

#

but its using performance where its mostly not needed

young knoll
#

I mean, very little

mortal hare
#

they're used only in specific instances

ivory sleet
#

What type of map is it? A normal HashMap?

mortal hare
#

yes

#

its not a problem

#

im just trying to optimize my packet level thingy as much as i can

ivory sleet
#

Hmm yeah well they may be slow

mortal hare
#

what kind of map do you suggest

ivory sleet
#

I mean if you can, an IdentityHashMap is faster

#

though

#

you need "identity" keys

twilit wharf
ivory sleet
#

so normal hashing doesn't work anymore

mortal hare
#

OOH

#

that's sexy

#

thanks

ivory sleet
#

yeah

mortal hare
#

i've thought of this before

young knoll
#

Isn't an identity map the equivalent of == over .equals

ivory sleet
#

uses System::identityHashCode to compare

mortal hare
#

when i was developing on CPP

ivory sleet
#

yeah

#

coll

young knoll
#

I guess I could use that for my registries

ivory sleet
#

but it guarantees O(1) for things like contains

mortal hare
#

to use memory addresses as hash instead of object values

young knoll
#

Actually no, namespaced keys aren't comparable with ==

mortal hare
#

that's really sexy

ivory sleet
#

indeed

mortal hare
#

i really need this

#

its just what i need

#

thank you ❤️

young knoll
#

So many types of maps

ivory sleet
#

well

#

is your plugin a bungeecord pugin

#

or a spigot plugin?

#

yeah lol

iron bobcat
#

is there any plugin that can auto update the plugins that is outdate in the newest versions?

ivory sleet
#

uh probably

#

but why

young knoll
#

You can 100% make an auto updater

#

But I would avoid it

#

I cannot spell today

ivory sleet
#

🥲

iron bobcat
young knoll
#

I mean

twilit wharf
# ivory sleet is your plugin a bungeecord pugin

I have a bungeecord plugin which puts the user into a random lobby on join, now I want a spigot plugin which gives the user a item on join and from there they can open a menu and choose lobby through a item that represents that lobby

iron bobcat
#

who knows to tell me the name of the plugin ?

young knoll
#

I think plugins with a /download command aren't the worst

#

But true auto updaters are risky

ivory sleet
#

hmm I had one on my mind

iron bobcat
#

whitch?

ivory sleet
#

let me look it up

iron bobcat
#

k

#

this suck i have 30 outdate plugins and i am lazy to do it manually

ivory sleet
twilit wharf
#

yeah

#

I just want to make this the easiest way possible

ivory sleet
#

okay

#

you will need one main class for bungeecord

#

one main class for spigot

#

then have the plugin.yml refering to the main class for spigot

#

and the bungee.yml for bungeecord iirc

iron bobcat
twilit wharf
#

ok

ivory sleet
twilit wharf
mortal hare
#

Pro tip: tired of using slow SFTP servers, having no access to SSH and need to download big capacity files? Look no further than wget plugins on spigot.