#help-development

1 messages Β· Page 53 of 1

worldly ingot
#

If you're using Spigot's libraries feature, you still have to depend on it, just mark it as provided

#

It will be available at runtime for you automatically

rain mason
#

i'm extremly new to maven stuff, how would I import it? i only ever added NMS before lmao

#

oh nevermind im dumb

sacred mountain
#

hey @lost matrix the packet listener doesnt even seem to detect the message, i've prepended the message with ###

#

I've made it output something in console if anything appeared but nothing

#

ok so it works if i send a chat message, but not when the plugin sends it

#

so it's detecting that packet

#

bruh

#

never mind i'm literally braindead

#

eh nothings changed

waxen plinth
#

Wait, does opening a workbench GUI not work anymore?

#

e.getPlayer().openInventory(Bukkit.createInventory(null, InventoryType.WORKBENCH, "Portable Crafter"));

#

It opens the inventory, but nothing can be crafted in it

#

πŸ™ƒ

sacred mountain
#

simulating real life

onyx fjord
#

How are those realms map things coded

#

Do they use datapacks or

lost matrix
#

realms does everything with resourcepacks

buoyant viper
#

@waxen plinth does essentials still have a workbench command?

iron glade
#

Any way to fix chunks not loading for the spectator when moving too far away?

rain mason
#

gamerule spectatorsGenerateChunks true?

#

maybe

#

not sure

waxen plinth
buoyant viper
#

i meant it more as a hey does this still work

iron glade
#

Is there a way to disable the "Player X (formerly known as player XY) joined the game" message?

worldly ingot
#

Not as far as I'm aware. That's just Minecraft stuff that happens for... I want to say 30 days?

sacred mountain
#

com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0

#

ideas?

chrome beacon
#

What are you trying to do

#

Which packet is that

sacred mountain
#

listen to all plugin messages

#

clientbound

#

Packet.Play.Server.CHAT

#

(protocollib)

worldly ingot
iron glade
#

Since when is it mandatory to add text transcriptions to projects?

worldly ingot
#

if you really want, you can use a resource pack to change the lang of multiplayer.player.joined.renamed

#

At least a few years

#

Just premium though iirc

iron glade
#

Possible to add the text transcrptioni in a spoiler under the image containing the text?

worldly ingot
#

Usually sufficient but you're kind of screwing yourself over in terms of SEO

#

Plus why do it offsite when you can literally just paste it into a spoiler

#

Oh you said spoiler mb

#

My brain for some reason thought you were talking about a third party paste website lol

iron glade
#

yeah paste into a spoiler under the image on the plugin's page

#

no haha all good

worldly ingot
#

Yeah that's totally fine

iron glade
#

alright then I'll do it like that

sacred mountain
chrome beacon
#

What version are you on?

sacred mountain
#

1.19.2

#

paper

#

build 116

#

i think its like almost the latest, updated yesterday

worldly ingot
#

Are you filtering just that packet?

sacred mountain
#

and it seems to be only doing something when i send a message

#

nothing happens when i run a command and the server outputs stuff to my chat

worldly ingot
#

Yeah but you're filtering just for outgoing chat packets?

sacred mountain
#

huh?

#

i thought packet.play.server.chat is the server sending messages to the client

#

I'm using the override onPacketSending method

#

isn't that the server sending packets to the client or wht

worldly ingot
#

I know... but are you using a whitelist to only be listening for that packet

#

You didn't show which packets you were listening for in your screenshot lol

sacred mountain
#

bit unreadable

#

lemme send in a paste

#

?paste

undone axleBOT
sacred mountain
#

from some forum thread on spigot since i couldn't find anything else

#

from 2017 though 😬

#

didnt really check the date

worldly ingot
#

This for 1.19.2?

sacred mountain
#

yeah

#

version support shouldnt be a problem right

#

viaversion handles it for lower versions i think

#

but the base server is on 1.19.2 yes

worldly ingot
#

Does ProtocolLib have a release for 1.19.2? Because the chat packet underwent some changes and it doesn't have a chat component field anymore

#

It's a PlayerChatMessage now which contains signature information

supple elk
#

Best way to fill an area?

sacred mountain
#

ok so latest dev build was only 2 days ago

#

it says support for 1.19 on the side tho

chrome beacon
#

1.19 != 1.19.2

sacred mountain
#

yeah

chrome beacon
#

There are major chat changes between the two

sacred mountain
#

how much even changed. though

#

how can i do this in 1.19.2 then

chrome beacon
#

So why are you trying to replace stuff in the msg command

sacred mountain
#

choco said playerchatmessage

sacred mountain
#

in a plugin that doesnt support it

#

and the devs seem to be a bit dead

#

so i'm making a workaround for now

chrome beacon
#

Fork that plugin or use another one?

sacred mountain
#

bit difficult lol

#

aquacore

chrome beacon
#

Maybe even make your own msg command

#

That's not hard

#

It's easier than messing with the packet

sacred mountain
#

well yes but cross server sync with the plugin redis database and no proxy plugin

#

it's gonna be a lot more effort to make it compatible

#

which is why i've resorted to packet modification

chrome beacon
#

What plugin is it?

sacred mountain
#

bit difficult to fork an obfuscated plugin xD

#

and i don't have 200 quid for the SRC

#

mc market isnt even mcmarket anymore what

#

built by bit

chrome beacon
#

Ew mcmarket

#

And yeah they changed name

sacred mountain
#

spartan somehow got away with that

chrome beacon
#

Yeah and license systen limitation

sacred mountain
#

yup

chrome beacon
sacred mountain
#

i went with this one since no one has managed to crack it ever aha

chrome beacon
#

Someone probably has cracked it

#

Judging by other mcm code it's probably not hard

sacred mountain
#

lol

iron glade
#

Smh spigot not supporting bb code for tables???

sacred mountain
#

judging by the awful api they provide

#

yes

#

every method is just "throw new illegalargumentexception(plugin is not registered)"

#

and about 5 methods for one thing

#

anyways back to what i was saying

chrome beacon
#

Well that's how you do it when you don't want to give the code

sacred mountain
#

its going to be much easier to packed modify

sacred mountain
#

no good documentation is s pain

charred pollen
#

is there a event detects interacting with shields?

sacred mountain
#

is opening threads here allowed

charred pollen
#

instead of PlayerInteractEvent

grim ice
#

Yall know how to copy the whole memory and storage of the server?

#

I wanna make a time traveling machine

lost matrix
grim ice
#

so copying the world and player data and stuff? But how to refresh that

#

Without restarts btw

lost matrix
#

This is going to be a very complex task. You need to do quite a bit of research and then come up with
something yourself.

grim ice
#

Hmm

lost matrix
grim ice
#

Orrrr

#

I can tp the players to another server and restart the server

#

then tp them back in

#

That kinda sux tho

wet breach
#

your biggest issue is going to be storage

#

however for time traveling all you need is a DB

lost matrix
#

Yeah this is going to eat terrabytes of data

#

depending on the frequency

wet breach
#

depends how far back you want to allow time traveling

#

for 7-14 days you are looking at easily 20-30GB of data

#

but this amount of data is dependent on the players

#

and the frequency in changes

balmy valve
#

how do I set the lifetime of a particle when using spawn particle?

#

or is it possible

#

judging by the discord search feature it isnt so nevermind

slim brook
#

Hello, i try to change color of an Banner on the world but it still white

That my code

#

Someon have idea ?

waxen plinth
#

Does your method actually get called?

slim brook
#

Yep i got messages

#

But the color don't change

waxen plinth
#

Strange

#

That looks right to me

slim brook
#

To me too X)

#

SO i don't see why that didn't change

main girder
#

is there a lifesteal plugin tutorial that anyone knows

ancient plank
#

how craft heart?

main girder
#

wdym

#

like lifesteal

charred pollen
#

how do you cancel certain items in inventory or just off-hand so players can't pick it out

iron glade
#

Anyone knows how to make those updating server stats banners for signatures, etc?

sacred mountain
#

modifying clientbound messages using packet interception or something else

severe turret
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

severe turret
#

o

crisp steeple
#

wtf is airplane

severe turret
#

paper fork

main girder
#

does anyone know a tutorial on how to make a lifesteal plugin

sacred mountain
#

paper airplane

#

lol

severe turret
#

cool name

#

better than spigot

sacred mountain
#

tap

#

spigot fork

#

faucet

#

hose

ornate patio
#

how do i test plugins that require a lot of people

#

like 20

#

i dont think my pc can handle 20 clients

sacred mountain
#

nms dummy player

#

or get more friends

#

or kidnap 20 kids

#

what plugins are you even testing

#

that need 20 players

ornate patio
#

large minigame ones

sacred mountain
#

they dont have any other setting?

lost matrix
sacred mountain
#

well yes or that lmfao

sacred mountain
#

google it

ornate patio
#

mmm okay

severe turret
#

supporting cracked players

#

not on my watch

#

πŸ€“

#

clipped and shipped to mojang

lost matrix
#

How is that supporting cracked players?

modest garnet
#

anyone know a pmine source code i can look at to try and make one myself, wanna see how they do the world edit stuff etc

lost matrix
modest garnet
#

well whatever they do use. just want to see how they do it

#

the world mapping etc

#

all of it

worldly ingot
#

pmine?

modest garnet
#

private mine

main girder
#

anyone know a tutorial on how to make a lifesteal plugin

worldly ingot
#

Oh. For prison servers. lol. Good luck finding anything from a prison server open source

lost matrix
# modest garnet private mine

Filling a cube should be really simple with worldedit. Pretty much everything you would need is covered by the documentation.

modest garnet
severe turret
#

there was some cringe guy here who hounded on a guy for that

quaint mantle
main girder
#

does anyone know a lifesteal plugin tutorial

lost matrix
delicate lynx
#

bro just google, there are like a billion

main girder
#

no theres not

#

there all like how to setup a lifsteal smp

main girder
#

i've tried basically everything

river oracle
#

I literally spoonfed you all of the code you needed

main girder
#

ur code didnt work

river oracle
#

but your back because you've yet to figure out how to change the names of two variables

#

get it together

main girder
#

no matter what i did

river oracle
#

?learnjava

undone axleBOT
lost matrix
#

Such a plugin is quite an easy task. If you cant pull that off then you should put more effort into learning the basics.

ornate patio
#

So is mineflayer designed to be a testing software for plugins?

#

Is it possible to control these bots? As in once I connect 20 bots, I need to be able to take control of these bots

compact haven
#

lol then you need 20 clients

ornate patio
#

damn bruh

tawdry python
#

I made a function to break all the blocks of a chunk, does anyone have any tips on how I can make it as optimized as possible?

river oracle
#

@lost matrix don't you have a thread on this ^

worldly ingot
#

something something distribute tasks

lost matrix
#

?workdistro

river oracle
#

ahhh that command

river oracle
#

but that'd require you to actually crack that client open and get coding

ornate patio
#

damn

#

well is it possible to at least programmaticly make these bots do something

#

like when i say a certain command in chat on my main account, i'll have the bot break a block or whatever

river oracle
#

the most you could do server side is create a shit ton of npc's and code pathfinding goals

#

With PlayerJoinEvent do you have to delay a tik before the player gets added to the online players list like you do when its removed with player quit event

lost matrix
ornate patio
river oracle
#

depends how in depth the API you use is

#

NPC's technically can open and use inventories according to HumanEntity which is provided from the InventoryClickEvent

lost matrix
pseudo sierra
#

Hello! Im trying to learn how to code minecraft plugins, Are there any youtube videos or websites to learn?

delicate lynx
#

the spigot forums

pseudo sierra
#

Do you mind sending a link?

#

o.o

river oracle
full perch
#

I don't know if this is applicable as this is more so programmer etiquette, but if someone abandons a plugin are you allowed to and is it recommended if you maintain the plugin and upload a new resource if you cannot contact the author or they don't see your message about you asking to become the new maintainer?

river oracle
#

which has to be gpl3

#

just fork their plugin on github

full perch
#

Although not sure if the author wanted it to be maintained after they gave up on it given how they designed it (did things like tying basic functionality like grabbing player heads to their web server with it's own api... for some reason?)

full perch
#

they might've just did it to bypass mojang's api rate limiting

livid tundra
#

in what order are the items returned by playerinventory.getcontents(), and does it include all items? (empty slots, off hand, ect.)

#

(just realized my question sounded like something from a quiz, I'm asking because I don't know the answer)

balmy valve
#

anyone know what event is fired when giving an allay an item?

#

its not the playerinteractentity event like i thought it would be

buoyant viper
river oracle
craggy steeple
#

Guys any1 can help me how to start to search for this XP bug that's happening in my server? Suddently the user starts to receive almost infinit levels of XP, and nothing shows in the console as well. I literally don't know how to start thinking about how to solve this problem -> See this .gif https://i.imgur.com/EuOeUtg.gif
there is a plugin or a way to develop a plugin to find what's happening in the server?

delicate lynx
#

what's your plugin list

craggy steeple
#

It's not a hand coded server so lots of plugins

#

My bet is that is something related to advancements receiving XP. Because I was flying with elytra and all this started

delicate lynx
#

I remember seeing someone else having this exact problem, let me search some discord messages

craggy steeple
delicate lynx
#

I believe I found the messages, it has something to do with advancements not being saved, and it gives you completion once you join, something like that

#

in your spigot.yml, what is disable-saving under advancements set to?

craggy steeple
#

Ok ty so much!

#

Let me check

glossy lily
#

what causes memory leaks

craggy steeple
#

1sec

modest garnet
#

can anyone recommend a good book to improve my java knowledge

#

or course

delicate lynx
#

I sadly do not remember what the fix was, but you MIGHT have to disable advancement saving, try to set that to true and restart?

#

I SWEAR, some guy had this exact problem and they fixed it some how but I cannot find it

craggy steeple
delicate lynx
#

OH I FOUND IT

craggy steeple
#

Its sad because it don't show in the console 😦

#

NO WAYYY

delicate lynx
#

they changed that to true, the disable-saving thing

craggy steeple
#

k

#

i set this

#

`advancements:
disable-saving: false
disabled:

  • minecraft:story/disabled` to true?
delicate lynx
#

also, they disabled advancements completely:

#
disabled:
- '*'
#

it sucks, but it's a fix that works

full perch
# glossy lily what causes memory leaks

They are varied in how they are caused, but if you want to find out what plugin is causing a memory leak, you can use jmx, heapdump and analyze it using Eclipse MAT

craggy steeple
delicate lynx
#

yw!

#

I'm glad I remembered seeing someone else have the problem

craggy steeple
modest garnet
#

can anyone recommend a good book to improve my java knowledge or course

undone axleBOT
balmy valve
#

Does anyone have experience listening for Particle Packets with Protocol Lib

#

because its giving me a hard time

onyx fjord
#

if it also happens, report to spigot

craggy steeple
#

144p gif quality

#

Any item that I open a GUI I receive 1level, let's see

#

Disabled all the achievements let's see

craggy steeple
echo basalt
#

It's just like listening to a regular packet

balmy valve
#

oh wait

#

wrong thing sorry

#

Anyone know Sending a particle packet with Protocol Lib

#

Its giving me a rough time

echo basalt
#

It's just like sending a regular packet

balmy valve
#

Yeah I know

#

I'm asking if anyone has any experience because this is confusing and I have tried many a thing

echo basalt
#

Well

#

Show us what you got

#

And what's causing trouble

balmy valve
#

and I just lost what I was trying because I switched my idea back to my original and then remembered after that why I switched it back

#

whats been giving me trouble is simple

#

filling out the fields with the proper type

#

the link to give the packet fields doesnt have much on particles and whats there is confusing in itself

echo basalt
#

if you read my tutorial

#

it shows you how you can check the nms fields

#

You just have to use protocollib's nms wrappers

balmy valve
#

yeah, I was

#

here ill recreate what I did previously

echo basalt
#

packet.getNewParticles().write(0, WrappedParticle.create(Particle.REDSTONE, new Particle.DustOptions(Color.RED, 1)));

#

writes a redstone particle

#

for example

balmy valve
#

I already have that part figured out

#

just finished remaking it

#

going to try it and see if I fixed it while just making it again if I didnt ill send what I have here

#

yeah I get this error whenever it tries

#

This is the Packet Code:

                PacketContainer packet = new PacketContainer(PacketType.Play.Server.WORLD_PARTICLES);
                packet.getModifier().writeDefaults();
                packet.getParticles().write(0, EnumWrappers.Particle.valueOf(String.valueOf(particle)));
                packet.getDoubles().write(0, x).write(1, y).write(2, z); // Fills in Position Parameters
                packet.getIntegers().write(0, 1);
                if (stopMovements) {
                    packet.getFloat().write(0, (float) 0).write(1, (float) 0).write(2, (float) 0).write(3, (float) 0);
                }
                ProtocolManager manager = SpiritsUnchained.getProtocolManager();
                try {
                    Collection<Entity> collection = location.getWorld().getNearbyEntities(location, 15, 15, 15);
                    for (Entity entity : collection) {
                        if (entity instanceof Player player) {
                            ItemStack helmetItem = player.getInventory().getHelmet();
                            if (helmetItem == null) {continue;}
                            if (SlimefunItem.getByItem(helmetItem) instanceof SpiritLenses || PersistentDataAPI.hasByte(helmetItem.getItemMeta(), MiscUtils.imbuedKey) && PersistentDataAPI.getByte(helmetItem.getItemMeta(), MiscUtils.imbuedKey) == 2) {
                                manager.sendServerPacket(player, packet);
                            }
                        }
                    }
                } catch (Exception ex) {ex.printStackTrace();}
echo basalt
#

try encoding it with getNewParticles

balmy valve
#

ngl I have no idea what that means/how to do that

echo basalt
#

replace getParticles with getNewParticles

balmy valve
#

if I do that do i replace EnumWrappers.Particle.valueOf(String.valueOf(particle)) with WrappedParticle.fromHandle(EnumWrappers.Particle.valueOf(String.valueOf(particle)))

echo basalt
#

fromHandle should take an nms object

balmy valve
#

so I can just do WrappedParticle.fromHandle(particle)

#

is that what you mean?

echo basalt
#

WrappedParticle.create(particle, data)

#

you can pass null as the data

balmy valve
#

restarting now

#

if it was that simple

#

thank you lmao

#

we'll see once its started

#

its not erroring but I dont see the particles however that is probably from my own check before sending it so im not worried abt that

#

thank you

buoyant viper
#

wondering why u wouldnt just spawn the particle with api

balmy valve
#

because

#

need to hide these particles from players unless they have a specific item or a item with a specific persistantdatatag

echo basalt
#

you can add meta to protocollib packets ^

quaint mantle
#

why isn't this working?

buoyant viper
#

bad url?

quaint mantle
#

works

#

idfk

#

i've tried different image hosters

#

still doesn't work

echo basalt
#

spigo bad

balmy valve
echo basalt
#

like player#spawnParticle is a thing

#

unless you're on like 1.8

#

but then again you're using new particles

balmy valve
#

w h a t

#

kill me please

#

I just wasted

#

SO much time

#

Welp ig I know how to send particle packets for future usage

echo basalt
#

no such thing as wasted time

#

you learned packets

#

:)

#

flashbacks to when I wasted 9 hours making client-side items

#

because I forgot to set the entity type in the packet

near kite
echo basalt
#

geyser has a jenkins page

#

no need to make your own version of it

near kite
balmy valve
#

xd

#

ill just look into using packets for this

near kite
echo basalt
balmy valve
#

is there any way for seeing what actual entity the packet came from?

#

like is EntityID the UID?

#

its unclear

frosty tinsel
balmy valve
#

what is the entity id then

#

is that the id of the entity CLASS or some ID of the actual entity instance

marble copper
#

plz help my deluxe menus dont work after i changed my version from spigot to paper

frosty tinsel
#

I think

balmy valve
frosty tinsel
#

no

balmy valve
#

then how is it a ID to the instance

#

if its not a unique id?

frosty tinsel
#

I think the UUID is used by Bukkit

#

But those are not sent in packets

balmy valve
#

so how would I use this EntityId to get the instance of the entity

frosty tinsel
#

Maybe theres a method on the NMS Entity

balmy valve
#

the problem with that would be I'm not using NMS

#

this is fun

frosty tinsel
#

well

frosty tinsel
chrome beacon
balmy valve
#

I already saw that, I just don't know how to use that ID to get the entity back

frosty tinsel
balmy valve
#

ah

frosty tinsel
#

I think its World#getEntities()

balmy valve
#

it's 3am don't judge me not thinking about that lmao

marble copper
#

it was working on spigot

#

but dont work on paper now

#

i switched

frosty tinsel
marble copper
#

11]

#

11

frosty tinsel
marble copper
#

it was working on spigot tho

balmy valve
frosty tinsel
#

doesnt it have a wrapper

#

some of the packets do

#

anyway this should work

#

But it might start from 0

balmy valve
#

As you can see I am still very new to protocol lib

#

and packets

frosty tinsel
#

But I am not sure how to get the wrapper

#

gimme sec

#

ok, it probably doesnt have it

balmy valve
#

yeah I didnt see one

frosty tinsel
balmy valve
#

ik

#

I thought it was 2 because there were 3 VarInt entries

#

i have a test jar to figure out which one it is rn anyways, just going to try all three with proper checks to make sure they dont error

frosty tinsel
#

youll have to try

fiery prairie
#

so umm. in spigot, making a stringbuilder to get all the args and append a " " between them looks like this:

                        StringBuilder sb = new StringBuilder();
                        for (int i = 0; i < args.length; i++) {
                            sb.append(args[i]).append(" ");
                        }```

however, now I am making a Bungeecord plugin and `args` doesnt exist. how would i replace that to work with bungee?
frosty tinsel
fiery prairie
#

well uhh. command i guess if thats what u mean

frosty tinsel
#

Btw you can use String.join(" ", args)

fiery prairie
#

yea but args doesnt even exist

#

in bungee

frosty tinsel
#

show the whole class please

#

?paste

undone axleBOT
fiery prairie
frosty tinsel
#

it is there

fiery prairie
#

well yes

#

because i typed it in

frosty tinsel
fiery prairie
#

but it doesnt exist itself

balmy valve
#

So, slight problem

    protocolManager.addPacketListener(new PacketAdapter(this, ListenerPriority.HIGHEST, PacketType.Play.Server.ENTITY_SOUND) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
                Player player = event.getPlayer();
                player.sendMessage("Fired Packet Received");
                PacketContainer packet = event.getPacket();
                Entity entity;
                for (Entity maybe : player.getNearbyEntities(30, 30, 30)) {
                    if (packet.getIntegers().getValues().size() >= 1 && maybe.getEntityId() == packet.getIntegers().getValues().get(0)) {
                        player.sendMessage("Working 0 ");
                    }
                    if (packet.getIntegers().getValues().size() >= 2 && maybe.getEntityId() == packet.getIntegers().getValues().get(1)) {
                        player.sendMessage("Working 1 ");
                    }
                    if (packet.getIntegers().getValues().size() >= 3 && maybe.getEntityId() == packet.getIntegers().getValues().get(2)) {
                        player.sendMessage("Working 2 ");
                    }
                }
                ItemStack helmetItem = player.getInventory().getHelmet();
                if (helmetItem != null && helmetItem.hasItemMeta()) {
                    if (MiscUtils.imbuedCheck(helmetItem)) {
                        event.setCancelled(false);
                    }
                }
            }
        });

Thats the packet listener setup and, its just not even sending the Fired Packet Recevied

fiery prairie
#

like replace args with strings in my ccode

#

code*

frosty tinsel
#

Look at the Command interface

fiery prairie
#

alright, thanks

frosty tinsel
#

IntelliJ should tell you

fiery prairie
#

oh yea

frosty tinsel
#

It says args in docs

#

You proably don't have sources

#

maven

fiery prairie
frosty tinsel
#

yes

fiery prairie
#

well lets see

frosty tinsel
#

Try double press LSHIFT and type Download maven sources

fiery prairie
#

Oh yea its fine now

frosty tinsel
#

try it

fiery prairie
#
                        StringBuilder sb = new StringBuilder();
                        for (int i = 0; i < args.length; i++) {
                            sb.append(strings[i]).append(" ");
                        }
                        String message = args.toString().trim();

                        message = PlaceholderAPI.setPlaceholders(p, message);```
#

oh nvm

#

i did still strings

#

k i changed the strings to args it is fine but PAPI still has some problems

frosty tinsel
#

I don't think so

fiery prairie
#

oh so i cant use it

frosty tinsel
#

nope

fiery prairie
#

alright thanks

vivid skiff
#

Is possible to check if a player is looking at another player head?

vivid skiff
frosty tinsel
#

idk

#

Some Vector math

vivid skiff
#

oh

fiery prairie
#

"get the entity"

#

a player head is a block/item

#

unless he means as a head of a player entity

frosty tinsel
fiery prairie
#

yea possibly

frosty tinsel
#

"head of another player"

supple elk
#

Hey guys, I'm trying to teleport a vehicle up when it reaches a wall as a kind of 'step up' thing

#

Here's my code for doing that

#

Currently it's always returning air however

frosty tinsel
#

Try to normalize the vector

supple elk
supple elk
#

won't that make it a length of 1?

frosty tinsel
#

Whell you want a block in front of the player, right?

supple elk
#

yes, but it's moving and could move more than 1 block in a tick

frosty tinsel
#

I think

#

The faster hes going, the further block you will get

#

if he's not moving, youll get the block inside the player

supple elk
#

well I don't want to tp it if the velocity is 0

#

or if they won't actually be on top of the block in the next tick

#

ig I can try it

#

but if you look in the screenshots I sent

#

it's saying there is air in a block with ice

#

the co-ordinates should be the same

frosty tinsel
supple elk
#

not in the logs

frosty tinsel
supple elk
#

look at the co-ordinates

#

printed in the logs

#

they are the same

frosty tinsel
supple elk
#

or should result in the same block

frosty tinsel
#

You need to use player move event

#

thats the problem

supple elk
#

oh right

#

ok thank you

frosty tinsel
supple elk
#

oh cool

frosty tinsel
#

with boats on ice

supple elk
#

yeah exactly what I'm trying to do

#

making a boat racing game

frosty tinsel
#

use PlayerMoveEvent

supple elk
#

mk ty

frosty tinsel
supple elk
#

cool lol

#

can I see urs?

fiery prairie
#

is it possible to create a config in bungeecord in a similiar way like its possible with spigot, just create a config.yml in the resources folder?

frosty tinsel
supple elk
#

any WIP I can see?

#

I've basically finished mine

fiery prairie
frosty tinsel
fiery prairie
#

i have this

frosty tinsel
fiery prairie
#

it cant find the directory for config.yml

#

like the folder

frosty tinsel
supple elk
#

awh

#

ok

grim ice
#

anyone knows

#

how to copy the server's memory

#

and its storage

crimson terrace
frosty tinsel
fiery prairie
#

yea

frosty tinsel
#

you gotta create it

fiery prairie
#

how?

frosty tinsel
#

probably

#

File#mkdirs

grim ice
#

i doubt anyone would know how to do that but its worth asking

crimson terrace
#

It usually gets created automatically i think

frosty tinsel
fiery prairie
crimson terrace
frosty tinsel
#

Maybe tell us what are you trying to do and there will be a better solution

grim ice
#

a time machine

frosty tinsel
grim ice
#

some other plugins may have a data of their own

frosty tinsel
#

Or like the folder

grim ice
#

meaning i cant just copy basic player data

#

like hp and stuff

fiery prairie
frosty tinsel
fiery prairie
#

thanks!

frosty tinsel
supple elk
#

personal

#

just to play with me and my friends

#

wanna see it?

fiery prairie
#

ill send the code in a sec

frosty tinsel
#

Just use BoostedYAML

fiery prairie
#

i dont think thats the problem tho

frosty tinsel
#

It'll make it much easier

fiery prairie
#

it says its null

#

tho im pretty sure it isnt

frosty tinsel
#

when it says it is, it is

fiery prairie
#

so how do I make it not null without learning how to use a whole new library?

frosty tinsel
#

I've had the same when I started programming "oh it's a bug for sure"

#

Nah, it was my fault

#

always

frosty tinsel
#

you can dm

fiery prairie
frosty tinsel
#
    public StaffChatCmd() {
        super("staffchat");
        instance = this;
    }
fiery prairie
#

k i think i got it

#
11:17:53 [WARNING] Exception encountered when loading plugin: StaffChatBungee
java.lang.IllegalArgumentException: Plugin already initialized!```
#

maybe i should switch back to spigot

pastel juniper
#

Is there a way to set more than a stack in a single inventory slot???

fiery prairie
eternal oxide
#

and its buggy on the client.

glacial sphinx
#

G

earnest forum
#

jumpscare dont click

#

fucking geek

#

someone ban this guy

ivory sleet
#

?ban @cobalt pike

undone axleBOT
#

Done. That felt good.

cosmic fjord
#

can I teleport a player to a different world?

supple elk
#

Does anyone have any ideas on how to create a boat step-up effect?

#

This is what I currently have

#

but it's glitchy and sometimes the boat runs into the wall or loses it's velocity

cosmic fjord
#

ok

#

ty

supple elk
#

raytrace

dim bronze
vale jacinth
#

I am trying to hook when a player uses an elytra and I cant seem to figure out the right place to do it. Could someone offer some guidance ? πŸ™‚

dim bronze
#

is EntityToggleGlideEvent what you're looking for?

vale jacinth
#

ayy there we go

#

perfect

#

i kept searching docs for elytra with no help lol

supple elk
#

step height

#

so if you run into a 1 block tall barrier you get tped to the top of it

dim bronze
#

oh right 🀦

tender shard
supple elk
#

can't teleport a boat with a player on it

tender shard
#

oh, weird

#

what about setting it's velocity to Y+=1 or so?

supple elk
#

How would that help?

#

the tping part is fine

quiet ice
#

It uses nms though

#

Which means it is breaky breaky if mojang wants to

supple elk
#

true

tender shard
#

setting the velocity works 100% fine

#

just tried it

echo basalt
#

I've cracked proguard before

#

had to rebuild an obfuscated plugin and update some nms

#

took me like 5-6 hours

supple elk
echo basalt
#

now climb 2-block tall walls

supple elk
#

oh right

#

I'm going on ice

#

it needs to go a lot faster

quiet ice
supple elk
#

tping I think is a safer option

tender shard
#

just check if !next().getAbove().isSolid()

supple elk
#

it's a racing game

supple elk
#

doing a raytrace is having some decent results

#

still hitting the wall sometimes

quiet ice
#

Stitch + tiny-remapper + tools such as sl-deobf are pretty good at breaking apart the obfuscation provided by proguard

supple elk
#

I don't want the boat's velocity to be stopped when it hits a wall is the main issue

#

or when it climbs

quiet ice
#

BUt if it is just updating NMS you probably want to use Recaf instead at which point it will be something that only takes a few minutes instead of hours needed for recompilation

supple elk
#

I can sail up stairs which is good

echo basalt
#

it had name and package obfuscation and I did it manually by hand 😭

supple elk
#

but going around a sloping curve is a little glitchy

quiet ice
#

Be happy that generics weren't stripped then, the absence is nasty

echo basalt
#

they were

#

also anonymous classes were pain

#

the better decompiler didn't like them

#

so I had to cross-reference with the worse decompiler

quiet ice
#

Out of curiosity which where the decompilers?

echo basalt
#

I used jd-gui and fernflower

#

And procyon whenever both didn't work

quiet ice
#

Procyon is a beast

#

Really underappreciated decompiler

spare prism
#

?paste

undone axleBOT
spare prism
#

Why doesn't the command work?

    @Override
    public void onEnable() {
        // Plugin startup logic
        instance = this;
        configManager = new ConfigManager();
        dataManager = new MySQLManager();
        dataManager.initialize().thenRun(() -> {
            Main.getInstance().getLogger().info("asdjsaoudsahdousahdosauhdasiudhsaiudhasduksahdiusahdasdsadsadasdsada");
            AuctionItemsManager.initialize();
            registerEvents();
            registerCommands();
        });
    }
    private void registerCommands() {
        getCommand("auction").setExecutor(new AuctionCommand());
    }

AuctionCommand.java: https://paste.md-5.net/avoxaxuxif.java

Logs:

[15:23:14] [Server thread/INFO]: [CloudAuctions] Loading CloudAuctions v1.0
[15:23:26] [Server thread/INFO]: [CloudAuctions] Enabling CloudAuctions v1.0
[15:23:27] [ForkJoinPool.commonPool-worker-1/INFO]: [CloudAuctions] asdjsaoudsahdousahdosauhdasiudhsaiudhasduksahdiusahdasdsadsadasdsada
[15:23:46] [Server thread/INFO]: SunwooHan issued server command: /ah
[15:23:54] [Server thread/INFO]: SunwooHan issued server command: /ah
eternal oxide
#

is ah registered as an alias in the plugin.yml?

sonic sky
#

plugin.yml?

#

^

#

lol

spare prism
# eternal oxide is `ah` registered as an alias in the plugin.yml?
name: CloudAuctions
version: '1.0'
main: md.mirrerror.cloudauctions.Main
api-version: 1.16
authors: [ mirrerror ]
commands:
  auction:
    usage: ''
    description: ''
    aliases:
      - 'auc'
      - 'ah'
      - 'cloudauctions'
      - 'cloudauction'
      - 'clouda'
      - 'ca'
      - 'cauction'
      - 'cauctions'
eternal oxide
#

aliases should be an array not a list, I believe

echo basalt
#

lists and arrays are parsed the same

sonic sky
#

Try without the ''

#

Never personally used them and haven't had problems

spare prism
echo basalt
#

if your auction manager fails to initialize, the completablefuture will hide the exception and your command will not be registered

#

add a .exceptionally(throwable -> {throwable.printStackTrace(); return null;}); block at the end of your thenRun

valid folio
#

Who can help my fix this?

spare prism
valid folio
sonic sky
#

You're missing " on looting

valid folio
#

OUGHHH

sonic sky
#

chance is also misspelt

valid folio
#

THANKS!!!!!!!!!

sonic sky
#

πŸ‘ 😁

valid folio
#

I was working on it really hard when i have 0 knowlage about json and i have small thing that i don't see small thing like misspeling and all that kind of stuff

sonic sky
#

I'd recommend using YAML instead, a lot easier to get a hold of imo

grizzled oasis
#

Hi I have an issue https://sourceb.in/vzmeDlnsNU

Error: java.lang.NullPointerException: Cannot invoke "en.nothing.meridianacore.Meridiana.getParties()" because "en.nothing.meridianacore.Utils.PartyUtils.plugin" is null
at en.nothing.meridianacore.Utils.PartyUtils.findParty(PartyUtils.java:15) ~[MeridianaCore-1.0-SNAPSHOT.jar:?]
at en.nothing.meridianacore.listener.AdapterListener.onCall(AdapterListener.java:354) ~[MeridianaCore-1.0-SNAPSHOT.jar:?]

chrome beacon
grizzled oasis
sonic sky
#

The plugin instance is likely null (plugin isn'

#

(plugin isn't instantiated yet or hasn't enabled yet)

quiet ice
#

not only likely - it is

grizzled oasis
quiet ice
#

At least not necessarily

sonic sky
#

They didn't assign this.plugin

grizzled oasis
#

yes my error i didn't put

this.plugin = this on the event OnEnable

tardy delta
#

?di

undone axleBOT
sonic sky
#

#getFuelPower() #setFuelPower(int) #isCancelled() #isConsuming()

#

From first glance

#

Yeah but you can set the fuel power at your own speed

#

If it's faster than default

#

Probably more complex if you want it to be slower

wet breach
#

get the block and then use this

spare prism
#

?paste

undone axleBOT
spare prism
quiet ice
#

A NoClassDefFoundError means that the class was found but was invalidated

#

So this is not the original error which does not help us much

spare prism
quiet ice
#

Any earlier stacktraces

spare prism
quiet ice
#

I suspect the (implicit) static block might be throwing an exception or there is some other linker error

spare prism
#

just this one

spare prism
#

should I send you this class?

quiet ice
#

Yeah would be good

quiet ice
#

Unless you are running with Java 7 or compiling that specific class with another java version nothing should go wrong there

spare prism
#

and I compile the entire plugin

quiet ice
#

Next best thing would be that JPMS blocks something, but that is night impossible too. Both classes probably use the same classloader so that is not an issue though

#

So uh, did you use the reload command?

spare prism
#

nah

#

/stop

quiet ice
#

Then I have no idea why this would happen. Especially not if it is a persisting issue

spare prism
#

it throws every time when the plugin is disabling

#

cause I use a method that uses a field from that class

#

in the onDisable() method

quiet ice
#

try to explicitly load that class in your onEnable

spare prism
#

for example

tender shard
#

you cant load new classes in onDisable

#

just Class.forName("...") it in onEnable

quiet ice
#

I.e. something like

        Class.forName("md.mirrerror.cloudauctions.utils.TimeUtils", true, getClass().getClassLoader());
quiet ice
tender shard
#

the plugin class loader checks if the plugin is enabled in loadClass(...)

#

so I guess its on purpose

spare prism
young knoll
#

I’m surprised it doesn’t show a more explicit error message

quiet ice
#

It's surprisingly hard to make verbose error messages when it comes to classloading

young knoll
#

I mean if it’s explicitly checking if the plugin is enabled can it not just throw whatever error it wants

quiet ice
#

?stash Would be possible, but first you need to think about that. And not fall to the temptation to use CNFE

undone axleBOT
quiet ice
#

And if you do use a CNFE, make sure to not absorb it in other classloaders

brave goblet
#

How can i enable keep inv on death?

#

eg if player is killed by blaze then they keep their inv or not

worldly ingot
#

Something wrong with /gamerule keepInventory true? Or do you want it under specific conditions?

supple elk
#

Any idea why this isn't working?

#

keeps producing null even though the boat is pointing directly into a block

tardy delta
#

size() == 0 -> isEmpty() 😭

supple elk
#

nvm it's suddenly decided to start working?

supple elk
brave goblet
young knoll
#

Doesn’t the death event have a setKeepInventory

worldly ingot
#

Right, so if you're making a plugin, PlayerDeathEvent should have a setKeepInventory() method

#

Yes

brave goblet
#

ok cool thanks

#

that's way more simple than i thought

supple elk
#

I don't understand why this is so tempermental

undone spindle
#

im the biggest noob ever and i need help

#

if i export my project it doessnt work in server

#

?dontwork

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.

vocal cloud
#

?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.

undone spindle
#

?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.

undone spindle
#

uh....?

#

it sais its a useless statement

quiet ice
#

Yes

undone spindle
#

?paste

undone axleBOT
quiet ice
#

Because we literally do not know what is wrong

undone spindle
#

ooh

#

my plugin doessnt show up if i do /plugin

quiet ice
#

Then you forgot to define the plugin.yml or the jar is corrupted

undone spindle
quiet ice
#

(or you have an invalid name or whatever but that is visible in the logs)

quiet ice
undone spindle
#

yessir

undone spindle
tardy delta
#

any error?

undone spindle
#

wait so its cause ofmain

quiet ice
#

You probably did a typo when typing in the key

undone spindle
#

the key?

quiet ice
#

Needs to be main: com.dami.Main I presume

quiet ice
undone spindle
#

so

#

not doubble main?

quiet ice
#

no, and I'd put main in lowercase

undone spindle
#

also the package name?

quiet ice
#

The first one

ancient plank
#

aaaaaaaaaaaaaaaAAAAAAAAA

quiet ice
#

Oh right it is double main

#

so main: com.dami.Main.Main

#

And that is why you never have any uppercase letters in packages

#

Because some idiot (me) is going to think it's a class by accident

undone spindle
#

XD

ancient plank
#

this is why standards are a thing

undone spindle
#

when i say im a noob IM A REAL NOOB

tardy delta
#

lookin' hot

#

ah me when using sqlite for the first time

onyx fjord
#

am i tripping or the chat has that weird padding on left even on 1.19

tardy delta
#

average css user

quiet ice
#

Wasn't it always that way?

#

At least on a screenshot from april (1.18.2) there is this left padding

fiery prairie
#

is there an event for falling ?

#

like when someone falls

tardy delta
#

is there some utility method to get a file object and create it if neccesary?

floral drum
tardy delta
#

i mean wtf

crimson terrace
viral temple
#

files looking hot

floral drum
viral temple
tardy delta
#

Path.of?

floral drum
#

progress bar looking hot

viral temple
floral drum
#

uwu

viral temple
#

literally supporting legacy code

tardy delta
#

Files.touch llfao

floral drum
#

what dat do

tardy delta
#

creates a new ffile

#

bruh i just want a way to avoid handling the io exception

floral drum
#

o

#

is SneakyThrows coming in clutch??

viral temple
floral drum
#

I mean wha-

viral temple
#

but the exception is more detailed

quiet ice
#

try-with-resources is not such a big deal

floral drum
#

try-with-resources is very poggers

quaint mantle
#

is there many ideas for plugins

tardy delta
#

its ugly and im retrowing the exception anyways

floral drum
floral drum
quaint mantle
#

no i mean is most of the ideas taken

viral temple
echo basalt
#

fucking

viral temple
floral drum
echo basalt
#

synchronize player time with their actual timezone

floral drum
#

or whatever the fucking name is

#

LMFAO

tardy delta
#

lol

viral temple
#

xD

floral drum
#

hah

echo basalt
#

or do this

#

idfk

tardy delta
#

someone doing weird stuff on their pc

#

πŸ€”

quiet ice
floral drum
#

haha I love optimization

echo basalt
#

make a calculator

quiet ice
#

You may only stop once you have replaced most calls with the Unsafe class

echo basalt
#

but you can't use common operations

#

only bitshifts

#

and bit operations in general

floral drum
#

x16 = << 4 ez

echo basalt
#

okay

#

but 7*8

floral drum
#

7 << 3

echo basalt
#

9-17

floral drum
#

haha kms

quiet ice
tardy delta
#

smh i had to

floral drum
#

meh this shit weird

echo basalt
#

you can't use +

#

only |

floral drum
#

alr bet

crude charm
#
 Could not resolve dependencies for project me.activated:AquaCore_3.0:jar:1.0-SNAPSHOT: Failure to find org.spigotmc:spigot-api:jar:1.18-R0.1-SNAPSHOT in https://repo.extendedclip.com/content/repositories/placeholderapi/ was cached in the local repository, resolution will not be reattempted until the update interval of placeholderapi has elapsed or updates
are forced -> [Help 1]
****
chrome beacon
#

ew AquaCore

crude charm
#

?

#

Ah

#

Wdym ew?

#

Have you ever worked with the code...?

chrome beacon
#

If you get something from mcm assume the code quality is quite bad. Also is has a licensing system which could brick your server should something happen to their server

quaint mantle
#

would anyone recommend a course to learn bc im stuck in tut hell

quiet ice
#

Just jump in the cold water

quaint mantle
#

so no courses

quiet ice
#

But baby steps. Don't do anything bukkit for the first few months

crude charm
# chrome beacon If you get something from mcm assume the code quality is quite bad. Also is has ...

"If you get something from mcm assume the code quality is quite bad." You're assuming, if you'd actually worked with it then you'd say quite the opposite. While it has some issues I've modified it alot as to where it's very fun to work with.

"Also is has a licensing system which could brick your server should something happen to their server"
Not only have I never heard of this happening, there is a reason I have src

quiet ice
#

I.e. work with scanner, do some file IO and stuff like that

quaint mantle
#

is we schools anygood

#

i have

crude charm
#

Anyway, can you help me with my issue?

chrome beacon
#

You forgot the maven repo

quiet ice
#

If not, never heard of them

quaint mantle
#

ya is it outdated

crude charm
quiet ice
#

Let's say I wouldn't learn java that way

quaint mantle
#

ok how would you learn it

chrome beacon
quiet ice
#

But then again I learnt java in the good ol' 1.7 days through CanaryMod, so the way I learnt it cannot be replicated at all these days

tardy delta
#

uhh do i have to explicitly create a database when using sqlite? when using h2, hikaricp created the db for me?

crude charm
quaint mantle
#

oh

#

learn as you go a good way

crude charm
tardy delta
#

well ye ive seen people just creating a file and then setting the jdbc url to that file

quaint mantle
#

im just gonna take a break and come back later

#

bc i think im stressing my self to much tutorials are good

#

but just stuck

#

is github copiliot good way to learn

quiet ice
#

copilot imo does quite the opposite

quaint mantle
#

oh

quiet ice
#

I'm someone that believes that typing out everything by hand and having next to no auto-completion is the best way to learn someone (learning by doing)

quaint mantle
#

ya

#

so autocomplete

quiet ice
#

In that essence IDEs are counter-intuitive to the learning process

quaint mantle
#

no

#

bc im using tabnine

quiet ice
#

But these days only a madman would suggest not to use these tools, so do whatever you want