#help-development

1 messages · Page 979 of 1

echo saddle
#

don't recall if it was there or I added

quaint mantle
#

i need to maintain a boolean on true for certain time

lost matrix
#

There is literally no value for that. Not described on the wiki and looking at the nbt tags doesnt show anything either.

grim hound
#

so?

echo saddle
#

perhaps it was added, I don't recall, code is old

lost matrix
grim hound
quaint mantle
#

pls, help

eternal oxide
lost matrix
#

No, this will result in random behavior for around 2 seconds and after that its always true.

echo saddle
#

ok, then is there way to set tags in itemstacks

quaint mantle
#
new BukkitRunnable(){
                @Override
                public void run() {
                    combat = true;
                }
            }.runTaskTimer(main, 0, 50L)
#

and this is right?

#

only this code

#
BukkitTask run = new BukkitRunnable(){
                @Override
                public void run() {
                    combat = true;
                }
            }.runTaskTimer(main, 0, 50L);
            
            run.cancel();
            
            combat = false;
#

or this? xd

lost matrix
lost matrix
eternal oxide
#

the second one woudl error instantly

#

can;t cancel the task thats not yet scheduled error

quaint mantle
#
public void entitydama(EntityDamageByEntityEvent e)
lost matrix
#

Then set it to false, and back to true when the event is called...

quaint mantle
#
BukkitTask run = new BukkitRunnable(){
                @Override
                public void run() {
                    combat = true;
                }
            }.runTaskTimer(main, 0, 50L);

            combat = false`
#

like that?

#

can you explain me with code pls? im not expert haha

lost matrix
quaint mantle
#

pls

lost matrix
#

I dont even know what you are trying to do...

quaint mantle
#

im trying to do this

#
@EventHandler
    public void entitydama(EntityDamageByEntityEvent e){
        if(e.getDamager() instanceof Player && e.getEntity() instanceof Player){
            Player p = (Player) e.getEntity();
            Player k = (Player) e.getDamager();

            BukkitTask run = new BukkitRunnable(){
                @Override
                public void run() {
                    combat = true;
                }
            }.runTaskTimer(main, 0, 50L);
        }
    }
#

when the event is called the boolean combat sets to true

#

and after 10 seconds set it to false

eternal oxide
#

why?

quaint mantle
#

I want to make a combat logger type

eternal oxide
#

you realize this is a single boolean so it will be set for anyone attackign anyone?

lost matrix
#

Thats another issue

#

...

#

Is that a moment for a certain suggestion?

quaint mantle
#

is not a combat logger

#

is when a player falls into the void by people

eternal oxide
#

so last damager?

#

you can get that from teh death event

echo saddle
#

So, the biggie question, is there a Spigot API for DataComponents?

quaint mantle
#

p.getName() fall into the void

#

and

quaint mantle
#

p.getName() fall into the void by killer.getName()

#

and i working with that with booleans

#

can you explain me how

eternal oxide
#

scrap the boolean

quaint mantle
#

how?

echo saddle
slender elbow
#

pdc?

quaint mantle
#

can you show me an example code?

#

pls

#

im not expert @eternal oxide

eternal oxide
#

add a tag to the Player PDC with the last player attacker and the time

quaint mantle
#

only show me how can i set the boolean to false after an certain time

#

pls

eternal oxide
#

thats a waste of your and my time

quaint mantle
#

why

eternal oxide
#

it will not do what you think it will

eternal oxide
#

In EntityDamageByEntityEvent (if both are players) get the attacked players PDC, set two entries. "last_damager" and a PersistentDataType.LONG for System.currentTimeMillis().
In the death event read the players PDC for last damager and the time, if it's within 10 seconds you send your second message.

#

?pdc

echo saddle
#

so, what is the best way now to store custom data for an item

echo saddle
#

and this custom tag container is per item?

eternal night
#

Yes

slender elbow
#

no different than it was a year ago

dapper flower
#

I want to cancel the fact that an item get damaged on the BlockBreakEvent, I don't want to set the item to unbreakable tho

#

how do i do that

lost matrix
#

Generally with the PlayerItemDamageEvent. A bit more context would be nice.

dapper flower
#

I made a slimefun item that uses electricity as durability, so when the electricity is 0 the event of breaking the block gets cancelled altogether and a message pops out saying "Charge your tool", I didn't define the itemstacks in a static context and now ofc it fails if i try to set it to unbreakeable within a static context, so i either use another event or when blockBreakEvent is called i make the tool unbreakable, but i am worried that if doing so it will damage the item by 1 witch is a pain in the ass

lost matrix
#

What prevents you from just making the ItemStack unbreakable if it never uses any durability anyways?

dapper flower
#

I created the items in an enum thinking it would be more sustainable however it was a stupid decision, if I just made a class filled to the brim with static public variables "like slimefun does btw" i could have just reference the item from a static context and set it to unbreakable like this

static {
  item.getMeta().setUnbreakable(true)
}
#

but i don't want to refactor lol

lost matrix
#

Slimefun is such a dumpster fire

#

Just cancel the PlayerItemDamageEvent then

dapper flower
#

yeah doesn't work guess am gonna use that event

#

that was it ty

deep herald
#

anyone know why this doesnt send if they arent on 1.12 and lower?

lost matrix
deep herald
lost matrix
#

I mean... 762 is in fact not <= 340, so the code works as expected

deep herald
#

it doesnt send the message when im on 1.8

#

did I do it wrong?

lost matrix
#

Print out the protocol version

deep herald
#

is the 1100L wrong?

lost matrix
#

Print out the protocol version

civic sluice
#

1.8 is 47

deep herald
#

im aware

civic sluice
#

then don't join with 1.19.4

alpine urchin
deep herald
alpine urchin
#

the way viaversion works is it modifies the protocol version so that the server thinks the client is the same version, allowing it to join

#

so if viaversion is on the server use viaversion API

deep herald
#

oh

lost matrix
#

smh

alpine urchin
#

same applies for protocolsupport

deep herald
#

there?

deep herald
lost matrix
#

That doesnt make any sense. Just print out the damn protocol value when you join with an 1.8 account

deep herald
#

oh

#

oh

#

thats not good

#

it prints the latest

lost matrix
#

So it prints 762 when you join with 1.8?

deep herald
#

yes

lost matrix
#

Alright then you have a protocol mapper installed like retropper suggested. Viaversion i suppose?

deep herald
#

?

alpine urchin
#

simple words: he’s asking do you have viaversion or protocolsupport

#

on ur server

deep herald
#

like what

lost matrix
#

Ah i see. Do you have ViaBackwards installed or is your server on 1.8 running viaversion for forward compatability?

alpine urchin
#

first you need to check if viaversion is on your server, with an if statement somewhere. if that is the case, use via api to access protocol version

#

if that is not the case

#

read it from the packet

deep herald
#

viabackwards

#

and viarewind

#

legacy

alpine urchin
#

oh

#

you’re not reading packets

#

just plib api

deep herald
#

wdym

#

my brain

young knoll
#

Does viaver show your version correctly in game

#

With the command

deep herald
#

no

#

oh

#

yeah 1.8.x

lost matrix
#

In which event are you checking the protocol version?

deep herald
#

my join event

lost matrix
#

Then delay the check by a few ticks

deep herald
#

wait

#

thats what i have

#

isnt it in millis?

alpine urchin
#

no

lost matrix
#

Its in ticks. And this doesnt delay the check.

deep herald
#

it was delayed so long

#

alr it works

#

sry guys

lost matrix
# deep herald thats what i have
@EventHandler
public void onJoin(PlayerJoinEvent event) {
  Player player = event.getPlayer();
  Bukkit.getScheduler.scheduleSyncDelayedTask(() -> {
    ViaAPI api = Via.getAPI();
    int version = api.getPlayerVersion(player);
    if(version <= 340) {
      player.sendMessage("Go somewhere else with your garbage legacy software or whatever");
    }
  }, 80);
}

80 ticks is about 4s

deep herald
lilac vector
#

I'm being too hopeful but is there anyway this magical 1.20.5 update also added support for crafting with multiple items?

chrome beacon
#

No but you can handle that yourself

lost matrix
#

Minecraft fundamentally doesnt support this, and the chance that this ever gets implemented is quite slim

lilac vector
#

thought so yeah

lost matrix
#

But with some trickery its possible

lilac vector
#

hm?

#

I mean worst case I can always remake the crafting table

#

it's not too horrible

young knoll
#

You can make use of the crafting events for that

#

PrepareItemCraftEvent and CraftItemEvent

worldly ingot
#

There's a mod for it 👀 So it's not like it's impossible

#

I'd imagine the only reason Mojang doesn't add this is because they just don't need to. All of their recipes are and likely forever will be unique

lilac vector
worldly ingot
#

Which isn't necessarily guaranteed in a modded environment

next plume
lost matrix
young knoll
#

They want stacked ingredients like hypixel skyblock

remote swallow
#

wait that isnt a scale mod

#

decieving name smh

worldly ingot
#

Oh multiple ingredients

next plume
kind hatch
young knoll
#

It’s not

#

Afaik

kind hatch
#

punches air

lost matrix
zealous osprey
#

emotional damage event gets fired

remote swallow
#

spigot releases client side mods fabric mods to add new api to stuff when

golden turret
#

when the ProjectileHitEvent is called, the projectile's location is not the actual hit location. How can I get it? I am currently using ray trace, but i want to know if there is a better way

lost matrix
#

Yeah if minecraft doesnt let us force inject java code into any client that connects, what is it even good for?

young knoll
#

That’s what log4j was for

golden turret
#

looking into the AbstractArrow, it looks like it does the same thing i do

lost matrix
#

Hm. Looks a bit sporadic to me.

#

Sometimes its correct

young knoll
#

How does the hit sometimes manage to be before and after the movement

#

Quantum code

lost matrix
#

Schrödingers ProjectileHitEvent

golden turret
#

ig the best way is to use raytrace

#

sad

lost matrix
#

Anyways since i had arrows and particles setup i made this weird spiral arrow thing

echo saddle
#

anyone know why remapper is throwing an Unsupported class file major version 65 errors

lost matrix
#

Guess your compiler doesnt like java 21 classes

#

How about you compile using java 21

echo saddle
#

thought i was

chrome beacon
#

You could also just be using outdated plugins

echo saddle
#

remapper is 1.4.0

sullen marlin
#

You need to use the latest version

#

Idk what it is 1.4.3 maybe?

#

1.4.2? 1.4.1 idk? Check it

echo saddle
#

i didn't see any mention when i looked for it, it is because of updates to specialsource?

lilac dagger
#

2.0.3?

sullen marlin
#

Sounds about right

lilac dagger
#

2.0.2*

chrome beacon
#

2.0.3 was released yesterday

echo saddle
#

where would I find the remapper version

lilac dagger
#

oh, i didn't see it

chrome beacon
lilac dagger
#

i look on maven central myself

echo saddle
#

yes, it says the Mojang Spigot Remapper version for gradle is 1.4.0

#

thats what i got

lilac dagger
#

wait, how come maven central doesn't receive updates?

remote swallow
echo saddle
#

io.github.patrick.remapper

remote swallow
#

it most likely isnt updated

sullen marlin
#

You might be able to make it use a more recent ss

echo saddle
#

is there something else (perhaps better) to use?

sullen marlin
#

But idk gradle

remote swallow
echo saddle
#

yeh, gradle and kotlin

remote swallow
#

best bet is either make ur own or update patrick's

echo saddle
#

right, lemme see if i can just compile that plugin with latest ss

remote swallow
#

prob just needs dep upgrades

#

for kotlin, plugins and gradle ver

young knoll
#

Epic where is your version smh

remote swallow
#

uhhhhhhhhhhh

#

its a lot of effort that my braind oesnt have in it

#

at the moment

#

mayb soon

young knoll
#

Only half a brain cell

remote swallow
#

bit of an over-estimate

#

cant believe you gave me half a brain cell

#

ive got like a tenth

echo saddle
#

welp, not making any progress to update this gradle plugin

brave canyon
#

Hello! My name is Jordy and I am trying to set up an AWS t2.micro EC2 for a minecraft server. Is there anyone with guidance?

young knoll
#

Wonder how hard it would be to convert userdev to spigot

echo basalt
#
Amazon Web Services

Introduction This blog covers how to deploy your own personal Minecraft Java server on AWS. Hosting your server on AWS can eliminate common networking challenges and security concerns associated with at-home servers. Because you have control over the virtual machine, you can configure any mods or plugins that you want. We will use Amazon Elastic...

remote swallow
#

That im pretty sure contain paperclip

ivory sleet
#

spigotclip when spigot

remote swallow
#

We cant call it spigotclip

#

Also legal grayzone so no offical releases yadayada

ivory sleet
#

myea, well it was a joke

#

:(

brave canyon
# sullen marlin Sounds expensive

do you think it's expensive if it's just a personal server? also what do you think could be the player limit for just a small server?

ivory sleet
#

its hard to tell the limit before you know what plugins you’re gonna run, how many chunks on average that the server is gonna have to tick concurrently etc

#

but maybe 20-30 given an educated guess

#

just guesswork tho

kind hatch
brave canyon
ivory sleet
#

I don’t mind :)

sullen marlin
brave canyon
split heart
#

am i allowed to paste an image for help?

sullen marlin
#

only verified users can paste images

split heart
#

k

#

any ideas what I'm doing wrong this is 4 days of failure...

white root
#

I suspect most people here both use and recommend intellij

sullen marlin
#

what happens if you click the > next to spigot-api

#

also delete craftbukkit

split heart
sullen marlin
#

delete module-info.java

split heart
#

your gonna make me cry why did that fix it?

#

that was made automatically

sullen marlin
#

because 1) plugins dont use modules; 2) if you really did want to try and use modules, then you need to put the corretc info in module-info which you didnt

split heart
#

gotcha literally happiest man alive right now

late abyss
#

How can I get the state of a player's skin hat layer visibility?

#

While they're connected to the server, I should have access to that information, right?

worthy yarrow
#

?bt

undone axleBOT
lost matrix
#

The client then requests the Skin from Mojang and displays it

late abyss
#

Yeah I can download it myself

#

I just need to know if the head layer is on or off

lost matrix
#

What you could do is actually download the skin (possibly as a BufferedImage) and then check the layers

lilac dagger
#

the ones in playerprofile

#

i'm gonna replace my value signature system for urls

#

and make md happy by using the api

late abyss
#

It's transferred via the server to other players in real time, so I should have access to read it's state, right?

lost matrix
smoky anchor
late abyss
#

that might work thanks!

inner mulch
#

whats the approach for talking between servers? If I use redis and send packets between them, is it out of scope for the packet to know it behaviour? (should the packet only contain data and the action is processed on the reading side)?

lost matrix
#

Redis is one option. You can use packets that contain only data and create your own protocol on that, or you can use something like PRCs (Remote Procedure Calls)

inner mulch
lost matrix
#

What are you trying to do?

inner mulch
#

a lot. this can be used for kicking players if you are not on the same server as they are

#

or send messages to them

lost matrix
#

In those cases you dont need a response from the server, right?

inner mulch
#

yes, why?

lost matrix
#

In which case you should create a concrete protocol with packets only containing data

inner mulch
#

so an event system

gloomy ocean
#

I had a plugin made for me and I'm trying to set the configs right now, but I can't get the attack speed to work right. Any suggestions?

#

I've put 0, 1.6, -3, stuff like that there

#

Idk what to put to make it normal 😭

inner mulch
lost matrix
#

You just have the same plugin on all servers. Then you define the protocol in your plugin and everyone knows what to do when they get a packet.

inner mulch
#

i thoguht the data approach was for when the class is not there

lost matrix
gloomy ocean
lost matrix
#

Sounds like a problem for the dev of the plugin then

gloomy ocean
#

There wouldn't be anything in the code that would do that

#

It's just the attribute we're using

lost matrix
#

I dont understand what this is even supposed to mean...

dawn flower
#

can i turn an integer (that hit the integer limit) to a biginteger

floral drum
#

nerds

#

wc

inner mulch
floral drum
#

honestly for simplicity sake I would use a long

dawn flower
#

i want to get Player#getExp even after int limit

#

without keeping track for the xp myself

lost matrix
dapper flower
#

I want to place a structure layer by layer, is there an alternative to hardcoding a 3dimensional array and cyclicing thru it?

dawn flower
#

what if i do the formula for xp increment backwards on a long

lost matrix
lost matrix
dapper flower
#

I have slabs and stairs in the mix, i tought using setType was a good idea but it doesnt keep track of the orientation of the stairs/slabs, what can i do?

dapper flower
#

i can place a blockdata?

dawn flower
#

what if i do the formula backwards on the level

#

on a long

lost matrix
# dapper flower i can place a blockdata?

Block is really just a position in the World. even setType technically just changes the BlockData.
So setting the entire BlockData and not creating a new one through the Material, is the way to go.

dapper flower
#

what method allows me to do that? i only know settype

#

didnt work with blocks a lot

ivory sleet
lost matrix
# dawn flower on a long

There is a formula which determines the xp needed for a levelup.
The data is stored in an int.
You have no long and a mathematical function can not be "done backwards".
I have literally no idea what you mean by that.

ivory sleet
#

if you struggling due to hitting the total xp cap, you can always use sendExperienceChange and keep track of the internally total exp yourself

lost matrix
#

He doesnt want to track the xp himself

#

He wants to store trillions of xp in an integer, no matter what

ivory sleet
#

well not like they have an option if they decide to go over integer limit on the total xp

lost matrix
#

In theory, if they are fine losing some precision, they could convert the integer bits and manually calculate a mantissa, base and exponent.

#

Which means you would probably only be able to increment your xp in steps of 8, 16, 32 etc, based on how much precision you want to lose vs the incremented size

ivory sleet
#

Yea

lost matrix
#

But thats bonkers

ivory sleet
#

I mean going to the trillions is already a bit goofy

limber mulch
#

How can I get all NBTs Tag in 1.20.5?

lost matrix
ivory sleet
#

Spigot api doesnt really expose nbt, it abstracts over it

limber mulch
lilac dagger
#

Serialize gives you a map

#

Maybe use that

lost matrix
limber mulch
#

for a plugin that set and get custom metadata to itemstack

lilac dagger
#

Pdc?

lost matrix
#

Spigot has an API for that called PersistentDataContainer

#

?pdc

limber mulch
#

thanks

dawn flower
#

and they get like 100 xp every 4 seconds

lost matrix
#

Keep track of the xp yourself and just store it in the players PDC

misty crypt
#

I can compile --rev 1.20.4 with the latest BuildTools.jar (#181), but I cant compile --rev 1.20.5 with the same BuildTools.jar. The error I get is "[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project spigot-api: Fatal error compiling: error: release version 17 not supported" but i'm using OpenJDK 22 (also tried 21 with the same result) on a Fedora server. If I go digging, and i dont know if this is related, I find that the ./Spigot/Spigot-API/pom.xml which gets pulled down from the git repo during the build process contains the following:

#

<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.5-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Spigot-API</name>
<url>https://www.spigotmc.org/</url>
<description>An enhanced plugin API for Minecraft servers.</description>

<properties>
    <skipTests>true</skipTests>

** <maven.compiler.release>17</maven.compiler.release>**
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

#

Anybody got any ideas to build on this for a solution please?

dawn flower
#
    public static long getXPFromLevel(int level) {
        if (level >= 1 && level <= 16) {
            return (long) (Math.pow(level, 2) + 6 * level);
        }
        else if (level >= 17 && level <= 31) {
            return (long) ( 2.5 * Math.pow(level, 2) - 40.5 * level + 360);
        }
        else if (level >= 32) {
            return (long) (4.5 * Math.pow(level, 2) - 162.5 * level + 2220);
        }
        else {
            return 0l;
        }
    }```
i found this online which turns level to xp as a long
#

and it looks accurate to me

eternal oxide
#

First off, thats creative so good luck with that

wet breach
#

also, do you have git installed or are you using the provided version from buildtools?

ivory sleet
dawn flower
ivory sleet
#

It looks accurate yep

dawn flower
#

keeping track would be pain

ivory sleet
#

Nah not really

#

There are some major advantages if you track it yourself, for instance being able to access it even if the player is offline, or if you wanna do some data analysis on the levels and exp

misty crypt
wet breach
#

and git?

misty crypt
wet breach
#

be surprised in how much issues it causes for whatever reason

#

anyways, maybe see if it can be updated?

dawn flower
wet breach
#

oh also probably wise to check on your maven install as well

mellow edge
#

if anyone has ever played bedwars can you tell me what entity type is the diamond cube spinning in diamond generator

misty crypt
ivory sleet
misty crypt
#

I Can remove the package and let it use the maven version if you think thats worth a try?

wet breach
#

nah, typically using git and maven installs instead of the ones buildtools pulls in generally clears up many issues

#

but if your git and maven are up to date, then it points to openjdk being the most likely issue

#

or you need to clear out your maven plugins

#

and let those get re-downloaded

misty crypt
#

I dont have my own maven install. Im not a java developer in any way, so while im using a vanilla git, im using a BuildTools maven

wet breach
#

well you don't need to be a developer to have it installed lol

misty crypt
#

Yeah I know 🙂 But i was wondering if its worth me installing maven myself instead of relying on the BuildTools version

wet breach
#

maybe see if installing maven specifically clears up anything? It may not solve anything but it rules out that possibility

misty crypt
#

So you dont think this in the pom.xml is related?

#

<maven.compiler.release>17</maven.compiler.release>

wet breach
#

it just tells the compiler to use java 17

#

well compile for java 17

#

if you are using a higher version, it still can compile for lower versions

misty crypt
#

Which isnt compatible with 1.20.5 tho, is it?

wet breach
#

and is more of an issue if you had less then version 17

wet breach
#

Mojang as far as I am aware hasn't updated the java version to be used since java 17 I think it was or 18

#

which was increased from 8 to 17

misty crypt
#

Java Version
Mojang has decided to make Minecraft 1.20.5 require Java 21 or later. This is a Long-Term-Support (LTS) version and will be the recommended Java version until either a new LTS is released or Mojang requires an upgrade. For Linux users in particular, because this version is still quite new, you may need to install it from a third party such as Azul Zulu if it is not available in your package manager. Note this must be a JDK not JRE.

wet breach
#

oh guess they did do that

misty crypt
#

Cuz it looks like the pom.xml in the spigot repo is incompatible with itself if thats the case

wet breach
#

well in that case the only way to get around this issue of yours is to install maven and run maven on the parent project for spigot

#

so that the changes you made in the pom are reflected

misty crypt
#

Yeah I tried changing the pom myself, but BuildTools just downloads a fresh version during build and overwrites my changes

#

Theres probably a way to override that, but i havent got that far

#

If this is an upstream issue, I figured that was the best place to fix it

wet breach
#

buildtools just runs a bunch of commands for you just fyi, so that means anything it does you could just do manually yourself if needed or wanted to

misty crypt
#

I cant be the first person to discover this tho can I? This would mean that nobody has been able to build spigot 1.20.5 since it was releaased

wet breach
#

so, install maven, make your changes to the appropriate pom, then go into the directory called spigot

#

and run mvn package

#

and it should build from the parent pom and then give you a jar in the spigot-server directory

chrome beacon
#

It builds fine for me

wet breach
chrome beacon
#

I would guess that your JDK distro doesn't like release mode Java 17

chrome beacon
wet breach
#

yeah that was going to be my next thing was that its something with open jdk

#

which this wouldn't be the first time someone had issues with open jdk

misty crypt
#

Fair comment 🙂

chrome beacon
#

The only people I've seen have that problem are all running OpenJDK

wet breach
chrome beacon
#

Personally I'm using Adoptium

#

which should just be OpenJDK but apparently not?

kind hatch
river oracle
#

I use eclipse turnium

kind hatch
#

People kept running into issues like that yesterday.

chrome beacon
wet breach
misty crypt
#

Directory contains no spaces

chrome beacon
#

That bug must be very old if that's the case

wet breach
#

it is

kind hatch
river oracle
#

Just grab adoptium

wet breach
#

or oracle jdk

#

which ever you prefer lol

kind hatch
#

My only other thought is that there is a bug with the jdk.

misty crypt
#

Ok cool. Thanks everyone. I'll try a different JDK and see how that goes

wet breach
#

its like every so often open jdk decides it is just going to be weird for no reason

kind hatch
#

I do know that I have a slightly older jdk than some other people who have been having issues.
I’ve got openjdk 21.0.2 installed and not 21.0.3

shy rock
#

Entity death gets logged at console for some reason. My plugin gives them a custom name tag but there is no EntityDeathEvent or anything to log them.

inland summit
#

Hey. I was banned on Spigot but I don't know why. Can you help me?

river oracle
#

I'm guessing cloudflare. Get off a vpn or change your ip. You got an IP that was banned for mischief by happenstance

inland summit
#

I dont have a VPN

#

I think i send a Payd Plugin to my Friend :/

river oracle
#

Yes refuse to listen to me than admit to something that is frowned upon 💯

inland summit
#

?

shy rock
#

🙃

inland summit
#

yea

#

I dont know what i his Problem

river oracle
shy rock
#

or use vpn basically

river oracle
shy rock
#

Haha

misty crypt
#

Many thanks @wet breach @river oracle and @kind hatch . That seems to have solved the problem. Cheers!

river oracle
#

Just call them or just restart your internet most ips are dynamic now days

#

It's not hard

eternal oxide
#

Most ISPs won't give you a new IP as they are dynamic. Turn off your modem for a day.

river oracle
eternal oxide
#

Yeah you might. Here in teh UK with Virgin Media your ip stays the same for years if your modem stay on

river oracle
eternal oxide
#

It does refresh but you still generally get the same IP assigned

river oracle
#

Ah Bad luck

eternal oxide
#

only way to drop it is turn off your modem so some other schmuch gets your IP assigned.

#

in 10 years my IP has changed twice, usually when there was a service outage.

river oracle
wet breach
harsh ruin
eternal oxide
#

click event

#

but you are using Creative inventory so theres pretty much one event for that

harsh ruin
#

I tried that, but that didn't work?

@EventHandler
    public void inventoryBlacklistMoveEvent(InventoryCreativeEvent event) {
        if (event.getCursor().getType().name().endsWith("CONCRETE")) {
            event.setCancelled(false);
        } else {
            event.setCancelled(true);
        }
    }```
shadow night
harsh ruin
#

no

shadow night
#

Well, you should

#

Also, that if statement is unnecessary. Just saying.

harsh ruin
#

yeah, I know..

eternal oxide
#

what exactly are you trying to prevent?

harsh ruin
#

If the player grabs anything that isn't concrete I cancel the event

#

It's a blacklist for my server

eternal oxide
#

from teh looks of that code, you want to cancel only if the item on teh cursor (picked up) name ends with concrete.

#

oh no actually

#

you cancel everythgin except for concrete

harsh ruin
#

Yes

eternal oxide
#

So your code cancels if they DONT have a stack of concrete already picked up

harsh ruin
#

It detects when I grab concrete, but it doesn't cancel the event if I don't pick concrete

eternal oxide
#

that code you posted will only cancel if you have already picked up concrete

#

um no

#

yes. Debug it so you can see

#

sysout whats on teh cursor

harsh ruin
#

?

eternal oxide
#

sysout event.getCursor().getType().name()

harsh ruin
#

It says creative

eternal oxide
#

or Bukkit.broadcast(event.getCursor().getType().name());

#

no it doesn't

harsh ruin
#

I can't upload images here

eternal oxide
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

harsh ruin
#

There

#
    @EventHandler
    public void inventoryBlacklistMoveEvent(InventoryCreativeEvent event) {
        event.setCancelled(true);
        event.getWhoClicked().sendMessage(event.getClick().name());
    }
}```
eternal oxide
#

That is not what I told you to do

chrome beacon
#

uh you can't stop a creative mode player from picking up an item in their inventory

harsh ruin
#

sysout results in an error

chrome beacon
#

The client has control over that

harsh ruin
chrome beacon
#

no

#

All the server sees is; set slot x to item y

eternal oxide
#

The client is boss in Creative

harsh ruin
#

Oh

#

Any alternatives? Since I kind of don't want players to get anything else except concrete

eternal oxide
#

you should still be able to set the contents after the event

#

however I doubt you can prevent dropping

shadow night
#

But you still can prevent picking up

eternal oxide
#

create yoru own inventory instead of using creative

#

creative gives too much control to the client

shadow night
#

I remember I watched a video where there was a command like /printer which would give creative without letting you take items but it allowed for duping

eternal oxide
#

fill the inventory with items you want them to be able to get. Cancel any click events in that inventory and put a copy of the ItemStack (they clicked) on their cursor.

harsh ruin
#

Alright, guess that's better.. Thanks

shy rock
#

You can't reload config with a command while server is running?

smoky anchor
#

You need to support that yourself.

shy rock
#

I already made the command with reloadConfig, command works but it just doesnt reload it

eternal oxide
#

Then you are not reading from teh config, but a cached version

shy rock
#

a

dapper flower
#

How do I run a runnable in a syncronized way? I need to break some blocks that is why i can't use an async

chrome beacon
#

?scheduling

undone axleBOT
dapper flower
#

Alr, can you place blocks asyncronously?

chrome beacon
#

No

#

In general don't interact with the world at all async

#

most things need to be done sync for it to be safe

dapper flower
#

What i want to try to do is place blocks like an animation, so first layer, second layer, third layer etc

chrome beacon
#

you can use the scheduler for that

#

Just schedule a sync task

dapper flower
#

yeah but how do i pause it from placing blocks? i can't jus do Thread.sleep LOL

#

like place first layer, wait 1 second --> place 2nd layer

chrome beacon
#

The scheduler runs a method

#

and you can tell it to run that method with a 1 second wait

#

(20 ticks)

dapper flower
#

so if i have smth like 7 layers i start 7 runnables 1 layer at a time with delay?

harsh ruin
#

Quick question, how do I loop all blocks and see if any of them are concrete? (not blocks around player)

chrome beacon
#

or just one runnable that keeps track of the layer to place

chrome beacon
harsh ruin
#

Registered

young knoll
#

Loop over Material#values and check if it ends with _CONCRETE I guess

#

Unless there is a tag for that

#

Alternative just manually make a set for it

harsh ruin
dapper flower
#

I am trying to build stuff using block data, if blockdata is null it just places air in its place, why does this not work tho? The loggers work as intended

if(b == null) {
    Bukkit.getLogger().info("AIRRRRRRRR!");
    w.getBlockAt(x,y,z).setType(Material.AIR);
} else {
    Bukkit.getLogger().info("place!");
    w.setBlockData(x, y, z, b);
}
worldly ingot
#

There is a setType() on World you can use instead

inner mulch
#

when using redisson, is there a reason to or not to, create multiple RTopics? When I create a lot to seperate the message transfer, will this be expensive or when only using one will this just struggle with all the messages?

lost matrix
dapper flower
dapper flower
slender elbow
#

setType with Material just calls setBlockData with the default blockdata anyway

slender elbow
#

are you running this async by any chance?

lost matrix
#

Probably the offset. I assume its being placed somewhere, just not where he is looking

dapper flower
#

yeah this is what i just thinked of too, printing location while i am at it

#

ok i found it ,-,

#

found the mistake ty for the help in bugfinding

#

lets see if it works now

#

works nice ty

orchid iron
#

hey, is this the right place to ask for help about packet modification?

icy beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

pseudo hazel
#

but yes

#

this is probably the best channel

mellow snow
#

Hello, I made very fast and simple plugin for create shower. It isn't work. Idk why, there's no console or game error.

Here's the code:


    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Action action = event.getAction();
        Block block = event.getClickedBlock();

        // Controlla se il giocatore ha cliccato con il tasto destro del mouse su un blocco
        if (action == Action.RIGHT_CLICK_BLOCK) {
            player.sendMessage("1");
            // Controlla se il blocco è un bottone di pietra
            if (block.getType() == Material.STONE_BUTTON) {
                player.sendMessage("2");
                // Crea un nuovo task che genera particelle d'acqua
                new BukkitRunnable() {
                    @Override
                    public void run() {
                        // Controlla se il giocatore è ancora nella zona della doccia
                        if (player.getLocation().distance(block.getLocation()) <= 3) {
                            player.sendMessage("3");
                            // Genera le particelle d'acqua
                            player.getWorld().spawnParticle(Particle.WATER_SPLASH, block.getLocation().add(0, 1, 0), 10);
                            player.sendMessage("4");
                        } else {
                            // Se il giocatore ha lasciato la zona della doccia, interrompe il task
                            this.cancel();
                        }
                    }
                }.runTaskTimer(this, 0L, 20L);  // Esegue il task ogni secondo (20 tick)
            }
        }
    }
}```
orchid iron
#

I have this ProtocolLib PacketAdapter class that should modify a ClientboundLevelChunkWithLightPacket but i cant read the buffer (FieldAccessException: Field index 0 is out of bounds for length 0)

https://paste.md-5.net/abugoqahor.java

icy beacon
#

?paste for code walls

undone axleBOT
icy beacon
#

there are 2 code walls right now

#

a new one gets posted and no one sees yours

#

just use a pastebin

eternal oxide
#

many here don;t even bother reading code walls. Formatting is all bad.

icy beacon
#

that's one reason why

orchid iron
#

updated my message

lost matrix
icy beacon
#

can somebody make cafebabe automatically detect messages with code blocks spanning 20+ lines, delete the message, upload the code to md5's paste and resend the message? :evil_giggle:

lost matrix
orchid iron
#

right when i try to read the ByteBuffer in line 3 of the paste

lost matrix
#

You are getting the error when reading a field from the packet. The packet simply has no byte[] field.

mellow snow
orchid iron
lost matrix
orchid iron
#

ok how would i approach this problem then? i know about block updates but im not sure if its smart to send hundreds of individual block updates, every time a chunk gets loaded

lost matrix
#

You can use ProtocolLib, listen for outgoing packets and modify them before they are being sent out.

#

What is this for btw?

orchid iron
#
        super(plugin, ListenerPriority.HIGH, PacketType.Play.Server.MAP_CHUNK);

        this.plugin = plugin;
    }

    @Override
    public void onPacketSending(PacketEvent event) {
        Player player = event.getPlayer();
        if (player == null) return;

        PacketContainer packetContainer = modifyChunkPacket(event.getPacket());
        if (packetContainer != null)
            event.setPacket(packetContainer);
    }```
(hope this doesnt count as a code wall)
This is where the code from the previous paste is triggered.
orchid iron
echo basalt
#

Look at the NMS class

#

I've done this before btw

slender elbow
#

ProtocolLib is just a funny reflection utility for packets

echo basalt
#

I'd recommend cancelling the packet and sending it later to avoid blocking the IO thread and upping the ping

#

:)

lost matrix
lost matrix
echo basalt
#

I'd re-compute and re-send the chunk packet on the PlayerMoveEvent in order to ensure the client and the server are 100% in sync

lost matrix
#

Yes, cant have desyncs

orchid iron
#

lmao

echo basalt
#

Let me check how cursed my code was

lost matrix
#

But send an unload and a load chunk packet after another to have a cleaner map for the player

slender elbow
#

oh no

lost matrix
#

And call System.gc() after that so the server is kept clean as well

echo basalt
#

And to ensure the client has all blocks, make sure you send a block update packet for each block on the chunk

#

On top of the chunk packet

#

Just in case

lost matrix
#

In case the dumb client missed a block yeah

echo basalt
#

Also send a particle wireframe of each block so you know if any of them aren't there

green prism
#

Hello there, I'm experiencing some issues with using POJO objects. Even after cloning them, when I modify elements in the cloned instance, it also affects the ones in the original instance. Can you please help me?

        GuiDetails guiDetails = defaultGuiDetails.clone();

        this.setPlaceholders(player, guiDetails);
    public GuiDetails clone() {

        GuiDetails clone = new GuiDetails(inventoryLayout, guiType);

        clone.setHolder(holder);
        clone.setInventoryName(inventoryName);
        clone.setInventorySize(inventorySize);
        clone.setPlaceholders(new HashMap<>(placeholders));
        clone.setText(text);

        for (Map.Entry<Character, GuiElement> entry : elements.entrySet()) {
            clone.addElement(entry.getKey(), entry.getValue().clone()); // GuiElement#Clone gets executed
        }

        return clone;
    }
    public GuiElement clone() {
        return GuiElement.builder()
                .material(material)
                .displayName(displayName)
                .lore(lore)
                .amount(amount)
                .glow(glow)
                .onClick(onClick)
                .build();
    }
echo basalt
#

Shallow clone vs deep clone

green prism
#

Partially

#

My problem is with the elements, here:

        for (Map.Entry<Character, GuiElement> entry : elements.entrySet()) {
            clone.addElement(entry.getKey(), entry.getValue().clone()); // GuiElement#Clone gets executed
        }
#

Oh wait, should I recursively clone also there?

                .material(material)
                .displayName(displayName)
                .lore(lore)
                .amount(amount)
                .glow(glow)
                .onClick(onClick)
                .build();
dapper flower
#

Material.getData() is deprecated, what is the alternative? i need to spawn the particicle of a block being broken

lost matrix
dapper flower
#

like the whole thing?

#

alr

green prism
odd forge
#

Hey, is it possible that plugin messaging is broken in 1.20.5?
I'm not receiving any custom payloads anymore.

civic sluice
#

Any code changes on your side?

dapper flower
#

I want to access the inventory of a chest what is the difference between

getBlockInventory()
getInventory()
getSnapshotInventory()
vast ledge
#
@NotNull
Inventory getBlockInventory()
Gets the inventory of the chest block represented by this block state.
If the chest is a double chest, it returns just the portion of the inventory linked to the half of the chest corresponding to this block state.

If the block was changed to a different type in the meantime, the returned inventory might no longer be valid.

If this block state is not placed this will return the captured inventory snapshot instead.

Returns:
the inventory
#
@NotNull
Inventory getInventory()
Gets the inventory of the block represented by this block state.
If the block was changed to a different type in the meantime, the returned inventory might no longer be valid.

If this block state is not placed this will return the captured inventory snapshot instead.

Specified by:
getInventory in interface InventoryHolder
Returns:
the inventory
#
@NotNull
Inventory getSnapshotInventory()
Gets the captured inventory snapshot of this container.
The returned inventory is not linked to any block. Any modifications to the returned inventory will not be applied to the block represented by this block state up until BlockState.update(boolean, boolean) has been called.

Returns:
the captured inventory snapshot
vast ledge
dapper flower
#

ty how do i download the documentation on intellijidea

civic sluice
#

Ur using Maven or Gradle?

dapper flower
#

Maven

vast ledge
#

(do you have)
pom.xml
or
build.gradle

dapper flower
#

pom.xml

civic sluice
#

For gradle: the highlighted button.

dapper flower
#

i won't need to do it for every project right?

civic sluice
dapper flower
tall dragon
#

asset?

vast ledge
icy beacon
#

define asset

tall dragon
#

no idea what you mean with asset

icy beacon
#

this did not make it clearer

vast ledge
#

Probably a plugin

tall dragon
#

ohh u want to delete ur plugin post or somethn?

#

just report ur self with the message "delete pls, thanks"

#

and mods will get it done

vast ledge
vast ledge
#

You

#

little

civic sluice
distant forge
#

Hello, im using Mac os. If I run the buildtools, what java is it using?
JRE or JDK?
What version should I use?

civic sluice
#

For 1.20.5 there was a change that you need the JDK

odd forge
vast ledge
tall dragon
#

more specifically. right here

civic sluice
odd forge
tall dragon
#

you got it!

civic sluice
#

!jira

odd forge
tall dragon
#

then its not your resource...

#

are you logged in?

#

if its your resource. you will have an edit button

#

like i do

#

either verify or upload to an image hoster

distant forge
civic sluice
tall dragon
#

did you post the resource in the same account ur logged into right now?

#

if you go here. does it show up?

#

ye

#

and now when u click it there is no edit button?

#

tf

#

ohhh

#

gotta enable 2fa ig

#

uhh yea?

#

make sure to save ur backup codes?

gloomy ocean
#

What's the best attack speed for like a dagger sort of weapon

cedar turtle
#

Has the PotionEffectType DAMAGE_RESISTANCE been removed or renamed in version 1.20.5?

orchid iron
#

when i use the nms class i can access the array but i prefer using the protocollib api for compatability reasons

cedar turtle
lost matrix
#

Because those are completely different types of software

cedar turtle
#

well it's also in the spigot api

#

where can i find the bungee api overview?

young knoll
undone axleBOT
cedar turtle
#

thanks

young knoll
#

I believe we renammed a bunch of fields to match the Mojang names

#

So it's probably RESISTANCE

cedar turtle
#

mh right, but why was that not noted anywhere

shadow night
pseudo hazel
#

just drop support as soon as the new update rolls out for your plugin

#

easy

#

no legacy bs

shadow night
#

Lol

#

Well, reasonable

#

Fuck ancient version users

pseudo hazel
#

yeah they should update

#

or play the version of the plugin last released for that version

#

maybe have lts for game breaking bugs on separate branches

cedar turtle
#

Is there also an overview for older api versions?

pseudo hazel
#

but apart from that I usually dont bother

pseudo hazel
cedar turtle
#

I have not found anything so I ask 😄

young knoll
chrome beacon
#

or you can build the docs yourself

#

locally

wary harness
#

I got weird situation

#

e.isCancaled allways returns true

#

should it not be false

chrome beacon
#

Well do you have something cancelling it

#

Another plugin perhaps

wary harness
#

well I think not I got Vault and Essentials

#

on server

chrome beacon
#

also commit by build tools :kekw:

#

They really should fix that

#

Why does it need to configure a global user

young knoll
#

We did fix it

#

But you still gotta manually fix your global settings

distant forge
chrome beacon
young knoll
#

(Well, Shadow did :p)

chrome beacon
#

also I'm not sure if they get installed automatically

distant forge
chrome beacon
#

?bt

undone axleBOT
distant forge
# chrome beacon ?bt

Like I said, I have used the buildtools before and never have to to something special to generate those

chrome beacon
#

hm it does look like source and javadoc jars are in the maven repo

eternal oxide
#

BT only builds source and JD if you tell it to. Your IDE may download them from the spigot repo if you ask

tardy delta
#

wondering how many people actually installed java 8 with this

distant forge
#

There are indeed flags for --generate-docs and --generate-source, but im 100% sure I never used them before

chrome beacon
#

yeah they're present in the maven repo

#

They've never worked for me so I just assumed they weren't

eternal oxide
#

if you are using IJ you can click the download sources button and it will search repos for them

#

I always generate jd/source for every build, so I use switches

distant forge
#

I let the buildtools run with the flags, but the stuff is still missing. I was already wondering, why the buildtools are that fast this time. Only about 3 minutes. Guess its because it is skipping most. But why?

young knoll
#

If you’ve already run it for a given version a ton of stuff is cached

eternal oxide
#

also, even with the flags it will not create teh final jars for jd and source

distant forge
distant forge
eternal oxide
#

you zip the produced files

#

theres probably some way to force it to make jars but I don;t know how

#

its never made them for me

wary harness
#

@chrome beacon just want to tell u I can't believe what what canceling interection event 🤣

#

it was default spawn protection by mojang

#

which is in server.properties

#

is it possible to ignore that for events?

worthy yarrow
#

I wonder if event priorities might override that?

#

I don't remember if it was just priority over other (same) events

wary harness
#

I tried with low and monitoring an high

worthy yarrow
#

Ehhhh that's not the fix I just woke up sorry

#

I shoulda read more

wary harness
#

I think I will just add warning in console spaming they should disable that

#

anyway servers use WG or some other big plugin for protection

worthy yarrow
#

That's quite an old source, I feel like there might just be some other way around it. I am not aware of it though

young knoll
#

Not that I know of

kindred sentinel
#

How to clear persistant data container? Like without namespaced keys

chrome beacon
#

hm? why

eternal oxide
#
for (NamespacedKey keys : container.getKeys()) {```
young knoll
#

Rip other plugin data

shy rock
#

anyone knows the code to check any spawned unit's base health and how to modify it? same for damage

orchid iron
gilded forge
#

Since Minecraft is now based on Java 21, what will happen to those plugins based on Java 17? Will they work correctly?

vast ledge
#

The amount of english

gilded forge
#

Thats cool

gilded forge
#

Now I m going to change all of my 10 plugins :/

chrome beacon
shy rock
#

Most servers wait for the plugins to update

warm mica
#

What is the reason that mojang decided to switch to components for items?

shy rock
#

It's not like its a big update tbh

chrome beacon
#

It is quite a big update for a minor version

shy rock
#

eh

#

dog armor hammer wind charge

#

maybe for mojang its big since they do updates once a year

chrome beacon
#

There's a lot more than that

kind hatch
#

^

young knoll
#

Plugins don’t need to update

chrome beacon
#

especially in the way that the server works internally

young knoll
#

Java 17 plugins should run fine on 21

blazing ocean
#

but not the other way around

young knoll
#

Correct

#

Java 8 plugins should even still run

#

As long as they don’t do janky reflection

lost matrix
#

They are working towards data driven systems

young knoll
#

They also did it for performance

torn shuttle
#

any of you familiar with the extended view distance plugin?

#

FartherViewDistance

#

I'm wondering if it can be improved, seems to be completely hit and miss on my end

#

I never sent chunks via packets but I assume the way this would work would be to get the chunk data and send a packet to the player?

young knoll
#

Pretty much

torn shuttle
#

but no feedback on what view distance a client has right

#

I wonder if there's trick around that

young knoll
#

I think the client sends that info now

torn shuttle
#

wait, really?

young knoll
#

Yeah

torn shuttle
#

oh my god

#

how the times change

#

oh I wonder if that might be what broke fartherviewdistance then because I'm using the distant horizons mod

#

so technically I'm seeing a lot farther than my view distance

stiff sonnet
#

does anyone know how I could listen for and potentially cancel any kind of item interaction in an inventory? I don't know why but a simple InventoryInteractEvent listener seemingly doesn't trigger at all

young knoll
#

InventoryClickEvent and InventoryDragEvent

stiff sonnet
#

hm I was hoping to avoid that split. Oh well then, thanks!

#

right different problem: Is there an inexpensive way to distinguish a block's inventory from a block-less inventory? I'd like to somehow check if tehre is e.g. a dispenser, and ignore cases where I'm clicking in a player inventory or an inventory opened by the server

young knoll
#

You can check the holder

#

But that’s not always inexpensive

stiff sonnet
#

the best I could come up with myself is checking if there is a non-air block at getInventory().getLocation() but that seems clunky

young knoll
#

Doesn’t work for entities

#

You can check if getHolder instanceof Container or Instanceof Entity

#

Oh wait you want to single out blocks

#

Then yeah just instanceof Container

stiff sonnet
#

I suppose that works, thank you so much!

orchid iron
dapper flower
#

What are the types of operations/methods that are resource expensive when using spigot? I want to know them so if i can i dodge them

ivory sleet
#

What do you define as resource expensive? IO calls?

tardy delta
#

io operations like writing to files and databases

primal ermine
#

Hi! What is the correct way now to get PotionEffectType from config string? This one is deprecated:
PotionEffectType.getByKey(new NamespacedKey("minecraft", name))

young knoll
#

Registry

#

Specifically Registry.EFFECT

olive lance
#

Hey all. My premium plugin was removed- was there some notice about anything happening ?

rotund ravine
#

?support

undone axleBOT
rotund ravine
#

For help

olive lance
#

I haven’t yet logged in to my account I imagine there should be some kind of correspondence there would you know? I just got temp locked lol

#

Maybe it wasn’t removed and I just can’t view premium plugins when not logged in?

lost matrix
# dapper flower ^

IO and everything that changes massive amounts of objects in a single tick. There is nothing inherently slow in the api (besides loading worlds)

acoustic pendant
#

Hey, so I have this expansion that is giving an error when loading the plugin:

 @Override
    public @Nullable String onPlaceholderRequest(Player player, @NotNull String params) {

        FileConfiguration data = plugin.data.getConfig();
        if (params.contains("_")) {
            String[] parts = params.split("_");
            String uuid = parts[1];
            if (player == null) {
                return "";
            }
            if (params.contains("mission")) {
                return data.getString("Missions." + uuid + ".mission");
            } else if (params.contains("progress")) {
                return data.getString("Missions." + uuid + ".progress");
            } else if (params.contains("goal")) {
                return "Missions." + uuid + ".goal";
            }
        }
        if (params.equals("money")) {
            return String.valueOf(plugin.rewards.getConfig().getDouble("Money"));
        }
        return "UUID not provided";
    }```
#

this is the error

#

does someone know why does this happen?

lost matrix
chrome beacon
#

yes

#

they did

acoustic pendant
#

uuuh

#

yea xd

chrome beacon
#

Shutdown the server and replace the jar

#

then start it again

acoustic pendant
#

i'll try

acoustic pendant
acoustic pendant
#

i got like the same error kind of

covert pond
#

I just finish my plugin and when I went to start the server I received a string error

chrome beacon
#

Send the error

#

?paste

undone axleBOT
covert pond
#

I'll have to do it when I get home. I was trying to send the screenshot that I saved but can't

young knoll
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

covert pond
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

covert pond
#

I don't have a forums account.

chrome beacon
#

Then the second part

slender elbow
#

is it intentional that plugins continue to enable when onLoad throws an exception? 🤔

remote swallow
#

thats pointless then

#

its called before onEnable when the plugin is found by the server and it says "loading xyz"

dapper flower
#

Then it is the other eay around

slender elbow
#

shit just continues as if nothing happened

#

gj

rotund ravine
#

It’s not

#

Onload then onEnable 👌🏻

dapper flower
#

When would you use onLoad ? I always threw everything in onEnable and called it a day

soft tendon
#

just curious, what changed in 1.20.5 with the netty pipeline?
there used to be an encoder, and it still appears to exist on vanilla, but it's not there on spigot 1.20.5 👀

rotund ravine
dapper flower
slender elbow
#

it literally just catches Throwable and ignores it (apart from logging it)

#

so even Errors are effectively ignored

#

👍

obsidian wolf
#

Does anyone know a plugin that uses Custom Model Data where I could load 3d model textures into the game while still having the blockbench model thing?

slender elbow
winter cradle
slender elbow
shy rock
#

How to make a custom nametag on entities disappear after being x far away ?

soft spire
#

What is wrong with this? I place a block and I don't see a chat message ```
package org.timothy.chest_shops;

import net.md_5.bungee.api.chat.ClickEvent;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.player.PlayerInteractEvent;

public class MyEventListener implements Listener {
public void onBlockPlace(BlockPlaceEvent event) {
Bukkit.getServer().broadcastMessage("Sign placed!");
}

public void onPlayerInteract(PlayerInteractEvent event) {

}

}

soft tendon
soft spire
#

And I did register new MyEventListener in the main class onEnable

obsidian wolf
slender elbow
soft spire
#

ah

#

There we go, thank you

soft tendon
gloomy ocean
#

Not really development but does anyone know why my game looks like this 😭

remote swallow
#

thats normal

#

its how blocks look far away

shy rock
#

How to make a custom nametag on entities disappear after being x far away ?

covert pond
#

That's the error I got when I first tried out my plugin

soft spire
#

Got a question. I am using SignChangeEvent because I am coding something for a prisons server. How can I make it so it has access to the chest the sign is on?

#

The way its going to work is if I do ```
[shop]
<price>
<amount>
<sell/buy>

echo basalt
covert pond
#

Hm alright I'll have to take another look when I hop back on my PC in a few. Thank you

mellow snow
#

Hello guys, I'm here for my impossible mission. I need to make a custom tab without the player names, only the roles and how much player with this role are online. Something like this

rotund ravine
#

Not that impossible

#

But hf doing it

mellow snow
#

bro idk

young knoll
#

If you are fine with NMS taking over the tab is pretty simple

young knoll
#

net.minecraft.server

#

Basically any code from the vanilla server

#

Not part of the api and undocumented + subject to change

mellow snow
#

I think I got this. I know how to hide player, now I have to set all the roles and the custom names in the tab

acoustic pendant
#

Hey, so i'm trying to reload the config with this code but when i execute it the config doesn't apply any change and notepad said config has been edited, returning to the same as before editing the file, could someone tell me why is this happening?

small valve
#

What order are the bungeecord api events in?

#

(The following is for the case where a player joins the proxy forthe first time)

For example, does ServerConnectedEvent fire before PostLoginEvent?

If I cancel the PostLoginEvent does the ServerConnectedEvent still fire? If I kick the player during the PostLoginEvent does the ServerConnectedEvent still fire?

iron spade
#

someon can help me with this import error: import net.minecraft.server.v1_18_2_R2.World; error: Cannot resolve symbol 'minecraft'

buoyant jasper
#

How to update Essentials

rough ibex
#

use the latest version?

buoyant jasper
#

I use the latest stable version and auto tab complete doesnt work and the console says its because of Essentials

eternal oxide
#

I'm not sure if 1.18.2 uses Mojmaps though

#

?mappings

undone axleBOT
young knoll
#

It does

#

1.17+ has Mojmap

covert pond
#

private void endGame() {
why is it telling me i need to put ";" after ()?

remote swallow
#

show more code

covert pond
#
 private void endGame() {
                Location spawnLocation = plugin.getSpawnLocation();
                if (spawnLocation != null) {
                    for (Player player : Bukkit.getOnlinePlayers()) {
                        player.teleport(spawnLocation);```
remote swallow
#

?paste the class

undone axleBOT
covert pond
remote swallow
#

you have a method in a method

covert pond
#

alr thanks. ill fix that

mortal oasis
#

Is anyone able to pm me and help with a code for a gui plugin?

worthy yarrow
mortal oasis
#

I'm using better GUI plugin and I'm trying to make it when I click one of the items in the GUI it opens another chest with different world teleports that can be clicked and used to teleport with.

worthy yarrow
#

Is this a plugin you are coding yourself? Or a plugin that already exists?

mortal oasis
#

gotcha thanks

eternal oxide
#

its the second

worthy yarrow
#

I'm working on a temperature system for a seasons plugin currently. That being said, since Biome.custom is the only representation of a custom biome I can get (unless they are my biomes obv but in this case they are external from a datapack), should I just apply a base temperature range?

covert pond
#

https://paste.md-5.net/cohuzukizi.java
okay so im trying to get it where if a player gets hit by the arrow it will teleport them to a set spawn location. but when the player gets hit they dont get teleported but they do recive the message

#

or does it not work if i just shoot my self with the arrow bc thats what i been doing

sullen marlin
#

What does your config look like

#

Print the location

covert pond
#

starting-arrows: 20
spawn-location:
x: 1571
y: 77
z: -1078
world: world

#

thats all i got in the config.yml