#help-archived

1 messages · Page 115 of 1

wheat summit
#

That's what it looks like

#

Though there's also an error

opal marsh
#

@naive goblet what do you mean?

wheat summit
#
    @EventHandler
    public void onGrabyPacket(PlayerJoinEvent event) throws InvocationTargetException {
        Player player = event.getPlayer();
        PlayerInfoData playerInfoData = new PlayerInfoData(WrappedGameProfile.fromPlayer(player), 0, EnumWrappers.NativeGameMode.fromBukkit(player.getGameMode()), WrappedChatComponent.fromText(player.getDisplayName() + "AAAAAA"));
        ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
        PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
        packetContainer.getModifier().writeDefaults();
        packetContainer.getPlayerInfoDataLists().write(0, Collections.singletonList(playerInfoData));

        for(Player players : plugin.getServer().getOnlinePlayers()) {
   Error on this line         protocolManager.sendServerPacket(players, packetContainer);
        }
    }
#

at me.slashthewarrior.project.events.PacketActions.onGrabyPacket(PacketActions.java:37) [SlashSkyknock-1.0-SNAPSHOT.jar:?]

naive goblet
#

Nonnull ItemMeta#getDisplayName

opal marsh
#

@naive goblet ah I was not aware of that. probably throws an exception if the displayname isn't set. Check with hasDisplayName()

naive goblet
#

Hmm iirc ItemStack#getItemMeta would return a new ItemMeta if its not air right?

opal marsh
#

@wheat summit which line is 37?

#

@naive goblet I haven't worked much with that api but it would make sense to me

naive goblet
#

I just need to know if air makes some rude exceptions because then it might be more worth throwing an ISE instead

wheat summit
#

protocolManager.sendServerPacket(players, packetContainer);

#
Player player = event.getPlayer();
        PlayerInfoData playerInfoData = new PlayerInfoData(WrappedGameProfile.fromPlayer(player), 0, EnumWrappers.NativeGameMode.fromBukkit(player.getGameMode()), WrappedChatComponent.fromText(player.getDisplayName() + "AAAAAA"));
        ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
        PacketContainer packetContainer = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);
        packetContainer.getModifier().writeDefaults();
        packetContainer.getPlayerInfoDataLists().write(0, Collections.singletonList(playerInfoData));

        for(Player players : plugin.getServer().getOnlinePlayers()) {
            protocolManager.sendServerPacket(players, packetContainer);
        }
opal marsh
#

@wheat summit makes sense that it's in the stacktrace since the packet is probably fired in sync

wheat summit
#

What do you mean?

#

As in the packet is sent too early?

opal marsh
#

no, just that the stacktrace can be thought of as everything leading up to the problem. so because you sent the packet, the listener is called instantly so it's part of the stacktrace

#

not a problem

wheat summit
#

Ok

#

So nothing went wrong...?

#

Nevermind

opal marsh
#

I'm guessing you need to change onPacketReceiving to onPacketSending but I'm not sure

frigid ember
#

@opal marsh Do you know where to get the yaw values for north/south/east/west?

#

I honestly cannot find anything on this online

quartz trench
#

you mean the unit circle?

opal marsh
#

@frigid ember 0 is south, 90 is west, 180 is north, -90 is east

wheat summit
#

Ok I'm getting the message packetsent now though I can't see my alt on either window but do commands like/tp

#

And skins reset to steves

opal marsh
#

@frigid ember or it could be 0-360 with 0 being south and 90 being west. I'm not sure. Pitch and yaw are funky

#

@wheat summit I don't understand what you're saying

wheat summit
#

So

#

No errors appeared

#

When I ran it in the onenable

#

It sent the message to console instead of an error

frigid ember
#

@opal marsh Thanks

wheat summit
#

Though also made other players invisible

opal marsh
#

skins resetting to steves would make sense because you're changing the player names

wheat summit
#

Oh, I thought it was just the display name we were changing

opal marsh
#

idk about invisibility though, that's some funky business

wheat summit
#

Yeah

opal marsh
#

are you setting the packet field "action" to 0 and "Number of players" to 1?

wheat summit
#

What?

opal marsh
#

if you don't set the "Number Of Players" integer, I suspect it could be defaulting to 0

wheat summit
#

Oh no, for some reason it made us use lists

#

That might be it

opal marsh
#

in that case, it might be setting it automatically? double check by trying to write the int

hoary parcel
#

the packet doesnt have an int field

wheat summit
#

Ok I'll do it in a few minutes

hoary parcel
#

you guys need to be careful when looking at wiki.vg

#

it describes the wire format

#

not the format of the packet class mojang uses

#

which is what you want for protocollib

opal marsh
#

ah, I see, thank you

#

I was not aware of that

hoary parcel
#

what seems missing is the action enum

opal marsh
#

what's the recommended way to get the packet class format? server mappings?

hoary parcel
#

just look at the packet class

opal marsh
#

right but iirc those have funky names

#

obfuscation and all

hoary parcel
#

you dont care about the names, do you?

#

you care about the datatype

#

or you can just look at my mapping viewer

opal marsh
#

ah, I suppose

hoary parcel
opal marsh
#

ooh, nice

hoary parcel
#

there you can see that the packet class only has two fields, the entries and the action

opal marsh
#

vue but not vuetify ;-;

hoary parcel
#

its quasar

#

and yes, its super ugleh, the code is even worse, I was hella drunk

#

but it works

opal marsh
#

pretty cool stuff though

hoary parcel
#

wait till I tell you that I have a spigot/paper fork where I use mojang mappings, so I can send packets directly, just by setting fields with nice names 😄

opal marsh
#

ooh, looks pretty but why not use a wrapper instead of a fork?

hoary parcel
#

because this is sooooo much easier

#

I remapped everything to mojang names

#

dealing with "nms" (it isnt nms for me anymore, I have actual packages!) is so much nicer

broken patio
fleet crane
#

See the cache headers

frigid ember
#

can i get a Player from a UUID?

wheat summit
#

Yes @frigid ember

frigid ember
#

how so?

wheat summit
#

Bukkit.getServer().getPlayer(Player'sUUID)

frigid ember
#

ah ok.

arctic parcel
#

how do i create a thread on spigotmc?

frigid ember
#

You have to click on the category first you want to post in

frigid ember
#

@opal marsh So I'm trying to figure out how to orient which way an armorstand is actually looking

#

You said to teleport the armorstand with the pitch/yaw that you want

#

However, I don't see a teleport method that passes those arguments

#

This is the closest thing I found:
armStand.setRotation(arg0, arg1);

#

Is this what I'm looking for?

#

@opal marsh 270 would be west right?

grave crest
#

Uhmm how to disable chat and tab between worlds by coding

quartz trench
#

Just guessing but I think you set rotation in the Location Object

opal marsh
#

@frigid ember the teleport method takes a Location as an argument. That Location object contains pitch and yaw data

frigid ember
#

@opal marsh it also has a setDirection method that takes 2 paeans

#

Params

honest sun
#

how do you load a class in from another plugin

#

im looping through classes in each plugin in the server but java cant find the class becuz its not in my plugin

quartz trench
#

What are you trying to do @honest sun

#

You probably need to include the Plugin in your classpath or your dependencies for your build tool

honest sun
#

i cant im looping through all plugins in the server and then looping their classes

#
                            try {
                                Class<?> clazz = // issue
                                if(!clazz.isAnnotationPresent(CommandCreation.class))
                                    continue;
                                CommandCreation command = (CommandCreation) clazz.getAnnotation(CommandCreation.class);
                                System.out.println("HOLY FUCKING SHIT DUDE YOU FOUND A FUCKING COMMANDLOL LMAO NICE JOB MAN: " + command.name());
                                CommandImplementer.loadCommands(command, plugin);
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                        }```
#

this is what i have right now

dusty topaz
#

well maybe change getClasses to return a list of classes

#

instead of just their names

honest sun
#

well that just spits out an error in that method the issue is the classes cant load because they're from a different project

quartz trench
#

Have you already tried Class.forName

honest sun
#

ya i said the issue is java cant load in a class thats not in their project

#

thats the problem

quartz trench
#

I'm only checking if the class exists in my plugin but I compile against the spigot API and when I run on Paper this Class.forName("com.destroystokyo.paper.VersionHistoryManager$VersionData") gives me the class not null

honest sun
#

im checking for other plugins

quartz trench
#

Should work the same as long as you load after

honest sun
#

no it doesnt

#

thats the issue here

quartz trench
#

Ok sorry for not being helpful

honest sun
#

all good gamer

frigid ember
honest sun
#

can u show us your enum class

frigid ember
ashen stirrup
#

The private access modifiers means you can only access the method from within the class.

#

@frigid ember

frigid ember
#

Is there any obf that doesn't do that?

frigid ember
#

any multi-worlds plugin for 1.15?

quartz trench
#

multiverse works fine

frigid ember
#

hm idk

#

has some bugs

quartz trench
#

Are you using the dev build?

#

Or the old one on bukkit

frigid ember
#

oh wait there's a dev one?

frigid ember
#

ok will see

#

mine was 4.1.0

quartz trench
#

if it doesn't work idk. Mv works fine for me

frigid ember
#

it works

#

but

ashen stirrup
#

For younger people, is Minecraft a good place to start coding?

quartz trench
#

It will get them interested but IDK how well they will learn Java

frigid ember
#

the potions in world 1 stay in world 2

quartz trench
#

I think thats default behaviour

frigid ember
#

hmm

quartz trench
#

when you go to the nether you keep effects for example

frigid ember
#

can i change that?

quartz trench
#

Not sure, I would look through the multiverse configs and then look for another plugin if there is no option

frigid ember
#

ok

#

thanks again

quartz trench
#

I think you may need to use Multiverse-Inventories to do that

frigid ember
#

can i get the latest build

frigid ember
#

appreciate it

quartz trench
#

np

arctic parcel
#

Does anyone know how to link players in different worlds

#

I have multiverse-core and I want to link the players in nether and the end for factions.

ashen stirrup
#

Wdym?

arctic parcel
#

I want to make a placeholder (%server_online_<world>)

#

and I want to keep the nether, factions, and the end in one number

#

like 3 Players

#

for my scoreboard

frigid ember
#

u could use ''/mvtp ''ur world name'' ''

arctic parcel
#

No, that’s not the issue.

#

Is there a way so I can invite you to my server

#

Can I share the IP for my server?

ashen stirrup
#

You want linked world player count

arctic parcel
#

yes.

#

i want to link all three worlds

frigid ember
#

doesn't it count by default ?

arctic parcel
#

No. I want to link the player count for all three worlds

ashen stirrup
#

Just get the server player count?

arctic parcel
#

when it shows the amount of players, it will show the players in the factions world, nether world, and the end world because they are all considered factions.

frigid ember
#

hello! could someone please answer this?

is there anyway to use the same domain for your minecraft server and website?
like, if i want to connect it to my webhosting. i have to change the nameservers. and the nameservers are one cloudflare
where i have my minecraft connections etc

is there anyway i can make it the same domain for both?

arctic parcel
#

yes u can. just add a sub domain to your server. for example “play.example.com

#

the “play.” is the su domain

#

subdomain*

frigid ember
arctic parcel
#

no i don’t think so

frigid ember
#

and how do i add the subdomain if the domain is connected to the webhost?

arctic parcel
#

what website are u using for ur domain??

frigid ember
quartz trench
#

You can use MC and a site on the same domain? Just set up an A record

frigid ember
#

@quartz trench i know how to setup a record.

quartz trench
#

oh they are different machines

frigid ember
#

yeah

quartz trench
#

did you already try an SRV record to your mc server

arctic parcel
#

oh right. i forgot i’m sorry

frigid ember
#

@quartz trench not the problem.

#

i can connect to the server, but idk how to connect the domain to the website, while also being availbe at the cloudflare

#

so the srv's can work

quartz trench
#

Hmm I haven't used cloudflare so I'm no use there

frigid ember
#

should i just buy another domain?, because i actually have no idea.

arctic parcel
#

can u add a cname to ur domain?

#

go to ur domain manager

quartz trench
#

I don't see why a subdomain wouldn't work also tbh

#

I don't think you need to buy another domain

frigid ember
#

@quartz trench, sav.com for some reason doesn't have srv. and that's for the most part why i use cloudflare. lol.

#

idek why i bought a domain there, it was cheap.

quartz trench
#

Oh, I see

#

I would try and transfer the domain

frigid ember
#

yeah, i should try that.

quartz trench
#

to cloudflare or namecheap or something

frigid ember
#

i mean, i can transfer it to my hosting service?

quartz trench
#

if they have good DNS I don't see why not

frigid ember
#

where both the webhost and minecraft servers are hosted at.

quartz trench
#

just make sure they support whatever records you need to use

arctic parcel
#

can someone also help with my problem lol

frigid ember
#

@arctic parcel, what's the problem?

#

@quartz trench, i work there.

#

so i'm pretty sure they have good support 😉

arctic parcel
#

when it shows the amount of players, it will show the players in the factions world, nether world, and the end world because they are all considered factions.

frigid ember
#

@arctic parcel that's because they're in the same server. i think you can use per-world player-count or something

#

2 seconds

arctic parcel
#

but i want to link all of the players

frigid ember
#

take a look at that?

#

oh?

arctic parcel
#

for example, if there is one player in factions world, one player in nether, and two in end

#

i want it to say 4 players

#

but keep in mind, i also have a creative world, skyblock world, and kitpvp world

frigid ember
#

@arctic parcel, why do you have everything in one server?

arctic parcel
#

cuz bungeecord is too expensive

frigid ember
#

your server won't handle the players each and one will have.

#

@arctic parcel how much are you paying for your server right now?

arctic parcel
#

yes it will. i have about 6 gigs of ram on it

frigid ember
#

not enough.

#

far from enough

arctic parcel
#

about $12.00

frigid ember
#

yikes.

arctic parcel
#

LOL

frigid ember
#

12$ for 6gb?

arctic parcel
#

yeah i think

frigid ember
#

oml

#

i got 14gb for 5$

#

:p

arctic parcel
#

WHAT?

#

how?

#

what server hosting do u use?

frigid ember
#

check dm's i don't wanna advertise here.

arctic parcel
#

ok

frigid ember
#

so i tried the mv-inventories and changed the configs

#

but it still keeping the effects

kind crow
#

Is there a way to hide timestamps from server configs? I use git to sync all my configs and those timestamps mess everything up

torn robin
#

you mean logs?

fleet crane
#

Ive never seen a config with timestamps tbh

#

it'd depend on the plugin

worn gate
#

need help pliz, my plugin works on my test server but not on my actual server

sturdy oar
#

Server config with time stamps???

worn gate
#

?

sturdy oar
#

Not talking to you

quartz trench
#

If your talking about the file timestamps git should ignore those unless you have line endings that are different ie CRLF vs LF

#

if one machine is windows and one is linux

hoary parcel
#

Bukkit.yml etc change all the time

#

It's kinda annoying

#

Server properties too, since it's backed by a hashmap

#

I gitignore and force add when I changed something

fleet crane
#

uh no

#

bukkit.yml definitely does not change

#

and server.properties will not change on recent java versions or where the java version is the same

sturdy oar
#

Omg wtf I've just watched snapshot pre 1.16 and I'm shocked

#

buckets are now weird

quartz trench
#

I'm not saying anyone is wrong but on my server the last modified date for all those files changes each server restart

#

java 8

fleet crane
#

git does not track last modified date

quartz trench
#

yeah I know

fleet crane
#

then whats the issue?

quartz trench
#

nothing, I just thought you said the files don't change

fleet crane
#

well the file is still bit for bit identical

hoary parcel
#

Maybe that changed recently, I haven't touched that recently

#

But that's what I remember

#

Good to hear that that seems to be changed

kind crow
#

Ive never seen a config with timestamps tbh
I mean server.properties for example. spigot.yml is another example. There are commented timestamps in the beginning of that files

#

I have paper 1.12, not the latest

hoary parcel
#

pinging md while using paper

kind crow
#

It was automatic reply, sry

#

spigot.yml is a part of spigot as I can tell from the name

gleaming totem
#

Woah

worn gate
#

I need help !

#

pliz

#

with my plugin. It only works on my test server and not on my official server

knotty karma
#

that gives literally no information about what's going on. Are they running the same version? do they all have the same plugins? what about configuration?

#

have you checked logs to see exactly what's happening on your main server?

worn gate
#

i'm showing u my code

#

there are no errors

#

?paste

worldly heathBOT
worn gate
#

this works on my test server but not on my main server

#

and there are no errors

#

just the gui doesn't open

knotty karma
#

so if it works on your test server, then it's probably not your code.

#

start looking at what's different on your main server, and see if you're missing something important

worn gate
#

like what ?

#

what could make the difference on the code ?

knotty karma
#

not your code

#

server config, plugins, etc

#

also with your code, dont use nested if loops my man

//dont do this
if(a) {
  if(b) {
    thing();
  }
}
//do this
if(a && b) {
  thing();
}
obtuse rose
#

correction: if is a not a loop

worn gate
#

?

knotty karma
#

if statements, my bad

worn gate
#

so how can i fix that ?

knotty karma
#

thats not whats causing your issue, just a programming tip to make your code cleaner

frigid ember
#

does ur test server has another api?

worn gate
#

it's the same plugins i think

frigid ember
#

hm

knotty karma
#

have you checked logs?

#

what errors does your plugin throw on enable?

worn gate
#

yeah, no errors

knotty karma
#

does it successfully enable?

obtuse rose
#

can you even do Eager operation on Java boolean?

worn gate
#

i check @knotty karma

knotty karma
#

i dont think so... not sure tho

worn gate
#

no, they aren't any errors

knotty karma
#

you still havent checked your environment

#

99% chance this isnt your code, its your environment

worn gate
#

how do i check it ?

knotty karma
#

figure out what is different between your test server and main server. try loading it on a new server, see if that works

worn gate
#

ok

knotty karma
#

if it works in one place, but not elsewhere, figure out what's different. then, remove the differences until you figure out what was causing it not to work

sturdy oar
#

oh god that

#

code

knotty karma
#

ikr

worn gate
#

the problem is that i have other gui's which open without any troubles

sturdy oar
#

apply DRY principles and you may figure out the issue

knotty karma
#

anyways, i would like some multithreading advice

#

so i have a custom generator, inside of which i need to change biomes. The biome change is calculated independently of everything else in the generator, and nothing is dependent upon its result

worn gate
#

fail to bind to port...

knotty karma
#

you already have a server running on whatever port you assigned

worn gate
#

i know...

knotty karma
#

anyways, i profiled my plugin and the biome change takes a lot of CPU time. Should i put it in its own thread so it runs asynchronously? I'm worried about the amount of threads that would be spawned, since it'd be one per chunk generated

obtuse rose
#

well, it would be nice if you provide profiling data

#

wait.... so which part take time?

knotty karma
#

so in my chunk generator, getting/setting biomes takes 80% of the time, and actually generating the chunk takes 20%

obtuse rose
#

yea, but what does it do in that 80%?

#

how much time it took to calculate noise / to set chunk itself

knotty karma
#

the 80% isnt even the noise/setting the biome, it's NMS retrieving biomes. 1 sec ima screencap my flame graph

#

so, if i stuck it in a thread, would that method even be run asynchronously?

obtuse rose
#

Don't quote me on that, but I think nms loading stuff aren't thread safe

#

if I remembered correctly, it also do IO operations if those area aren't loaded etc

hoary parcel
#

I think I remember a patch for that

worn gate
#

well it works just fine on another server

knotty karma
#

so then find out what's causing it to stop working on your main server

worn gate
#

how ?

knotty karma
#

bruh

worn gate
#

were opening the main in 2 hours

knotty karma
#

look at what is different between your test server, the one you just set up, and main

#

figure out the differences, remove them one at a time, test, repeat

worn gate
#

ok

knotty karma
#

this is like troubleshooting basics here

worn gate
#

i don't know how to do it

knotty karma
#

another method that might work better depending on your situation, is if you have time, build a new main server, by adding things to the one you just set up until it breaks

worn gate
#

yeah but the builds already are on my main

#

how can i just get the same map ?

knotty karma
#

copy/paste the world folders

worn gate
#

yeah but it's on an ubuntu server

#

i don't know how to do it

knotty karma
#

last time i checked Ubuntu had the ability to copy files

#

cp <from> <to>

worn gate
#

yeah but how can i downalod them on my computer ?

#

well, i'll try

hoary parcel
#

How do you even run a server?...

knotty karma
#

ikr lmao

#

and @worn gate SFTP client of your choice

hoary parcel
#

Rsync > sftp

mental niche
#

how can i download mcmmo

knotty karma
#

from their website

mental niche
#

but i can't

#

my money is not the much

#

?????

knotty karma
#

bruh we're not here to help you pirate plugins

#

if you want to use it, pay for it

mental niche
#

woah

spring cradle
#

Is it possible to add more / less hearts with Spigot api ?

hoary parcel
#

Yes

#

Set the max health attribute

hoary parcel
#

That doesn't allow you to set max health

#

Use the attributes as I said

frigid ember
#

im looking for a plugin that control potions/effects

spring cradle
#

Oh ok, thanks

#

I didn't think it was going to be that easy.

obtuse rose
#

@hoary parcel why rsync?

frigid ember
#

Hello all, I am using Message Announcer.

I was wondering how to I create a clickable link inside of a message?

hoary parcel
#

Because rsync is superior for syncing worlds

obtuse rose
#

Sync worlds?! O_O

frigid ember
#

Can anyone help me?

undone narwhal
#

If there is no indication on the page of the plugin, then you can't do it

knotty karma
#
boolean generateDecorations = true;
@Override
public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) {
  //generate stuff

  //calculate some conditions
  generateDecorations = areConditionsMet;
}
@Override
public boolean shouldGenerateDecorations() {
  return generateDecorations;
}```

how terrible of an idea is this
#

i have a hunch that it's pretty terrible and not something that I should do

#

would it even work?

#

i'd assume those are all fetched and stored on enable and not per-chunk

#

(by "those" i mean shouldGenerateDecorations() etc)

hoary parcel
#

That will not likely not work

#

I don't think they are stored, but I don't think you can rely on order

#

Since chunk gen goes thru stages

knotty karma
#

yeah that was another concern

#

ugh i wish that the chunk coords were passed into that method

limber summit
#

Hey guys, to save the cache from my server to my database I do this :

#
    public void updateBdd() {
        try {

            int size = Main.playerPoints.size();
            if(size == 0)
                return;

            this.query.createStatement().execute("DELETE FROM players");

            StringBuilder sb = new StringBuilder();

            int i = 0;
            for(String keySet : Main.playerPoints.keySet()) {
                Integer points = Main.playerPoints.get(keySet);
                if(i == size - 1) {
                    sb.append("("+keySet+",'"+points+"')");
                    break;
                }
                sb.append("("+keySet+","+points+"),");
                i++;
            }

            String sql = sb.toString();

            System.out.println(sql);

            this.query.createStatement().execute("INSERT IGNORE INTO players(uuid, vip_points) VALUES " + sql + ";");

        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
#

is there something better?

#

I'm not very convinced that doing a : this.query.createStatement().execute("DELETE FROM players"); is a good idea

frigid ember
#

how can i fix it?

                    if (args[1].equalsIgnoreCase("SetCrateParticlesMod")) {
                        if (args[2]=="true") {
                            plugin.getConfig().set("hubParticlesEnabled", "true");
                            sender.sendMessage(toColor("&aThe particles been enabled"));
                        } else if (args[2]=="false") {
                            plugin.getConfig().set("hubParticlesEnabled", "false");
                            sender.sendMessage(toColor("&cThe particles been disabled"));
                        } else sender.sendMessage("non option");
                    }
undone narwhal
#

First, do it in parallel @limber summit

#

@frigid ember What's the problem?

frigid ember
#

allways it type non option

undone narwhal
#

Is your 3rd argument null?

#

Never use == with Strings but equals() or related methods

chrome heron
#

are there a plugin for item display on chat but bungee version?

undone narwhal
#

Didn't know any sorry

limber summit
#

wdym Rolyn?

undone narwhal
#

Someone knows if Faction has an event fired when the player switch faction when he moves?

#

@limber summit Call this method "Async" so it won't freeze the server

#

You can use Bukkit#runTaskAsync or something similar

sturdy oar
#

well databases shouldn't always been used async

#

in some cases i've needed to use them on the main thread

undone narwhal
#

Yeah for sure, but if you only need to save a cache it could be better using parallel

unique fox
#

When a player connects to a seperate server through bungeecord, is it then the server that maintains the connection or bungeecord?

hoary parcel
#

Bungee is a proxy

#

So both

tiny dagger
#

the bungee gets your connection and route it to the server

obtuse rose
#

Bungee is a reverse proxy

frigid ember
#

how do u move to another server host provider?
should i just copy and paste all the fyp files

tiny dagger
#

yeah, that's how it goes

tiny dagger
#

teleport

#

elaborate on why it doesn't work

#

oh so on playermoveevent

#

well

#

edit from or to

#

pretty sure those mutable as well

#

edit the internals?

#

lastloc

#

and loc

#

the nms code

worn gate
#

( Attention , informations non sur à 100 %) Mauvaise nouvelle pour aujourd'hui, en effet un événement de cyberattaque va avoir lieu sur toutes les plateformes de réseaux sociaux , y compris Discord . Certaines personnes vont essayer de vous envoyer des images extrêmement gores , des insultes racistes/pornographiques et il y aura bien évidemment des gens qui en auront après votre IP . Je vous conseille à tous de n'accepter personne en ami ( sauf si c'est une personne que vous connaissez ) . Merci de passer ce message sur tous les serveurs que vous administrez . Je vous souhaite à tous de la sécurité . Pensez à vous mettre en invisible/déconnecté aujourd'hui , ce qui vous fera réduire la chance de vous faire harceler par ces gens . Même si les informations ici ne sont pas 100% sures , merci de rester prudent pour le bien de tous .

frigid ember
#

now im not french but let me guess

#

some random mf pasted that in a discord; saying YOUR going to be hacked!"!!!111!!1!1

#

ah the DISCORD attack

ashen stirrup
#

I'm sorry, but if you add someone you don't know and willingly click on a dodgy link, it's survival of the fittest xD

frigid ember
#

the copypasta that was made two weeks ago

#

its fake

tiny dagger
#

oh no they got my ip

frigid ember
#

and there is no group at all

#

with the abilities to target all social media platforms

#

if you mean scraping well tracr.co is a nice site

tiny dagger
#

well

#

clicking a site can get your ip

#

it doesn't matter which platform it will be

#

just don't click them

frigid ember
#

cyberattack
not phising or whatever its called

tiny dagger
#

what if you take the vector calculations on your own to prevent them mendling with it? 🤔

remote ore
#

Hello, I have essentials, CrazyAuctions. But isn't the same money, how can I make an good economy and the same on all the plugin?

undone narwhal
#

You should use Vault

#

I saw that CrazyAuctions uses Vault

remote ore
#

I already have vault :/

grave scarab
#

hi

sturdy oar
#

Henlo

grave scarab
#

i'm having an issue with a plugin of mine that was made for bungeecord

#

is there a way to force my plugin to load after a certain one
i have depend: [LuckPerms] in my yml file

sturdy oar
#

there is : load-before

grave scarab
#

there is?

#

ty

#

i got it working

fair musk
#

hello, what are the forums where you can post an update of your plugin
for example if I want to tel people I updated where could that be
on the forums

limpid thistle
#

hello, what are the forums where you can post an update of your plugin
for example if I want to tel people I updated where could that be
on the forums
@fair musk You can click on "Post Resource Update" when you are viewing your own plugin

#

And then everyone following it will receive a notification

fair musk
#

Alright thanks!

tawny gale
#

Someone has a good message announcer plugin please (don't tell me Message Announcer plugin because it deletes my config)

golden shale
#

I am about to begin developing my first plugin and whilst following the tutorial, am i right in thinking I am required to download this .jar?

sturdy oar
#

no

#

if you downloading stuff and importing manually you already doing something wrong

#

you should import dependency from maven\gradle

sturdy oar
#

don't follow that

golden shale
#

In the past I had been using maven but that was many years ago

sturdy oar
#

NetBeans has full support for maven \ gradle so I don't see why you wouldn't use them

golden shale
#

was just looking for an up to date tutorial

sturdy oar
#

well you're not going to find many "up to date" tutorials with NetBeans IDE

#

although the process is very similar on IntelliJ as well

#

so you could just kinda follow those

golden shale
#

Does IntelliJ follow the maven route?

sturdy oar
#

IntelliJ can use maven and gradle as well

#

and has super cool plugins

#

that automatically setup your plugin maven config for you

golden shale
#

would you recommend intellij over eclipse?

sturdy oar
#

yes

#

i mean you could just try them all

#

but im pretty sure you would like IntelliJ the most after having tried them all

golden shale
#

Thanks, I'll give it a go with IntelliJ. I've not developed in java in quite a while

sturdy oar
#

oh god

frigid ember
#

dont bring in god

#

say jesus

#

wait jesus is god ????????:?/?/?/?/?/?/?3?/

naive goblet
#

Nice code dkl

frigid ember
#

bring in holy sprit

#

hes god too?

#

no way

naive goblet
#

He must be

frigid ember
#

is angel also god?

#

“we beliv in one god”

#

pls dont take offense anyone

#

but Lol

sturdy oar
#

DKLMapper your trying to set items in a non existing slot

#

the stacktrace is pretty clear

naive goblet
#

Dkl I’d highly recommend something like mfs when making guis or so

#

It can be a relief to work with

sturdy oar
naive goblet
#

Saw that too

frigid ember
#

thats not good code

#

rather make an areay for each kne

naive goblet
frigid ember
#

one

#

and make a for loop

#

so its less repetitive

#

as there is no pattern in these numbers ofc

#

oh boy lol

#

he wrote it 50 times

#

oh boy

#

this mans be doing a yanderedev

acoustic temple
#

So i'm writing a command that'll put a potion into an inventory, and getting this error; Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_15_R1.inventory.CraftMetaItem cannot be cast to org.bukkit.inventory.meta.PotionMeta
I'm casting the item's ItemMeta to PotionMeta, editing that, and then doing setItemMeta(potionmeta); how am I supposed to do it?

sturdy oar
#

well the item meta clearly isn't an instanceof PotionMeta

#

so check your item before doing the cast i guess

acoustic temple
#

Oh I should probably make a new ItemMeta for that since its using one from a previous item

naive goblet
#

I think it copies by default?

frigid ember
#

@acoustic temple check what CraftMetaItem inherits bro

gleaming helm
#

getItemMeta() stupidly makes a copy of the meta

#

You have to set it again with setItemMeta() if you want it to update

acoustic temple
#

mhm, thats what ive been doing

naive goblet
#

Spodo what are you specifically trying to accomplish

frigid ember
acoustic temple
#

i think what i'm doing wrong is
im making a GUI with a bunch of items, one item object specifically
the item object started as something other than a potion, so the meta object wasnt an instanceof potionmeta

vestal jewel
#

How to make a sound code in config with boolean?
Example:
Had-Sound:
Enable: true - if true it will make a sound, if false, it will not make a sound!
Sound: 'ENTITY_EXPERIENCE_ORB_PICKUP'
How can I do it?

naive goblet
#

Make a potionbuilder

acoustic temple
#

que?

naive goblet
#

@vestal jewel java if (boolean) { //do stuff }

#

Spoda yeah ?

#

I can send some pseudo code if you’d like

acoustic temple
#

that'd be a big help
i'm new to spigot so i'm kinda just figuring stuff out as i go

vestal jewel
#

can send?

naive goblet
#

Deived you can get a bool value by FileConfiguration#getBoolean(path)

vestal jewel
#

@naive goblet how ?, '-' i am still learning java

lucid wasp
#

Does anyone know if it is possible to show stuff from GitHub in minecraft using spigot?

#

I want to create a GUI that shows all commits, and would know how to make a GUI but I dont know how I would get those commits

undone narwhal
#

Yep obvisouly

steady cedar
#

Use GitHub's RESTful API.

#

It's pretty well documented. I'm not sure if it contains commits

#

Worth looking into it though

lucid wasp
#

Thanks, Ill look into it!

naive goblet
#

@acoustic temple

class PotionCreator implements Supplier<ItemStack> {

List<Consumer<PotionMeta>> list;

public PotionCreator() {
  list = new LinkedList<>();
}
 private void withMeta(Consumer<PotionMeta> meta) {
list.add(meta);
}
public PotionBuilder setType(PotionEffectType type) {
withMeta(meta -> meta.setMainEffect(type));
return this;
}
@Override public ItemStack get() {
ItemStack item = new ItemStack(Material.POTION);
PotionMeta meta = (PotionMeta) item.getItemMeta();
list.forEach(consumer -> consumer.accept(meta));
item.setItemMeta(meta);
return item;
}
}``` might miss some stuff but it was on phone
acoustic temple
#

oh, thank you so much!

naive goblet
#

@vestal jewel FileConfiguration#getBoolean() and
FileConfiguration#getString() then Sound#valueOf(String#toUpperCase)

vestal jewel
#

'='

naive goblet
#

Type#method

#

Since I don’t know where you get your types I can’t write something in your case

frigid ember
#

can he not

#

lol

#

Hey

#

if he knows no other community

#

is ok

#

So i have a few questions

#

ok

#

How important is a dedicated gpu for a modded server

#

to run a modded server

sturdy oar
#

0

frigid ember
#

okay

sturdy oar
#

also this isn't sponge support

#

you should ask them if you plan to run server with mods

#

spigot doesn't do forge mods )=

frigid ember
#

is there a difference when using ecc memory

sturdy oar
#

in performance ? prob not

#

in stability, yes

frigid ember
#

okay

#

whats more important

#

clocks or cores

#

and is setting java params important

#

OpenJ9 vs HotSpot vm

opal marsh
#

single-core performance is very important for minecraft

#

I use OpenJ9 and I've heard it's more efficient on memory and slightly better for cpu

sturdy oar
#

You'd have to prove that

#

I'm fine with GraalVM 11

clear night
#

Hey, does any of you fine folks know what I'm doing wrong here?
https://paste.helpch.at/ofamehipuz
I'm trying to hide players from the tab list without hiding the actual player entity :)

brave gulch
#

Hello,

I got to a bit of a problem today. I will need an offline player database that will store name : uuid i will handle that with mongo, but then i have problems of multiple uuids having the same name since there is some illegals account that have different uuid but same name does anyone have idea how it would be best to handle this kind of accounts? I will be updating the name to the latest one on every join. But i am unsure how to handle another thing where if i change name on my main account to something else and then i don't login to server so the name wont update, and on my alt account i change it to MrWolfeh and join the server it will most likely generate an error?

sturdy oar
#

Well use the UUID as primary key

#

and unique

#

simply don't base your code/db on the player usernames

frigid ember
#

tell me morw about openj9

sturdy oar
#

It has been developed by eclipse team and it's still 🤷‍♂️

frigid ember
#

is it better on performance or not

brave gulch
#

I need an offline player database so i cant use the uuid

frigid ember
#

what are pros and cons

torn robin
#

@brave gulch pretty sure you can?

#

Last I checked I don’t think UUIDs changed when the name changed, even for offline

sturdy oar
#

Uuids are unique

brave gulch
#

Since i have servers that start by themselves and they always regenerate to template i don't have the user cache available and im not sure the OfflinePlayer works without that or i am wrong?

frigid ember
#

OfflinePlayer works with uuids

sturdy oar
#

OfflinePlayer simply contacts mojang API

frigid ember
#

i don't see why you'd need a player cache honestly

sturdy oar
#

If cache isn't found

frigid ember
#

yep

#

using mongo just adds dependencies and complications

sturdy oar
#

NoSQL ☹️

frigid ember
#

😦

brave gulch
#

mongo is nice

frigid ember
#

Can't find it anyone know what people use for bungeecord to add commands like /survival /creative /hub /kitpvp ect to take you to that server?

sturdy oar
#

Aliases plugin

ionic hound
#

Anyone know a good free plugin for money vouchers? for 1.15.2

torn robin
#

@ionic hound can you look up “Money vouchers 1.15” for me and tell me what you see

gleaming helm
#

Don't use mongo for a cache. If you want a cache, use redis

#

The reason you'd want a cache is because the mojang API is rate limited to 600 requests per 10 minutes

arctic parcel
torn robin
#

Maybe just don’t have an offline server

#

Almost as if mojang solved this problem for you

gleaming helm
#

I have an online mode server and still need a cache for UUID lookups

#

There are perfectly valid reasons to want to look up a UUID or player name

torpid field
#

How would i make a variable uniqe to every player?

gleaming helm
#

Learn java.

torpid field
#

ok

torn robin
#

@gleaming helm are you looking up players that have already join?

#

I’m pretty sure they’re auto cached

gleaming helm
#

Both players who have joined and have not joined.

#

Using the filesystem cache does not work for my use case for two reasons

brave gulch
#

Yeah redis is smart thanks 😄

gleaming helm
#
  1. I'm sharding, so not all the servers share the same filesystem.
#
  1. If a player changes their name, I want it to update immediately.
torn robin
#

That’s one a second are you really going to need to lookup a player a second

gleaming helm
#

Not the next time they join

naive goblet
#

@torpid field you want to keep track of every player online?

gleaming helm
#

I'm caching for a period of a few minutes

#

So if they change their name it'll change on the network in less than 10 minutes guaranteed.

torpid field
#

@naive goblet no more like a variable like a players money or kills

naive goblet
#

Well if you want a unique player variable you may use their uuid

#

explain more my buddy

gleaming helm
#

You can use a map to map player uuids to your variable

#

I think that's what you're asking

naive goblet
#

Depends

gleaming helm
#

If you want to save it I believe bukkit has a serializer for saving a map collection to yaml but I'm not really sure (I refuse to store any data in yaml files)

naive goblet
#

lerdyr if I am right you want to store custom stats for each player ?

torpid field
#

yes

naive goblet
#

store each player with a file named after their uuid

torpid field
#

to explain more i want to add another currency

naive goblet
#

ah

torpid field
#

so like normal money and coins

naive goblet
#

Yeah

#

Well make a class for the methods that is responsible for the data management

torpid field
#

But whouldnt having many files of players uuid and an int coins be a waste of space?

naive goblet
#

Certainly

#

You could store it with a database if you want but it requires knowledge about some basic java

torpid field
#

right now i am just making plugins on a local server so getting a database would require money to be spend on a host right?

#

or i could just make one file with all the players uuid and coins right?

naive goblet
#

I mean not neccesarily

#

1 file is kind of oof

#

But I mean if you want sure

#

Wouldn't recommend it though

torpid field
#

what do you mean by oof

naive goblet
#

First of all maintaining the file with all player uuids

#

All I can tell is that after a while that file will be pretty nasty

torpid field
#

Is a hashmap a good idea?

naive goblet
#

Depends

#

I mean essentially the hashmap will be lost on shutdown

torpid field
#

hmm

naive goblet
#

why not try per player file?

#

I mean it's not that bad after all

torpid field
#

sure

naive goblet
#

Obviously a database is better but choosing between single flatfile for storage per player vs per player flatfile then per player flatfile is better

torpid field
#

ok so ill just need to make a folder and make the player data inside that folder right?

naive goblet
#

yeah it's smart to make a directory for it

torpid field
#

there is a player.uuid method right?

naive goblet
#

Player#getUniqueId()

torpid field
#

ok ty for taking the time to answer my probably pretty stupid questions :)

naive goblet
#

np just ask more if needed

red zenith
#

Does spigot provide builds before the official release?

remote socket
#

Does SQLITE have a number cap?

#

I get "Couldn't execute MySQL statement:
java.sql.SQLException: ResultSet closed"

red zenith
#

By number cap do you mean a limit on the number of records it can retrieve in one query?

remote socket
#

I mean it looks like it's an overflow error

#

But it seems far too small of a number for that

red zenith
#

So you mean the number of bytes that can be allocated to a numeric field?

remote socket
#

Perhaps

red zenith
#

what version are you using?

remote socket
#

Of?

red zenith
#

sqlite

remote socket
#

how can i check

red zenith
#

well that does look like an over flow; it does appear that sqlite is limited to 8 bytes, but I would expect a larger number in that case.

remote socket
#

"Eight bytes contain 64 bits of information, so you can store 2^64 ~ 10^20 unique items using those bits."

sturdy oar
#

wait

remote socket
#

Yes the number is definitely too small

sturdy oar
#

"Couldn't execute MySQL statement" but you said SQLite

#

something's wrong here

frigid ember
#

#general

sturdy oar
#

@frigid ember we already told you

remote socket
#

something's wrong here
It's just a message, it's a mistake

#

I'm learnt it online

#

and they must have copied the messages from another of their projects

sturdy oar
#

...

#

2 people literally told you

#

read the whole conversation

#

@remote socket it's kinda too small for humans to read

remote socket
sturdy oar
#

oh god...

#

learn how to use maven for god's sake

remote socket
red zenith
#

Why aren't you using maven to include your dependencies?

remote socket
#

I am

sturdy oar
#

not to mention Spigot already provides SQLIte drivers

remote socket
#

learn how to use maven for god's sake
@sturdy oar Dont be so rude, I know how to use maven

sturdy oar
#

then why the hell you're using system dependencies

#

for something that is already present at runtime

remote socket
#

Can't remember

red zenith
#

then why do you have those jars in a dependencies folder?

remote socket
#

Because UltimateStacker doesnt have a repo

red zenith
#

What does that have to do with sqlite?

sturdy oar
#

imagine Songoda plugins having an API

#

how funny

frigid ember
#

lol com.gmail

#

LOOL

remote socket
#

I don't remember why its there

frigid ember
#

best domain for dependency

remote socket
#

But there was a reason

red zenith
#

Songoda does have repos, on Gitlab

remote socket
#

Yeah but they don't actually work

#

Because they require the private stuff

red zenith
#

Hrm, pretty sure I was able to do something with their SkyBlock plugin when I was trying to trouble shoot my Scoreboard plugin.
Been a while though since I did that.

remote socket
#

It doesn't work, you have to use system scope

naive goblet
#

songoda jesus dude

sturdy oar
#

high quality software

remote socket
#

I'm new to plugin development, why's everyone hate them

sturdy oar
#

it's a long story, i don't want to explain it again

red zenith
#

there's not bot command to explain it? 😛

naive goblet
#

long story short their code is kinda scammy for what you're paying for

opal marsh
#

I've never heard of this 👀

sturdy oar
#

just the fact that the user is banned should be enough

opal marsh
#

oh damn

remote socket
#

long story short their code is kinda scammy for what you're paying for
It's all open source, so you can just compile it free 🤷‍♂️

opal marsh
#

I think I looked at their plugins a while ago and they had nice artwork but I had no idea they were banned

remote socket
#

just the fact that the user is banned should be enough
"The User"? Isn't it several people

sturdy oar
#

I don't want to bring this story up again, however with 'the user' i refer to the creator of the website.

remote socket
#

Ah okay

sturdy oar
#

you can just look up all conspiracies and not funny things she had done yourself

frigid ember
#

frost byte

#

ea

sturdy oar
#

sports

frigid ember
#

rotanosrepmi

red zenith
#

So they breadcrumb charges for their plugins?

frigid ember
#

idnef

red zenith
#

DLC in DLC?

frigid ember
#

etyb-tsorf

red zenith
#

So you're a repoorter?

naive goblet
#

isnt that like ksi but glasses

frigid ember
#

?

fallow nest
#

pls help anyone know why my server crashes with this [Netty Epoll Server IO #2/WARN]: io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer

frigid ember
clear night
#

Would anyone happen to know how I would hide players only from the tablist, without completely preventing clients from rendering them? This is my code

        this.protocolManager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Server.PLAYER_INFO) {
            @Override
            public void onPacketSending(PacketEvent event) {
                if(event.getPacket().getPlayerInfoAction().read(0) == PlayerInfoAction.ADD_PLAYER) {                    
                    PacketContainer packet = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.PLAYER_INFO);
                    
                    List<PlayerInfoData> playerInfoDataList = new ArrayList<PlayerInfoData>();
                    
                    for(PlayerInfoData data : event.getPacket().getPlayerInfoDataLists().read(0)) {
                        if(data == null || data.getProfile() == null) {
                            playerInfoDataList.add(data);
                            continue;
                        }
                        WrappedGameProfile profile = data.getProfile();
                        playerInfoDataList.add(new PlayerInfoData(profile, data.getPing(), data.getGameMode(), data.getDisplayName()));
                    }
                    packet.getPlayerInfoAction().write(0, PlayerInfoAction.REMOVE_PLAYER);
                    packet.getPlayerInfoDataLists().write(0, playerInfoDataList);
                    
                    for(Player p : Bukkit.getServer().getOnlinePlayers()) {
                        try {
                            ProtocolLibrary.getProtocolManager().sendServerPacket(p, packet);
                        } catch (InvocationTargetException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
        });
pure pasture
#

Hi One question is there a good way to access a file from one plugin in another plugin?

#

So like you have Plugin a which creates a file and plugin b should be able to access it

bronze marten
#

Just get the datafolder, go one folder up, get the other plugins datafolder, get file

pure pasture
#

I did that but if Plugin a changes a value in the file plugin b still outputs the old value ...

bronze marten
#

You need to refetch the values, or watch the files for changes

pure pasture
#

How

bronze marten
#

But why would you need that

pure pasture
#

Cause I want a modular system

bronze marten
#

Eh, that doesnt make much sense

pure pasture
#

Why

bronze marten
#

Its better to just broadcast the new values in code

#

Just hook into your “other plugin”

#

Let that other plugin call update methods

pure pasture
#

How would you do that?

fallow nest
#

pls help anyone know why my server crashes with this [Netty Epoll Server IO #2/WARN]: io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer

pure pasture
#

Does it show you that error in console or when you try to log on?

#

Or I could do it differently

#

I have the problem that my plugin stops all tasks that are being run by it when a certain action happens cause I dont know how to do that otherwise

frigid ember
#

Heya

#

Is there any newbie Dev who wants to make a small plug for free?

pure pasture
#

Yes

#

xD

frigid ember
#

Who

pure pasture
#

Me

#

lol

frigid ember
#

How much time are you in java?

pure pasture
#

A year

#

Or a year and a half

frigid ember
#

Okay I think you are able to make it

pure pasture
#

Nice

frigid ember
#

Do you know some ai or armorstand packet property?

#

Using protocollib

pure pasture
#

No xD

#

Never worked with that

frigid ember
#

Maybe it's time to do so?

pure pasture
#

What do you need?

frigid ember
#

@pastel arrow maybe ping green person (staff) but k don't recommend it, you can try

hard crane
#

hey is there a way to make items not stackable, someone said making them unbreakable but that didnt work

bronze marten
#

I think you could give them a weird enchantment which could make them apart from the rest, and then hide flags

#

But i dont think you can prevent stacking of exactly the same types

pure pasture
#

Can you somehow set the id of a repeating task?

naive goblet
#

Why would you need the id?

rose pivot
#

Can someone help me how to play the block shuffle like where to put the files so on?

frigid ember
#

Is it possible to have a crafting table without opening it for a player?

#
InventoryView inv = p.openWorkbench(p.getLocation(), true);

I have this, but I don't want it to open

naive goblet
#

not sure

#

why u need it ?

remote socket
#

I mean it looks like it's an overflow error

#

It was nothing to do with SQLite

tiny dagger
#

👀

#

just type 2^31-1

#

in a calc

frigid ember
#

Alright guys, so I have this now But the item in slot 0 should be set to a diamond block

tiny dagger
#

uh, why?

#

setitem 0

#

new itemstack material.diamond block

frigid ember
#

@tiny dagger oops sorry I forgot to post the code

    private HashMap<Player, InventoryView> crafting = new HashMap<>();
    
    @Override
    public void onCommand(Player p, String[] args) {    
    Inventory in = Bukkit.createInventory(p, 54);
    
    InventoryView inv = p.openWorkbench(p.getLocation(), true);
    p.openInventory(in);

    //inv.setItem(0, new ItemBuilder(Material.DIRT).setName("HI").build());

    new BukkitRunnable() {
        
        @Override
        public void run() {
        in.setItem(0, inv.getItem(0));        
        }
    }.runTaskTimer(main, 20L, 20L);
    
    crafting.put(p, inv);
    }

    @Override
    public List<String> onTabComplete(Player p, String[] args) {
    return null;
    }
    
    @EventHandler
    public void onClick(InventoryClickEvent e) {
    Player p = (Player) e.getWhoClicked();
    
    p.sendMessage("CLICKED");
    
    if (crafting.get(p) == null) {
        p.sendMessage("null craft view");
        return;
    }
    
    InventoryView view = crafting.get(p);
    
    if (e.getSlot() <= 9) {
        view.setItem(e.getSlot(), e.getCurrentItem());
        e.setCancelled(true);
    }
    
    
    }

I'm trying to get the result from the workbench

frigid ember
#

Oh wait, I think I forgot to register my listeners

#

BRUH

#

gg

rich olive
#

are any spigot devs on this server?

naive goblet
#

Yes

#

A lot in fact

rich olive
#

ok, in that case

#

I think there is a bug in spigot, but I don't know enough about it to file it on JIRA

#

hopefully one of them sees

naive goblet
#

Could you make a summary of it here

timid valley
#

he meant for md5

naive goblet
#

👌

vernal plank
#

Is there an event to detect when farmland degrades into dirt?

#

Neither MoistureChangeEvent nor BlockFadeEvent are triggered for this

#

Oops I had a mistake in my code, BlockFadeEvent is called for farmland degrading into dirt and the moisture event is triggered for all degredations before then.

naive goblet
#

BlockGrowEvent?

#

Or am I wrong?

vernal plank
#

Hm?

hard crane
#

hey is there a way to check in which inventory the player put the item? i want to prevent players from putting items with lore in craftable inventories which includes the player 2x2 interface, so i cant just check which inventory is currently open because that would disallow the player from moving the item in their normal inventory

naive goblet
#

iirc that 2x2 is a part of the players default inventory

calm cloak
#

Maybe you could check what slot they moved it to? Idk if the 2x2 registers as a specific slot number, but I bet it probably does

naive goblet
#

You could probably debug which slot with the drag event or click event

hard crane
#

but like the inventory click event only gives of the slot the item was originally clicked in

#

so it could be dragged into the crafting inventory but not taken out

naive goblet
#

Wym

#

Or I mean cancel drag event perhaps

hard crane
#

e.getSlotType() would be the slot where the item initially was clicked wouldnt it

calm cloak
#

hm.. lemme think about it for a minute

naive goblet
#

And debug from drag

#

Drag has getFrom and getTo iirc

hard crane
#

it doesnt say in the docs

calm cloak
#

What about trying a CraftItemEvent? (Not sure if a different event would be more appropriate) but check the recipe items for lore? And cancel the crafting if so

#

Or does that not really fulfill what you're trying to do

hard crane
#

could i technically use getInventorySlots() from drag event and look if it contains the slots of the craft interface

calm cloak
#

I have no idea homie, I haven't really worked on anything with the crafting items in a hot minute

#

Worth a shot maybe? lol

hard crane
#

ill try it

cursive lily
#

If there is anyone good with the citizens plugin please contact me ASAP! Thanks in advance.

calm cloak
#

What do you mean by section?

#

Do you mean a config.yml file?

pure moon
#

How do i download mc mmo

hard crane
#

ok so this is kinda strange, getinventoryslots outputs 1, 2, 3,4 if i put the item in the craft interface but also if i put it in the usual 1, 2, 3, 4 slots

calm cloak
#

@hard crane it must be a different inventory owner or type then. something has to be differentiating those two.

uneven dove
#

Somebody can help me?, I need change my resource to premium.

calm cloak
#

Yeah, you do it just like that

#

So like for UUID:

#

That would be 2 spaces out further on the next line, than hello: is

#

@uneven dove You gotta delete the resource and reupload it. Needs to be approved by Resource staff

uneven dove
#

How delete the resource?

calm cloak
#

I don't think you can delete it by completely by yourself. I think you need to use the report button on the bottom of your plugin's page and ask for it to be deleted

#

You could upload an empty jar file though, and delete the previous version, under the "version history" tab

golden vault
#

Yes, report your resource with "please delete".

uneven dove
#

Where is the option to report?

golden vault
#

bottom left of the description

uneven dove
#

ready

#

How long does it take?

golden vault
#

done

uneven dove
#

❤️

calm cloak
#

thats some super speed Weaves 😮

golden vault
#

lol

uneven dove
#

web is down ? or is my connection?

grave verge
#

same with me

calm cloak
#

It happens once in a while

#

Its happened to me a handful of times in the past couple months

hard crane
#

ok so i did it with the drag event and i check if the inv is crafting and the raw slots are 1 2 3 or 4

#

and sometimes it works but sometimes it just doesnt

#

no errors nothing

#

event just doesnt trigger for some reason or smth

calm cloak
#

Thats weird

#

Good on you for check rawSlots though, I forgot about that for a minute lol

hard crane
#

hm

#

do you have any idea why this could be happening?

calm cloak
#

tbh no

#

Is there any difference? Between when it works and doesnt work?

#

Different item stack, size, etc?

hard crane
#

no exact same item

calm cloak
#

Different slot that its moving to?

uneven dove
#

@golden vault i added my resource 🤭

hard crane
#

if i try putting it in the same crafting slot again after its been cancelled i can do it

#

and then i can move it everywhere

#

and then it doesnt work at all for some time

#

but resumes afterwards

#

if it helps heres the code

#
@EventHandler
    public void onDrag(InventoryDragEvent e){
        Player player = (Player) e.getWhoClicked();
        if(e.getInventory().getType().equals(InventoryType.CRAFTING)) {
            Set<Integer> slots = e.getRawSlots();
            System.out.println(slots);
            if(slots.contains(1) || slots.contains(2) || slots.contains(3) || slots.contains(4)){
                e.setCancelled(true);
                player.sendMessage(Lang.CANT_PUT_IN_INV.get(player));
            }
        }
    }```
uneven dove
#

try with InventoryClickEvent

hard crane
#

inventory click event only gives the original slot of the item not where it was moved to

#

so if i cancel it in inventorytype crafting the player wouldnt be able to move the item anywhere

frigid ember
#

I have this, but for some reason it tdoesnt work if I place the item down

#
    @EventHandler
    public void onClick(InventoryClickEvent e) {
    Player p = (Player) e.getWhoClicked();
    Inventory inv = e.getInventory();
    Inventory clicked = e.getClickedInventory();
    
    if (clicked == null) return;
    
    InventoryView view = crafting.get(p);
    
    if (view == null) {
        return;
    }
    
    for (int i = 1; i <= craftingSlots.length; i++) {
        view.setItem(i, inv.getItem(craftingSlots[i - 1]));
    }
    
    inv.setItem(23, view.getItem(0));
    }

And for some reason the slot 0 is being set to air

uneven dove
#

use InventoryAction to check if you are taking an item from those slots

sleek ivy
#

what do the villagers-work-immunity-after/for options mean

calm cloak
#

@hard crane Why are you checking InventoryType.CRAFTING

#

Wouldnt it make more sense to check InventoryType.PLAYER

#

If youre looking for the 2x2

hard crane
#

well crafting is the 2x2

#

and player is the general inv

calm cloak
#

oh ok

#

Well thats about the only thing i could think of

acoustic temple
#

Is there a more efficient way to affect loot tables/drop rates than just listeners?

calm cloak
#

Not that I know of

#

I would imagine that you could do it with NMS, but personally I wouldn't go down that route there is substantial benefit. which idk if there is

acoustic temple
#

What's NMS?

rich olive
#

acronym for net.minecraft.server

acoustic temple
#

ahh

calm cloak
#

Downside of using NMS is plugins break when a new MC version comes out.

fleet crane
#

Is there a more efficient way to affect loot tables/drop rates than just listeners?
@acoustic temple ?xy

#

?xy

worldly heathBOT
acoustic temple
#

Oh, sorry
What I'm going for is I want to slightly bump the drop rate of apples & flint, and make it so that apples drop from any type of leaves

fleet crane
#

BlockBreakEvent --> random --> drop

acoustic temple
#

Aight, that's what I thought
Just wanted to check if there was any special way of messing with that stuff
Thank you though!

uneven dove
#

Best way to create nms entity in versions (1.12 - 1.15) ?

#

I was able to spawn her but I can't edit her pathfinder

#

or, is there any way to get the path that would use an entity from point X to point Y?

rich olive
#

md5, did you see my messages above?

frigid ember
#

Does anyone know how to add acceleration to vectors?

#

For example, I want an entities speed when given a vector to speed up slower, not just "explode" forward as it currently does.

#

I've thought of making very small increases to the velocity at the start, something like

   stand.setVelocity(stand.getVelocity().multiply(1.5));
   //etc   
#

yo

#

y'all know how to fix this?

#
    Player p = (Player) e.getWhoClicked();
    Inventory inv = e.getInventory();
    Inventory clicked = e.getClickedInventory();
    
    if (clicked == null || inv == null) return;
    if (clicked.equals(inv)) {
        p.sendMessage("clicked inventory");
        
        if (!Util.contains(craftingSlots, e.getSlot())) {
        e.setCancelled(true);
        p.sendMessage("contains slot");
        }
        else {
        e.setCancelled(false);
        }
    }
    InventoryView view = crafting.get(p);
    
    if (view == null) {
        p.sendMessage("null view");
        return;
    }
    
    //For some reason it's messed up if I set it right away
    new BukkitRunnable() {
        
        @Override
        public void run() {
        for (int i = 1; i <= craftingSlots.length; i++) {
            view.setItem(i, inv.getItem(craftingSlots[i - 1]));
        }
        
        inv.setItem(23, view.getItem(0));
        new BukkitRunnable() {
            
            @Override
            public void run() {
            inv.setItem(0, new ItemBuilder(Material.STAINED_GLASS_PANE, 15).setName(" ").build());            
            }
        }.runTaskLater(main, 2L);
        }
    }.runTaskLater(main, 2L);
    }

uneven dove
#

@frigid ember inv.setItem(0, new ItemBuilder(Material.STAINED_GLASS_PANE, 15).setName(" ").build());

#

try put a debug

frigid ember
#

what would I debug exactly?

#

I have open a workbench at the same time so I think when i set the items in the workbench its setting slot 0 to the result, but I don't know how to fix that

uneven dove
#

put a message to see if that line is executed

frigid ember
#

Yeah it executes

uneven dove
#

uhm

frigid ember
#

I see it flicker black then turn back into diamons

uneven dove
#

I don't know, the only thing I see in your code that can be changed is
This:
for (int i = 1; i <= craftingSlots.length; i++) {
view.setItem(i, inv.getItem(craftingSlots[i - 1]));
}
To:
for (int i = 0; i < craftingSlots.length; i++) {
view.setItem(i+1, inv.getItem(craftingSlots[i]));
}

#

2 times are diamonds generated?

frigid ember
#

wdym

wet bronze
#

Guys

#

I need help with world guard.

#

I enabled warp signs in Essentials and when I make them in worldguard regions, nothing happens when you right click them.

#

I enabled flags use and interact and it still doesn't work.

#

I'm also OP'ed and have the * perm, so I have no idea why it doesn't work.

calm cloak
#

Is the problem only occurring in the worldguard region? Did you check to see if the same sign works outside the wg region?

wet bronze
#

The sign works outside of the worldguard region

wet bronze
#

I've tried every single thread online

calm cloak
#

Long thread but the guy having the same issue it seems found his answer

wet bronze
#

Nothing works

calm cloak
#

idrk what to tell you then. if you went through every thread you could find from google, enabled the right wg flags, and gave yourself the right permission

#

no idea :/ sorry

frigid ember
frigid ember
#

Anyone good with multi-dimensional hashmaps? lol

lean stratus
#

is there any way i can get a knockback 1000 stick?

heady jolt
#

^ that would crash your server

frigid ember
#

/give <playername> minecraft:stick 1 0 {ench:[{id:19,lvl:1000}]}

#

For 1.8 at least, not sure what it is in 1.9+

timid wagon
#

Is this also where I can ask development questions?

#

Well I'll ask anyways ;p
If a Minecart is not being pushed by Water due to a modification of a Minecart, how would I fix that? Do I need to make the water realize that it's an Entity and should be pushed or make the modified Minecart get pushed by the water?

#

Alright better question. Where is the Water Physic Logic for Minecarts?

frigid ember
#

Can I force update a chest inventory?

frigid ember
#

@pastel arrow I mean a custom inventory using Bukkit.createInventory, but however I have this issue now

java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom cannot be cast to org.bukkit.inventory.CraftingInventory

Inventory inv = Bukkit.createInventory(null, InventoryType.WORKBENCH);
crafting.put(p, inv);

CraftingInventory inventory = (CraftingInventory) view; //error here, where view is crafting.get(p)

jolly ember
#

Hey guys, does anybody know how to change player's block collision to one block height?

undone narwhal
#

To make him crawl?

jolly ember
#

yup

fleet crane
#

@frigid ember that's fixed in later versions

frigid ember
#

md_5 ur pro

#

ur best man, im u biggest supporter lol

#

wish to meet usomeday irl

rich olive
#

should I just file my issue on JIRA anyways? even though I don't know much about it?

frigid ember
#

md_5 fork minecraft dungeons code LOL, learn cpp and fork it, idk what lang they used for netcode but probs cpp as ue4 is the game engine

fleet crane
#

yes you can make an issue on jira if there are steps to reproduce it

rich olive
#

well that's why I didn't do it

#

I don't know how to reproduce

fleet crane
#

can you make the issue happen repeatedly?

rich olive
#

but I have a stacktrace and some more info

#

I can't, but a user of MV can