#help-development

1 messages · Page 1084 of 1

shadow night
#

Not like your isn't gonna be a abonded after you finish it

drifting viper
#

-_

#

so when you all say that there are already great rust mc servers out there, Why no one uses them and Spigot/Paper is still the Standard

blazing ocean
#

they're feature incomplete

#

have no support

#

are experimental

#

etc

shadow night
shadow night
#

spigot is the standard, nobody is brave enough to go and change it

blazing ocean
drifting viper
#

yeah most of them are build with the goal of incompletion, So you have to only enable what you need like in valence, Most people dont like this approche and don't want to build everything them self

grim ice
shadow night
grim ice
#

ig you could say paper?

blazing ocean
grim ice
#

paper is the dominant server software, that's for sure

#

I can't recall the last time I ran /version and the server wasn't paper

shadow night
drifting viper
# grim ice there's no reason to use them

Performance, Security, Scalability. I think you already know the Performance issues of normal Java Servers. The Rust Server can startup in under 1ms. Also important for Large Server to minimize down time and get a good performance with large player count. The Paper team tries to this by Creating Folia.

#

also uses less resources

quiet ice
#

Minestom is great if you want something different

shadow night
grim ice
#

sure it sounds amazing

wet breach
#

in regards to servers, start up times are not really relevant

eternal night
grim ice
#

but most of the time you won't be starting up your servers every minute

drifting viper
young knoll
#

Wait we need the thing

wet breach
#

I rarely restarted my MC servers

quiet ice
#

The Rust Server can startup in under 1ms. Also important for Large Server to minimize down time and get a good performance with large player count. The Paper team tries to this by Creating Folia.

Have you heard about GraalVM's native-image?

wet breach
#

they would stay up for 30 days or more at a time

drifting viper
wet breach
#

so why would I care about a 10 minute startup time when 99% of the rest of that time its always on

shadow night
#

Some unofficial reimplementation of the server can take ages to update to update to a newer version, while official software gets updated with the release of a new version

grim ice
wet breach
#

not entirely sure what they mean by that

hazy parrot
grim ice
#

how is the coding language going to make your server software more secure?

eternal night
#

Well, you see, with c you could easilyl fuck up and have people uh, like, uh

#

well yea the server is in java but ehm

drifting viper
#

for example

eternal night
#

that isn't security?

quiet ice
#

Security under Java will probably be better tbh - there isn't all that much you can f up aside from path traversal attacks but that can be easily mitigated and is a non-issue

drifting viper
eternal night
#

That is still not security

#

That is stability at best.

quiet ice
#

Crashing is a non-issue in the grand scheme of things

drifting viper
wet breach
#

Java actually does a pretty good job when compiling to let you know about Nulls and a decent IDE would let you know before compiling

shadow night
#

Rust server reimplementations have a major downside of being just not exactly like the original server implementation, which by itself could cause quite a lot to break

grim ice
drifting viper
#

for example an command could crash your server

grim ice
eternal night
#

I'd call security to be the safety of server data and server hardware. Log4J was a security exploit. You crashing a server isn't really. Not that NPEs are common in the first place

young knoll
#

Does hypixel use rust

#

Kek

quiet ice
wet breach
quiet ice
hazy parrot
#

What is buffer underflow

eternal night
#

gonna send me a nice msg command to get some ACE going on papermc stonks

wet breach
#

so an overflow makes it reset going higher

#

underflow goes in the other direction

eternal night
#

Certainly possible in java NODDERS

shadow night
#

There are two choices:
A. Use a patched version of the official server both of which (original and patched) update almost immediately after a new version and have been tested by time, existing for more than ten years
or
B. Some random persons reimplementation of the server in rust that hasn't been tested by a single person

young knoll
quiet ice
young knoll
#

Doesn’t that just underflow to the highest possible stack pointer

#

Or does it start trying to reference whatever is before the stack

eternal night
young knoll
#

What

drifting viper
young knoll
#

I mean, accessing memory you aren’t supposed to is a bit of an issue

quiet ice
#

It's absolutely fine in java land

eternal night
#

In c at least

quiet ice
#

In the kernel that might be another issue

young knoll
#

Scary red text in console is just whatever

wet breach
eternal night
#

Java is so far away from that issue, it does not matter

young knoll
#

I guess it depends on how the stack pointer is stored

#

If it’s unsigned it would wrap back to the top

wet breach
#

the memory address of a negative that is beyond what is allowed would end up being a completely different memory address

#

and does not wrap back

shadow night
young knoll
#

The stack on the NES wrapped back :p

quiet ice
paper viper
#

Lmao

young knoll
#

char doesn’t count

#

hush

shadow night
young knoll
#

ulong

#

Or should it be unsigned long for maximum verbosity

quiet ice
#

Well I'd rather have 128-bit CAS than unsigned numbers

young knoll
#

long long

paper viper
#

u could use a lib that makes a fake unsigned type lol

young knoll
#

Let’s make a language where each o added to the word long is another 8 bits

shadow night
paper viper
#

backs it up with a larger signed type

shadow night
#

just use BigNumber at that point

young knoll
#

long is 64 bits
loong is 72 bits
looong is 80 bits

shadow night
quiet ice
#

Wasn't there a language that supported 0-bit ints?

shadow night
wet breach
#

if you ran build tools, all the decompiled classes should be in the work directory

young knoll
#

Run buildtools and then look into the work directory for the decompiled source

quiet ice
shadow night
#

actually, 1-bit ints would be great

grim ice
#

are cpu processes ran LIFO?

paper viper
shadow night
quiet ice
tardy delta
slender elbow
grim ice
#

since it doesnt make sense for system processes to be ran like that

sweet pike
#

or is that not possible

young knoll
#

Yes

tardy delta
#

why would processes be run lifo?

quiet ice
#

Uh, obviously no - since otherwise a 4 Core CPU would instantly freeze the system when trying to run more than 4 applications at the same time

eternal oxide
grim ice
#

fair

grim ice
quiet ice
tardy delta
#

stack pointer goes to zero?

eternal oxide
#

ie, base of the stack. It can;t go below

young knoll
#

Wouldn’t that depend on the language

tardy delta
#

why would that happen on a buffer underflow

#

im confused

grim ice
#

crash?

sweet pike
# young knoll Yes

if i do that, is it just the work folder that has the moj mappings? or can i work with them in my CB directory as well?

blazing ocean
young knoll
#

Just the work folder

blazing ocean
#

that's my gif 😡

young knoll
#

The cb code is like

blazing ocean
tardy delta
young knoll
#

Half mojmap half spigot map half ???

#

Yes I realize that’s 3 halfs

tardy delta
#

i get it

sweet pike
#

i'm having such a headache trying to navigate all that's required to contribute

#

anyway, thanks!

wet breach
rough drift
young knoll
#

How many online players do you have

#

¯_(ツ)_/¯

blazing ocean
#

37531 at least :cope:

grim ice
#

i feel like hypixel players are bots

sullen belfry
#

does anyone know why this error happens?

[13:02:56 ERROR]: Paper Async Command Builder Thread Pool - 1
java.util.ConcurrentModificationException: null
        at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:1023) ~[?:?]
        at java.base/java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:1052) ~[?:?]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:537) ~[paper-1.21.jar:1.21-123-0a1be9a]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:496) ~[paper-1.21.jar:1.21-123-0a1be9a]
        at net.minecraft.commands.Commands.lambda$sendCommands$6(Commands.java:475) ~[paper-1.21.jar:1.21-123-0a1be9a]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]```
#

for context i did /reload confirm with my plugin on the server

slender elbow
#

i can confidently say that isn't a spigot issue 🤓

eternal night
#

how do you know emily?

sullen belfry
#

lol

#

true

slender elbow
#

i have a hunch

sullen belfry
#

my bad

eternal night
#

there is an open issue on the paper github for that ^ but yea, not the right discord

slender elbow
#

true

eternal night
#

ah too late KEKW

sullen belfry
#

not my code doing a freaky time?

eternal night
#

nah

remote swallow
blazing ocean
#

smh lynx

eternal night
lost matrix
sullen belfry
lost matrix
#

Read the message displayed when you try to reload. Then youll know.

sullen belfry
lost matrix
#

Its an artifact from the past

blazing ocean
sullen belfry
#

starts of soft, and then it turns into the devil

drifting bluff
#

plugin.yml

  core:
    description: The main core commajnd
    usage: /core
    permission: simplecore.core```
commands/core.java
```package work.constt.simpleCore.commands;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

public class core implements CommandExecutor {
    @Override
    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
        return false;
    }
}

simplecore.java


import org.bukkit.plugin.java.JavaPlugin;
import work.constt.simpleCore.commands.core;

public final class SimpleCore extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        this.getCommand("core").setExecutor(new core());
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
}

why cant i type /core

sullen belfry
#

the funniest error ever

blazing ocean
#

i mean i've encountered those issues before

lost matrix
#

Phrase it like this:

I expect X to happen
In actuality Y happens
Here is my implementation, what could be the cause:

grim ice
drifting bluff
#

yes

drifting bluff
drifting bluff
grim ice
grim ice
lost matrix
drifting bluff
#

yes

drifting bluff
lost matrix
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

grim ice
#

what do you expect to happen

#

your command class is basically empty

drifting bluff
#

wait a minute

#

how do i do it so when i execute the command it says something ib chat?

#

or like how do i declare the player variable?

tardy delta
#

look at the CommandExecutor signature

drifting bluff
#

where

lost matrix
#
    @Override
    public boolean onCommand(CommandSender sender, Command command, String s, String[] strings) {
        sender.sendMessage("You have used a command");
        return true;
    }
drifting bluff
#

thx

blazing ocean
#

don't reload

drifting bluff
#

RESTART?

lost matrix
#

Ofc, never use reload

drifting bluff
#

fgor what is there rleoad then

lost matrix
#

Type in /reload and read the message. Its not supported, will cause problems and is an artifact from the past.
Also make sure to update your plugin every time you compile it. I have the suspicion that you simply forgot to place the new jar in your plugins folder.

drifting bluff
#

oh my gosh im so DUMB

#

😭

lost matrix
#

Happens

grim ice
#

and it's generally better to learn some java basics

drifting bluff
#

yea

grim ice
#

before trying spigot, although you can do it any way you want

drifting bluff
#

wait 2hex are u a devloper of photon gaming or like what u doing here

#

lol

grim ice
#

Nah that server doesnt even pay lol

#

i just spend free time there when im bored

drifting bluff
#

ah lol

#

but u know itsallay

grim ice
#

I do

drifting bluff
#

from where?

grim ice
#

i help him with his server sometimes

drifting bluff
#

nice

drifting bluff
#

when i type it it shows thistho

#

and not the message

#

it shows: You have used a command

sand spire
#

Which PersistentDataType and value should I use if I use the key as a boolean where if the PDC has the key it's true and if it doesn't it's false?

lost matrix
slender elbow
lost matrix
sand spire
#

Thanks 👍

lost matrix
#

But if its on an entity then you can as well use scoreboard tags

remote swallow
sand spire
fossil flax
#

someone know what the code i have to write on my spigot plugin to get the server server name wheres the player is?

lost matrix
grim ice
#

wait a sec

#

That gives you the server implementation name... nvm

fossil flax
lost matrix
fossil flax
#

how can i do that?

lost matrix
#

I personally hate this system and built something on top which returns a CompletableFuture instead

grim ice
#

Not possible

#

only with NMS

lost matrix
#

I mean

#

Yeah

hexed bluff
uncut grove
#

Hey,

I tried to make a command that spawns a npc on the current Position. I heared that in the 1.21 you need a ServerEntity to spawn the npc. I uploaded my code here: https://pastebin.com/BMLs1wuT In the marked section I Think I have done somethin wrong or missed something. Can anyone look through it? When I run this code nothing happens.

~ @uncut grove

granite night
#

how do I get the plugins folder path? i mean server/plugins not server/plugins/<myplugin>

lost matrix
wet breach
#

path.getParent()

lost matrix
uncut grove
granite night
lost matrix
# uncut grove nope, nothing. Do you know a doc / tutorial where I can see how the spoofed conn...
public class PlayerConnectionSpoof extends ServerGamePacketListenerImpl {

  private static final Connection DUMMY_CONNECTION = new Connection(PacketFlow.SERVERBOUND) {
    @Override
    public void setListener(PacketListener packetListener) {

    }
  };

  public PlayerConnectionSpoof(ServerPlayer player) {
    super(MinecraftServer.getServer(), DUMMY_CONNECTION, player);
  }
}
this.nmsPlayer.connection = new PlayerConnectionSpoof(this.nmsPlayer);
uncut grove
lost matrix
sweet pike
young knoll
#

moj

sweet pike
#

im not even close to compiling, but i certainly can't do it with that

tardy delta
#

cast it to the right functional interface

#

or use a lambda

fallen tree
#

what am i doing wrong?

sweet pike
uncut grove
tardy delta
#

ugh nms

slender elbow
#

or use a good decompiler uwu

sweet pike
# tardy delta ugh nms

i'm literally stuck idk what to do. if i resolve these errors how i usually would then it would result in a lot of NMS code changes that i don't really think are needed

remote swallow
slender elbow
#

vineflower is a great decompiler :3

eternal night
#

what about wineflower tho

remote swallow
#

lynxflower when

sweet pike
river oracle
fallen tree
eternal night
slender elbow
#

you can't just use the server jar like that anymore

fallen tree
#

what do i need then

#

the api?

#

where do i get the api

slender elbow
#

use maven or gradle

river oracle
slender elbow
#

if you don't need nms, that is, and you shouldn't, lol

#

your byte serialization impl is flawed

eternal night
eternal night
slender elbow
#

🫡

river oracle
eternal night
#

Who knows

river oracle
#

😕 pain

slender elbow
#

send link

eternal night
#

@Deprecated(forRemoval = true, since = "1.21")

river oracle
#

I'm on phone lel

eternal night
#

fallen tree
slender elbow
#

you don't need to import any jars like that

#

maven will provide you with the api

fallen tree
#

okay

river oracle
#

That's probably the "flaw"

paper viper
remote swallow
#

ill find his pr

#

hold on

river oracle
#

just look at stash it should be like the top PR

#

I can't see it on my phone my password is too long

river oracle
#

Faks

remote swallow
slender elbow
#

yeah that's flawed

eternal night
#

ah wait

slender elbow
#

but i am not legally allowed to help you runs

river oracle
#

Back go step 1 I suppose still gotta figure this out properly

eternal night
#

do those names fuck with our names

#

oh god

river oracle
eternal night
#

phew, they do not

#

all good

paper viper
#

Bitbucket is unable to reset the password for your account because it is managed by a read-only external directory. Please contact your administrator to change your password.
wtf

#

oh well

worldly ingot
#

idiot >:(

slender elbow
#

woah

eternal night
#

😭 it is in UnsafeValues anyway

worldly ingot
eternal night
slender elbow
#

i mean, i have signed the cla

remote swallow
river oracle
#

If my impl isn't good enough upstream it you clowns

worldly ingot
#

SHOW ME THE NDA, EMILY

slender elbow
#

it's not really a legal matter lol

slender elbow
#

:^)

worldly ingot
#

Shit

eternal night
remote swallow
#

rewrite papers to be yours then upstream it

worldly ingot
#

I've been bested by the agreement very aptly described by its name!

eternal night
#

phew, glad you didn't name the agreement there

river oracle
#

Well I know my impl is flawed atleast

eternal night
#

papermc lawyers were on the line

river oracle
#

Time to start from square one back to draft pr 😭

remote swallow
#

lawysers

worldly ingot
#

Well I'm not stupid!

slender elbow
#

lawyers?

worldly ingot
#

Sometimes

eternal night
remote swallow
#

lynx is breaking the lawy

eternal night
#

shy im just a boy

worldly ingot
#

from a poor family

blazing ocean
eternal night
remote swallow
#

is it normal i sang im just a boy as im just a girl and from a poor family as fred

worldly ingot
worldly ingot
#

ngl that looks more like Dr. Disrespect, which

#

Topical

remote swallow
worldly ingot
remote swallow
#

it is culture

remote swallow
eternal night
#

Well you fix the decompile issues

remote swallow
#

are you talking to simon hypixel about bad stuff

worldly ingot
#

The Mr. Simon Hypixel

blazing ocean
#

what did simon do to him

#

smh

slender elbow
#

John Hypixel, inventor of Hypixel

sweet pike
remote swallow
eternal night
slender elbow
#

i mean, you can't contribute something if it doesn't compile, so, like, lol

river oracle
#

If you edit more than one line in an nms file your PC explodes

river oracle
#

Watch out

slender elbow
remote swallow
river oracle
#

Yeah

#

I'm really rich so I can afford it

eternal night
river oracle
#

I actually do all of my projects on a 50 dollar early 2010s think pad

remote swallow
remote swallow
#

3 hour compile time

river oracle
#

It takes 50 minutes to compile but I can't be losing my main rig

tardy delta
#

ok i didnt expect the gif to be that big

blazing ocean
river oracle
#

Inventor of the burger

remote swallow
#

what about john gun

#

or john ar15

tardy delta
#

shot himself

blazing ocean
#

john doe

river oracle
#

Rip John Deer

blazing ocean
#

joe blow

remote swallow
#

john america

river oracle
eternal night
#

rust

blazing ocean
#

kek

remote swallow
river oracle
remote swallow
#

and john rust the second

blazing ocean
#

john go

remote swallow
#

john kotlin

river oracle
#

@eternal night what's your minecraft favorite server software. Answer very carefully

blazing ocean
#

john odin sounds kinda fire tho

remote swallow
#

john rad

tardy delta
#

nah its ginger bill

eternal night
blazing ocean
#

kek

#

p sure that's valence

river oracle
blazing ocean
blazing ocean
remote swallow
#

my fav server impl is @sterile axle c one

river oracle
#

I'd honestly trust a server impl in go more than rust tbhhh

remote swallow
#

idk if it was c or ++ or #

river oracle
#

Plus the go server wouldn't be aids to write plugins for

blazing ocean
#

my fav server impl is that kid who made a server impl in arduino cpp

remote swallow
#

y2k make an 8bit server impl

tardy delta
#

imagine trusting a gc over no gc

river oracle
remote swallow
#

make it possible

river oracle
#

I mean you'd Really have to cut down on things to make it possible

#

I'd have to do it in C or assembly too

blazing ocean
#

go is more aids than rust

tardy delta
#

lol

#

why

blazing ocean
#

the error handling 😭

#

missing generics

tardy delta
#

what error handling?

blazing ocean
#

goofy ahh syntax

tardy delta
#

the optional ok like semantics?

#

you prefer exceptions?

blazing ocean
#
file, err := Open(path)
if err != nil {
    return "", err
}
contents, err := Read(file)
if err != nil {
    return "", err
}
return contents, nil
eternal night
#

thanks

blazing ocean
#

wha

eternal night
#

not really all that powerful, but that is fine

#

the language is supposed to be dead simple to read

blazing ocean
#
func SumIntsOrFloats[K comparable, V int64 | float64](m map[K]V) V {
    var s V
    for _, v := range m {
        s += v
    }
    return s
}
#

what the fuck

eternal night
#

Yea

blazing ocean
#

that's just

#

no

#

just no

eternal night
#

better than rusts

#

easy peasy

blazing ocean
#

rusts is simple

blazing ocean
#

no

#

rusts ? better

tardy delta
#

its all syntax sugar

#

i dont like languages which hide everything they do

blazing ocean
#

it's unreadable in go

eternal night
tardy delta
#

💀

eternal night
#

brille fielmann?

blazing ocean
#

like if you work with large codebases in go it just becomes very unreadable

eternal night
#

the fuck are you talking about

tardy delta
#

it actually doesnt

blazing ocean
#

half the code is error handling and returning

eternal night
#

yea it is verbose, does not make it hard to read / unreadable

#

I'd argue the fact that you can see exactly what happens with each error is rather nice

blazing ocean
#

it clutters the code a lot tho

eternal night
#

instead of blindly throwing shit up the callstack with ?

blazing ocean
#

i really like go just that's annoying

remote swallow
tardy delta
blazing ocean
#

just .expect it

tardy delta
#

just found out that if you hold shift and click reply, the ping author thing is off

#

expect just pannics 💀

tardy delta
#

not a single way to recover

#

yes

sweet pike
#

i don't think that's illustrated anywhere on any guide

eternal night
#

i do not know

#

@river oracle might

shadow night
#

compile it with maven maybe?

eternal night
#

Well, you'd be missing spigot patches applied on top

river oracle
#

I.make a cb plugin

shadow night
sweet pike
eternal night
river oracle
#

Make a test plugin for craft bukkit

#

It's basically just spigot minus components

sweet pike
#

yeah but what server jar do i run that on?

river oracle
#

And run the bootstrap jar

sweet pike
river oracle
alpine urchin
#

hi guys

kindred sentinel
#

I want to make horses act like real horses, responding to the player with some delay. Like I go straight on a horse and when I try to stop, horse is still going straight some time

#

Do u have ideas how to make it?

hollow oxide
#

hi,
my commands are lame...

i want to put color on them, is it possible and how?

thx for your time

paper viper
#

Are you using a command library?

hollow oxide
#

nope

paper viper
#

Brigadier handles the argument colors

remote swallow
#

you would need to use brigadier

#

some command frameworks have support for it

paper viper
#

Brigadier + Commodore

#

Some other APIs for example Cloud have built in support

#

You can’t do it with the built in api tho

eternal night
#

(just use a command library)

hollow oxide
#

how to use the brigadier to make it have color?

eternal night
#

by deep diving into an internal library and NMS, learning brigadier which isn't documented, and then doing it 👍

hollow oxide
#

;-; sounds hard

paper viper
#

Use a command library like what lynx said

hollow oxide
#

but brigadier isn't documented

slender elbow
#

then use another command framework

#

like cloud or commandapi

#

the world is your oyster

hollow oxide
#

k, i'll try

onyx fjord
#

did anything happen to Particle.REDSTONE in 1.21?

slender elbow
#

api particle names align with the vanilla names now, so, that'd be dust

uncut grove
#

Hey,

I tried to make a command that spawns a npc on the current Position. I heared that in the 1.21 you need a ServerEntity to spawn the npc. I uploaded my code here: https://pastebin.com/BMLs1wuT In the marked section I Think I have done somethin wrong or missed something. Can anyone look through it? When I run this code nothing happens. I also not recive any errors.

~ @uncut grove

onyx fjord
chrome beacon
#

compile against an older version if you want to keep backwards compat

ancient forge
#

I can use java 22 to make plugins right or do i need to use 17?

blazing ocean
#

what mc version are you targeting

ancient forge
#

1.20.6

blazing ocean
#

use java 21

ancient forge
#

Its saying my main class is never used. Im following a youtube video and i got exactly what he has but mine says that what is my main class is never being used

#

Main```package org.mopo.cowCannon;

import org.bukkit.plugin.java.JavaPlugin;

public final class CowCannon extends JavaPlugin {

@Override
public void onEnable() {
    // Plugin startup logic
    getServer().getPluginManager().registerEvents(new EntityListener(), this);

}

@Override
public void onDisable() {
    // Plugin shutdown logic
}

}

Listener ```package org.mopo.cowCannon;

import org.bukkit.entity.Cow;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEntityEvent;

public class EntityListener implements Listener {

    @EventHandler
    public void onEntityRightClick(PlayerInteractEntityEvent event) {
        if (event.getRightClicked() instanceof Cow) {
            Cow cow = (Cow) event.getRightClicked();

            cow.getWorld().createExplosion(cow.getLocation(), 2f);
        }

    }
}
tardy delta
#

it isnt going to be used in your own code

#

the server is gonna load it

ancient forge
#

nvm i figured out what it was, the run was set to current file and not running the actual thing

buoyant viper
#

plugin i wrote for 1.16.5+ wouldnt work on 1.20.6 bc of renames

chrome beacon
#

?

#

You should submit that as a bug

buoyant viper
#

it was something with potions idr

#

i also already updated that code so i dont even have the old one that it broke :c

#

no VCS used bc its just a personal plugin for my smp

chrome beacon
#

should always use vcs

rough ibex
#

all of my personal stuff uses git lol

#

I don't think I have a single thing that doesn't use it

scarlet gate
#

I'm trying to get a location that is 2 blocks perpendicular to the midpoint of a line, I was wondering if there is an easy way to do this. I've attached a birds eye view example where the ? is the location I'm trying to calculate. Any ideas how I would go about this?

I hope that makes sense aha
https://imgur.com/a/vLxX7eX.png

past kiln
#

Is there anyone here I could send some skript code to, I want to know if its possible to turn it into a plugin

chrome beacon
#

The answer is yes

#

if you can do it with skript you can do it in a plugin

past kiln
#

Okay

#

What about telling me the difficulty level based on the script

#

or price even

chrome beacon
#

?services

undone axleBOT
chrome beacon
#

If you want to hire someone ^^

gray marsh
#

one of my users said they have no logs folder, is this even possible? it's plain BungeeCord apparently

chrome beacon
#

yeah I don't think Bungeecord uses a log folder

lunar zealot
#

How can I put an item in slot 0 of a StoneCutter inventory

chrome beacon
#

Have you tried getting the inventory and using the setItem method

onyx fjord
#

which Material method is used to get the mojang name?

#

like minecraft:dirt

chrome beacon
#

Material#getKey

grim ice
worthy yarrow
#

Because 1.20.5 (iirc) was the benchmark for 21

#

Mmm we love giving away emeralds

ivory sleet
#

yea 21 is also lts so its just as nice if not nicer

glass wharf
#

Hi, I am using this code to overwrite the /msg, message, w, whisper... etc commands
It works, but after using /msg the next time i type in chat regularly i get kicked with this message

"Received chat packet with missing or invalid signature."


public void onOperatorSet(PlayerCommandPreprocessEvent event) {
        String cmd = event.getMessage();
        if (cmd.startsWith("/msg ") || cmd.startsWith("/tell ") || cmd.startsWith("/w ") || cmd.startsWith("/whisper ") || cmd.startsWith("/message ")) {
            event.setCancelled(true);
            Player target = MCMafia.getInstance().getServer().getPlayerExact(cmd.split(" ")[1]);
            if (target != null) {
                String playerA;
                String playerB;
                if (event.getPlayer().getUniqueId().compareTo(target.getUniqueId()) > 0) {
                    playerA = event.getPlayer().getUniqueId().toString();
                    playerB = target.getUniqueId().toString();
                } else {
                    playerA = target.getUniqueId().toString();
                    playerB = event.getPlayer().getUniqueId().toString();
                }
                String identifier = "privateWhisperFrom" + playerA + "To" + playerB;
                MCMafia.getChatManager().createChannel(identifier, "Whisper", "§3");
                Channel channel = MCMafia.getChatManager().getChannel(identifier);

                MCMafia.getChatManager().playerJoinChannel(MCMafia.getGame().getMafiaPlayer(event.getPlayer()), channel);
                MCMafia.getChatManager().playerJoinChannel(MCMafia.getGame().getMafiaPlayer(target), channel);

                Chatter chatter = MCMafia.getChatManager().getPlayersChatter(MCMafia.getGame().getMafiaPlayer(event.getPlayer()), channel);

                Message message = new Message(cmd.split(" ")[2], chatter);

                MCMafia.getChatManager().playerActivateChannel(MCMafia.getGame().getMafiaPlayer(event.getPlayer()), channel);

                chatter.sendMessage(message);

            }
        }
    }

#

Does anyone know why this is happening or how to fix?

worldly ingot
# kindred sentinel

It that a plugin? A Spigot bug? Vanilla bug? Or what? Because that's really funny

tardy delta
#

atleast you can buy air now

#

bit overpriced though

worthy yarrow
tardy delta
#

villager got confused

worthy yarrow
#

Was it the villager or the totem that got confused?

drifting bluff
#

how do i makea toggable command?

worthy yarrow
#

Do you mean rather a command that toggles something else?

sterile axle
drifting bluff
#

like when u type /pvp it says on and if u type it again it says off

quaint mantle
#

Hashmaps and reverse operator

eternal oxide
#

just a boolean

quaint mantle
#

In that case just use gamerule command

young knoll
#

There’s no gamerule for PvP

#

Only on bedrock :(

river oracle
#

Spigot mappings have some weird names

#

GameProfileSerializer
vs
NbtUtils

#

like wat

young knoll
#

Which is which

river oracle
#

first is spigot

#

second is mojmap

young knoll
#

Mmm

#

Probably got named when it had less functionality or something

river oracle
#

I love looking at mojangs code /s

young knoll
#

You wrote it

river oracle
river oracle
#

so many generics 😭

young knoll
#

True

river oracle
#

like I'm trying to figure out how the fuck this stuff works and its just like Codec<T, C, A , B , E>

eternal night
river oracle
#

its solid I can't blame you

eternal night
#

i do and yea it is great

slender elbow
#

wdym Codec only has two type parameters :kappa:

river oracle
#

idk what they're all called

slender elbow
#

russian doll?

young knoll
#

Russian nesting codecs

river oracle
#

Dyanimc<T> or whatever

#

which does who knows what kekw

#

welp I think I was missing using DFU so I guess I will be looking at this shit all night

slender elbow
#

it holds the DynamicOps and a T so it stays within the domains of that ops

river oracle
#

yep that went over my head Kekw

slender elbow
#

xd

river oracle
#

dw I'll have it figured out by the weekend

eternal night
slender elbow
#

mm hmm

river oracle
#

((CraftServer) Bukkit.getServer()).getHandle().getServer() I love this

young knoll
#

Cringe

#

MinecraftServer.getServer().CraftServer

#

Or something

river oracle
#

why is it deprecated

slender elbow
#

you tell me, it's in a cb patch :^)

#

"static abuse bad" or smth idk

river oracle
#

deprecating internals of your own patch???

#

interesting

#

I'm ngl I'm just staring at a Codec and datafixer rn and just being like yep hmhm and nodding.

eternal night
#

common first reaction

river oracle
#

I don't think I'm capable of doing this right now 😭 I'm just sifting through Dynamic and am like what the fuck is this, then I find myself like 20 classes in and confused as all hell

slender elbow
#

checks out

eternal night
#

I mean, whatever you are doing, you won't need a full understanding on the composite nature that is codecs and data converter

#

Be smart, find places where this is already used for similar purposes in internals, copy paste, profit

slender elbow
#

copying proprietary code ???

#

never

river oracle
#

so real tbh

#

actually 🤓

#

its open source

slender elbow
#

vanilla?

#

interesting

river oracle
#

oh yeah it is. My decompiler cracks it right open CH_KekLaugh

#

no issues there

young knoll
#

Is DFU open source?

slender elbow
#

legally you can't copy minecraft code for cb patches because of the CLA :^)

remote swallow
young knoll
#

Yeah

river oracle
young knoll
#

It’s one of the things they OSed

river oracle
#

god damnit its not javadocs

#

😭

eternal night
#

again, you don't need an understanding of dfu

#

find where mojang uses it (for exactly the same purpose as you are)

young knoll
#

I wish they’d OS the NBT system

eternal night
#

because, surprisingly, items loaded in newer versions of minecraft are ran through DFU

remote swallow
#

aikar has contributed to dfu?!

young knoll
#

How else would it get so over-engineered

slender elbow
#

dinnerbone

young knoll
#

Nah if that was the case spigot would be more over-engineered

slender elbow
#

fry is the second biggest contender

young knoll
#

Oh dinnerbone

river oracle
#

@eternal night CraftLegacy carried me through all that

#

💪 now its time to make this not look like ass

eternal night
#

wat

#

CraftLegacy should have 0 calls in there

#

what are you doing

slender elbow
#

monkaW

eternal night
#

oh, you are copying from craft legacy

#

yea

slender elbow
#

why are there two CraftLegacy classes lmao

eternal night
#

one legacy layer wasn't enough

remote swallow
#

why is there 2

grim hound
#

how can I check what ip address the server is hosted on?

grim ice
#

InetAddress.getLocalHost()

grim hound
#

it doesn't say the port

#

but that's aight

young knoll
#

I don’t think that will get you the public ip

grim ice
#

it will not

grim hound
grim ice
#

it'll give you a private ip

#

for your public ip, this will work

#
    private static String getIPAddress() throws IOException {
        try(BufferedReader reader = new BufferedReader(new InputStreamReader(new URL("http://checkip.amazonaws.com").openStream()))) {
            return reader.readLine();
        }
    }
young knoll
#

Boo

#

No twr

grim ice
#

true

slate siren
#

I am going to code a plugin with Kodlin. I cannot add the spigot library to pom.xml, I get an error.

#

Can you help?

grim ice
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

slate siren
#

To the pom.xml project it gives an error while adding spigot library:

Dependency 'org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT' not found

eternal oxide
#

1.8 is no longer supported. You need to build it using Buildtools

grim ice
#

sucks

#

Why do this?

slate siren
eternal oxide
#

?paste your pom

undone axleBOT
pseudo hazel
#

what versions have you tried

slate siren
slate siren
#

ConsoleApp.xml was not loaded into the project. Is this the problem?

eternal oxide
#

run Buildtools for 1.19.4, then run it again for 1.8.8

gray geyser
#

Is there any easy way to send players between servers when they click an item in a GUI? I'm using bungeecord with 3 subservers.

eternal oxide
#

?pmc

slate siren
eternal oxide
#

at what point are you seeing errors?

gray geyser
# eternal oxide ?pmc

I had a look at that but I couldn't really understand what it was getting at, I'm new to all of this sorry.

slate siren
#

package dev.bingulhan

class sinhaprojesi : JavaPlugin() {

}

I wrote this to the project but I need to download the spigot library and I get a not found error while downloading

eternal oxide
#

doesn;t kotlin use a .kt file not a pom?

#

I've idea on kotlin

slate siren
#

What is this?

untold yoke
#

Looking for a new developer on my minecraft server due to a recent resignation, dm me if you are interested or want more information.

worthy yarrow
#

?services

undone axleBOT
west orbit
#

how do you damage an entity? like deal a certain amount of damage

worthy yarrow
#

You can lower it's health by an amount

west orbit
worthy yarrow
#

iirc it increments half heart : 1

slate siren
#

In version 1.8.9, right click on armor stand is not detected? I wrote a code with Kotlin and tried it, it didn't work.

#

There is no error in the plugin

#

It was working when I made a diamond block for trial purposes.

#

But it didn't work in the armor stand

worthy yarrow
#

?1.8 also is too old just update

undone axleBOT
slate siren
#

I know 1.8.8 is up to date, but there are things I need to do in this version.

worthy yarrow
#

That's not what I meant

slate siren
#

Why is it not detecting right click?

slate siren
#

Isn't that for 1.21?

worthy yarrow
#

?tas

undone axleBOT
slate siren
#

Okay .d

floral drum
slate siren
round elbow
#

how can I read a org.bukkit.Location from a YamlConfiguration?
I saved it using YamlConfiguration and somehow YamlConfiguration#getLocation does not seem to exist
using

dependencies {
  compileOnly("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
}
paper viper
#

Please update to latest

#

Newer features were added later

round elbow
#

uhhh the spigot plugin im creating is meant for 1.12.2

paper viper
#

Then you have to make your own location serializer

round elbow
#

i see how it is

paper viper
#

Normally I’d see 1.8 or latest servers and none in between lol

round elbow
river oracle
#

why 1.12.2

#

that's such an odd choice

#

pre flattening but with new combat?

round elbow
#

ever heard of mohist?

river oracle
#

oh god

paper viper
#

Bruh

river oracle
#

please learn how to mod

#

this weird inbetween thing just sucks for everyone

round elbow
#

whats wrong with it

river oracle
#

its unstable, plugins and mods are inherintly incompatable that and it has before done fishy things with the essentials jar at runtime

paper viper
#

Countless things are wrong with it

#

Mohist is also considered the “worst of its own kind” too if you know what I mean

round elbow
#

ah i see

#

alternative?

river oracle
#

Forge

paper viper
#

Fabric

round elbow
#

or is it just better if i do whatever im doing in a mod?

paper viper
#

Just switch to one thing

river oracle
#

write a mod

#

do one or the other

paper viper
#

Do either modded or plugin

round elbow
#

alr

#

thanks

paper viper
#

And also make sure to update

#

Cause no dev likes being stuck using old api

sweet pike
#

trying to run mvn -P development clean install. on my local Bukkit proect but im getting a test error:

-------------------------------------------------------------------------------
Test set: org.bukkit.AnnotationTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.058 s <<< FAILURE! -- in org.bukkit.AnnotationTest
org.bukkit.AnnotationTest.testAll -- Time elapsed: 0.057 s <<< FAILURE!
org.opentest4j.AssertionFailedError: There 5 are missing annotation(s)
    at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
    at org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
    at org.bukkit.AnnotationTest.testAll(AnnotationTest.java:100)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

can anyone point me in the right direction to resolve this?

lethal knoll
#

Hey all, does anyone have an idea how to solve this? Or is this a bug?
java.lang.IllegalArgumentException: missing required data class org.bukkit.Color

#

This is because of the 1.21 update

worthy yarrow
#

More context

worldly ingot
#

If it's not here, it will be above. The methods and parameters are listed somewhere in the build log

#

But basically a method (likely you have) added is missing a nullability annotation either for one of its parameters or on its return type

worldly ingot
oblique peak
#

hi, this is a really silly question coming from paper, but i can't seem to use Bukkit.getPluginsFolder() it just gives a 'cannot resolve method error'

worthy yarrow
#

.getServer

worldly ingot
#

Bukkit doesn't have this method

worthy yarrow
#

darn

oblique peak
#

wait

worthy yarrow
#

Thought we might be cool like that

oblique peak
#

doesnt have getserver?

#

or doesnt have

worthy yarrow
#

your method

worldly ingot
#

Doesn't have getPluginsFolder()

oblique peak
#

ah

worldly ingot
#

Alternative would be yourPluginInstance.getDataFolder().getParent() and that should be the plugins folder

#

(getDataFolder() is protected though, worth noting :p)

obtuse hedge
#

so uh

#

what was that api

#

for text components

#

where you could make templates

#

and use them over and over

sweet pike
#

what's the different between handle[...]Event and call[...]Event inside CraftEventFactory. i've tried taking a look at some of the methods but i can't wrap my head around why certain events are named as call vs handle

echo basalt
#

Unless you mean a different kind of protected

worldly ingot
#

Oh, yeah, it is public

#

It's part of the Plugin interface

grave lion
obtuse hedge
valid burrow
#

give an example

#

what does teams contain

#

seems like a very chaotic strucutre

#

try properly organizing that first

#

then making a proper mysql setup shouldnt be that comlicated anymore

#

remember to normalize your db and follow all the Schema rules

worthy yarrow
#
public TitlesGUI(PlayerTitlesPlugin plugin) {
        this.plugin = plugin;
        this.titles = new ArrayList<>(plugin.getTitleManager().getTitlesMap().values());
        this.pages = new HashMap<>();
        initPages();
    }```

So as setting titles to a new array list in the constructor, will this always reflect the current values of the map in titleManager?
#
public void updateTitlesList() {
        this.titles = new ArrayList<>(plugin.getTitleManager().getTitlesMap().values());
        pages.clear();
        initPages();
    }```
rather is it necessary to redefine the titles list every time in order to reflect changes of the values in titlesMap?
wide cipher
#

idk what the error is here, says Cannot resolve method 'stream(List<World>)'

echo basalt
#

getWorlds returns a list, not an array

#

Arrays.stream is a method that converts a T[] into a Stream<T>

#

What you want is List#stream

worthy yarrow
#

illusion I have another project for you to yell at

echo basalt
#

no

#

I have work to do

#

can't waste my time

blazing ocean
obtuse hedge
#

someone told me

#

to make text component templates

#

that I could reuse whenever I needed to use it

blazing ocean
#

wha

#

minimessage..?

obtuse hedge
#

maybe

#

idk

spring trail
#

I downloaded the Timber mod but it doesn't appear in the mods section on the Aternos server. How can I add it?

nova notch
#

whats spigot got to do with a mod or aternos

near furnace
#

I need an expert :)

dusty herald
# near furnace https://hastebin.com/share/hegilelixi.css I've been getting this same stupid er...

It looks like you’re encountering an IllegalArgumentException with the message “Plugin already initialized!” during the startup of your Minecraft plugin. This exception typically occurs when a plugin is being initialized more than once. Here are a few steps you can take to resolve this issue:

Ensure Singleton Pattern: Make sure that your plugin’s main class is following the singleton pattern. It should only be instantiated once throughout the lifecycle of the plugin.
Check Constructors: Look for multiple instantiations of your main plugin class or other classes that should only be instantiated once. The stack trace points to CommandsPartOne and Main classes. Ensure that you’re not creating new instances of these classes in your code unnecessarily.
Review Plugin Enabling Process: The error occurs during the onEnable method. Review this method to ensure that you’re not performing any actions that would lead to re-initialization of the plugin.
Update Dependencies: If you’re using external libraries or dependencies, make sure they are up to date and compatible with the version of the server you’re running.
Check for Conflicting Plugins: Sometimes, other plugins can cause conflicts. If you recently added a new plugin before this error started occurring, try removing it to see if the problem persists.
Server Version Compatibility: Ensure that your plugin is compatible with the server version you’re using. The stack trace mentions paper-api-1.21-R0.1-SNAPSHOT.jar, so your plugin should be compatible with this API version.

near furnace
dusty herald
#

do you have more than one plugin

#

that has the same plugin.yml name

near furnace
#

no, only one

dusty herald
#

send code

near furnace
dusty herald
#

yes.

near furnace
#

i have:

#

a commands package

dusty herald
#

send main

#

onenable

#

part

near furnace
#

which includes classes:

  1. CommandsPartOne
  2. FeedCommand
near furnace
#
package com.lexplugins.plugin;

import com.lexplugins.plugin.commands.CommandsPartOne;
import com.lexplugins.plugin.commands.FeedCommand;
import com.lexplugins.plugin.commands.InvincibleCommand;
import com.lexplugins.plugin.listeners.JoinLeaveListener;
import com.lexplugins.plugin.listeners.LeaveBedEvent;
import com.lexplugins.plugin.listeners.SheepShearListener;
import com.lexplugins.plugin.listeners.XPBottleBreakListener;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerBedLeaveEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class Main extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        // Plugin startup logic
        Bukkit.getServer().getConsoleSender().sendMessage("Plugin booting up...");
        Bukkit.getPluginManager().registerEvents(this,this);
        Bukkit.getPluginManager().registerEvents(new XPBottleBreakListener(), this);
        Bukkit.getPluginManager().registerEvents(new SheepShearListener(), this);
        Bukkit.getPluginManager().registerEvents(new JoinLeaveListener(), this);
        Bukkit.getPluginManager().registerEvents(new LeaveBedEvent(), this);
        getCommand("invincible").setExecutor(new InvincibleCommand());
        getCommand("suicide").setExecutor(new CommandsPartOne());
        getCommand("feed").setExecutor(new FeedCommand());

    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
        Bukkit.getServer().getConsoleSender().sendMessage("Pluggin shutting down...");
    }
}
#

also on an irrelevant note, only the main class can contain the onEnable() and everything else can't have it or else it will break right?

dusty herald
#

yes

#

if any other class has JavaPlugin it will break the plugin

near furnace
#

so this is the main class

dusty herald
#

yup

near furnace
#

yes. thanks

dusty herald
#

send CommandsPartOne code

near furnace
#

roger

#
package com.lexplugins.plugin.commands;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.*;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class CommandsPartOne extends JavaPlugin implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        if (sender instanceof Player p) {

            p.setHealth(0);
            p.sendMessage(ChatColor.RED + "Man, you used /suicide... What did you think was going to happen?");

        } else if (sender instanceof ConsoleCommandSender) {

            Bukkit.getServer().getConsoleSender().sendMessage("The console ran the command.");

        } else if (sender instanceof BlockCommandSender) {

            Bukkit.getServer().getConsoleSender().sendMessage("The command block ran the command.");

        }

        return true;
    }
}```
dusty herald
#

** extends JavaPlugin **

worthy yarrow
#

^

dusty herald
#

see the problem?

worthy yarrow
#

Also there's no reason to be logging

#

You're only performing operations if the sender is a player

near furnace
#

OHHHHHHHHHHHHH

worthy yarrow
#

So you can remove all the useless else / else ifs

near furnace
#

so it like

#

showed us how to log entities other than players

#

thats why :)

worthy yarrow
#

Also Bukkit.getLogger() exists

near furnace
#

and i always run into errors because i try to do some stuff a little bit different from the tutorial

near furnace
#

whats that and how do u use that

worthy yarrow
#

instead of getServer.getConsoleSender

near furnace
#

oh

#

i originally used System.out.println

worthy yarrow
#

Bad

#

Just use Bukkit.getLogger

near furnace
#

then someone told me to use bukkit.getServer().getConsoleSender

dusty herald
#

ALEXA WONT STOP FARTING

near furnace
#

@worthy yarrow

Bukkit.getServer().getLogger().sendMessage("The command block ran the command.");```
#

.sendMessage is not valid there, if i use .getLogger

worthy yarrow
#

thats just extra work + bukkit.getLogger lets you choose a level ie: #severe("error message here")

#

press . after getlogger

shadow night
#

aren't you supposed to use your own logger and not the bukkit logger?

worthy yarrow
#

and see your choices

worthy yarrow
near furnace
#
Bukkit.getServer().getLogger().warning("The command block ran the command.");```
do i use this?
#

.warning is the closest to .sendMessage

worthy yarrow
#

sigh

near furnace
#

oh severe

worthy yarrow
#

it's just a logging level

shadow night
#

aren't loggers a basic concept in java

worthy yarrow
#

Idk at this point

shadow night
#

or, well, I guess it is a bit above basic but not advanced

#

what do you call it

worthy yarrow
#

intermediate?

near furnace
#

well im not intermediate at all

worthy yarrow
#

I'd call logging a basic concept unless you want to make it complex

near furnace
#
Bukkit.getServer().getLogger().severe("The command block ran the command.");```
so this just gets the server. gets the thing/logger which is trying to send the command, then what type to send
shadow night
#

loggers are something more advanced

worthy yarrow
#

I use sout for debugs most of the time, but thats debugging I suppose

blazing ocean
#

but you should be using your plugins logger

near furnace
#

omg

#

im understanding nothing

#

what is these loggers

near furnace
#

i just want to print a message to the console 😭

shadow night
#

a very useful one

worthy yarrow
#

its not that hard

near furnace
#

whats wrong with using
Bukkit.getServer().getConsoleSender.sendMessage("hi hello this is a message")

quaint mantle
#

how to enable spawn entities ?
i mean 1.19.4 feature holograms,items

near furnace
near furnace
worthy yarrow
#

plugin.getLogger

#

Your main class is the plugin reference

shadow night
#

and lets see whether we'll have to call ?di

worthy yarrow
#

kek

near furnace
worthy yarrow
#

uh

shadow night
#

sigh

worthy yarrow
#

It'd do you a lot of good to actually learn java before using an api

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

worthy yarrow
#

It's also not that we can't help you it's rather just that spoonfeeding you is not going to help teach anything

near furnace
#

i only learnt java absolute basics, like i can make a very very simple number guessing game thats it

worthy yarrow
#

So then go learn it better

near furnace
#

but i didnt know you have to learn java to the point you can build spaceships to learn minecraft plugin development

worthy yarrow
#

Well when you put in those terms, you're not even at a level where you can build a fire with java

#

So just take the time to learn the language before you attack an api

near furnace
#

how good do you think someone should be before learning api's like spigot/bukkit

shadow night
#

knowing what dependency injection is and how to operate a logger

hazy parrot
#

At least know basic principles

worthy yarrow
#

When you say basic, you probably mean you know 6 total operators and thats about it

#

This isn't really even what you can call a level

#

You need a foundation of the syntax at least before trying to use an api

shadow night
#

once you can write me a mapping file that changes net/minecraft/util/math/MathHelper to net/minecraft/util/math/Meth come back (that's a joke btw)

worthy yarrow
#

MethHelper

shadow night
#

lmao

shadow night
nova notch
#

wait i was joking but this is actually just chatgpt lmao

karmic falcon
#

e

near furnace
#

@dusty herald
the error is gone now thanks to you :)
i removed the "extends JavaPlugin" in the CommandsPartOne

#

also can someone tell me why i get this warning all the time

[14:51:07 WARN]: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "org.bukkit.Server.getTPS()" because "org.bukkit.Bukkit.server" is null
[14:51:07 WARN]:        at org.bukkit.Bukkit.getTPS(Bukkit.java:2374)
[14:51:07 WARN]:        at com.destroystokyo.paper.gui.RAMDetails.update(RAMDetails.java:62)
[14:51:07 WARN]:        at com.destroystokyo.paper.gui.GuiStatsComponent.lambda$new$0(GuiStatsComponent.java:27)
[14:51:07 WARN]:        at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
[14:51:07 WARN]:        at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
[14:51:07 WARN]:        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
[14:51:07 WARN]:        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
[14:51:07 WARN]:        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
[14:51:07 WARN]:        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
[14:51:07 WARN]:        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
[14:51:07 WARN]:        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
[14:51:07 WARN]:        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
[14:51:07 WARN]:        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
[14:51:07 WARN]:        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
[14:51:07 WARN]:        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
karmic falcon
#

hi, if i export my project with plugin.yml containing some commands info(i am making a custom command) does a folder called NameOfMyPlugin containing the command config get created?

near furnace
blazing ocean
#

this is some paper issue

#

we are not paper

near furnace
#

ok

#

thanks :)

near furnace
echo basalt
#

The error message is a lil funny

blazing ocean
#

real

drifting bluff
#

guys how do i set worldguard flags with my plugin?

hazy parrot
shadow night
#

maybe the default server gui?

blazing ocean
#

yea

#

it's a java 22 issue according to somebody in paper

#

(+ windows moment)