#help-development

1 messages · Page 34 of 1

lament sorrel
#

thx

waxen plinth
#

If you're unsure how to navigate javadocs, feel free to ask

#

But they're really handy and can often answer a lot of your questions without needing to ask a person

grim ice
#

Me when i use versions of libs so old they don't even have docs:

#

Feels awesome

rotund pond
waxen plinth
#

It really depends

#

Sometimes the code solves a problem that never really changes

#

So it doesn't matter how old it is

rotund pond
#

I see

waxen plinth
#

Unfortunately most problems aren't like that

#

They change over time in one way or another

#

Cause most of what a programmer does isn't in a vacuum, it's most often handling the interaction between two or more discrete systems

rotund pond
#

Alright 😂

waxen plinth
#

Which are often their own projects that evolve and grow and change over time and whose tools will need maintenance

lament sorrel
#

can someone come dm

crisp forum
#

Is there any doc about which mc version fits best with which java version? I can set sourceCompatibility
targetCompatibility from build.gradle.kts and IDK what should I set them to. Going to publish multiple jars for mc version 1.8-1.18

lament sorrel
#

how do i use Plugin#saveDefaultConfig()

old geyser
#

How can I avoid dropping specific items when a player dies?

gray merlin
#

Can I use an NMS ItemStack in a BukkitObjectOutputStream#writeObject?

peak depot
lament sorrel
#

thx it worked

lost matrix
peak depot
#

you mean maven clean or what

lost matrix
peak depot
#

ok

lost matrix
peak depot
#

The command mvn is not found

lost matrix
peak depot
#

yes but I dont work with maven since I only stuck to 1.8 so I added the jar manully but now I want to go to newer version where you need to run buildtools

lost matrix
#

Then properly install maven first

shut field
#

how do I block a pufferfish's idle animation?

peak depot
ornate patio
#

bump

#

can't really figure out how to use the packet play out classes because mojang mapped doesn't deobfuscate those

lost matrix
peak depot
ornate patio
ornate patio
lost matrix
ornate patio
#

No

#

I only want to change the text above the players ahead

lost matrix
#

Then you need to hide it (with teams) and work with invisible named entities

ornate patio
#

I heard its possible with packets

lost matrix
peak depot
#

7smile7 what do now?

ornate patio
#

so do you reckon i teleport invisible armor stands wherever the player goes or something

lost matrix
ornate patio
#

problem is

#

part of my plugin already involves picking up players

lost matrix
#

An entity can have multiple passengers on a single slot. (Unless you are using an old version)

peak depot
ornate patio
#

having entities stacked on top of each other?

#

or you can literally have two entities on top of a player

lost matrix
ornate patio
#

also the Marker entity is a thing too, can I assign a custom name to that and mount it on a player or no?

lost matrix
ornate patio
#

is that a good idea

inner yacht
#

why, you were already given a decent solution

echo basalt
#

we gave you a solution

#

and you're actively seeking a different one

#

either you're in denial, or blind

tranquil viper
#

I have an object that has a long "id" value in it. What's the best way of sorting the objects from least to greatest based on the "id" value if I don't necessarily know what the ids are.

echo basalt
#

You can make a comparator

#

And call Collections.sort

tranquil viper
#

Hm ok, I'll look into a comparator. Thank you very much 🙂

ornate patio
#

but also

ornate patio
echo basalt
#

addPassenger

#

or setVehicle

#

type thing

ornate patio
#

any mob can have infinite passengers then?

echo basalt
#

ye

#

above like 1.8

ornate patio
#

but would the name be positioned correctly?

peak depot
ornate patio
#

and the text is too low

echo basalt
#

I mean

#

that looks like a baby armorstand

#

a taller one would be better

#

only problem I see with this approach is messing up your hitbox

ornate patio
#

it might also block arrows

tranquil viper
ornate patio
sharp verge
#

Whats the approach if i wish to create something like this (example below) in my config.yml?

  -  Test:
    -  Test: 'test'``` ?
ornate patio
#

invisible to the player it's mounted on, but visible to everyone else

sharp verge
#

Thanks

echo basalt
#

on openjdk-18 they both do the same

tranquil viper
#

Ah alright, thanks 🙂

echo basalt
#

I mean sure yours would work but I'm not sure how efficient it is for a linkedlist to sort, comparing to an arraylist for example

#

You'd need to change nodes a bunch

tranquil viper
#

I'm not really making this for efficiency, it's only going to be run at most once an hour lol

#

Obviously doesn't hurt to make everything as efficient as possible but it seems like extra work that wouldn't make a huge difference

#

Bukkit.getPlayer() only returns a player if they're online, correct?

echo basalt
#

ye

tranquil viper
#

I can't seem to remember

#

lmao

#

thanks

old geyser
#

How can I avoid dropping specific items when a player dies?

glass mauve
#

PlayerDeathEvent

peak depot
echo basalt
#

event.getDrops().removeIf

old geyser
#

Thanks to all

sharp verge
#

?paste

undone axleBOT
sharp verge
#

Okay so this is all my classes, just testing out
https://paste.md-5.net/ifiyodolon.java

Why is it that whenever i write "testing" in chat, nothing happens in my customConfig.yml
And also when creating the ConfigurationSection, does it always do String: {} ?

sharp verge
echo basalt
#

that is a horrible approach at configging

sharp verge
#

And what would the better approach be ? :)

echo basalt
#

applying Object-Oriented programming

#

I see no reason to use static

sharp verge
#

I'll look into that, but first, why does nothing happen with the customConfig.yml when i type "testing" ? Is it something with the code, and if yes, what ?

echo basalt
#

I mean you're creating an empty section

sharp verge
#

in the onEnable() {}?

#

or in the message class ?

ornate patio
sharp verge
ornate patio
#

its not

#

i used a tall armor stand and the name is too low

echo basalt
#

no need to create sections

fair acorn
#

How can I send a sound to all players online?

river oracle
#

use a lambda expression

#

?paste

undone axleBOT
vocal cloud
#

Isn't there a way to play a global sound?

#

Apparently not. Sadge

river oracle
#

https://paste.md-5.net/ayunihajov.coffeescript I'm trying to cancel teammates from hitting eachother however for somereason this code only stops players from punching and shooting eachother as soon as they have an item in their hand they can deal damage to their teammates again

fair acorn
river oracle
undone axleBOT
river oracle
#

learn how to loop before coding spigot plugins

fair acorn
#

Ok thx

river oracle
#

but then it allows the attack

#

hmm interesting Idea could this have to do with another event clashing?

river oracle
#

I fixed hte issue by elevating event priority during that stage of the game

#

though in the future I need to work out a proper event staging. Which I'll end up discussing with another dev tommorow

karmic stirrup
#

How can I make String.join(" ", args) get all args except the first one?

quaint mantle
#

args[1..] 😄 🦀

warm trout
#

Can I get how many blocks are within a boundingbox

lost matrix
lost matrix
# warm trout Can I get how many blocks are within a boundingbox

If you want to filter blocks by type then you can do something like this

  public static void forEachBlock(final BoundingBox box, final World world, final Consumer<Block> blockConsumer) {
    for (int x = (int) box.getMinX(); x <= (int) box.getMaxX() - 1; x++) {
      for (int y = (int) box.getMinY(); y <= (int) box.getMaxY() - 1; y++) {
        for (int z = (int) box.getMinZ(); z <= (int) box.getMaxZ() - 1; z++) {
          blockConsumer.accept(world.getBlockAt(x, y, z));
        }
      }
    }
  }
tall moon
#

so I'm trying to build modified spigot 1.10.2 but I'm getting errors such as ```
TimedRegisteredListener.java:[35] System cannot be resolved

Is this because I'm using the wrong java version? My java home is java 17
lost matrix
tall moon
#

I'm trying to reintroduce a bug

#

in a modern version

lost matrix
#

And why do you need to build against 1.10 then?

tall moon
#

to find out where the bug is

#

I have no idea why it happens so I'm trying to find why it occurs

#

the bug is tnt being knockback happening through walls and ignoring distance between entities

lost matrix
#

Anyways your bug comes from java not being properly enabled for your project.
Set a java version for your project.

tall moon
#

how do I do that?

lost matrix
#

What ide are you using?

tall moon
#

IntelliJ

#

I did ctrl alt shift s

#

and set it to 1.8

#

wait it's using 1.6 lmao

lost matrix
#

File -> Project Structure -> Project
Then select SDK

tall moon
#

I need to download an even older version I guess

lost matrix
#

And make sure maven also has the same jdk version

lost matrix
tall moon
#

mvn clean install

#
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>```
#

in the pom.xml

river oracle
#

your project version is 1.8 versus the maven compiler source of 1.6

tall moon
#

ah ok

#

so once I have selected the correct SDK I still get the same error

river oracle
#

you could also try to compile against 1.8 instead of 1.6

summer cargo
#

how might I disable the version check for bungeecord server switching?

tall moon
#

well I've selected 1.8

#

how do I tell maven to use it?

river oracle
summer cargo
tall moon
#

still the same error

#

does that mean I should get java 1.6?

river oracle
#

wait I'm curious to know if you need the 1.8/1,6 jdk's to compile to it

lost matrix
river oracle
#

I'm not sure how that works exactly

tall moon
#

ok I'm convinced it somehow still isn't using java 1.6

#

oh come on

#

now I can't change my default java version back

quasi patrol
#

Can you get a chat color from rgb?

lost matrix
quasi patrol
silent wave
#

hi, how can i create a license system?

vocal cloud
#

You don't

brave sparrow
#

Not worth it

#

Too easy to remove

vocal cloud
#

You can make it difficult to remove but in doing so you'll spend more time on the license system then actually working on the code

brave sparrow
#

It’s Java

silent wave
#

ok

vocal cloud
#

Basically, you host the code on another platform and during runtime you download and generate all the classes required.

brave sparrow
#

Java is still Java

vocal cloud
#

So it's a lot more work

brave sparrow
silent wave
#

oh

vocal cloud
#

Yeah, but that's a lot more work then having a jar

lost matrix
brave sparrow
#

Also

vocal cloud
#

I'm not saying it's a great solution, just that's what professional licensed projects do

brave sparrow
#

That isn’t gonna work nicely for spigot lol

chrome beacon
brave sparrow
#

And it still gets cracked regularly

vocal cloud
#

True, but with a java lib I tried to use they pulled the API-for-files nonsense

#

It makes it a lot harder to modify

silent wave
#

if i work a lot of time on the license system i add a lot of difficult to break it

#

right?

lost matrix
vocal cloud
#

Then, due to an oversight, it's cracked in 10m.

brave sparrow
#

As much time as you spend on it, someone will crack it in an afternoon

vocal cloud
#

You don't want to spend 100 hours to make something that takes 1h to bypass

brave sparrow
#

Also, if you’re planning on releasing this on spigot, you’re not allowed to include a licensing system anyway

#

So no point

lost matrix
#

You can use one of the obfuscators that break decompilers. I wouldnt go beyond that.

silent wave
#

ok

compact haven
#

pretty sure that’s not allowed by spigot either

quasi patrol
lost matrix
quasi patrol
silent wave
#

basically it will be cracked hahaha

#

ok guys, ty

vocal cloud
#

Correct

#

Write good code and people will pay for it

silent wave
#

😘

lost matrix
silent wave
#

ok, ty for help me

quasi patrol
#

Anyways?

lost matrix
vocal cloud
#

1.17 doesn't have ChatColor.Of()?

chrome beacon
#

Did you use the right ChatColor import

#

Use the md5 bungee one not the bukkit import

quasi patrol
#

Resolved.

echo basalt
quasi patrol
#

If I have a domain that basically redirects to another domain, can I get the domain that is actually inputted when logging into the server, and not the domain that is being redirected to?

drowsy helm
#

for what usecase anyway?

twilit pulsar
#

How to fix?

[07:36:53 ERROR]: Error occurred while enabling NetFFA v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "netffa.netffa.NetFFA.getCommand(String)" is null
        at netffa.netffa.NetFFA.onEnable(NetFFA.java:28) ~[NetFFA-1.0-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.19.1.jar:git-Paper-94]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:477) ~[paper-1.19.1.jar:git-Paper-94]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.19.1.jar:git-Paper-94]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:422) ~[paper-1.19.1.jar:git-Paper-94]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306) ~[paper-1.19.1.jar:git-Paper-94]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1124) ~[paper-1.19.1.jar:git-Paper-94]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.1.jar:git-Paper-94]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[07:36:53 INFO]: [NetFFA] Disabling NetFFA v1.0-SNAPSHOT```
lost matrix
twilit pulsar
#

OHH

#

I forgot

#

i always forget something

#

Ty mate

echo basalt
tardy flame
#

:C

echo basalt
#

Welp I'm stupid as shit

#

decided "hey look it's 6:40am imma go hit the gym early"

#

so I went to fill up my water bottle

#

family's all asleep

#

I dropped the half full bottle into the sink

chilly fox
#

hyy can anyone suggest me some claim plugins? (i used gp and towny)

echo basalt
#

woke up the entire family

tardy flame
#

Well played

chilly fox
lost matrix
tardy flame
#

Go there and ask

echo basalt
#

If you're here asking for server help

lost matrix
echo basalt
#

you have a bigger chance at learning how to code the plugin you're looking for

#

than actually finding the plugin you're looking for

chilly fox
echo basalt
#

you can code one in about 3 hours

tardy flame
#

Claim plugin in 3 hours???

echo basalt
#

if you abuse worldguard's api

tardy flame
#

I'm writing pets plugin in 6 months now

lost matrix
tardy flame
#

And i don't see the end

echo basalt
#

I mean

#

you're probably doing something very wrong

lost matrix
#

Its all a matter of features.

echo basalt
#

Or you're rewriting spigot itself type thing

#

I've only had one project that I "spent" 6 months on

#

and it was a client-side tutorial system

lost matrix
#

6 months for a single plugin. Ive done whole server setups with thousands of lines of code in that time.

echo basalt
#

but I also had little packet and nms experience

#

And we ended up having npc animations

tardy flame
#

Before this project i also didn't know that much about them

#

But thanks to it I learned thousands new things

#

So I'm taking my time more on learning

chilly fox
#

all are saying go to #help-server but no one replying there 😢

tardy flame
#

Than writing

echo basalt
#

You don't go to the fruit section of a supermarket to ask about laundry detergent type thing

echo basalt
#

I mean you technically can but the employees will treat you as special

tardy flame
#

😅

quaint berry
#

Sorry to cut in but how do I create a config file?

#

I tried to find some docs but its no help

echo basalt
#

are you sure

tardy flame
#

How tf did you manage to find and SS it in 1 second

#

Wtf bro

echo basalt
#

I have a nice keyboard with very short travel

quaint berry
#

ah

vocal cloud
#

Google on new tab

tardy flame
#

I couldn't even read what he said and you already...

vocal cloud
echo basalt
#

I can do about 130wpm comfortably on this keyboard

tardy flame
#

I can do like 10

#

I'm on my phone

#

:(

echo basalt
#

and have sharex specifically configured so I can just yeet my mouse

#

:)

vocal cloud
#

We need a bot where we can reply to someone with ?google and it'll auto create a search lol

tardy flame
#

?google

undone axleBOT
vocal cloud
#

Yeah, but like it autofills the Search query with their exact question

tardy flame
#

Yeah

#

?google t

undone axleBOT
tardy flame
#

Would be cool

echo basalt
#

Maybe a command to recommend a common research pattern

#

I'm tired of seeing people ask the most repeated questions all the time

#

"help how do I make plugin"

lost matrix
#

Still waiting for ?npe

tardy flame
#

What's npe

vocal cloud
#

I need one for when people wrap things with Objects.requiresNonNull

#

And complain it throws a NPE

echo basalt
#

oh god that's cringe

tardy flame
#

Ohh null pointer exception

vocal cloud
#

Like intellisense is not intelligence

echo basalt
#

we should make a tutorial for like

#

something so ironic

#

just to see if people even have a train of thought

#

like a tutorial for async garbage collection

#

where's just a while(true) System.gc() on a new thread

#

Just to see if someone's capping

lost matrix
vocal cloud
#

Wait you can do that

echo basalt
#

ClearLagg be like

vocal cloud
#

I didn't realize you could call the GC

lost matrix
#

!!Logic.UNTRUE

echo basalt
#

And whenever some ignorant mf goes like "help how do I make tps go up" you just reply with that

vocal cloud
#

Oh man I had an issue in my mod where the TPS was going sub zero with our tiles. That was cause we'd check the recipe every tick. 20k recipes checks a second per tile. KEKWholdup

echo basalt
#

or just send some code that goes like

new Thread(() -> {
  while(true) {
    Field tps = MinecraftServer.class.getDeclaredField("tps");
    tps.setAccessible(true);
    tps.set(Bukkit.getServer(), 144); // set tps to 144 (to match with 144hz screen, we dont want to waste performance)
    System.gc(); // gc to clear ram
  }
}).run();
lost matrix
#

lol

vocal cloud
#

Why stop at 20?

#

Why not 200

echo basalt
#

oh shit

#

yeah let me just

vocal cloud
#

If you think about it. The TPS will drop but as long as it's above 20 you're good

chilly fox
#

last question: do anyone of you have a claim plugin which i can get?

vocal cloud
#

Gotta make it or find it on the forums

#

Use someone's sketchy 5 year old 1.8.8 disaster that uses individual text files for claims

compact haven
#

I need help lmao; for some reason my maven dependencies are not taking effect in my kotlin source code

echo basalt
#

Lockette 😉

#

put a [lock] sign on every block imaginable

compact haven
#

the dependencies are there, and also shown in the sidebar, but no invalidation of cache or anything is fixing it

#

in source it's like they dont exist in path

lost matrix
#

maven + kotlin
Interesting choice

echo basalt
#

hol'up

compact haven
#

yeah I should really change this to gradle shouldnt I

echo basalt
#

you wot m8

compact haven
#

god fucking damnit

echo basalt
#

I'd go to the gym but I'm getting an ab workout right here

lost matrix
compact haven
#

does anyone know how to migrate a maven project to gradle without the IDE causing any problems

#

nah it's not that, I've tried that several times

vocal cloud
#

You can switch it pretty easily in intellij

compact haven
#

How?

vocal cloud
#

Idk they have a tutorial I think

#

Been a long time since I've needed to

compact haven
#

oh gradle even took my pom

#

and made gradle build scripts from it too

#

how lovely

dapper carbon
#

this should work right? String cmd = "kill %player%" cmd = cmd.replace("%player%", player.getName()); Bukkit.dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd);
however I am not getting any output

lost matrix
dapper carbon
#

it was an example, not actually what I am doing..

#

didn't want to post a wall of text tbh

lost matrix
compact haven
#

lol, so gradle has taken the liberty to turn main and test into submodules of the module, and not designate the kotlin folder as a source root

vocal cloud
#

Don't execute commands for other plugins sad just use their APIs

compact haven
#

some plugins don't have an API

#

like LiteBans 🐈‍⬛

echo basalt
#

Lmao wtf

compact haven
#

they have an API, but not a complete one xd

#

then they further go on to say execute database queries to get ban information

#

like what the fuck

uncut cobalt
#

How to spawn a respawn anchor block, light it up with glowstone, and make it explode as if interacted with, without any player touching it

echo basalt
#

Check its blockdata

uncut cobalt
#

Uh how would I do that

#

Like the exploding part

compact haven
#

im going to throw a tantrum

#

why is this not working

#

I have the implementations in my build script

#

and yet no dependencies are being recognized in my kotlin file

small current
#

So i coded an item command plugin but it got some problems
Clients got some auto recipe fill thing where you for example click on beacon and it puts the recipes in the crafting
How to cancel that what event gets called

crisp steeple
lament sorrel
#

can someone exaclty explain how to configure the config file

river oracle
#

What config file

#

Your question is so broad you are better off not asking

hardy swan
#

How to write a plugin

lament sorrel
chrome beacon
#

?configs

undone axleBOT
quaint berry
#
java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "com.darkerdata.wildtp.WildTp.getCommand(String)" is null

I'm guessing that this is from the command not giving a response?

chrome beacon
#

You forgot to define the command in the plugin.yml

quaint berry
#

OH

#

I'm an idiot

vivid cave
#

Yo lil question, is ping a really accurate way to determine how good the connection is to the server?
Wouldn't there be a more accurate way like "calculating the amount of keep alive packets they received in the last second" or sth?

chrome beacon
#

Keep alive is deffinetly not more accurate

vivid cave
#

I'm doing animation, so heavily spamming client with packets, I'm working a way to make sure that these animation won't make them crash though, what do you advise me to use?

#

Obviously if they're struggling keeping up i will send them less or even no more packets at all until they are good again

#

So you think I should use ping?

chrome beacon
#

I think you should add a setting for the users to decide

#

And try to lower the amount of packets as much as possible

vivid cave
#

E.g if many stuff are animating at the same time, in the ideal situation they'd be able to see everything

#

I'm implementing priority list based on angle of view & distance

vivid cave
#

so preferably i do it for them

#

technically they are not responsible for the animation so I can't blame them that they didn't read as technically it's not really vanilla

chrome beacon
#

Ping isn't a great way to messure how much the client can handle

#

Users will need manual control

vivid cave
#

besides user control

near kite
#

I have a question

#

How can I attempt changing a npcs model to mob or player

#

For older versions

#

While newer versions shows a custom model

#

I wanta try doing this with packets and citizens api

chrome beacon
vivid cave
drowsy helm
#

citizens goes pretty far back

near kite
#

I’m using model engine to display an npc

drowsy helm
#

oh cant help you there

#

that is extremely hard i wouldnt recommend

echo basalt
#

I mean

#

You can just fork spigot

#

And make some funky changes

supple elk
#

My editor theme on IntelliJ resets everytime I restart the IDE, anyone know why?

grim ice
#

intelllij default theme

#

is best

supple elk
#

👎

grim ice
#

ive been using weird themes for a year now

#

im so tired from them

#

default is best

supple elk
#

I've used the same theme for nearly 2 years

grim ice
#

fuck

supple elk
#

I much prefer it

grim ice
#

thats bad

vivid cave
#

@grim ice ur bad

supple elk
#

how is that bad 🤔

grim ice
#

how do u not get bored from t

supple elk
#

look how nice this is 😫

grim ice
#

oh damn

#

this is actually nice

supple elk
#

exactly

grim ice
#

mine sucks

#

ass

#

thats prob why

supple elk
#

lol

grim ice
#

give me ur theme!

supple elk
#

lmao

#

ok

grim ice
#

tho ill have to get a theme in notepad too

#

since that's where i code the most nowadays

#

💀

supple elk
#

...

#

what

vivid cave
#

Honestly for having tried both Intellij and VSCode, even in java i personally prefer VSCode... It has as much tools for java but is way more versatile for other languges AND more customizable, themes plugins etc

grim ice
#

im serious lol

supple elk
#

w h y

grim ice
#

notepad++ ofc tho

slate mortar
glossy venture
#

this is also nice theme

quaint berry
#
teleport-Delay: 180
#This is the teleport delay in minutes
teleport-range-max: 5000
#This is the max teleport range in blocks
teleport-range-min: 4000
#This is the min teleport range in blocks

This is my config.yml /\

int maxRange = config.getInt("teleport-range-max")

For some reason it always returns 0 all though I followed the docs?
(Also sorry for cutting in)

slate mortar
# glossy venture

does intellij still have that "bug" where it removes the background when you restart it?

glossy venture
#

no

#

at least i dont

hardy swan
#

Use vscode

glossy venture
#

but i havent updated intellij in like 2 years lol

slate mortar
#

i remember i had that bug like few months ago

#

even tho i was even on the latest 2022 beta when it was out

#

lemme try it out

glossy venture
#

im using 2021.2

slate mortar
#

you got some random image i can use? i dont have any on my pc lol

glossy venture
slate mortar
#

2022.1.3 in my case

glossy venture
#

i use this

#

as bg

slate mortar
#

okay that looks fine thx

glossy venture
#

itsl ike first result when u search background or smth on google

sharp flare
glossy venture
#

yeah

slate mortar
#

OMG

glossy venture
#

intellij is specialized

slate mortar
#

ITS ACTUALLY FIXED

sharp flare
#

Atleast intelliJ is a dedicated IDE for java

slate mortar
#

this actually looks poggers

glossy venture
#

hate the vcs highlighting

#

just git add * lmao

slate mortar
#

it had that bug where after restarting intellij, it reset the background for the "empty frame" part

#

which was fricking annoying

glossy venture
#

empty frame?

slate mortar
#

when you have nothing opened

glossy venture
#

the editor?

#

oh

slate mortar
sharp flare
#

All of the time I've been using default intelliJ theme, time to change it

glossy venture
#

bruuuuh why does publishing take so long

slate mortar
#

while this is the normal frame

glossy venture
#

though it is uploading the shaded jar too

#

which i dont want

#

because its like 20 mb

slate mortar
#

without the empty frame, it does this weird shit

#

oh thanks windows

#

for breaking my screenshots everytime when using 3 monitors

glossy venture
glossy venture
#

getInt cant return null so an undefined value is 0

quaint berry
slate mortar
#

can you show the actual yml file?

#

i suppose you may have fucked up spacings

glossy venture
#

bro sonatype nexus is so nice

#

holy shit

#

finally releasing libs

slate mortar
#

oh i'm dumb

#

my bad

#

ignore that

#

please

quaint berry
#

Oh ok

slate mortar
#

well is that the full yml?

quaint berry
#

Yes

glossy venture
#

show more java code

#

is that your plugin config?

#

or a custom config

#

in a different file

slate mortar
#

would be helpful to see what config refers to

#

a custom config, or the "vanilla" one

quaint berry
#

I'm having a stroke

glossy venture
#

the one bukkit gives you

quaint berry
#

The same one I sent?

glossy venture
#

so your plugin config?

#

not a custom loaded one?

slate mortar
#

so what is the config object? i suppose just Plugin#getConfig?

glossy venture
#

the one you get with JavaPlugin#getConfig()

quaint berry
#
package com.darkerdata.wildtp.commands;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.util.Random;
import java.util.logging.Level;

public class WildTpCommands implements CommandExecutor {
    Random random = new Random();

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        FileConfiguration config = Bukkit.spigot().getConfig();
        if (!(sender instanceof Player)) {
            return true;
        }

        int tpDelay = config.getInt("teleport-Delay");
        int maxRange = config.getInt("teleport-range-max") + 1;
        int minRange = config.getInt("teleport-range-min") + 1;

        Player player = (Player) sender;
        if (command.getName().equalsIgnoreCase("rtp")) {
            Bukkit.getServer().getLogger().log(Level.FINER, "rtp activated by " + ((Player) sender).getDisplayName());
            Bukkit.getLogger().log(Level.SEVERE, "max-range is " + maxRange);
            int blockX = random.nextInt(maxRange);
            int blockZ = random.nextInt(maxRange);
            if (random.nextInt(2) == 1) {
                blockX = blockX * -2;
            }
            if (random.nextInt(2) == 1) {
                blockZ = blockZ * -2;
            }

            Location finalLocation = new Location(((Player) sender).getWorld(), blockX, 300, blockZ);
            ((Player) sender).teleport(finalLocation);




            //TODO TP THE PERSON YOU SHOVEL
        }
        return true;
    }
}
#

Here

#

If it helps

glossy venture
#

youre getting the spigot config

slate mortar
#

Bukkit.spigot()

#

wtf

glossy venture
#

not your plugin

slate mortar
#

thats the spigot.yml i suppose

glossy venture
#

you need a reference to your plugin

#

and use Plugin#getConfig()

slate mortar
#

MainClass.getInstance().getConfig()

#

where MainClass is... well

#

your main class 😎

vocal cloud
#

Use DI so you don't have to make instances sadge

grim ice
#

make?

#

no one makes an instance of his main class tho

vocal cloud
#

They do a private static instance then set it in onEnable. That's making an instance.

#

Just pass the thing around in onEnable. hes_UwU

grim ice
#

thats not making an instance

#

lmao

#

ur instance is only made by bukkit

grim ice
vocal cloud
#

That's just semantics. Point being. Using DI > static instance

glossy venture
#
api 'net.orbyfied.j8:j8s-command:0.1.1:dev'
api 'net.orbyfied.j8:j8s-util:0.1.0:dev'
api 'net.orbyfied.j8:j8-registry:0.1.0'
api 'net.orbyfied.j8:j8-util:0.1.0'

im including these modules in a core module, which is a standalone plugin, but other modules (also standalone plugins) need to include the core module, which is done like this

// for example, misc
compileOnlyApi project(":core")

but now i cant access anything from j8s-command in misc, although its declared as api, to add to the weirdness, i can use stuff from for example j8-util in misc

grim ice
#

not necessarily

glossy venture
#

do i need to invalidate caches

grim ice
#

theyre the same

#

but a static instance is easier to use

#

and less spammy

vocal cloud
#

But it's not good practice

grim ice
#

for what reason?

#

your class is already a singleton

#

you're just completing the singleton pattern

glossy venture
#

oh boy

#

now it has to index

#

everything

vocal cloud
#

Because people should be using DI a vast majority of the time. Practice makes perfect

glossy venture
#

whole paper server

grim ice
#

that's a very bad point

#

there are cases where a singleton pattern is better

#

especially when your class is already a singleton

#

you're just completing it, literally

#

and a static instance is less spammy than di

glossy venture
#

with a manager pattern yeah, but if your class is already a singleton and isnt supposed to be protected from outside modules you can just use the singleton pattern

#

what the fuck

#

why does it still not work

vocal cloud
#

Meh. Still don't like it.

grim ice
#

@glossy venture

#

something wrong with ur gradle?

grim ice
#

clear caches! the ultimate solution to all problems

glossy venture
#

i invalidated them

grim ice
#

not intellij

#

try .gradle/caches

glossy venture
#

dont have that folder

#

or in user dir?

vocal cloud
#

The last time someone had an issue like this they hadn't installed the modules to their .m2

#

Or was it the core. I don't remember

glossy venture
#

i have them uploaded to sonatype oss

#

and the other modules are working

#

and i can download the jar from oss

#

with the correct content

vocal cloud
#

Wack

grim ice
#

btw mike

#

why are web sockets

#

bad

glossy venture
vocal cloud
#

Depends, what purpose are they for?

grim ice
glossy venture
#

oh aight

grim ice
vocal cloud
#

If it's client-> server it's bad for example. Especially in forge

grim ice
#

between backend and front end

#

no it's both ways

vocal cloud
#

Forge provides a messaging system within itself already

grim ice
#

what

#

for real?

#

how

vocal cloud
glossy venture
#

this is whats hapening

slate mortar
#

i know that fabric's api has a class for sending "packets" with data, i suppose its similar in forge

vocal cloud
#

It's great because it allows you to easily serialize and read data

slate mortar
#

its fancy af honestly

#

i use it so often

grim ice
#

@vocal cloud

vocal cloud
grim ice
#

theyre not sending to a forge server

glossy venture
#

aight ive deleted .gradle/caches and ive invalidated cahces in intellij

#

should work now

grim ice
#

they're sending to an actual backend

glossy venture
#

right

grim ice
#

that's a client side md

#

mod

slate mortar
#

bascially you want to send an empty message to a server?

ClientPlayNetworking.send(new Identifier("mod_id", "packet_channel_id"), PacketByteBufs.empty());```

so fricking fancy
grim ice
#

it doesnt have a forge server

slate mortar
#

imagine using forge

vocal cloud
#

Wait so it's a forge mod -> vanilla server

grim ice
#

no

#

forge mod -> backend

#

the backend isnt a minecraft server

vocal cloud
#

Ah

#

Well, if you want to hook into that you'd probably need to add that functionality to their code

grim ice
#

no

#

their code is legit

#

what i said

#

they have their backend

#

and they send and get info from it

vocal cloud
#

Can you access said backend?

grim ice
#

what i wanted to do earlier is to get the info they get from their backend

#

no

vocal cloud
#

I mean you sent the code it seemed open source

glossy venture
#

GREAT

#

now none of them are working

#

amazing

#

fuuck

grim ice
#

but i dont actually have access to the backend

slate mortar
grim ice
#

only the code

slate mortar
#

reminds me of me using my lib in my local maven repo

vocal cloud
#

When they receive whatever just broadcast it via a channel

slate mortar
#

always throwing that bs

glossy venture
#

reimporting gradle proj

#

pls

#

wokr

grim ice
#

yeah i can def clone the repo

#

and add that functionality

#

lmao

#

but like thats effort

#

💀

glossy venture
#

oooooh

#

it didnt have anything downloaded yet

#

i had to reimport gradle proj

#

pls work

vocal cloud
#

morgen, morgen, nur nicht heute, sagen alle, faule Leute.

glossy venture
#

pls

grim ice
glossy venture
#

fuck its gonna have to do userdev shit again

vocal cloud
#

Tomorrow tomorrow not today says all the lazy people. In other words, just do it KEKLEO

#

It sounds better in German

glossy venture
#

yessir

#

its download the jars

#

indexing yay

vocal cloud
#

inb4 1 still doesn't work

glossy venture
#

prob gonna take like a year

#

YEEEEEEEEEEs

#

everything is still broken but thats because i renamed like every method ever

vocal cloud
#

get refactored

grim ice
glossy venture
#

delete .gradle/caches and invalidate caches

#

then reimport project

grim ice
#

see

#

im smort

glossy venture
#

and it starts downloading everything

#

and indexing

grim ice
#

because i had a gradle issue like this for around a week!

glossy venture
#

and then fixed

vocal cloud
#

I'm lazy. I'd just release a new version and that would fix it kek

grim ice
#

and struggled everyday

#

trying to look for a solution!!

glossy venture
#

that sucks

grim ice
#

until i just started deleting random shit

#

and i discovered deleting caches worked

#

man

#

i need topics to elarn

#

learn

glossy venture
#

fuck shit i forgot to implement shit

#

and the test string completion is still in

#

the release

#

looooooooooooool

vocal cloud
#

Learn test-first development

glossy venture
#

its not borken

#

but its like in a test stage

#

and i just released it lol

#

guess ill implement the feature in my user project

near kite
drowsy helm
#

oh as in a model engine model with a vanilla mob?

#

your wording is confusing

near kite
#

Yes

drowsy helm
#

you would have to get the entity id of each armour stand then send a remove packet to the player

#

then send a spawn packet for whatever mob you want

#

idk if model engine api can get the entity ids tho

near kite
#

Thank you

#

I’m watching the popeye movie

#

The one that got leaked

small current
#

So i coded an item command plugin but it got some problems
Clients got some auto recipe fill thing where you for example click on beacon and it puts the recipes in the crafting
How to cancel that what event gets called

vocal cloud
#

We talking hacked clients?

ripe urchin
#

Sounds like JEI

#

I don’t think that’s an event you can cancel. It’s just JEI internally looks up the recipe, checks your inventory and moves the items

#

It’s like doing it with your mouse except very fast

earnest forum
#

probably inventory click event?

#

try it and see

vocal cloud
#

You can check how fast they do it but that's about it

#

You could rate limit it but that'd probably create frustrating moments for fast players

small current
#

i can't find anyway to cancel it

vocal cloud
#

?jd-s

undone axleBOT
rapid condor
#

hey i need a dev to add a placeholder compatible with PlaceholderAPI into a plugin

small current
vocal cloud
#

It's for me. You've tried all the inventory events?

#

Move, click, etc?

gray merlin
#

I'm confused in this step for remote debugging

small current
#

i can try for listening for

gray merlin
#

Is this on a server of our own, or is it somewhere on the IDE?

small current
#

inventoryclickevent on workbench if the click type is number key

#

but

#

how can i get the number

rapid condor
#

hey i need a dev to add a placeholder compatible with PlaceholderAPI into a plugin, payment via paypal @ me if interested!

undone axleBOT
rapid condor
#

hey i need a dev to add a placeholder compatible with PlaceholderAPI into a plugin, payment via paypal @ me if interested!

earnest forum
#

this isn't the place

rapid condor
#

cant

#

i dont have 20 post

small current
#

your issue

#

this is not the place to ask

rapid condor
#

hey i need a dev to add a placeholder compatible with PlaceholderAPI into a plugin, payment via paypal @ me if interested!

earnest forum
#

asking to get muted or banned

small current
#

this is not the place to ask

rapid condor
#

blocked 2 too

small current
#

can we ban this guy

vocal cloud
#

KEKW keep blocking and eventually all the good devs will be gone

sullen marlin
#

pls stahp axing

small current
#

wait what

#

wassup @sullen marlin

vocal cloud
#

Hash man to the rescue

small current
#

i hate you

#

why you code c style in java with a bunch of not needed spaces

#

check the bungeecord source guys its a nightmare

#

so anyone got any idea

#

about how to cancel this crafting thing

vocal cloud
#

Like I said, log all events and you'll find it

#

Add some "XYZ event fired"

#

Then go from there

gray merlin
#

Have I missed something?

#

I don't need to build the plugin and put it on plugins right?

small current
#

not enough info

vocal cloud
#

Then log more

small current
#

i logged all the fields in the event

#

any inventory related

vocal cloud
#

Well there's got to be something lol

small current
#

getHotbarButton found it

rapid condor
#

is there a dev?

#

around

#

i need help developing

vocal cloud
#

Jeez did you not get the memo

earnest forum
rapid condor
#

how to add placeholders?

glossy venture
#

look up placeholderAPI github

frosty tinsel
#

Hello, does anyone here know how to properly use Dagger 2? (ik I should ask directly, but there is not a single straightforward question)

glossy venture
#

it has an explanation there

rapid condor
#

@glossy venture can you do it instead of me?

#

for money

glossy venture
#

nah

rapid condor
#

k

glossy venture
#

dont have paypal

earnest forum
#

zypan u a weird ass mf

#

dont get the memo

glossy venture
#

goofy ahh

eternal oxide
#

?services

undone axleBOT
vocal cloud
#

Lmfao we tried that. Even md_5 showed up

rapid condor
#

this services isnt working

#

i need 20 posts

#

should i go spam somewhere to post there?

#

ooh

#

i dont have to post

small current
#

@rapid condor are you a bot ?

rapid condor
#

idk tell me

#

my ai never stops learning

gray merlin
#

Can I use an NMS ItemStack in a BukkitObjectOutputStream#writeObject?

eternal oxide
#

why?

#

Can;t just just use teh Bukkit instance?

gray merlin
#

The bukkit instance doesn't save all of the nbt.

eternal oxide
#

Its designed to be used with Objects which implement ConfigurationsSerializable

gray merlin
#

I see, thank you.

tardy delta
#

meh looks bad

#

or i could make a static inner class and pass an instance 🤔

floral drum
#

uwu

#

hi fourteen ❤️

tardy delta
#

ello

cunning canopy
#

can you cast a Slime back to an Entity?

tardy delta
#

yes

eternal oxide
#

But why would you?

cunning canopy
#

that takes in entities

#

and rotates them

eternal oxide
#

then T extends Entity, or ?

echo granite
eternal oxide
#

no need to cast

cunning canopy
#

feel free to improve

vocal cloud
eternal oxide
#
void matchPlayerRotation(T extends Entity, Player player) {
        T.setRotation(player.getLocation().getYaw(), 0);
    }```
#

not at ide so syntax is not correct

cunning canopy
tardy delta
#

what am i seeing 👀

eternal oxide
#

Fix it, not in IDE here

echo granite
cunning canopy
vocal cloud
#

My point is, you're not adding anything to the conversation before

vocal cloud
#

You added nothing new

small current
echo granite
#

I am here to add my own perspective regardless of whether you like it or not.

tardy delta
#

just take an entity as parameter lol

eternal oxide
#

yeah, I'm not awake

tardy delta
#

me every day

#

its 26°C in here and dark to protect from the sun 💀

eternal oxide
#

What I was meaning was generics so his ide would not complain about passing a non cast entity

#

ie java <T extends Entity> void matchPlayerRotation(T entity, Player player) { entity.setRotation(player.getLocation().getYaw(), 0); }

#

no ide warnings then

#

I may be wrong but I think teh ide would complain passing a Player into a method which takes a LivingEntity

#

I can;t remember

noble lantern
#

LivingEntity extends Entity so should theoritically be okay?

tardy delta
#

shh hes not fully awake

eternal oxide
#

brain cells firing

#

Yep you are correct. I was lost in a haze of generics for some reason.

grim ice
#

life

onyx fjord
#

does any of you use github actions for automated releases?

past geyser
#

not for spigot currently, but soon maybe

#

whats the issue?

patent quarry
#

Hey !
I created a textComponent long time ago that normally run a command when it is clicked but since the 1.19.1, it doesn't work anymore:

TextComponent finish = new TextComponent(StringConverter.coloredString("&4&l[FINISH]"));
finish.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "exit"));```

Nothing is sent, and I don't find information related to a modification of that. Someone know how can I fix my problem ?
onyx fjord
#

just some pain

eternal night
tardy delta
#

after 20 minutes i found the sound i was looking for lmao

eternal needle
#

hi i can get this to work pls help pl.sendTitle(ChatColor.RED + e.getPlayer().getName(), ChatColor.RED+ "tagget deg!", 20, 40, 20); i code 1.19

tardy delta
#

lets start using gson smh

gray merlin
#

I've got a question about NMS:
If we have complex tags, such as this (see picture) in an ItemStack, when we call .c() will it return the tag data in a HashMap, bound to the key name, which is in this case, LOTRPouchData?

tardy delta
#

meh i did some stupid things in the past and need to redo the whole design now

#

🥺

rare flicker
#

What's the name of the sound played whenever you make a map?

tardy delta
#

ui.cartography_table.take_result?

rare flicker
#

THANK YOU!

tardy delta
#

probably not in that workbench thing yiu mean

rare flicker
#

i was looking all over the item section

#

empty map, map, filled map

#

but yes that's it x)

tardy delta
#

literallty had the sound list open

rare flicker
#

i would've never looked in UI tbh

tardy delta
#

anyways time to break my whole plugin

gray merlin
#

Are the armour slots counted as inventory slots?

rare flicker
#

i didnt read, what are you working on?

gray merlin
#

In a PlayerInventory

chilly fox
tardy delta
#

ig youre talking bout this method

gray merlin
#

Is the armour counted in?

tardy delta
#

well i think you can read :)

dusty herald
#

getStorageContents gets only items inside of the common places u store shit like in chests but ignores offhand and armor slots iirc

gray merlin
# tardy delta well i think you can read :)

Well sure, but that is exactly my question. Often people separate the two. If I could understand it clearly and hadn't already read it and not understood it, I wouldn't have asked...

tardy delta
tawdry python
#

Why doesn't the mob spawner block exist? I'm using Spigot 1.8.8

dusty herald
#

my explanation is better

dusty herald
#

pig spawner maybe

gray merlin
#

I see, then getContents includes armour, and getStorageContents doesn't for the most part.

#

Thank you.

dusty herald
#

yes

tardy delta
#

smh kinda weird to implement a storage design for using database and non databases

tawdry python
tardy delta
#

1.8

eternal oxide
#

?1.8

undone axleBOT
dusty herald
#

Show me what you mean

tawdry python
#

I want get mobspawner block in 1.8

tardy delta
#

ElgarL, back alive? 😂

eternal oxide
#

just about

arctic moth
#

antiviruses are a waste

#

btw any way to make a void world with WorldCreator?

tardy delta
#

theres a method to set the type

arctic moth
#

so WorldType.FLAT or smth and then set the preset to null?

tardy delta
#

dunno what the preset is but ig that it is FLAT ye

river oracle
arctic moth
#

ik

eternal oxide
#

all I have is Defender and common sense

tardy delta
#

same

#

i got a free norton licence now but norton heavy asf

eternal oxide
#

I used to like the Enterprise version of Norton

#

until they made it almost impossible to remove

cunning canopy
#

is it considered bad practice to do Class self = this?

tardy delta
#

got the deluxe thing or smth

#

licence key thing laying next to me lol

cunning canopy
#

what if there was

#

inside a bukkit runnable

#

instead

#

of doing

#

Class.this

#

multiple times?

tardy delta
#

can we get any context lol

eternal oxide
#

Sounds like you are using Class wrong

cunning canopy
#

I have a lot of player data in my main class

#

that I need to access inside the gameloop (BukkitRunnable)

eternal oxide
#

then pass an instance of your datasource

tardy delta
#

make a proper gameloop class i'd say instead of using a runnable where you put all the stuff in