#help-development

1 messages · Page 623 of 1

vapid anvil
#

well you clearly haven't defined it in scope

shadow night
#

Well, does it exist? Do you have it imported?

chilly hearth
#

exsit*

#

and there is no option to import it i didnt manually but didnt worked

tender shard
#

what the hell is "bosscommand2"? a field? a local variable? please tell me it's not a class name

chilly hearth
#

its a class name ;-;

tender shard
#

it's a shit class name then

#

?conventions

smoky anchor
shadow night
#

Naming conventions tell me it should be atleast BossCommand2

chilly hearth
#

will that fix the

#

error ?

tender shard
#

why do you have 2 boss commands anyway

#

or lets rather say, why do you have 2 commandexecutors for one boss command

chilly hearth
#

like /ancient for 1 boss and /reaper for another boss

#

its 2 bosscommands

shadow night
tender shard
#

then they should be called AncientCommand and ReaperCommand

shadow night
#

Yes

chilly hearth
#

i HAVE CLASS name bosscommand2 wdym; -;

shadow night
#

Do you have it imported tho?

tender shard
#

I mean you also wouldn't use PlayerCOmmand1, PlayerCommand2, PlayerCommand3, PlayerCommand4 for tpa, kill, give and spawn, would you?

chilly hearth
#

not working

#

i added manually but diddnt worked

tender shard
#

show a screenshot of your project setup

chilly hearth
#

alr

shadow night
#

When a person doesn't know naming conventions it usually means they failed somewhere at learning java lol

chilly hearth
#

ima send u in dms mfnalex

smoky anchor
#

?img

undone axleBOT
tender shard
shadow night
#

Send it here

chilly hearth
#

oh wait ima upload ther

#

let me veridy and send

eternal oxide
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

chilly hearth
#

done

eternal oxide
#

remove the fully qualified name and correct your imports

shadow night
#

Yes

chilly hearth
#

that also not working

eternal oxide
#

clear caches

chilly hearth
eternal oxide
#

clear caches

chilly hearth
#

how

eternal oxide
#

file menu

chilly hearth
#

there is no clear caches option there

eternal oxide
#

yes there is, look for it

shadow night
#

Invalidate caches?

chilly hearth
#

yes

#

i selecteddd all and restart

buoyant viper
#

does TRUE == 0 or 1 i forgor

echo basalt
#

1

shadow night
#

True is 1

buoyant viper
#

ah

shadow night
#

0, off, false; 1, on, true

tender shard
#

In bash, 0 is true

shadow night
#

Shell languages are always confusing

chilly hearth
#

yk sometimes i dont understand this

tender shard
chilly hearth
#

its loading lets see

buoyant viper
#

would this work or are my types all fucked up

shadow night
chilly hearth
#

HOW TF IT FXIED BRO

#

NAH

shadow night
#

Lmao

chilly hearth
#

@eternal oxide bro how

#

nah

tender shard
#

It was IJ being confused

shadow night
#

IJ just fucked up

tender shard
#

And now use proper class names

chilly hearth
#

i quit

shadow night
chilly hearth
eternal oxide
#

if IJ is having issues with imports its almost always a bad cache

chilly hearth
#

ah got it

#

welp thanks

shadow night
#

I wonder if eclipse does that too

eternal oxide
#

sometimes, but in eclipse you just press F5 😉

shadow night
#

I hope you will call your classes properly tho

shadow night
chilly hearth
#

next class comming in bosscommand3 😉

shadow night
#

But tbf eclipse looks like it comes from 10 years ago lmao

pseudo hazel
#

maybe start by using actual names and style conventions

tender shard
chilly hearth
#

ikr

eternal oxide
#

I love 10 years ago 🙂

chilly hearth
#

i should be the ceo of google

shadow night
#

What is google even written on

chilly hearth
#

notepad 😉

#

notepad pro max

shadow night
#

Notepad pro max super language

chilly hearth
#

notepad pro max s Ultra

pseudo hazel
chilly hearth
#

notepad pro max S Ultra 5G

pseudo hazel
#

google is not one thing

buoyant viper
#

top tier

pseudo hazel
#

google is a company

chilly hearth
#

notepad pro max S Ultra 5G FOLD

shadow night
eternal oxide
#

google devs use their own in house development system

pseudo hazel
#

probably written in go at this point

chilly hearth
pseudo hazel
#

given its their own language

tender shard
#

maven-checkstyle-plugin should be part of the builtin superpom so that "classname" class names wouldnt even compile

shadow night
#

Lmao

buoyant viper
chilly hearth
#

ur class name is PDCWrapper

#

it shouldbe Airthebest

shadow night
#

PersitentDataContainerWrapper

buoyant viper
#

right, should be PdcWrapper (or whatever the fuck google styleguide would want)

chilly hearth
#

dw i wil correct u everytime ma man

chilly hearth
#

it should be Air is the best

pseudo hazel
#

ig PdcWrapper is better

chilly hearth
#

nah Air is the best is better

pseudo hazel
#

but purely because if you want to add more acronyms they dont beldn together

eternal oxide
#

I'd argue for PDCWrapper

chilly hearth
#

WOW

#

imagine

shadow night
#

PersistentDataContainerWrapper

pseudo hazel
#

SMHPDCWrapper

buoyant viper
chilly hearth
#

ok ima throw up

#

i dont understand a bit

#

cuz me new to java

pseudo hazel
#

wait whats the diff between normal pdc and this

shadow night
#

I understand everything

eternal oxide
#

if PDC was a word it would be PdcWrapper, but its not, it's an acronym.

tender shard
chilly hearth
pseudo hazel
#

oh i guess

chilly hearth
buoyant viper
#

lol

shadow night
chilly hearth
#

..

pseudo hazel
#

usually

chilly hearth
#

1+1= 11

#

sm

#

smh

#

easy math

shadow night
#

As I said, greater than 1

chilly hearth
#

+-

#

ima go back to coding the new clas bosscommand3 😉

buoyant viper
#

would it be smart to cache NamespacedKeys in my wrapper? thonk

tender shard
#

I usually do that

buoyant viper
#

somethin like this?

tender shard
#
@UtilityClass
@SuppressWarnings("unused")
public class PDCUtils {

    private static final Map<String, NamespacedKey> KEYS = new HashMap<>();

    ...

    /**
     * Creates a NamespacedKey or returns a cached one. <b>JeffLib has to be initialized first.</b>
     *
     * @param key Key name
     * @return NamespacedKey
     */
    public static NamespacedKey getKey(final String key) {
        return KEYS.computeIfAbsent(key, __ -> new NamespacedKey(JeffLib.getPlugin(), key));
    }
}
#

btw NamespacedKey.fromString does not exist in 1.16, in case you care about that

buoyant viper
#

ah, yeah should probably use the constructor version

buoyant viper
#

it exists in 1.16 api though...

eternal oxide
#

you should toLowerCase key as NamespacedKey does that internally

buoyant viper
#

or well, 1.16.5 ig :v

tender shard
#

it was added in 1.16.4 or sth

buoyant viper
#

wait there isnt even a spigot-api for 1.16.0 expandssia was it another 1.7 situation where 1.16.1 = 1.16's release?

#

or was spigot just lazy

tender shard
#

1.16.1 was the first one, yeah

buoyant viper
#

good idea of when to remove it from cache? @tender shard

buoyant viper
#

hmm

tender shard
#

Or do you create thousands of throwaway namespacedkeys?

buoyant viper
#

fair, i just have 1 key that im using rn

chilly hearth
#
        getCommand("ancient").setExecutor(new bosscommand());
        getCommand("reaper").setExecutor(new bosscommand2());
        getCommand("exotic").setExecutor(new bosscommand3());
        getCommand("feral").setExecutor(new bosscommand4());``` how to make a command that execustes them all at once ?
tender shard
#

by using the same commandexecutor

#

and/or using a command alias

mellow edge
#

no matter if the player changes his name, the UUID will stay the same right?

tender shard
#

yes

#

(that's the purpose of the UUID)

mellow edge
#

ik just checking

#

thanks

tender shard
#

unless you're in offline mode

#

in offline mode, changed name = changed UUID

pseudo hazel
#

yeah the uuid is directly tied to the account

mellow edge
#

yeah the you need register plugins, but I luckily am in online mode

pseudo hazel
#

offline mode is not supported here anyways 😄

shadow night
#

Thank god I bought minecraft

#

6 or 7 years ago, I got that game

#

Thankfully

tender shard
#

i bought it in beta 1.2 🥲

shadow night
#

Wow

#

I remember playing 1.12.2 pre releases

pseudo hazel
#

I have a question, is there a way to see if the server has disabled statistics/advancements apart from trying to use them regardless?

tender shard
#

beta 1.3 was released on my 16th birthday, so basically since I'm allowed to buy alcohol lol

pseudo hazel
#

germany do be wildin

tender shard
shadow night
#

Actually, is the law only against buying alcohol or drinking too?

buoyant viper
#

ive somehow flipped true to equal false and false to equal true

#

what in the fuck

pseudo hazel
#

okay and is there such a thing for statistics too?

tender shard
#

there's only a law against SELLING it to underage people, and that law only applies to public stores etc

shadow night
#

Oh lol

tender shard
pseudo hazel
#

oh

tender shard
#

not sure though

buoyant viper
shadow night
#

So many colors

pseudo hazel
#

well on some server I look at statistics but then it say" [they] are disabled on this server"

tender shard
buoyant viper
#

i probably should

tender shard
#

🥲

buoyant viper
#

but this is just a part of my smp's plugin

#

bc i keep messing up my house by stripping the log my door button is on with my axe

#

i was just converting to PDC so it can persist across joins

#

and somehow i have the stupid

tender shard
#

same lol. In my plugin it just disables logstripping and adds stonecutting recipes instead

shadow night
#

Nice

tender shard
buoyant viper
tender shard
#

i hate that boolean was only added after 6 versions

buoyant viper
#

is that not... how it would/should work?

tender shard
#

that's how it works

buoyant viper
#

this is what im doing on player-join for if they dont have it... idk why its flipping

tender shard
#

I'd probably just use a flag "disabled_log_stripping" and then use getOrDefault when checking it

#

so you only have to change PDC for players who actively changed their settings

buoyant viper
#

tru

#

oh my god its because im stupid

#

!pdc.get(can_strip_logs) return

#

that should be if get(can_strip_log) return

chilly hearth
#

what is

#

the

#

format

#

of

#

command

#

in plugin yml

smoky anchor
#

bro can you type like a normal person please

chilly hearth
#

okie

#

can u help ?

tender shard
chilly hearth
#

commands:

smoky anchor
#

all of that could be in one message...

shadow night
#

My ide shows me plugin.yml stuff lol

buoyant viper
#
commands:
  command1:
    description: "Your plugin description"
    aliases: [ "alias1", "alias2" ]
    usage: "/commandname <args> ..."
    permission: "yourplugin.command"
``` basically idk
green falcon
#

does BlockBreakEvent fire twice? one for each hand? for some reason I'm getting 2 events per block break

smoky anchor
#

I don't think you can break with your off-hand
I know InteractionEvent does tho

smoky anchor
shadow night
#

I've noticed that while making my plugin

green falcon
chilly hearth
shadow night
#

Don't do that

chilly hearth
#

and setting the same excuetor

#

i want to them to spawn sepertaly by commands like /reaper /ancient which is working but i also wana make them spawn all at once will for examlpe /all

shadow night
#

Then make an /all command and call the commands as the player ig

chilly hearth
#

heh

#

wdym

shadow night
#

I mean what I said

chilly hearth
#

like call the commands asplayer?

shadow night
#

Well I guess you could do it in a different way

chilly hearth
#

what way

shadow night
#

Call the onCommand function from the command classes, but that also sounds oof

chilly hearth
#

;-;

shadow night
#

Idk I've never done that

eternal oxide
#

move all the spawn methods into their own class

smoky anchor
#

guy called the classes "bosscommand2" and so on, I don't think they care

eternal oxide
#

seperate from teh commands

shadow night
chilly hearth
eternal oxide
#

put ALL spawn methods in one class

chilly hearth
#

;-;

eternal oxide
#

a single class, probably with static methods

chilly hearth
#

but i want them to spawn sepretely as well

#

like /ancient and /reaper ;-;

eternal oxide
#

commands are not the spawn code

shadow night
chilly hearth
#

i dont ;-;

eternal oxide
#

commands just check if a person can use a command and what shoudl be called

#

spawning shoudl be compeltely seperate

shadow night
#

Yes

#

That sounds like a very good idea

chilly hearth
#

then*

eternal oxide
#

yes

chilly hearth
#

alr now guide me

eternal oxide
#
public class Spawn {
  public static ancient(Location location) {
    location.getworld().spawn(...
  }

  public static reaper(Location location) {
    location.getWorld().spawn(...
  }
}```
#

expand as you need to do your spawning

#

your /ancient command class then calls Spawn.ancient(location) to spawn your whatever ancient is

#

as its a utils class all methods are static so can be called from anywhere

lofty junco
#

hey is it possible to create a plugin that can run on paper and bungeecord?

buoyant viper
#

yes

shadow night
#

Why paper if we are spigot

buoyant viper
#

u include a bungee.yml and plugin.yml (or paper-plugin.yml for paper-exclusive) in the plugin

#

make bungee.yml point to the bungee-related code, and plugin.yml point to paper-related code

shadow night
#

Wait, can I make a plugin that works differently on paper than spigot?

eternal oxide
#

Build against spigot and it runs on all forks. ONLY build against a specific fork if it offers you somethign you really need which Spigot doesn;t

buoyant viper
#

i think if plugin.yml exists it overrides paper-plugin.yml

#

or vice versa? idk

shadow night
#

Sad

buoyant viper
#

u could always just check to see if the server is paper lol

lofty junco
eternal oxide
#

paper-plugin.yml is experimental and buggy

buoyant viper
#

just Paper

shadow night
#

Paper is paper

#

Spigot is spigot

eternal oxide
orchid gazelle
#

Paper is spigot

#

Spigot is not Paper

lilac dagger
#

nope

lofty junco
#

rly since when?

shadow night
eternal oxide
#

since forever

buoyant viper
orchid gazelle
#

Ofc lol, Paper is literally based on spigot

lilac dagger
#

paper is a fork of spigot but plugins don't work the same for paper

orchid gazelle
#

It's still spigot

lilac dagger
#

loosly yes

orchid gazelle
#

If I take a sock and put a nail on it it loses function but is still a sock

shadow night
#

Lol

eternal oxide
#

Based on the mona lisa. Do you think I could get a few million for it?

shadow night
#

Yeah

buoyant viper
#

its once u start depending on paper-api specifics that its funky

orchid gazelle
#

It's not based on mona lisa because it has never been an exact copy of it

lilac dagger
#

hmm, armorstands bounce arrows on paper so not sure

eternal oxide
#

based on has never ment an exact copy

buoyant viper
lilac dagger
#

if you're trying to make a prop hunt game bows work on spigot but not on paper

orchid gazelle
lilac dagger
#

so that's why i don't consider paper spigot anymore, it doesn't just build on top, it changes how things work on spigot

#

that makes incosistent api

orchid gazelle
#

Paper is still spigot

#

It's literally just modified spigot

echo basalt
#

It's bukkit-based, sure

eternal oxide
echo basalt
#

but there are so many changes on top

orchid gazelle
#

Heck it's even copying the patches lol

lilac dagger
#

if i compile a plugin for bukkit i sure knew it worked on spigot

#

but with paper i'm not sure

orchid gazelle
#

It does 99%

buoyant viper
echo basalt
#

throwback to when I started making plugins and I'd import bukkit instead of spigot

smoky anchor
#

throwback to when I started making plugins and used nms to edit item nbt as I didn't know PDCs exist

shadow night
#

Lol

echo basalt
#

throwback to when I started making plugins and used mns to edit item nbt because PDCs didn't exist

lilac dagger
#

lol

smoky anchor
#

LOL

buoyant viper
echo basalt
#

project idea I just had

#

a sort of language detector where you paste code and it gives what language it is

#

because hastebin's is awful lmao

#

I'm thinking of either a confidence-based algorithm or just AI

shadow night
#

AI is cool

#

You just gotta scan it for certain syntax

smoky anchor
#

Just make a regex for each language smh

echo basalt
#

Not that easy

#

Because sometimes you don't have full code

#

But you can pick up on subtle differences when it comes to naming conventions that lets you differentiate between, for example, C# and Java

orchid gazelle
smoky anchor
shadow night
smoky anchor
#

oh fuck

shadow night
#

You don't want to start with java and end up getting a gradle buildscript

smoky anchor
#

There is a fatal flaw in my solution it would seem :D

shadow night
#

Lol

smoky anchor
#

In my defence, I don't use brain in shitposts

shadow night
#

Well, that's interesting

#

Where do you store your brain?

smoky anchor
#

what

shadow night
#

Well, is it a jar or maybe a box?

green falcon
#

very strange BlockBreakEvent gets called twice if I break any block in creative, but not survival

smoky anchor
shadow night
#

In a jar, nice

zealous osprey
#

you making thaumcraft 1.12?

smoky anchor
#

wut? lol no
I am responding in a funny way

merry cove
#

hey why is this a struggle? @EventHandler public void onCraft(CraftItemEvent event) { Player player = (Player) event.getWhoClicked(); Bukkit.getLogger().warning("event is called correctly."); if(event.getRecipe() == GrapplingHook.getInstance().getRecipe()) { Bukkit.getLogger().warning("correct recipe"); if (!player.hasPermission("gh.craft") || !player.hasPermission("gh.admin") || !player.isOp()) { event.setCancelled(true); } } } The only message that pops up is [12:10:10 WARN]: event is called correctly.
it's the literal same recipe as loaded onEnable() so don't see how it's nto a match? tried doing event.getRecipe().equals() but that didn't help either?

#
        ItemStack item = getHook();

        ShapedRecipe recipe = new ShapedRecipe(new NamespacedKey(this, "gh"), item);
        recipe.shape(" X ", " X ", " X ");
        recipe.setIngredient('X', Material.STICK);
        return recipe;
    }

    public void loadRecipe() {
        Bukkit.addRecipe(getRecipe());
    }````it's loadRecipe() onEnable
smoky anchor
#

your getRecipe will return a different instance each time

#

so you can't compare them with ==

#

I would compare with the namespaced key

merry cove
#

ok so get the key from ItemStack item = event.getRecipe().getResult(); then match it ?

smoky anchor
#

no, the recipe namespacedkey

#

the one you pass here new ShapedRecipe(new NamespacedKey(this, "gh"), item);

merry cove
#

I get that, but the way I get the item in the crafting table is that way I showed I assume to match the key

smoky anchor
#

I don't understand

merry cove
#

oh I thought u wanted me to match the key with the final item, not the recipe. my bad

uncut needle
#

./title Jorvents title "What is this called"

#

how do to it in spigot

#

the big text in centre of screen

ocean hollow
#

why am i getting this error

chrome beacon
#

The remove method calls the remove method

ocean hollow
#

hahahah lol

gray talon
ocean hollow
#

yeah, i fixed that))

gray talon
#

you russian?

ocean hollow
#

i -> i.remove();

#

no

gray talon
#

fair enough

ocean hollow
#

i from ukraine

gray talon
#

fair enough

tall furnace
#

The tutorial series can be done in half a day. I recommend trying every single feature out to help it all stick.
Also, using chatGPT isn't just not a good way, chatGPT cannot write runnable code because it doesn't get what a boolean is. Even with simple code it just creates garbage that will only confuse you.

ivory sleet
#

yea, chat gpt only has superficial knowledge

tender shard
#

chatgpt can't even crash the jvm

shadow night
#

ChatGPT when you want it to tell you the truth: no, but I can create this false information
ChatGTP when you want it to generate false info: haha, no

tender shard
#

lol exactly

shadow night
#

I tried getting it to generate false info, it fucked up

#

Then I asked it to code a mc forge gui and

#

Guess what

tender shard
#

it killed your unborn child

#

and sold its remains to organ traficking mafia

shadow night
tender shard
#

taskmanager in macOS be like: right-click process -> "kill children"

ivory sleet
shadow night
ivory sleet
#

altho its a pretty shit way of doing it

#

thought it would just recommend me epsilon gc

shadow night
#

Thats not quite clever

tall furnace
shadow night
#

Create a new thread and ask it to tell you whats wrong

tall furnace
#

That wouldn't do anything because i is undefined

hazy parrot
#

what

shadow night
#

i?

ivory sleet
#

i is not even declared?

tender shard
# ivory sleet

that doesn't crash the JVM, it just throws an OutOfMemoryError though

tall furnace
#

Or is that a 1?

shadow night
#

A 1

ivory sleet
tall furnace
#

I just woke up and my eyes are blurry, my bad

tender shard
#

not if you catch it

#
    public static void main(String[] args) {
        try {
            int[] arr = new int[Integer.MAX_VALUE];
            arr[0] = 1;
        } catch (Throwable throwable) {
            System.out.println("asd");
        }
    }

this prints asd

tall furnace
shadow night
#

I wonder what code can crash the compiler, like, not just throw an error, but actually crash it

ivory sleet
#

but not always

#

the jvm may still crash

tender shard
#

this is a proper JVM crash

hazy parrot
shadow night
#

Wait, does craftbukkit have its own events?

young knoll
#

What

ivory sleet
tender shard
shadow night
#

And those are?

buoyant viper
#

EntityDismountEvent

#

and uhhh

tender shard
#

idk check javadocs

buoyant viper
#

idk the other

#

?jd-s

undone axleBOT
tender shard
shadow night
#

Lol

#

But they won't get a playerjumpevent

buoyant viper
#

jumping is not its own packet

#

its a series of generic movement packets over X time

shadow night
#

Bruh

smoky anchor
#

But you can check for the "Jumps" stat increase

buoyant viper
#

hmm

#

true

#

i wonder where the code for that happens, ill have to look later

smoky anchor
#

yo if you do find it, tell me
I wonder as well :D

tender shard
uncut needle
#

its

#

player.sendTitle()

nocturne forge
young knoll
#

Papers jump event isn’t anything special either

tender shard
#

it's "special" in the sense that they once again didn't contribute it to spigot

tall furnace
nocturne forge
clear panther
tender shard
#

model?

#

its latest IJ (ultimate 2023.1.4)

smoky anchor
#

With the beta UI disabled I assume ?

tender shard
#

yeah ofc, the beta UI is total shit

#

it takes up more space for everything

#

it removes the useful labels and replaces them with non-descriptive icons

#

and many buttons are hidden in some context menu instead of being there directly

kind hatch
#

Y'all just haters. I love the new UI.

tender shard
#

in the "old" ui it shows like 70 entries in the project menu, in the "new ui" it only fits like 55 entries

smoky anchor
#

you mean the files of a project ?

grand saffron
#

Question: I was planning on releasing a paid plugin and use the placeholders like %__NONCE__% for a random id and then send it through a post request to a server to see how much servers are using the singular plugin. If I notice that one of the plugins bought is being used in multiple number of servers, does it break spigot tos to just disable usage of the plugin to that specific user?

kind hatch
cinder abyss
#

Finally !

eternal oxide
#

you are not permitted to use drm/licensing systems in paid plugins

cinder abyss
# cinder abyss Finally !
player.addPassenger(player.getWorld().spawn(player.getLocation(), ItemDisplay.class, (itemDisplay) -> {
  itemDisplay.setItemStack(previous);

  Transformation transformation = itemDisplay.getTransformation();
            transformation.getTranslation().set(player.getEyeLocation().getDirection().normalize().multiply(0.35).toVector3f());
  itemDisplay.setTransformation(transformation);

  itemDisplay.setRotation(player.getLocation().getYaw() + 180f, 0f);
}));```
eternal oxide
cinder abyss
grand saffron
#

Like how do plugins like litebans get through with that then

eternal oxide
#

he's talking about blocking his plugin not a player

#

a server can ban a player

grand saffron
#

yeah not that

#

litebans has a method of detecting nulled plugins

#

and disables itself

eternal oxide
#

nulled?

hazy parrot
#

It's some new slang for cracked plugins

grand saffron
#

that

tender shard
shadow night
cursive sandal
#

hello, i am usign Votifier and Voteplugin for my voting system in my server, but i want that if someone votes, they get 1 vote key. how do i configure that?

kind hatch
tender shard
grand saffron
#

^

cursive sandal
#

oh okay ty

smoky anchor
#

I am not sure with this one tho lol

grand saffron
#

Premium Plugin Protection

#

Just put that there so I won't trample over other questions

tender shard
#

this too #general message

cinder abyss
eternal oxide
cinder abyss
eternal oxide
#

too dark to see

#

try a pitch of -90 or -180

kind hatch
cinder abyss
eternal oxide
#

you may then need to invert the offset

cinder abyss
cinder abyss
#

I think its the rotation not the offset

eternal oxide
#

it is

#

try other values like -135

#

basically multiples of 90

#

or 45

cinder abyss
#

okay

eternal oxide
#

whichever you need to get it right

kind hatch
tender shard
#

idk I made those screenshots on june 21st on windows 11. and on macOS the difference is even bigger (but there I got a reoslution of 3456x2234)

nocturne forge
#

what do i use instead of getInventory on enderChest

astral horizon
#

where is exact information of PacketType.Play.Client.BOAT_MOVE packets?

onyx fjord
#

not the block

#

because its different for each player

buoyant viper
#

?jd-s h

undone axleBOT
twin venture
#

hi have a problem while saving a uuid :
leader: !!java.util.UUID 'eb949088-f4de-4e61-bb90-ee4220316774'

#

how i can fix it?

eternal oxide
#

UUID.toString() and UUID.fromString(string)

shadow night
#

yes

twin venture
#

alright ,so saving is to string and loading from string?

#

or the other way around?

twin venture
#

there is no tostring method xd

shadow night
#

wdym

eternal oxide
#

yes there is

shadow night
#

im pretty sure I've seen it just recently

twin venture
#

is it in 1.8.8?

#

or higher?

eternal oxide
#

in all

#

its Java not Spigot

pseudo hazel
#

its a java feature

#

toString has been there since the dawn of time

twin venture
#

oh i see oky

hazy parrot
#

why do you need it

shadow night
#

its minecraft:water

#

thats a string

eternal night
#

blocks don't have integer ids outside of the network layer

echo basalt
#

oh you sweet summer child

#

You got the global pallette?

#

The chunk packet sends a palette that matches integers to the index of the block state on the global palette

shadow night
#

oonga boonga not understand word

echo basalt
#

And uses that "local palette" in the chunk contents

#

I don't care

#

You have a global palette that says "air is 0, stone is 1" etc

#

Yes

#

The beginning of the chunk packet sends a sort of mapping from local palette -> global palette

#

And then it sends all the contents in the local palette indexing

shadow night
#

why

echo basalt
#

Smaller numbers encode better

shadow night
#

bruh

echo basalt
#

So if you have a chunk full of block states that have a really high ID on the global palette

#

It just says "this is block id 0 on the local palette" and sends a bunch of 0's instead

cinder abyss
#

Hello, is the player view (F5) available with spigot ?

echo basalt
#

That's client-side

cinder abyss
#

okay thanks

clear panther
#

smh

echo basalt
#

uhh I don't have plib's packet wrappers on me

#

Able to link me to code?

shadow night
#

oh thats confusing

echo basalt
#

Something tells me that the palette is in the buffer

#

I'd suggest reading the buffer manually

#

The global palette is something that both the server and the client should have

#

yeah you want to run this

tall furnace
shadow night
#

burger

echo basalt
#

No clue what you're trying to do

#

but unpacking a buffer should be much faster than whatever nms route you could do

#

Yeah so

shadow night
#

why tho

echo basalt
#

All you need is the global palette

#

And whatever data you want to inject

#

And a proper understanding of the chunk format

#

Nope

#

It's something that's kinda hardcoded in both the client and the server

#

Nope

#

You just need to know what bytes to write

#

And you already got some parts down

#

Starts with the amount of blocks, then the palette

#

Pretty sure you can get the global palette in nms by doing new GlobalPalette<>(Block.BLOCK_STATE_REGISTRY);

#

That's what paper's antixray does

prime spire
#

Hello! I'm currently in the progress of making a plugin that'll handle skyblock like islands for people.
I'm wondering what the best approach to doing it would be though, not looking for any code or spoon feeding - just a nudge in the right direction.
Like should I create an entire void world per "island", or is there a better approach to it?

Thanks in advance!

echo basalt
#

Yeah so

#

I'm working on something like that at the moment

shadow night
echo basalt
#

spoofs chunks

echo basalt
#

There are multiple ways of handling this

shadow night
#

what if you'd just replaced all ores by stone (in the packets) instead of replaceing the stone by ores

echo basalt
shadow night
echo basalt
#

Still lets xrayers find caves and it's less annoying

echo basalt
#

Keeps coordinates intact and all

shadow night
#

what plugin should I make, I gotta be working on another one but I don't feel like it rn

prime spire
echo basalt
#

Worlds are re-used and all the island data should be kept in a database

umbral ridge
echo basalt
#

So disk space is used less than ram at this scale

shadow night
umbral ridge
#

why

echo basalt
#

The idea is that when a player joins you paste the island and when they leave it unloads

#

So yeah disk space is only a concern in your database server :p

#

I'd assign 5gb to each instance for good measure however

shadow night
pseudo hazel
#

whats the difference

umbral ridge
#

goodluckwith that

shadow night
#

lol

pseudo hazel
#

youll never get an idea with that attitude xD

echo basalt
#

If you're using something like worldedit to store your islands, specifically the sponge format it'd be quite better as it's 1 byte / block unless your palette is huge, compression will help when it comes to huge air gaps

icy beacon
#

why are you resistant to using it

shadow night
#

when will we get mixins

shadow night
prime spire
echo basalt
#

If you want more direct spoon-feeding uhh

#

I have 2 projects that will help you out a ton

shadow night
#

thats mean

echo basalt
#
GitHub

World template loading/saving system. Contribute to IllusionTheDev/Cosmos development by creating an account on GitHub.

GitHub

Scalable Skyblock Core. Contribute to IllusionTheDev/SkyblockCore development by creating an account on GitHub.

prime spire
#

I mean I wouldn't mind projects to learn from, I just started my minecraft/Java journey (Though I do have other coding experience!), so any help is appreciated

quaint mantle
#

Hi, can someone confirm if minecraft completely removed the possibility to equip a block as a helmet? This code "works", it's showing the message and all, but the block won't be equipped as helmet

if (currentParty == null) currentParty = player.getParty();

                        if (currentParty != null) {
                            ItemStack partyItem = currentParty.getPartyIcon();
                            ItemStack currentHelmet = player.getInventory().getHelmet();

                            if (currentHelmet == null || !currentHelmet.isSimilar(partyItem)) {
                                sender.sendMessage(ChatColor.GREEN + "You are now showing the party icon");
                            } else {
                                sender.sendMessage(ChatColor.RED + "You are no longer showing the party icon");
                            }
                        } else {
                            sender.sendMessage(ChatColor.RED + "You are not in any party!");
                        }

currentParty.getPartyIcon() returns a GLASS_BLOCK stack

echo basalt
#

You never set the item

#

in the player's helm?

quaint mantle
#

OOOOH

#

God damn, sorry for this

#

I should take a break

echo basalt
quaint mantle
#

🗿

vapid anvil
#

why is java so cringe

#

0xf1 isn't a valid value for a byte

#

because bytes only go up to 127

echo basalt
#

It is valid

#

It's a negative byte

vapid anvil
#

my IDE complains

quaint mantle
#

Use int instead of byte

vapid anvil
#

it's a byte array literal

quaint mantle
#

Cast it to byte

#

(byte) 0xf1

vapid anvil
#

I think that just truncated it

quaint mantle
#

🗿

vapid anvil
#

best language ever designed 😁

echo basalt
#

got a major headache atm so can't help you on that

vapid anvil
#

yeah nah I'm just not gonna deal with it lol

quaint mantle
vast ledge
#

facts

echo basalt
#

can't even get myself to assign basic variables anymroe

vapid anvil
#

the only redeeming factor is how easy it is to mod

#

but even then, C#

quaint mantle
vast ledge
#

Ur just to dumb to use it then

quaint mantle
#

You are trying to judge a fish by its ability to walk

vapid anvil
#

"Ur just to dumb to use it then" is gold lol

vast ledge
#

it very much wasn't designed for games

#

but its not garbage

quaint mantle
#

It's a miracle that minecraft stills works on java, but as BedlessDeus said, it's not garbage just because a game is made using it even though java was not made having "games" in mind

vapid anvil
#

oh I'm not saying it sucks just because Minecraft uses it

vast ledge
#

You can see the win10 minecraft edition runs a lot better cus it's written in a general use lang

vapid anvil
#

I'm saying it sucks as a person that's used it for years lol

zenith gate
#

Can you expand an already in use inventory? Say I have a backpack, when the player is level 5 ( my own level system ) they only get 2 rows of slots in their backpack. but when they level 25 they'll get a full double chest. Can you exapnd an inventory while keeping contents? or is that something I have to handle, and update the new inventory with the items.

hybrid spoke
vast ledge
#

you can clone old inventory into the new one

zenith gate
#

Oh that's sweet. I was thinking it would be a lot harder. thanks.

quaint mantle
vast ledge
#

it runs

#

on nearly any os

quaint mantle
#

Maybe a bit old, but stills being updated

zenith gate
#

it runs on BILLIONS OF DEVICES

vast ledge
#

yep

quaint mantle
#

And java 20 seems very good

vapid anvil
shadow night
zenith gate
zenith gate
quaint mantle
quaint mantle
#
void main() {

}
#

That's it

#

In java 20

vast ledge
#

ooh

zenith gate
#

WHAT?

quaint mantle
#

No class nor anything

vast ledge
#

I see c++

zenith gate
#

not all that garbage extra stuff?

shadow night
#

But it's very limitted

quaint mantle
#

Plus

String world = "World";
String helloWorld = $."Hello ${world}"
#

That will be valid on java

#

Or something like that

vast ledge
#

are they ever going g to fix our garbage collector issues?

zenith gate
#

Nah

#

no one ever does.

quaint mantle
zenith gate
#

i say burn the garbage lol

hybrid spoke
#

just throw it into the ocean

zenith gate
#

the ocean? that bad

vast ledge
quaint mantle
#

At let it burn

vast ledge
#

it's not wokring

shadow night
quaint mantle
#

But you were able to create your own

vast ledge
eternal night
#

yea

#

powerful as fuck

vast ledge
#

yes

quaint mantle
vast ledge
#

I no like

zenith gate
#

lmao i can see that

eternal night
#

Like, what was their example ?

vast ledge
#

I cry

shadow night
vast ledge
#

I no lie

#

way to complicated

shadow night
#

Bro just blyat-ed

eternal night
#
JsonElement element = JSON."""{"test": "value"}"""
shadow night
zenith gate
#

json

#

ovbiously lol

quaint mantle
#

Now I expect an update for java servlets which everyone uses and knows about

vast ledge
#

we ain't in c++

eternal night
#

the templating can parse custom types

#

which is soooo nice

shadow night
#

Why not add an assembly executor?

eternal night
quaint mantle
shadow night
#

Imagine having to use java to run assembly

zenith gate
#

I am getting rollar coaster tycoon vibes now haha.

quaint mantle
#

Imagine if instead of java minecraft used assembly

shadow night
tall furnace
zenith gate
#

and prolly a hell of a lot more stable.

quaint mantle
pseudo hazel
#

yes but a nightmare to work on

quaint mantle
#

Yes

shadow night
#

Architecture

tall furnace
quaint mantle
#

Well, let's start a new game guys

tall furnace
#

I'm in

quaint mantle
#

AssemblyCraft

tall furnace
#

XD

shadow night
#

Lol

zenith gate
#

I'd rather stare at the sun

quaint mantle
#

🗿

tall furnace
#

I'm dying here XD

shadow night
#

Let's rewrite minecraft server code in assembly

zenith gate
#

ME TO lol

shadow night
#

For no reason

quaint mantle
#

Finally, minecraft world load in 2 seconds

zenith gate
#

nah try 0.8231

#

we can do it.

quaint mantle
#

Let's write minecraft in native bytecode

pseudo hazel
#

yeah ill check back with you in 10 years

shadow night
#

What if we integrated a dedicated server into the client instead of the default server thingy

tall furnace
#

I say we use barebones Rust and build it as it's own operating system

shadow night
quaint mantle
#

Too much work for the JVM

tall furnace
zenith gate
#

This might be getting out of hand guys. Want to create an operating system? 😭

shadow night
#

Spigot in your minecraft worlds

zenith gate
#

strictly for minecraft

shadow night
#

Mineos

tall furnace
#

Yas

quaint mantle
#

Mine os?

#

It is mine?

zenith gate
#

its a server wrapper thingie

quaint mantle
#

Or it is a mine?

shadow night
#

Pronounced mee-neh-os

buoyant viper
#

Ours

quaint mantle
#

MineOurs

shadow night
quaint mantle
#

Now fr, let's make minecraft in assembly 😎

quaint mantle
#

I'll start:


#

*proceeds to hang off himself

zenith gate
#

here you go ⚰️

quaint mantle
#

Thanks

zenith gate
#

np man lmao

quaint mantle
#

Imagine hiring a full team of senior assembly developers for making that dream real

shadow night
#

That's stupid

zenith gate
#

Who'd be paying for it? some rich dad?

quaint mantle
#

Then selling it to microsoft

#

🤑

zenith gate
#

for 10 billion dollars

#

just so they can ruin it.

quaint mantle
#

Also injecting a backdoor on the game

zenith gate
#

Woah woah dont disclose it. rookie mistake bro.

quaint mantle
#

So if they ruin the game, we can rollback 😈

shadow night
#

Lol

zenith gate
#

just revert to default settings lmao. after a years work for them. we just send a rollback command. 🤣

cinder abyss
#

Hello, how can I flip a ItemDisplay so the handle is facing up ?

pallid oxide
#

Anyone have fix for ItemStack.isSimilar for heads with custom playerprofile & textures?

zenith gate
#

isSimilar only checks stack size.

#

use pdc

#

?pdc

shadow night
#

What can I use instead of pdc when doing 1.8?

zenith gate
#

That I do not know..

#

Something you'd have to google.

pallid oxide
zenith gate
#

Man i swear i remember someone telling me earlier that isSimiliar returns stack size. i asked the same question and had to use pdc instead.

#

I dont know, ill read up on it again, sorry tho.

pallid oxide
wet breach
zenith gate
hallow jackal
#

are permissions case sensitive?

#

I was just wondering if I should name the ones in my plugin all lowercase

wet breach
hallow jackal
#

Alright, thanks!

shadow night
wet breach
#

well that is the only thing that is what PDC does

#

only other thing would be to use something like JNBT and create your own NBT Files?

#

disadvantage of the second is that the server won't maintain it for you lol

shadow night
#

I feel like I'm gonna die NBTing

wet breach
#

the first one has the disadvantage of that if you don't clean up the data you will inflate the game files

young knoll
#

There’s something called NbtAPI

shadow night
#

Is there?

wet breach
#

in case you want to see jnbt

shadow night
#

Wait, is it theoretically possible to recreate pdc for 1.8?

echo basalt
#

yeah

#

I've done it before on a spigot fork

wet breach
#

all PDC is, is just an API layer over NBT

#

but it does a bit more to ensure some things from plugins

#

like doing some cleaning up etc

shadow night
#

Okay, time to code (no I'm lazy)

echo basalt
#

me irl

tender shard
shadow night
#

Lol

tender shard
#

shrinks be like .getMentalDiseases().clear()

#

🧠

shadow night
#

Can you freeze it like a js array? So you can't change it

tender shard
#

good question

#

one could replace the diseases list with an unmodifiable list through reflection

echo basalt
#

just make a FreezableList wrapper class

#

that takes in a list

#

and has a freeze method that throws exceptions

young knoll
#

What are you, Mojang

young knoll
#

Yeah until I replace it with a modifiable list again via reflection

river oracle
#

lets ignore all errors this could cause 😄

tender shard
#

Ok

#

Collections.emptyList()

#

Or however its called

lilac dagger
#

that's so cool ^

#

i wish java was like this from the start instead of the ugly null

quaint mantle
river oracle
#

shhhh

quaint mantle
#

Imagine modifying something on the list then it gets completely replaced by a new list 🗿

#

Or imagine modifying the list while its being replaced

#

JVM go brrrrrr

zenith gate
#

I just have to say ChatGPT is the worse utility to ever exist.

quaint mantle
#

I use it as a "suggestion" and "code analisi" tool

zenith gate
#

I am not. I use him to generate boiler plate stuff that I dont want to.

#

and to sometimes explain errors.

#

he is just stupid sometimes.

river oracle
#

it sucks at code stuff in general

#

GPT4 is semi competent

zenith gate
#

i agree

river oracle
#

but that's as far as it goes

river oracle
quaint mantle
zenith gate
quaint mantle
river oracle
#

what

quaint mantle
#

It can literally generate constructors

#

Out of nowhere

#

Like

#

You have this

zenith gate
#

Doesn't support Fleet Sad_Ghast

river oracle
#

Fleet sucks anyways

zenith gate
#

Woah

river oracle
#

just use IntelliJ or Eclipse

zenith gate
#

My machine struggles with IntelliJ and I hate eclipse

quaint mantle
#

@AllArgsConstructor
public class User {
  
  @Getter
  private final String name;

  @Getter
  private final String email;

  @Getter
  private final String phone;

}

Then lombok generates a "new User(name, email, phone)" constructor and that class will have #getName #getEmail and #getPhone

river oracle
#

Fleet is literally just VSCode but worse

zenith gate
#

I like it better. Plus it is still in Preview...

river oracle
#

use Netbeans then

onyx fjord
#

and slower

#

even tho its not electron

river oracle
river oracle
#
@Data
public class User {
  private final String name;
  private final String email;
  private final String phone;
}```
Or even better a non lombok alternative
```java
public record User(final String name, final String email, final String phone){}
onyx fjord
#

just use your ide features

#

to generate all that

#

😮

river oracle
#

I recently stopped using Lombok

lilac dagger
#

i don't use lombok myself

#

i rely on intellij helping me automate that

river oracle
#

alt + insert go brrrr

quaint mantle
#

The difference between lombok and the IntellIJ helper is that lombok works under bytecode, and IntellIj literally generates the code

#

So there's no real difference

river oracle
#

I don't think its bad, but imho its just as easy to generate the code

#

I just generate my getters with equals hashcode etc

quaint mantle
#

For me is more comfortable to let lombok do the work

#

Plus it has some other annotations

#

Like @Builder

#

That makes the workflow easier

lilac dagger
#

pretty sure lombok adds some seconds at compile time

quaint mantle
#

I think

river oracle
#

it does add time to compile time

#

sasaseconds

#

@eternal night hey buddy ✋

eternal night
wary harness
#

Hey any one could point me to some tutorial or example for dynamic libs loading on run time
I want to avoid bulky jar file for my plugin
I was looking to make my own lib which player will need to install to use my other plugin but with all things inside goes over 3.5 mb
so I would like to dynamically download and load what I need

river oracle
wary harness
#

just don't know where to start

lilac dagger
#

do you guys happen to know of an event that sets the player location on join?

#

i think i remember there being one, i might scour the nms

#

w PlayerSpawnLocationEvent

#

yup

#

got it

cinder abyss
#

Hello, how can I change a ItemStack max durability ?

shadow night
#

I don't think you can

chrome beacon
#

You can't

topaz cape
river oracle
chrome beacon
#

or just use a Record

topaz cape
#

i dont recommend the usage of lombok at all since its a bad practice

#

im pretty sure @ivory sleet has the most reasons for that

#

oh shit

#

shit SORRY FOR THE PING

bright cedar
#

Heyy, I'm trying to create a command to add a specific percentage of speed to my player. I noticed that the base speed is 0.2F, but what's the equivalent of speed 1 in spigot walkspeed ? Because when I give the speed effect to my player the walkspeed is still 0.2F...

topaz cape
#

0.2f is indeed the default speed

river oracle
lilac dagger
#

can i use in maven AlwaysSpawn instead of always-spawn as artifact id?

#

or is it a bad practice?

topaz cape
#

i would rather google that than ask here however i do it the first way and its working fine

topaz cape
lilac dagger
#

got it

ivory sleet
river oracle
#

I d9jt use it

icy beacon
#

just curious

river oracle
#

Just curo8s

icy beacon
#

lol same

river oracle
#

Haha we smae

topaz cape
tender shard
river oracle
#

Conclube not explani why bad

#

Rube

river oracle