#help-development

1 messages Β· Page 897 of 1

ivory sleet
#

alex

#

u call System.gc() like ONCE

#

and thats it

tender shard
#

calling it once doesnt immediately get rid of the RandomAccessFile of the .jar

ivory sleet
#

ugh

tender shard
#

this is indeed needed twice to be able to instantly reload module .jars on windows D:

ivory sleet
#

hmm

lost matrix
ivory sleet
#

unfortunate

tender shard
#

it's only there when people reload a module .jar without reboot, which they shouldn't do anyway

#

it's our version of /reload

ivory sleet
#

wouldn't u wna join the thread anyway then?

tardy delta
ivory sleet
#

fr lol

#

jvm flags

tender shard
#

oh yeah for /module reloadjar it should join it, yes

ivory sleet
#

also mfnalex

tender shard
#

reloadjar was added later, at first there was only unload and loadfile

ivory sleet
#

u might wna put the thread priority to 10

#

so it executes faster

#

or well not executes faster

young knoll
#

while (true) {
System.gc()
}

ivory sleet
#

but gets higher prio regarding jvm and os stuff

floral drum
#

bad coll

proud badge
#

I dont understand why does it say its always true, it isnt

ivory sleet
#

how does ur enum look

proud badge
ivory sleet
#

well if its not comrade and not normal

#

then its prob new?

proud badge
#

hmm

ivory sleet
#

and it cant be null

#

since u never set it to be

tender shard
#

UUUGH I've been spending like 10 minutes on finding out why relative coordinates aren't working ...

remote swallow
#

kek

ivory sleet
#

oof

#

alex

#

join general

#

show us code

proud badge
#

ah I see now

tardy delta
#

oh alex is there a point in binding it to a var? dont think the compiler would handle that differently?

tender shard
ivory sleet
tardy delta
#

two people live again, interesting

ivory sleet
#

it would be 3 if my code wasnt so bad

echo basalt
#

same

tardy delta
#

im doing some opengl but i dont want to stream lol

ivory sleet
#

oo

#

yea thats fair

tardy delta
#

just had to figure out for 2 hours why nothing was being drawn, turned out i needed an f32 instead of a vec3

#

anyways

tender shard
#

why do you guys only look at the dirty class loading tricks haha

ivory sleet
#

well someone posted it

tender shard
#

lets see if it survives ktlint

quaint mantle
tardy delta
#

voila

quaint mantle
#

Ive compiled my plugin hundreds of times with the set up i have now, never seen this before

#

This shouldn't be happening

remote swallow
#

sonatype is prob down

quaint mantle
tall dragon
#

yea repo is prolly just down

quaint mantle
#

This happens often?

tall dragon
#

compile with -o flag i guess

#

to use prev downloaded vers

quaint mantle
tall dragon
#

oh are u using maven?

remote swallow
quaint mantle
tall dragon
#

then i dont know :d

#

but im sure a google search will reveal how to compile offline using gradle

quaint mantle
#

Just needed to Toggle offline mode, fixed temporaily until sonatype turns back on

tall dragon
#

indeed

#

@tender shard is spigot basics just like essentials but modular?

#

looks kinda cool

young knoll
#

That's the idea

tall dragon
#

so the idea is that i can pick and choose what i want i guess?

#

without too much bloat im never going to use

young knoll
#

mhm

tender shard
#

like /basics downloadmodule spawn or sth

#

although it includes all the "essential" modules by default, but each one can be disabled / enabled

tall dragon
#

thats actually rlly cool.

tender shard
#

feel free to PR some modules :3

tall dragon
#

i just might if i find myself without anything to do.

eternal night
#

there has never been a single exploit from module downloads πŸ™ tho I guess you can lock it down enough to not care about third party downloads

tardy delta
tender shard
#

thx

molten hearth
#

are cursor items bound to inventories?

#

im guessing they are but that seems so annoying T-T

tender shard
#

how could one call the "entity to teleport"? teleportee? sounds weird

lost matrix
#

The cursor should be owned by a player object, not an inventory

molten hearth
#

thank u

lost matrix
worldly ingot
tender shard
worldly ingot
#

targetEntity, teleported, teleportee, etc.

molten hearth
#

because atm I set the player's cursor item after they interact with a shop menu and it doesnt display until they exit out of the inventory and open their own lol

worldly ingot
#

It's contextual :p

lost matrix
#

Oh you mean the teleportee

#

Well call him bob

tender shard
worldly ingot
#

Then yeah, target is fine

#

iirc that's what vanilla uses

lost matrix
#

I mean target sounds like the destination to me as well

tender shard
#

yeah πŸ₯²

worldly ingot
#

As an English speaker, I assure you, it doesn't get conflated with "coords" lol

tender shard
#

german issue

worldly ingot
#

vanilla uses "<targets>"

ivory sleet
sullen canyon
worldly ingot
#

and "<destination>" for the coordinates

lost matrix
lost matrix
quaint mantle
#

@sullen canyon run the server in Java 8

#

Oh

#

wait why is 11 needed

#

For that

molten hearth
#

good shit right here

quaint mantle
#

Alr lmk if it works tho @sullen canyon

sullen canyon
#

it worked

#

thanks

quaint mantle
#

I didn't rly do much but np

#

I just started reading about sql and I'm just wondering how does authentication even work

#

like I can understand it with an http protocol cause you can have headers

#

but how does that work for tcp

shadow night
molten hearth
hazy parrot
icy beacon
tender shard
tardy delta
#

smh i did that once by accident in survival

tender shard
#

lmao I found back my baboon

young knoll
#

Okay do /locate and then click the command it gives you

quaint mantle
#

Hi guys, I'm trying to customize the server tablist but the pl is not getting a classdef. The issue is that i'm not using that class. im using PacketPlayOutPlayerListHeaderFooter

young knoll
#

If it doesn't work, banned

young knoll
#

/locate gives you a clickable tp command to go to said thing

tender shard
young knoll
#

ah

#

well

shadow night
#

/locate biome forest

young knoll
#

/locate structure minecraft:plains_village

tender shard
quaint mantle
tender shard
#

πŸ₯²

quaint mantle
tender shard
#

you have to use 1.8.8-R0.1-SNAPSHOT

delicate plover
#

So I'm running into an issue. i am trying to compile a source code from github for PandeLootPlus to make it work on 1.20.x since they abandoned the project in 1.19...

I'm running into a few issues though, I used buildtools to compile all the versions required in the script and i'm trying to BUILD it in IntelliJ, but i keep running into these issues...

I checked the .m2 files and see this - https://i.imgur.com/fC17n8T.png

But i ran buildtools like this - https://i.imgur.com/dIC219r.png

Here is the errors i'm getting - https://i.imgur.com/NcD7kFS.png

tender shard
#

it works but showing the coordinates is broken

delicate plover
#

Sorry for so many images lol. Just trying to get all the detail in I can xD

quaint mantle
young knoll
#

Essentials also breaks that

tender shard
#

the basics /tp is pretty unbreakable. it can take selectors as "to teleport" and as "teleport destination" or take coordinates as destination

hasty prawn
tender shard
delicate plover
#

I'm losing my shit on this stupid intellij crap XD

rough ibex
#

early return lol

tender shard
#

are you literally only checking type by regex?

quaint mantle
rough ibex
tender shard
#

what about @e[gamemode=spectator,dx=20,name=Jesus]

#

it was an example

delicate plover
quaint mantle
tender shard
tender shard
#

you even showed us that you're not using 1.8.8

#

1.8 is not 1.8.8

quaint mantle
tender shard
#

change the dependency to 1.8.8, and the nyou have to change the imports in your code from 1_8_R1 to 1_8_R3

delicate plover
# rough ibex what is your POM
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.seyarada</groupId>
  <artifactId>pandeloot-parent</artifactId>
  <packaging>pom</packaging>
  <version>parent</version>
  <name>PandeLoot Parent</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>16</maven.compiler.source>
    <maven.compiler.target>16</maven.compiler.target>
  </properties>

  <modules>
    <module>API</module>
    <module>v1_17</module>
    <module>v1_18</module>
    <module>v1_18_2</module>
    <module>v1_19</module>
    <module>v1_19_2</module>
    <module>v1_19_3</module>
    <module>v1_20</module>
    <module>v1_20_2</module>
    <module>v1_20_3</module>
    <module>Plugin</module>
  </modules>

  <repositories>
    <repository>
      <id>spigot-repo</id>
      <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
    <repository>
      <id>central</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
    <repository>
      <id>papermc</id>
      <url>https://repo.papermc.io/repository/maven-public/</url>
    </repository>
  </repositories>

</project>
#

and each version has it's on pom ofcourse.

#

Here is 1.17's

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>pandeloot-v1_17</artifactId>
  <packaging>jar</packaging>
  <name>PandeLoot v1_17</name>
  <version>v1_17</version>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>16</maven.compiler.source>
    <maven.compiler.target>16</maven.compiler.target>
  </properties>

  <parent>
    <groupId>net.seyarada</groupId>
    <artifactId>pandeloot-parent</artifactId>
    <version>parent</version>
  </parent>

  <dependencies>
    <!-- Spigot API -->
    <dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot-api</artifactId>
      <version>1.17.1-R0.1-SNAPSHOT</version>
      <classifier>shaded</classifier>
      <scope>provided</scope>
    </dependency>

    <!-- Spigot NMS version -->
    <dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot</artifactId>
      <version>1.17.1-R0.1-SNAPSHOT</version>
      <classifier>remapped-mojang</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>net.seyarada</groupId>
      <artifactId>pandeloot-api</artifactId>
      <version>API</version>
      <type>jar</type>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>net.md-5</groupId>
        <artifactId>specialsource-maven-plugin</artifactId>
        <version>1.2.2</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>remap</goal>
            </goals>
            <id>remap-obf</id>
            <configuration>
              <srgIn>org.spigotmc:minecraft-server:1.17.1-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
              <reverse>true</reverse>
              <remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
              <remappedArtifactAttached>true</remappedArtifactAttached>
              <remappedClassifierName>remapped-obf</remappedClassifierName>
            </configuration>
          </execution>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>remap</goal>
            </goals>
            <id>remap-spigot</id>
            <configuration>
              <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
              <srgIn>org.spigotmc:minecraft-server:1.17.1-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
              <remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
#

do I need to change my buildtools build flags? like generate source jars or something?

#

Other than that, I have not a clue...

tender shard
delicate plover
#

yes

#

it's got a few versions

tender shard
#

run mvn clean install -X and then upload the output somewhere

#

?paste

undone axleBOT
foggy cave
#
File file = new File("regions.yml");
        YamlConfiguration yamlConfig = YamlConfiguration.loadConfiguration(file);

        if (yamlConfig.getConfigurationSection("trashman") == null)
            yamlConfig.createSection("trashman");

        yamlConfig.set("trashman." + region.getId(), true);

        try {
            yamlConfig.save(file);
        } catch (IOException e) {
            e.printStackTrace();
        }

why is nothing happening, the trashman section doesnt even get created

#

like the file is there but this code doesn't do anything

low marlin
#

is there a way of changing a mob's AI in 1.20.1?

#

like if I want a custom pig to attack a player

mental moon
#

Anyone know why Barrel.close() isn't working in this case when the same sequence using Barrel.open() works just fine?
The Chest.close() works.
Thanks.

young knoll
#

Yiu have to use NMS

#

Spigot doesn't have an AI API

low marlin
mental moon
tender shard
tender shard
mental moon
foggy cave
tender shard
foggy cave
#

yep

young knoll
low marlin
#

Thanks

foggy cave
#

does anyone know how to get a worldguard ProtectedRegion from its ID?

#

can u tell me how

tender shard
#

why is my age a byte

late sonnet
mental moon
tender shard
#

I'm 28 bro

#

29 next week

#

would be easier to store my date of birth

shadow night
#

we aren't in 1993 old man and you aren't making a game for a game console that doesn't even have video memory

young knoll
#

What if I exceed 255

#

Don't want my age to overflow smh

shadow night
#

lmao

#

you gonna reset

#

hard reset that man

tender shard
#

updated ?nms to also include sth for gradle and a link to the ?switchmappings and multi-module maven tutorial:

https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is written for 1.20.4. If you use another version, you of course have to replace every occurance of β€œ1.20.4” with the version you actually use. What are...

torn shuttle
foggy cave
#

What about x y and z

tender shard
#

are you sure you're looking at the correct file?

#

postman != trashman

foggy cave
#

bro... lmao

wet breach
tender shard
#

πŸ₯²

minor junco
#

Why do you use String.valueOf in a string concatenation

minor junco
#

πŸ’€

wet breach
#

other then readability it doesn't hurt anything

#

that whole method gets turned into String.valueOf() anyways

worldly ingot
#

Yes it does. It's repeated 4 times :((

minor junco
#

I mean it is implicitly done already

rough ibex
#
"postman.${region.id}.x${player.location.blockX}"``` 😎
minor junco
#

When you have with a string and add onto it, you don't need String.valueOf

minor junco
rough ibex
#

that's kotlin

#

but thank you

minor junco
#

yes

#

But we're in Java land

worldly ingot
#

😎

wet breach
tardy delta
#

looks a bit cursed at first sight

foggy cave
#

works now thanks guys

#

gonna continue khoding now

wet breach
#

never know who is who these days

tender shard
#

wtf copilot

foggy cave
wet breach
#

there actually is plenty

echo basalt
#

Never question it

#

Just accept the fact

rough ibex
#

thanks @a

wet breach
#

We have @ancient plank

slender elbow
#

hostage?

young knoll
#

Maybe

tender shard
#

it's currently called TripleContextCoordinate but that is weird

peak depot
#

RelativeLocation?

tender shard
#

but it's not relative, it can be relative, and it can be relative to two locations (on each "axis")

peak depot
#

DynamicPosition

shell obsidian
#

Please help me, I'm relatively new to java coding

tender shard
peak depot
shell obsidian
#

well yeah

#

but i've tested everything

#

it should be working

#

it was working yesterday

peak depot
#

try logging the players name

shell obsidian
#

didnt change anything

peak depot
#

did you reconnect since too that server

shell obsidian
#

yeah

peak depot
shell obsidian
#

every time i change the code i restart the server

peak depot
shell obsidian
#

i'm doing that now

cursive verge
#

We're starting a minigame project and we need a manager.
The manager will be responsible for the staff and keep an eye on the moderators, and if there is a need for help in solving the issue, the manager will have to be able to help in solving the issue or problem.
If we talk about payment, then I say at once that for the time being our finances are small and we will invest only in the project, but if the manager will do a great job with his duties will receive a share of money from the profit. πŸ™‚

peak depot
rough ibex
#

?services

undone axleBOT
peak depot
shell obsidian
#

same error

#

alr

#

i already know the way i add the player is rlly bad

cursive verge
shell obsidian
peak depot
#

try looping through all contents from the map and see if theres acuall values in there

shell obsidian
#

okay

#

wait

#

if i use forEach wouldnt it produce the same error

#

?

peak depot
#

yes try printing the size of the map and then try printing just the player var and the int

minor junco
peak depot
inner mulch
#

can i get a new instance of an object without new or reflection? Or is there a secure way when using reflection that ensure correct parameters?

shell obsidian
#

how would i print the player variable?

peak depot
shell obsidian
#

oh okay

inner mulch
#

System.out.println(player)

minor junco
tender shard
inner mulch
minor junco
inner mulch
minor junco
#

do this:

peak depot
minor junco
#
gameManager.playerList.filter(Objects::nonNull).forEach((x, i) -> /* ... */)

if you simply want to fix your nullptr without finding the root cause for when you add null values.

Check your code for whenever you modify the list playerList and print out the values before putting them into that list.
For example if you have a method that does:

gameManager.playerList.add(player);

do

/* + */ System.out.println(player);
/*   */ gameManager.playerList.add(player);

this instead.

#

@shell obsidian

tender shard
quaint mantle
#

How can I like reset a map? I mean like in skywars when a new game starts

minor junco
#

.clear()

#

or do you mean a game map?

shell obsidian
#

like that?

quaint mantle
minor junco
#

as in do you mean a section of a world, so you reset the blocks, or do you mean a Map of values

peak depot
minor junco
shell obsidian
minor junco
#

print out when you add to the list

shell obsidian
#

its not

#

but it says it is

#

so im confused

minor junco
#

at some point you'll add a player to your list, no?

#

otherwise the list would be empty

shell obsidian
umbral ridge
#

hey

#

where can i get all the fish names

minor junco
inner mulch
shell obsidian
#

oh

minor junco
#

can we make a separate thread for your issue?

shell obsidian
shell obsidian
minor junco
#

well go to the definition of .registerPlayers() lol

#

I am no magician I can't see the definition with no source

shell obsidian
#

i have already

minor junco
#

alright, is there any other place where you add to this list?

shell obsidian
#

nope

minor junco
#

then any of the named player instances must be null, which shouldn't be possible

brazen badge
#

Hi, I have already asked for help on the mythic mobs forum (without receiving a reply) and also on the spigot forum. Could someone who knows mythic mobs help me out. I have been on this problem for 4 days now and need to move on. Here is the problem:

I have a serious problem, which is wasting a lot of my time. I'm creating a plugin based on mythic mobs. Practically when I click on a block (there is a whole persistent data system) if there is no player present in the region the mob inside, if there is one, is despawned. Controlling the boss is not done in the region, but is done by controlling all the mobs present with that id. Using a mob everything goes perfectly (I have done some debugging in the console), however, using another mob nothing goes, i.e. the mob spawns, but the old one is not despawned. YES the region id is found perfectly, the same for the mob id. Here is the code: https://pastebin.com/24Wq1wKw

minor junco
shell obsidian
#

doing that rn

#

Weird error

umbral ridge
tender shard
#

is it x y z pitch yaw, or x y z yaw pitch?

peak depot
tender shard
#

oh yeah I'm stupid, could have checked location class lol

#

thx though lol

umbral ridge
#

yea

#

lol

minor junco
brazen badge
#

Error that is not an error

quaint mantle
#

Is there any way to load maps from an specific directory?

#

Im trying but is creating a new world instead of using the ones I want

#

Let me send the code

rough ibex
#

yes because it's always going to

quaint mantle
lost matrix
#

Template worlds can be achieved by simply packing the worlds into zip or rar files and then unpacking them when needed.

quaint mantle
#

Okey, and for like when finish a game and restart the map (set it with no new block and that stuff) It's done with chucks management?
Or maybe I can like delete the world and load it again?

zinc moat
#

Can someone help me, i get this error when trying to register an class that my event is in

rough ibex
#

you must implement Listener

zinc moat
#

ohh

#

its fixed

#

Thanks

lost matrix
delicate plover
lost matrix
delicate plover
#

That would fix all of that? Gameprofile, brigadier, etc etc since it's all mojang?

lost matrix
#

Then some unexperienced plugin developer held hard references to them

lost matrix
quaint mantle
delicate plover
#

How would I go about finding the "new" authlib project(s) if that' the case? I have all of this in my pom already based on the pre-existing project. From my understanding it should be working as is but I'm not 100% as i'm still new to IntelliJ and this whole project compiling system.

lost matrix
ancient plank
#

im retired

young knoll
#

Can you not load words from an arbitrary file?

sullen marlin
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

quaint mantle
lost matrix
young knoll
#

wut?

sullen marlin
#

same thing

lost matrix
delicate plover
#

Same thing? Meaning specifically 1.18 snapshot you pointed out had all that included in it, therefore the NMS should be able to use that for the libraries and such that it states are missing? As far as authlib and brigadier are concerned?

#

That's in the full script ofcourse but it's specifically 1.17 - 1.20.4

#

Well, that's all a part of this as it's a loot drop system (Pandeloot) Just trying to compile an updated version of it for 1.20.4 since they abandoned the project in 1.19 lol.

undone axleBOT
lost matrix
delicate plover
#

No idea how that even works to be honest with you. I'm a true rookie in intellij lol. I only did this JUST to update this single script.

lost matrix
#

Yes

wet breach
delicate plover
#

Meh, I give up on it, i'm getting so confused and lost, i'm just gonna find a different script lol. we bought this awhile ago, but they open sourced it when they abandoned it.

umbral ridge
#

hey

#

how do you send an actionbar message?

sullen marlin
#

I feel like Google could answer this

delicate plover
#

Someone wanna just build this stupid project for me? I'll even pay at this point lmao

umbral ridge
young knoll
#

player.spigot().sendMessage

umbral ridge
#

md_5!!

glass tangle
umbral ridge
young knoll
#

Idk why a direct sendActionBar(String) never existed

#

Β―_(ツ)_/Β―

glass tangle
#

np

umbral ridge
#

im making a fishing competition plugin

delicate plover
# echo basalt wsup

So I'm apparently an idiot with Intellij, I'm just trying to build a proper project for a pre-existing open source code to update it to 1.20.4 (they merged someones pull request for updating it) but they abandoned the project so it has ZERO updates since 1.19. Every time I think i'm close enough to build it and whatnot, 1 thing after the next fails. The guys here are trying to explain it to me, but i'm a damn moron with all of this stuff lol.

umbral ridge
#

like &6 &e

delicate plover
#

More than likely honestly. I'm not skilled with this currently though, Have no clue where to start or what i'm doing wrong.

echo basalt
#

Alright let's go over this in a thread

glass tangle
echo basalt
#

I don't expect anything in return, other than to solve your issue

delicate plover
#

Thread, VC or DM? I can do any of the above.

echo basalt
#

Up to you

delicate plover
#

I can do any of the above haha.

umbral ridge
young knoll
#

Check the depreciation message?

glass tangle
#

the deprecated message may say what to replace it with

young knoll
#

I don’t recall us depreciating it but maybe

#

?jd

undone axleBOT
umbral ridge
echo basalt
#

Ask google to roll a number or sumn

delicate plover
#

Gen 2 VC?

young knoll
#

Idk why you don’t have the deprecation message

#

But it’s fromLegacy now

umbral ridge
#

ahh

#

i can see it here yea

#

so fromLegacy accepts colors or no? the one with 1 parameter

young knoll
#

Deprecated. fromLegacy(String, ChatColor) is preferred as it will consolidate all components into a single BaseComponent with extra contents as opposed to an array of components which is non-standard and may result in unexpected behavior.

#

Yes

umbral ridge
#

ok perfect

young knoll
#

It accepts Β§ based colors

umbral ridge
#

yeah thats alright

zinc moat
#

i need some help, so when i run my server it gives me an error saying the plugin is already initizlized and it came because that i did extends JavaPlugin in my class with my command but when i try changing it to implements commandsender @Override is erroring

young knoll
#

Well we can’t see the actual errors so..

#

Please send them

zinc moat
lost matrix
# zinc moat

Im suspecting your onCommand method to have the wrong parameters

zinc moat
#

these are my params

lost matrix
#

Wait, why are you implementing CommandSender?

#

You should implement CommandExecutor

zinc moat
#

...

#

im stupid

#

mb

#

my brain likes to shut off sometimes πŸ™‚

young knoll
#

Oh yeah I didn’t notice that

#

:p

quaint mantle
#

@lost matrix thanks for the advice. Zip worlds and unzip it goes well. Now i need to figure aout to delete/create when starting/ending game!

quaint mantle
#

with a string,

"somestring".replaceAll("someregex", "???")```how would i get the string the regex returns
lost matrix
quaint mantle
#

how would i put it in the ???

#

like the replacement part hto

lost matrix
young knoll
#

You want to replace the regex with… itself?

quaint mantle
#

oh

lost matrix
#
String replaced = oldString.replaceAll("regex pattern", "bird or whatever");
quaint mantle
#

wait waht

#

i want it to return the regex pattern

#

replace all the things the regex matches with, with the regex

lost matrix
#

Ah i see what you are trying to do. You want a matcher for that.

quaint mantle
#

o

lost matrix
quaint mantle
#

what is a foo

#

bvn

#

bvn

#

nvm

lost matrix
#

"foo" and "baz" are common phrases for placeholders or nonsense in programming

copper coyote
#

hey so im using kotlin with reflect in my plugin and declared the reflect as a library in my plugin.yml

i get this
[10:20:50 INFO]: [SpigotLibraryLoader] [PT] Loaded library Q:\bukkit\libraries\org\jetbrains\kotlin\kotlin-reflect\1.9.20\kotlin-reflect-1.9.20.jar

but still get the error
Caused by: java.lang.ExceptionInInitializerError: Exception kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath [in thread "Server thread"]

lost matrix
copper coyote
#

the package exists within my .jar (when viewed from recaf/jdgui)

lost matrix
#

Show your build file

copper coyote
#
GitHub

Minecraft plugin package manager supporting all major marketplaces. - flytegg/plugin-portal

GitHub

Minecraft plugin package manager supporting all major marketplaces. - flytegg/plugin-portal

lost matrix
copper coyote
#

yup

#

it was testing between both

#

neither worked

#

and both combined didnt work

lost matrix
#

Try adding it to your top level gradle file. Just the classpath dependency scope.

#
dependencies {
    classpath(kotlin("reflect"))
}

In the top level

wraith dragon
#

?paste

undone axleBOT
surreal hornet
#

can i just extend armorstand and make a new a entity base of armor stand ? or i need nms for that to work ? how can i make a custom armor stand, whats the best approach (Ping me please)

young knoll
#

You need NMS

#

Although the first question would be what do you want to do

surreal hornet
#

as i said i wanna make a new type of armorstand

#

i was thinking of just making my own class and use that armor stand as a property and control that armor stand but if u do that i cant override death event or easily execute something on mob death

#

i can just Listen for mob death event but that way i have to check for each instance of custom armor stand that i made to check that death event is related to which one of them

young knoll
#

Just slap a pdc tag on it

surreal hornet
#

and then put armor stand instance on a hashmap ?

#

yeh that work i guess

young knoll
#

Don’t need to, just check for the pdc tag on death

surreal hornet
#

but isnt overrding the actual death event more performance efficent ?

young knoll
#

Not really

#

It’s a micro optimization at that point

surreal hornet
#

you are telling me to put that custom object as a pdc tag on mob itself ?

rough ibex
#

and have fun with it

young knoll
#

If you need to attach a complex object to it then yeah you probably want a map

#

If you just want to identify it then a pdc tag is enough

surreal hornet
#

The map is perfect, but my only concern is its performance. Is it going to be alright if it has to go through a giant map to find the object for every small event?

#

for example something like damage event is going to happen alot

#

or move event or ...

#

and lets say we have 200 of that thing on server isnt that going to be problematic ?

slender elbow
#

if you're using a HashMap it's going to be basically O(1) lookup time

#

and even if it had to check individually by looping 200 isn't that much

young knoll
#

We love maps

slender elbow
#

a performance problem is probably around hundreds of thousands

#

if you're gonna do linear time lookup

young knoll
#

I think I remember in the past having like a massive map I used to track custom blocks

slender elbow
#

and the death event thing would be a performance problem if you're killing hundreds of entities a tick πŸ˜›

young knoll
#

Still didn’t have issues

slender elbow
#

basically: don't overthink performance unless you are running into issues

young knoll
#

Something something premature optimization

quaint mantle
#

guys

#

Config updates are a thing, where configs can store the version, but how would that work for something like sql

young knoll
#

You can still store a version

#

Either in a separate file or a table

quaint mantle
#

oh I see

#

I could just store it in a database config file

#

I see what u mean

wet breach
quaint mantle
#

why

#

just have it in like the config.yml or smthing

#

database_version:

wet breach
#

Because mysql supports schemas and its a simple query to check

#

So why introduce redundancy?

quaint mantle
#

What's a schema

wet breach
#

The skeleton structure of the db

quaint mantle
#

what if I have a database five versions behind

wet breach
#

Its still different, not sure why it matters how many versions just that you are able to identify what is missing or needs to be added. This can be done with a simple sql file that contains what the db structure should be.

#

Same sql file can be used to then update the db with the missing stuff or remove stuff no longer needed

#

This is what makes dbs an advantage over flat file where with flat file you may need to use version values because its faster then parsing the entire file to detect changes.

quaint mantle
#

No

mortal hare
#

holy shit, i wrote maximum unique prime factorization in the range from [L, R] searching algorithm that outperforms everything that i've seen on the internet
it can find biggest number with the biggest amount of unique prime factors in the range from 1 to 10^7 in a matter of ms

#

so proud of myself

quaint mantle
#

Ur not Albert Einstein

mortal hare
#

ik

#

but at least i can feel for a second like him

wet breach
quaint mantle
#

if I were to update from Version 1 to Version 3

mortal hare
quaint mantle
#

The updater would assume that the column name is "All Kills"

#

but it's really just "Kills"

young knoll
#

Then check for both

river oracle
#

that's the solution you are looking for

mortal hare
#

so i guess that's understandable

young knoll
#

I mean, you can still have a column named kills

mortal hare
young knoll
#

It doesn’t have to be clear what it’s for as long as you know (and document it)

quaint mantle
#

yeah that's what I was planning on doing by storing the version in a config

#

Wait

#

that wouldn't even work

mortal hare
#

why

#

well if the data is not compatible it could not work

quaint mantle
#

wait no it would

#

idk what I'm saying

mortal hare
#

not everything could be migrated from configs (for example if feature was removed)

wet breach
# quaint mantle The updater would assume that the column name is "All Kills"

Obviously the structure would be different. Using the updated schema provided you can easily see that the db structure changed. The only thing you need to decide on is how you want to update. My point i was making is having a column for version is unnecessary of its purpose is to tell you that one db is different from another.

quaint mantle
#

No I'm saying like

#

In another file

#

like let's say

wet breach
#

And it doesnt really matter by how many versions because db schemas dont care about it as it isnt necessary to update a db incrementally

quaint mantle
#

sql_database.yml

#

Users can store creds there

#

and then the db version

mortal hare
#

for migration scripts you can use something like liquibase

#

it like git

#

but for databases

#

you do commits

#

then you can rollback

#

but ofc if you're doing public plugin that wouldnt work

#

since nobody would want to use external tool

#

to migrate db

wet breach
#

I suggest learning more about mysql and sql to better understand how to utilize schemas in the way i am talking about

wet breach
#
class Test
{

    static final int MAXN = 100001;

      

    // stores smallest prime factor for every number

    static int spf[] = new int[MAXN];

      

    // Calculating SPF (Smallest Prime Factor) for every

    // number till MAXN.

    // Time Complexity : O(nloglogn)

    static void sieve()

    {

        spf[1] = 1;

        for (int i=2; i<MAXN; i++)

      

            // marking smallest prime factor for every

            // number to be itself.

            spf[i] = i;

      

        // separately marking spf for every even

        // number as 2

        for (int i=4; i<MAXN; i+=2)

            spf[i] = 2;

      

        for (int i=3; i*i<MAXN; i++)

        {

            // checking if i is prime

            if (spf[i] == i)

            {

                // marking SPF for all numbers divisible by i

                for (int j=i*i; j<MAXN; j+=i)

      

                    // marking spf[j] if it is not 

                    // previously marked

                    if (spf[j]==j)

                        spf[j] = i;

            }

        }

    }

      

    // A O(log n) function returning primefactorization

    // by dividing by smallest prime factor at every step

    static Vector<Integer> getFactorization(int x)

    {

        Vector<Integer> ret = new Vector<>();

        while (x != 1)

        {

            ret.add(spf[x]);

            x = x / spf[x];

        }

        return ret;

    }

      

    // Driver method

    public static void main(String args[])

    {

        // precalculating Smallest Prime Factor

        sieve();

        int x = 12246;

        System.out.print("prime factorization for " + x + " : ");

      

        // calling getFactorization function

        Vector <Integer> p = getFactorization(x);

      

        for (int i=0; i<p.size(); i++)

            System.out.print(p.get(i) + " ");

        System.out.println();

    }
}
#

This is SPF in O(log n) in worse case scenario

#

Abd with that back to work for me

serene garden
#

Can anybody tell why my configs.yml's content replaces whenever I set location in the file?

 public void set(Player sender) {
        Location playerLocation = sender.getLocation();

        plugin.getConfig().set("location", playerLocation);
        plugin.saveConfig();
}
quaint mantle
#

is there anyone to help me with ProtocolLib?

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!

quaint mantle
#

oh okay i'm sorry

so i'm trying to send a custom payload to the client with ProtocolLib.

public static void send(Player player, String key, JsonElement messageContent) {
        byte[] bytes = getBytesToSend(key, messageContent.toString());

        PacketContainer container = new PacketContainer(PacketType.Play.Client.CUSTOM_PAYLOAD);
        ByteBuf buffer = Unpooled.copiedBuffer(bytes);
        Object wrappedSerializableBuffer = MinecraftReflection.getPacketDataSerializer(buffer);
        container.getModifier().withType(ByteBuf.class).write(0, wrappedSerializableBuffer);
        ProtocolLibrary.getProtocolManager().sendServerPacket(player, container);
}

public static byte[] getBytesToSend(String messageKey, String messageContents) {
        ByteBuf byteBuf = Unpooled.buffer();
        writeString(byteBuf, messageKey);
        writeString(byteBuf, messageContents);
        byte[] bytes = new byte[byteBuf.readableBytes()];
        byteBuf.readBytes(bytes);
        byteBuf.release();
        return bytes;
    }
quaint mantle
# quaint mantle oh okay i'm sorry so i'm trying to send a custom payload to the client with Pro...

but i'm getting allways following error when i try to send the packet:

com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
        at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:315) ~[ProtocolLib.jar:?]
        at eu.filtastisch.coretest.utils.ProtocolManager.send(ProtocolManager.java:34) ~[CoreTest.jar:?]
        at eu.filtastisch.coretest.listener.JoinListener.onJoin(JoinListener.java:15) ~[CoreTest.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:git-Paper-426]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.4.jar:git-Paper-426]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.4.jar:git-Paper-426]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:344) ~[paper-1.20.4.jar:git-Paper-426]
short plover
#

Why does the swingMainHand function sometimes work and sometimes doesn't work?

torn shuttle
#

protocollib hasn't updated for 1.20 or is the compatibility just not fully assured

quaint mantle
#

i know, thats what i'm using

#

JoinListener:15 : ProtocolManager.send(e.getPlayer(), "banner", object);
ProtocolManager:34 : container.getModifier().withType(ByteBuf.class).write(0, wrappedSerializableBuffer);

torn shuttle
#

does anyone happen to know which movement packet would give clients the least amount of interpolated movement?

#

I have this issue where clients try to smooth movements of teleports too much when just using the api

#

wdym?

quaint mantle
#

nah its not the array, the problem is inside the write() method from the StructureModifier.class

torn shuttle
#

you know what, I decided to randomly ask google gemini about packets to see how good it could be and I don't regret it one bit

#

10/10 answer, truly

#

I hope it didn't call the fbi on me on top of that

shadow night
#

Lol

mortal hare
marsh kindle
#

Guys when I try to get into my minecraft server it tells me this:
If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
Can you please help me??

thin wind
#

Hello, is it possible to make villagers target zombies ? i think their scare of zombies override the pathfinder, and the pathfinders are not removed when i try to. ``` this.goalSelector.removeAllGoals(goal -> true);
this.targetSelector.removeAllGoals(goal->true);

    ((CraftWorld) location.getWorld()).getHandle().addFreshEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);

    Goal goal = new Goal() {
        @Override
        public boolean canUse() {
            return level().getNearestEntity(Zombie.class, TargetingConditions.forCombat(), GameBossVillager.this, GameBossVillager.this.getX(), GameBossVillager.this.getY(), GameBossVillager.this.getZ(), GameBossVillager.this.getBoundingBox().inflate(16.0D)) != null;
        }

        @Override
        public void start() {
            LivingEntity zombie = level().getNearestEntity(Zombie.class, TargetingConditions.forCombat(), GameBossVillager.this, GameBossVillager.this.getX(), GameBossVillager.this.getY(), GameBossVillager.this.getZ(), GameBossVillager.this.getBoundingBox().inflate(16.0D));
            if (zombie != null) {
                setTarget(zombie, EntityTargetEvent.TargetReason.CUSTOM,true);
            }
        }
    };
    this.targetSelector.addGoal(0,goal);```
young knoll
#

Villagers use the new brain ai rather than goals

thin wind
#

oh ok thanks

copper coyote
dry hazel
#

show output of the dependencies task

dry hazel
#

I mean, you overwrite the config

undone axleBOT
umbral ridge
#

hey

#

how do you know when the hook falls in water?

#

is hook an entity you can track?

#

FISHING event state fires as soon as you right interact with the fishing rod, at the start when you throw the hook

#

I need to calculate depth at the hook position, need to check the y axis and find the first block from the hook y axis to bottom

eternal oxide
#

why? just check it's state

umbral ridge
#

yeah what state?

#

BITE is too late

#

and FISHING fires too soon

#

oh wait

#

HOOK STATE

#

NICE!

#

perfect

umbral ridge
umbral ridge
#

only BOBBING is fired when you catch a fish (when you reel in)

#

anything else never ever even shows up

#

wait 1sec

eternal oxide
#

what exactly are you trying to do? You can check the entities state at any time

umbral ridge
#

UNHOOKED also fires for a fishing hook as soon as you right interact with the fishing rod

#

BOBBING fires when your fish starts to bite

#

what about the time when your hook falls in the water?

#

isInWater() or something like that on a hook entity

eternal oxide
#

the event should fire with a state of FISHING

umbral ridge
#

yea FISHING fires even before the hook is in the water

#

so I need to detect when the hook falls in the water,
and then notify the player about the water depth, resources... blah blah. I did that part now what I have left is to detect the hook ...

#

so what I could do. start a scheduler as soon as FISHING is fired and check every 5ms or so if hook entity is in the water

#

?

eternal oxide
#

then listen for the fishing event to start, then run a task to monitor the hook for a few ticks.

#

it has methods for isInOpenWater()

#

once that is true or you get a fishing event that cancels the fishing, or the Hook dies.

#

stop your task

umbral ridge
#

ill try it

#

XD

#

man am i blind or is grass water

eternal oxide
#

lol, very wet grass πŸ™‚

umbral ridge
#

its true everywhere

#

in caves

eternal oxide
#

that seems broken if true

umbral ridge
#

yeah

eternal oxide
#

in that case just check the block teh entity is in

#

oh

#

does it stop firing once it lands on teh grass/stone?

#

that check would return true as teh hook is flying in the air

umbral ridge
#

no no it fires once at the beginning and once you reel in

#

I just spammed

eternal oxide
#

ok

umbral ridge
#

alright

#

xD

#

yeah it's pretty much broken

#

need to add delay

#

a task

eternal oxide
#

best you can do then is monitor teh block at teh hooks location

umbral ridge
#

unless if

#

getCaught() is never null and it secretly gives off the hook location

#

nope

umbral ridge
#

nice

late sonnet
umbral ridge
#

i feel like their queue is too long so i dont even wanna bother with it xD

chrome beacon
#

Make a PR then uwu

young knoll
#

Choco has an open PR for some fishing stuff

umbral ridge
#

you do it!

young knoll
#

Maybe he’s interested

eternal night
#

hey coll

young knoll
#

Hey Lynx

warm mica
eternal night
#

were you the hero that implemented EntityKnockback

young knoll
#

Yes

eternal night
#

okay thanks!

umbral ridge
#

chunks are loaded

young knoll
#

Uhoh

chrome beacon
#

You shouldn't access the world async

young knoll
#

Paper team gonna knock at my door any minute

eternal night
#

I am booking a flight rn

umbral ridge
#

alrightt

eternal night
#

for your fucking final knockback bs

umbral ridge
#

idk much about that stuff

young knoll
#

Does thou not enjoy final knockback

eternal night
#

the naming is wild

young knoll
#

Y’all had the chance to say something

eternal night
#

bruh I have 209 PRs

umbral ridge
#

time to make 210

dry hazel
#

nerd behavior

young knoll
#

Amateur numbers!

umbral ridge
#

is .isLiquid() lava too

#

?jd-s

undone axleBOT
umbral ridge
#

fuck

young knoll
#

Should be

#

I assume?

umbral ridge
#

yeah it is

remote swallow
clear panther
#

guys
how do i do a huge check for a specific "type" of armor
for example: checking all special set
if player wears any special sets
then trigger a ability

young knoll
#

Add pdc tags to it

#

and check for those

blazing ocean
#

whats the blog post about the plugin output (dont use the maven shade plugin)?

#

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

#

oh

tardy delta
#

am i tripping or were we able to use a switch on a boolean in the past?

ivory sleet
#

dont think so?

tardy delta
#

+1 for kotlin then

ivory sleet
#

i mean you just put it in an if statement otherwise

#

not much of a semantic change apart from that we dont have if expressions

tardy delta
#

annoying to do this in 7 lines

boolean potentialBase = false;
if (readNumber) {
     potentialBase = initialChar == '0';
} else if (currentOrDefault() == '0') {
     pos++; // skip over '0'
     potentialBase = true;
}```
ivory sleet
#

ah you mean if we were able to do sth like
switch {
case x > 7 -> {}
case y != null -> {}
}
?

tardy delta
#

i thought switch(readNumber) used to work but i mistook it for smth else

ivory sleet
#

mye

ivory sleet
#

yea

#

we gonna get the when keyword in j23 iirc

#

which supposedly achieves similar stuff to what kotlin offers

remote swallow
#

is j23 end of this year or start of next

ivory sleet
#

idk

young knoll
#

when conclure is smelly -> sysout("smelly");

ivory sleet
#

damn

#

ok coll :c

remote swallow
#

coll are you spigot pring or plugining

ivory sleet
#

doesnt he do both

#

he even skripts I heard someone say

remote swallow
#

well yeah

#

but which is he doing rn'

#

bc he has mc open

ivory sleet
#

developing his next gpu accelerated machine learning integrated skript

#

defo

remote swallow
#

if anyone manages to do that they need to get locked up

ivory sleet
#

lol yup

young knoll
#

Messing with worldgen atm

#

So plugining

remote swallow
#

smh

#

fix the logger issue

#

its only existed for 2 years

river oracle
#

@young knoll if you're going to mess with world gen mess with making it async

young knoll
#

I mean it kinda is

remote swallow
#

make it more

tardy delta
#

only 800 lines of parsing

remote swallow
#

is that ur math parser

tardy delta
#

kinda

umbral ridge
#

so when a player catches a fish, how do I know if they have actually picked it up?

#

do I add a PDC data to the fish?

#

and then do what.. check for that pdc in ItemPickupEvent ?

#

nvm that isnt an event

young knoll
#

It is

umbral ridge
#

PlayerPickupItemEvent

young knoll
#

mhm

umbral ridge
#

so is that a smart choice

#

or am i not seeing any better option

young knoll
#

Seems fine to me

river oracle
#

How can I make gradle publish run checkstyle? I've seen literally nothing on the web (My query is probably ass)

chrome beacon
#

My guess would be making the publish task depend on the checkstyle task

#

Assuming both are tasks

umbral ridge
#

hey where are all the fish enums

young knoll
#

I only see 12 on the wiki

umbral ridge
#

wait 1 second

young knoll
umbral ridge
#

perfect

river oracle
umbral ridge
river oracle
#

but checkstyle runs on build

#

so like ta fuq

young knoll
#

wdym

#

You can get the pattern of a fish

slender elbow
umbral ridge
river oracle
young knoll
#

TropicalFish#getPattern

umbral ridge
#

ohh ty

slender elbow
#

I mean that publish is a task that exists when you add the maven-publish plugin

quaint mantle
#

im looking for a developer for my mc server and I only pay if you are good
ita: sto cercando un developer per il mio server mc pago solo se siete realmente bravi

slender elbow
#

?services

undone axleBOT
slender elbow
#

@quaint mantle ^

quaint mantle
#

?

slender elbow
river oracle
quaint mantle
#

oh sorry

quaint mantle
river oracle
#

go through the offering section

quaint mantle
#

oh ok

umbral ridge
river oracle
#

you can murder them with a sword

#

but no you can't catch any fish with a fishing rod in minecraft afaik

#

that isn't in the games current capabilities unless you are adding it yourself

young knoll
#

Well you can hook them like any entity

#

But fishing rods don't "catch" any entities, they just magically create an item

quaint mantle
#

How can I get a bed block with a location? I'm getting error when casting to Bed

young knoll
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

quaint mantle
umbral ridge
#

errors?

river oracle
#

πŸ₯² this looks like shit I wonder if there is a better way


tasks.publish {
    for (subproject in project.subprojects) {
        if (subproject.pluginManager.hasPlugin("pineapplecheckstyle")) {
            this.dependsOn(subproject.tasks.getByName("checkstyleMain"))
        }
    }
}```
quaint mantle
river oracle
#

CH_KekLaugh 1.8

umbral ridge
#

I would never go back to 1.8

#

anything before 1.12.2 for me is a no

#

XD

young knoll
#

Wrong bed import

#

You want org.bukkit.block.Bed iirc

quaint mantle
#

yeah but there is no import like that

river oracle
#

1.12.2 is like the stone age still

umbral ridge
#

I prefer the latest too

quaint mantle
umbral ridge
#

but there's people who still run old servers ...unfortunately

young knoll
#

What do you want to do with the bed anyway

#

It doesn't actually have any state

quaint mantle
#

Getting that bed

#

I'm doing a bedwars so i thougth it will like givr me if exist or no

umbral ridge
#

you could just check the block type at your location

young knoll
#

^

tender shard
umbral ridge
#

since bed is set up from 2 parts, you can play around with x and z values

tender shard
#

1.8 only has one Bed class and it's this

young knoll
#

Huh

#

Yeah it didn't have a state for it

#

Fair enough

umbral ridge
#

did it without packets at the end XD

#

did you post any new reviews

#

Nice

#

with what program do you do it

quaint mantle
#

Just got the block

#

done

umbral ridge
#

so since bed cant be placed and exist in just 1 block, its safe enough to just check 1 block where the bed could be

#

and thats pretty much it

quaint mantle
#

NO xd

dire marsh
#

seems fair enough to me

icy beacon
#

That is a VERY wide range

tender shard
#

?services

undone axleBOT
proud badge
#

How could I check if a mob/entity is loaded?

tender shard
#

Bukkit.getEntity(uuid) == null (or not)

proud badge
#

Or would this work?

tender shard
#

no, getChunk() would load the chunk

#

why do you even have a zombie object if it might be unloaded?

#

if you already have a maybe-stale reference, use isValid()

proud badge
#

No point in running the task if the mob is in an unloaded chunk

tender shard
#

either get it by uuid or check isValid

copper coyote
#

any idea why im getting this error:
Caused by: java.lang.ExceptionInInitializerError: Exception kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath [in thread "Server thread"]

but its getting loaded by spigot

[17:03:40] [Server thread/INFO]: [SpigotLibraryLoader] [PT] Loaded library P:\PT\bukkit\run\libraries\org\jetbrains\kotlin\kotlin-reflect\1.9.20\kotlin-reflect-1.9.20.jar

#

im shading it into my jar, as i can see by checking the jar under recaf or jd-gui

polar pulsar
young knoll
#

It's in ticks

#

The name is outdated

polar pulsar
#

oh thanks

slender elbow
#

it's noted in the javadoc :p

young knoll
#

Why didn't we deprecate and replace

#

smh

slender elbow
#

the entire statistics enum is fucked up

young knoll
#

Well it's an enum

#

Enough said

slender elbow
#

sure but it isn't updated at all

young knoll
#

It should be registry backed smh my head

hazy parrot
#

You have to add dependency

#

If you use reflection in kotlin

quaint mantle
young knoll
#

Set the fade in duration to 0

quaint mantle
#

thanks

hushed spindle
#

it seems i messed up somewhere early in my project where i initialized git in one of my modules, but now obviously the other modules aren't in my repo. any way i can change the git root directory to its parent director?

project
__core
____.git
____src
__module
____src
eternal night
#

but its gonna be quite a fun journey πŸ˜…

hushed spindle
#

uh oh

upper hazel
#

material.valueOf must work?

remote swallow
#

what does that even mean

river oracle
#

valueOf is primitive

#

and will throw an error if it fails to find an enum entry

young knoll
#

There's also Registry.Material.match

upper hazel
#

it’s just that the plugin cannot get the material through the string using valueOf, thinking that these materials do not exist

#

but with match this work

river oracle
#

:P

young knoll
#

I mean no

#

Material isn't going away remember

slender elbow
#

god I wish

worldly ingot
#

Registry#MATERIAL is no more on the chopping block than Material#matchMaterial() is PES_BlushGiggle

wet breach
#

why do people hate the material thing? πŸ€”

worldly ingot
#

Conflates blocks and items

#

And I mean... y'know...

#

look at it pepecringe

wet breach
#

its never bothered me lol

worldly ingot
#

Half of that class is switch statements

#

If we want to pull per-item or per-block data, we have to do it through UnsafeValues

#

Or switch and test it

wet breach
#

weird you have to do it through unsafevalues

worldly ingot
#

I mean how else would we do it? :p It's a Bukkit type. We can't just pull data from the server

#

The only ways we can really do that is via Server, ItemFactory, or UnsafeValues

wet breach
#

not sure if it would be wise though lol

worldly ingot
#

Yeah. It just makes more sense for it to be an interface and be implemented by a CB like all other interfaces are

#

Directly wrapping an internal type

plush gulch
#

How do I move an entitity to a location smoothly over a defined amount of time? e.g. move one block every second

mighty gazelle
#

repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}

dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
annotationProcessor("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
compileOnly("org.bukkit:bukkit:1.20.1-R0.1-SNAPSHOT")
annotationProcessor("org.bukkit:bukkit:1.20.1-R0.1-SNAPSHOT")
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

Why it doesn't work?

wet breach
#

but that requires nms, without nms you just teleport I suppose

plush gulch
#

what's the best resource for that?

lost matrix
wet breach
#

couldn't tell you the best resource to help with that unfortunately

#

maybe someone else might know of some kind of lib etc

lost matrix
mighty gazelle
#

Whats the url of the Bukkit?

river oracle
mighty gazelle
#

maven

river oracle
#

I don't think there is one

river oracle
shadow night
#

But if it was real, how would it work

lost matrix
shadow night
#

I hate when my wifi dies for a microsecond

lost matrix
slender elbow
#

ServiceLoaded Listener πŸ’ͺπŸ’―

torn shuttle
#

this is unfortunate, I got chatgpt to work pretty well with the assistant feature to do plugin support for my plugins but it's just expensive

quiet ice
torn shuttle
#

a maven cope and seether

quiet ice
#

conclure apparently

inner mulch
#

is it possible to set a player's head yaw?

lost matrix
inner mulch
#

okay thanks

proud badge
#

EnderCrystal does not extend Hanging, what would be the event for when a player places an end crystal ?

young knoll
#

I think it’s the EntityPlaceEvent

proud badge
#

Ok thanks

charred blaze
#

hey

#

somewhy location is null

#

im trying to load it from config

#

it think the world is the problem

remote swallow
#

do i have to type the command

charred blaze
#

its loaded with multiversecore

remote swallow
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

young knoll
#

Is it loaded before you try and read that

charred blaze
#

its failing both checks

#

arena id is 1