#help-development

1 messages · Page 630 of 1

rare rover
#

Yeah

tender shard
#

yeah it's great

#

@nimble oxide please send your whole main class, and your COmmandHelp class, then we can explain to you how to pass the databse object to the help command class

round finch
#

DK Danish?

#

🇩🇰

tender shard
#

idk we talked in DMs and I sent them back here

tacit juniper
#

Hey there, I'm new to java and mc plugins what should my spigot plugin be?

young knoll
#

?learnjava first

undone axleBOT
ivory sleet
tacit juniper
#

I've already learned java

ivory sleet
#

new to java

#

You sure?

tacit juniper
#

yes im sure

#

i just want suggestions for a simple spigot plugin to make

ivory sleet
#

ok

#

well

#

Join/leave message plugin

tacit juniper
#

ok thanks

slender elbow
worldly ingot
#

Fun fact: the first plugin I ever helped work on was called "Welcome/Welcome-Back". Wasn't even mine. Just offered to help someone else

#

It was really bad

slender elbow
#

i think my "first plugin" was a modification of one for the server i was on at that time, i don't remember what it did, i don't remember what i did, but i do remember that at one point it was throwing a NPE and so my butter brain immediately went "well i guess i'll stick @NotNull in here?" :kek:

worldly ingot
#

Well duh. @NotNull just dispells any and all null-related exceptions

hasty prawn
#

I'm pretty sure mine was copy-pasted almost straight from a Java book I had gotten that had a single chapter for making plugins. Pretty sure I spawned a pig.

magic gazelle
#

what is a "W-coordinate" ?

magic gazelle
#

how do 4 dimensions work with respect to noise generation?

sullen marlin
#

the 4th dimension is just an extra parameter

magic gazelle
#

but what it do

worldly ingot
#

Whatever you want. It's another degree of noise

#

The x, y, and z components of noise do absolutely nothing on their own either, you just happen to use them for x, y, and z block placement

#

(sort of mangling the definition of noise generation here but you get the idea lol)

livid dove
tacit juniper
#

i know

livid dove
#

"I've learned java".

I've been doing it years and only learned Points were a thing a 3 weeks back

tacit juniper
livid dove
#

What u enjoy in MC the most

worldly ingot
#

Points?

tacit juniper
worldly ingot
#

Like, from Swing? lol

livid dove
#

Good for quick and memory cheap checks

worldly ingot
#

Yeah, that's part of awt. It's more of a class for GUIs and I'd recommend avoiding it because it may not be available in all distributions

#

You could always make your own though

livid dove
river oracle
#

I have my own like point class thats decoupled from worlds

#

usually use it for mini games

livid dove
worldly ingot
#

Anyways, your point is that you're always learning. lol. You're right. I'm 8 years into Java and I'm still learning new things. Syntax-wise I think I know everything there is to know, but there are always libraries and features you've never used

livid dove
#

Dang nearly cried

#

Oh shit choco we discovered something neat last night

#

Mojang bodge job as much as we do.

Ghastly fire balls constantly reset their velocity and that's how they "ignore gravity" 🤣

worldly ingot
#

Right but they also aren't affected by air friction right? So it's probably just to keep a perpetual motion

#

Otherwise the delta movement gets reduced to 0 eventually

livid dove
#

Mhm

#

Just a neat quitk

#

Quirk

slender elbow
#

or receiver parameters too, those are fun
and by fun I mean meh

placid moss
#

are you sure thats java wtf

slender elbow
#

yes

placid moss
#

💀 ive never seen that before

slender elbow
#

The declaration of a method that returns an array is allowed to place some or all of the bracket pairs that denote the array type after the formal parameter list. This syntax is supported for compatibility with early versions of the Java programming language. It is very strongly recommended that this syntax is not used in new code.

#

lol

placid moss
#

lmao

slender elbow
#

some, so this is also valid int [] func() [] { ... }

#

2d array

placid moss
#

🤔

slender elbow
#

also the fact that constructors can have generic type parameters, that might not seem like anything new, but then you have stuff like this

class Whatever<T> {
  <U> Whatever() {}
}

new <String> Whatever<Integer>();
placid moss
#

where do you even find this stuff

slender elbow
#

or if the super ctor is generic <String> super(...)

class Whatever {
  Whatever() {
    <String> this(0);
  }
  <U> Whatever(int dummy) {}
}
#

idk I just know stuff

placid moss
#

lol

slender elbow
#

this is what hours of reading the language spec does to a mf

worldly ingot
#

Receiver parameters are interesting. I kind of wish they were more useful

spark lynx
#

what is the mechanism of a container's inventory that being synced to all players who have open the inventory gui
i want to apply it to my custom inventory to prevent dupe.

opal sluice
#

Hi, how do you guys remove the "==: serialization.class" from the yaml file while saving to it? (for example, Location doesn't print that anymore in the yaml file)

opal juniper
wet breach
pseudo hazel
#

the best thing you can do it give it an alias

#

like @SerializableAs("MyClass")

opal sluice
#

something like "==: alias"?

pseudo hazel
#

yes

desert tinsel
#

If I add fake players on my server with nms, can I use them for testing, like making them using a command, or triggering an event listener?

wraith dragon
lost matrix
mortal hare
wraith dragon
lost matrix
# desert tinsel can I find a premade one?

This is as premade as it gets

const mineflayer = require('mineflayer')

const bot = mineflayer.createBot({
  host: 'localhost', // minecraft server ip
  username: 'Bob', // minecraft username
  auth: 'offline'
})

bot.on('chat', (username, message) => {
  if (username === bot.username) return
  bot.chat(message)
})

// Log errors and kick reasons:
bot.on('kicked', console.log)
bot.on('error', console.log)

This is how you create a bot, let it join your server and repeat every message they see in chat.

#

I think there is a barritone module where you can let them run around and mine ores, fight mobs etc

desert tinsel
#

I just need for them to use commands

lost matrix
#

Well then this should suffice

desert tinsel
#

and maybe if I damage them, events needs to trigger

desert tinsel
lost matrix
#

What is your goal?

desert tinsel
#

to test minigames that needs 10 players

#

for my plugins

lost matrix
#

Spawning NPCs via a plugin might not be what you want. I would probably use mineflayer.

desert tinsel
#

I need fake players to join and use "/arenajoin", and then I would like to interact with them, idk if that the best method

lost matrix
#
const mineflayer = require('mineflayer')

const bot = mineflayer.createBot({
  host: 'localhost',
  username: 'Bob', // Generate a random name here
  auth: 'offline'
})

// Submit command 1s after joining
bot.once('spawn', () => {
  wait(1000)
  bot.chat("/minigame join")
})
desert tinsel
lost matrix
#

runs on nodejs sadly

opal juniper
#

could be worse, at least you get arrow functions rather than pythons monstrosities

lost matrix
#
lambda x: Some atrocity here

true

shadow night
#

As a certified nodejs developer, fuck nodejs, go with java

lost matrix
#

Some people be like "Yeah javascript is such a nice frontend language nobody likes. How about we use it in our backend as well."

quaint mantle
#

Hell nah js backend

desert tinsel
#

use java for backend

lost matrix
#

And then the project gets bigger, someone new joins and is unable to identify what anything does because dynamically typed

narrow flare
#

Except that the location added is not 0.5 but 0.4999999999999998. But I want the location to be equal to 0.5 and not 0.499... once the location is reached I stop advancing it. Here the location will never be reached as 0.5 is not added.
my code :

               allStands.forEach(armorStand ->  {
                    double z = center.getZ() - armorStand.getLocation().getZ();
                    double x = center.getX() - armorStand.getLocation().getX();

                    if(x > 0){
                        armorStand.teleport(armorStand.getLocation().add(0.05, 0, 0));
                    }else if(x < 0){
                        armorStand.teleport(armorStand.getLocation().subtract(0.05, 0, 0));
                    }else if(z > 0){
                        armorStand.teleport(armorStand.getLocation().add(0, 0, 0.05));
                    }else if(z < 0){
                        armorStand.teleport(armorStand.getLocation().subtract(0, 0, 0.05));
                    }
                });```
ocean hollow
#

Is it possible to save an image from an image in MySQL and then upload it custom on other servers?

quaint mantle
#

yo can someone help me out it's something stupid i know

vast ledge
lost matrix
ocean hollow
vast ledge
#

google it

ocean hollow
lost matrix
#

Or do you mean "image" in a more literal sense?

ocean hollow
#

I mean, I have a bunch of servers (for example, velocity), and synchronize maps between them.

vast ledge
narrow flare
lost matrix
#

Ah well in that case simply base64 encode it or use a binary blob

lost matrix
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!

narrow flare
# lost matrix What are you trying to do? Maybe lets start there.

I'm making animations with my armorstands.
At the end of my animation I move my armorstands to their final location. To do this I move them from 0.05 to 0.05.
As I know my final location, I check that my final location is equal to the location of my armorstand in order to stop my animation.

lost matrix
# narrow flare I'm making animations with my armorstands. At the end of my animation I move my...

I would simply snap the ArmorStand in place when the target is close enough

private static double movementSpeed = 0.05;

private boolean isClose(ArmorStand stand, Location target) {
  return stand.getLocation().distanceSquared(target) < movementSpeed;
}

private void snap(ArmorStand stand, Location target) {
  stand.teleport(target);
}

private void moveTowards(ArmorStand stand, Location target) {
  // Vector that points from ArmorStand to target. Length = 1.0 because its normalized
  Vector direction = target.toVector().subtract(stand.getLocation().toVector()).normalize();
  direction = direction.multiply(movementSpeed);
  Location tpLocation = stand.getLocation().add(direction);
  stand.teleport(tpLocation);
}

// Returns true if AS reached target. Call every tick until it returns true
public boolean moveStep(ArmorStand stand, Location target) {
  if(isClose(stand, target) {
    snap(stand, target);
    return true;
  } else {
    moveTowards(stand, target);
    return false;
  }
}
narrow flare
lost matrix
#

Thats just an arbitrary value.
If you want to be exact then you have to follow the Nyquist-Shannon sampling theorem.
But now that you ask... you should probably choose your movement distance as epsilon in this case.

#

I updated the code above.

ocean hollow
#

how can I make plugin folder be marked as minecraft plugin

quaint mantle
#

is there a way to have when you mine an ore you get a chance to have double the drop?

#

I can't find anything on it

chrome beacon
chrome beacon
quaint mantle
#

oh thanks im still a noob

chrome beacon
ocean hollow
#

oh, thanks, i am stupid

hazy parrot
ocean hollow
#

(that is not my plugin, it from git)

silent steeple
quaint mantle
#

Hey im getting :

Dependency 'org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT' not found```

Here is my pom.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<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>org.dimensions</groupId>
    <artifactId>DimensionsCore</artifactId>
    <version>1.0-SNAPSHOT</version>

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

    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.20.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
kind hatch
#

Did you run BuildTools?

quaint mantle
kind hatch
# quaint mantle wdym

Everything spigot related is pulled from your local .m2 directory. You need to run BuildTools with the version you want in order to use it.

eternal oxide
#

just api doesn;t need BT

#

my bet you used artifacts to build not maven

eternal oxide
#

you posted a message saying it can't find the api

quaint mantle
#

it shows without even trying to build

#

lemm show u in dms

eternal oxide
#

did you press the update button top right, as it shows in the tutorial?

quaint mantle
#

can't find it

kind hatch
eternal oxide
#

look harder 🙂

quaint mantle
#

ohhh

#

thanks

kind hatch
#

The one in the class view doesn't always show up.

quaint mantle
#

it's reloading

#

the error still showing up

eternal oxide
#

I can;t help beyond that as I don;t use IJ

quaint mantle
#

np

ocean hollow
#

what does it mean?

eternal night
#

the data is too large for the constraint on the sql table

#

ArtMap plugin is getting some invalid data

ocean hollow
eternal oxide
#

"artist" data is too long for your sql

wet breach
#

atrist can only have 32 characters

#

you need to sanatize inputs before just assuming anything as well

#

that is, ensuring the data is appropriate as well as not above a certain size

eternal oxide
#

remember that a name of max 16 characters in UTF-8 could be 32 or upto 96 bytes long

wet breach
#

the number isn't the amount of bytes

#

just the number of characters

eternal oxide
#

sql types, good point

wet breach
#

which brings up the question of

#

why is their artist name exceeding 32 characters?

#

XD

#

unless they messed up or got confused in what data is supposed to go where

#

also empty characters count against the limit as well

#

so, if there for some reason a ton of spaces after the string, it still counts lol

eternal oxide
#

or they are creating custom profiles with colours

wet breach
#

ah, that may be it

#

forgot about the colors

quaint mantle
#

why am i need database ?
my website, discordbot, and server will be same cloud server
i can't get any data from json file ?

#

if i do db it will also be on the same server

wet breach
#

well DB software tends to be more optimal in its abilities of retrieving and storing data

#

but you don't need to have a DB however, just makes future things and backups more easily done

#

even if its on the same host, a DB software still has benefits but no one is forcing you to use one

quaint mantle
#

alright

#

do u know mongodb ?

#

😄

#

i mean did u know using ?

ocean hollow
#

how can I remove map info? There is no Flag "HIDE_MAP"

#

this should be in minecraft, but why is it not in spigot?

tender shard
#

try HIDE_ENCHANTS or HIDE_ATTRIBUTES

#

one of those should do

eternal night
#

as per usual, those are under HIDE_POTION_EFFECTS

#

because naming

tender shard
#

ah yes

wraith dragon
#

does every location have a yaw and pitch?

eternal night
#

Well or 0 0

#

the value always exists

wraith dragon
#

oh okko

eternal night
#

just, not the value you might need

wraith dragon
#

I thought it was a nullable

#

thanks

ocean hollow
clear panther
#

how to make player smoothly teleport UHMM

hazy parrot
#

what is smooth teleport

eternal night
#

probably a relative teleport ?

eternal oxide
#

teleport a short distance and the client will extrapolate movement

clear panther
#

smoothly teleport

clear panther
rough drift
#

Does a player quit event fire if someone is sent to another server by bungee

tall dragon
#

no

#

wait

#

yes

#

i read that wrong

#

the player quits that server so yes it does.

fervent prawn
#

How can I realize point of applicaton for command? Do I need to use something like Mongodb for this? And how can I implement dropping points once a month, for example?

tall dragon
#

i have no idea what you mean with that question

#

what kind of "point"

chilly hearth
#

maybe send the code

#

or smth

icy beacon
#

anyone knows the repo & dep for bungee 1.8.8?
please do not harm me, i'm working on an unusually extensive commission that is in 1.8.8

chilly hearth
#
    @Override
    public void onEnable() {
        // Plugin startup logic
        getConfig().options().copyDefaults();
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new PlayerDeath(this) ,this);
        getCommand("reward").setExecutor(new KillRewardCommand(this));
``` the getcommand isnt excuting the command class ;-;
eternal oxide
#

Does nothing, delete it getConfig().options().copyDefaults();

chilly hearth
#

but i have a config file

chilly hearth
#

i have config file

fervent prawn
# tall dragon what kind of "point"

Points are a variable that indicates how many times a player can still use the team. Each time they are used, they decrease and if they are less than one, the command cannot be used.

tall dragon
#

so you want a system where players can use a command a certain amount of times

#

you'd just need to store a number for each player which would say how many times this player can still use the command

#

you could just mongodb for that. or any other storage solution really

fervent prawn
#

Okay, thanks. But how do I make my data in the database (points) take a given value once in a certain period of time?

tall dragon
#

your schedule a task that performs that for you every x amount of time

#

?scheduling

undone axleBOT
fervent prawn
#

Is this suitable if the time period is long? A month, let's say.

tall dragon
#

hm that probably would not work

#

then you would be better off scheduling a task in your plugin that checks if that amount of time has passed

#

for example it would check once every 10 minutes if a month has passed

icy beacon
#

yep, you can store a timestamp of when the month countdown has started, and then check every 10 minutes if the current timestamp is a month away

#

one way of implementing it

grim hound
#
long valToSave = System.currentTimeMillis() + 3600 * 24 * 30; //a month from now on
eternal oxide
#

Modify to do what you want```java
/**
* Schedule every Monday.
*
*/
public void schedule() {

    LocalDate nextDate = LocalDate.now().with(TemporalAdjusters.next(DayOfWeek.MONDAY));
    Long midnight = LocalDateTime.now().until(nextDate.atStartOfDay(), ChronoUnit.MINUTES);
    ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
    scheduler.scheduleAtFixedRate(()-> { /* Code here */ }, midnight, TimeUnit.DAYS.toMinutes(7), TimeUnit.MINUTES);
}```
icy beacon
# icy beacon anyone knows the repo & dep for bungee 1.8.8? please do not harm me, i'm working...

ok this took a long time of scouting old bungee plugins' source code, but in case anyone needs it:

<repository>
  <id>spigot-repo</id>
  <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
</repository>

<dependency>
  <groupId>net.md-5</groupId>
  <artifactId>bungeecord-api</artifactId>
  <version>1.8-SNAPSHOT</version>
  <type>jar</type>
  <scope>provided</scope>
</dependency>
fervent prawn
#

Thank you all

echo basalt
#

pretty sure that bungeecord isn't version-dependent as it's a proxy

#

So bungee 1.12 should work across all versions

icy beacon
river oracle
opaque scarab
#

Yes, I know this is the SpigotMC server, not PaperMC, but this sort of involves both. Paper doesn’t have any supported way to use Mojang’s NMS remappings with Maven (although there is a 3rd party plugin, which I don’t want to rely on) To get around this, would it be a bad idea to make a spigot plugin api that handles packets using Mojang’s remappings, then send packets in a Paper plugin through this api?

eternal night
#

"maven"

echo basalt
#

paperweight is a gradle plugin

eternal night
#

you missed that part there ^

echo basalt
#

specialsource is a maven plugin

river oracle
#

Oh then you'll have to use some spigot for nms

echo basalt
#

Specialsource is spigot's official, paperweight is paper's official

river oracle
#

And not use paper api

eternal night
#

honestly, marvins plugin is fine for maven and paper nms on maven

echo basalt
#

or just do what I do and use paperweight and avoid the paper API entirely

river oracle
#

^ that's what I do as well

echo basalt
#

Except that paperweight takes fuckin 19 years to compile

#

and makes a 300mb cache

#

per project

river oracle
#

I didn't realize that wtf 💀

eternal night
#

paperweight.experimental.sharedCaches=true

echo basalt
eternal night
#

Yea use sharedCaches

#

if you use

echo basalt
#

can't bother

eternal night
#

then don't complain lmao

echo basalt
#

I'd have to clean caches across like 19 different projects

river oracle
#

Man I'd throw together a quick python script and do it

#

Would take like 3 minutes

echo basalt
#

can't bother ssds are cheap

river oracle
eternal night
#

no, youd add it in a gradle.properties

#

either the projects one or your systems one

echo basalt
#

might jsut set it on my systems one

eternal night
#

yea

echo basalt
#

except I still use paperweight 1.3 or whatever

river oracle
#

I only have 3 terabytes between everything I need my space:<

eternal night
#

100%

echo basalt
eternal night
#

3 TB obviously is nothing and instantly gone

young knoll
#

I only have 750gb

lilac dagger
river oracle
lilac dagger
#

i don't need that much space

echo basalt
#

games and coding stuff

#

nothing else

#

also a lot of memes

river oracle
#

I usually use my shared storage drive for games and coding stuff

lilac dagger
#

but the coding stuff could take at maximum 1 gb

#

no way 😄

echo basalt
#

no

icy beacon
echo basalt
river oracle
lilac dagger
#

wait 15 gb?

river oracle
#

My coding stuff takes about the same space as ImIllusion

lilac dagger
#

what?

echo basalt
#

for ideaprojects

lilac dagger
#

do you fork projects a lot or?

echo basalt
#

gradle folder is another 8.3gb

#

and my local maven repo is 3.5gb

icy beacon
echo basalt
lilac dagger
#

ah

echo basalt
lilac dagger
#

you might be right

icy beacon
#

the more you do stuff the bigger it grows

echo basalt
#

so yeah if I sum it all I'm using ~30gb for coding stuff

eternal night
#
❯ du -sh .gradle
16G     .gradle
#

maybe I should clean that huh

echo basalt
spare patio
#

hey, does anyone know how I could get an ItemStack from a placed block's material and data?

icy beacon
echo basalt
#

I don't really have stupid bugs anymore

#

except that one time I spent 6 hours debugging stuff because I had a static object that shouldn't be static

echo basalt
#

no clue why it was even static

small current
#
        Location respawn;
        if (inSession) {
            respawn = session.getArena().getArenaLobby(session.getWorld());
            System.out.println("RESPAWN SET AT " + respawn);
        } else {
            respawn = ArenaProcessor.getCurrentArena().getArenaLobby();
        }

        event.setRespawnLocation(respawn);

[17:48:10 INFO]: [FFA] [STDOUT] RESPAWN SET AT Location{world=CraftWorld{name=private-22174257},x=1.0367338735542182,y=62.0,z=0.17358291354874272,pitch=8.699996,yaw=-179.25021}

i get spawned in the overworld

magic gazelle
#

what does /= do in Java?

#

(I tried Google, it seemed unable to read those characters and kept returning "What is Java")

echo basalt
smoky anchor
#

a = a / b;
a /= b;

echo basalt
magic gazelle
#

ah

#

thank you

small current
#

same

#

but i gotta fix this then i will rewrite it

#

(give tips pls)

quaint mantle
echo basalt
#

I should really just write a video tutorial on how to write a proper minigame engine

#

and post on youtube

#

with loud ass keyboard sounds

small current
smoky anchor
small current
#

and huge fps drop

small current
echo basalt
icy beacon
#

do i properly understand how to send bungeecord messages to plugins?
the bungee debug says that the message is being sent:

19:26:05 [INFO] Sending message...
19:26:05 [INFO] Sent 7 bytes

however there's no debug in my lobby console, whereas i expect it to appear immediately:

override fun onPluginMessageReceived(channel: String?, player: Player?, message: ByteArray?) {
  println("Identifying a message. Channel: $channel")
  ...
}

bungeecord plugin code: https://paste.md-5.net/esototahos.cs
listener code: https://paste.md-5.net/ayoyiroyuv.bash

echo basalt
#

you need to have a player online to actually receive plugin messages

icy beacon
#

i do

small current
echo basalt
#

I got no clue what that event is

small current
#

also send a github project of a minigame engine if you got one

#

ahh my bad

echo basalt
#

I just know you can teleport peopel on PlayerRespawnEvent

small current
#

playerrespawnevent

echo basalt
#

Trying to do map management on my minigame lib then I might actually post it

small current
#

event.setRespawnLocation(respawn);

#

this shit aint working

echo basalt
#

but I am really considering just making a tutorial from scratch

icy beacon
small current
#

quick question, lowest priority would happen first or last

icy beacon
#

first

echo basalt
#

first

#

check the docs

small current
#

my laptop cant handle to open chrome

echo basalt
#

something to do about high priority being treated last as it defines the outcome of the event

icy beacon
#

it's "lowest" because it happens first, but thus everything that the event changes can be overridden by higher-priority listeners

echo basalt
small current
#

cool

small current
#

also when will you release the video

#

you got a discord server or something

echo basalt
#

I'm not even sure if releasing a video is the right move because i'd be going over the theory and got nothing to show for it

vast ledge
#

Why is java so complicated 😭

echo basalt
#

takes forever to write a minigame guide

vast ledge
echo basalt
#

I might just do a huge .md gist

#

or a spigot post but my engine is mostly based off minikloon's

young knoll
#

Step 1: Make hypixel

#

Step 2: Done

echo basalt
#

with a load of changes

vast ledge
#

ez

echo basalt
#

I'd start by reading this

quaint mantle
# icy beacon here
public void initTasks() {
    System.out.println("Initiailzed task");
    getProxy().getScheduler().schedule(this, () -> {
      System.out.println("Sending message...");
      final ByteArrayDataOutput outStream = ByteStreams.newDataOutput();
      outStream.writeUTF("Forward");
      outStream.writeUTF("ALL");
      outStream.writeUTF("KitPVP");

      final ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
      final DataOutputStream out = new DataOutputStream(outBytes);

      try {
        out.writeUTF("Event");
      } catch (final IOException ex) {
        ex.printStackTrace();
      }

      outStream.writeShort(outBytes.toByteArray().length);
      outStream.write(outBytes.toByteArray());

      System.out.println("Sent " + outBytes.toByteArray().length + " bytes: " + Arrays.toString(outBytes.toByteArray()));
    }, 1, 30, TimeUnit.SECONDS);
  }

There no sending method.

young knoll
#

FSMgasm

icy beacon
quaint mantle
#

Bro

#

You have to send packet to the channel

icy beacon
#

maybe i missed a line or two in the tut

small current
echo basalt
#

I'll just write a wall of text in notepad++ and release it as a gist eventually

#

maybe post it on spigot

small current
#

Aight

quaint mantle
# icy beacon i just got into bungee please
public void sendCustomData(ProxiedPlayer player, String data1, int data2)
{
    Collection<ProxiedPlayer> networkPlayers = ProxyServer.getInstance().getPlayers();
    // perform a check to see if globally are no players
    if ( networkPlayers == null || networkPlayers.isEmpty() )
    {
        return;
    }
    ByteArrayDataOutput out = ByteStreams.newDataOutput();
    out.writeUTF( "MySubChannel" ); // the channel could be whatever you want
    out.writeUTF( data1 ); // this data could be whatever you want
    out.writeInt( data2 ); // this data could be whatever you want
 
    // we send the data to the server
    // using ServerInfo the packet is being queued if there are no players in the server
    // using only the server to send data the packet will be lost if no players are in it
    player.getServer().getInfo().sendData( "my:channel", out.toByteArray() );
}

Source: https://www.spigotmc.org/wiki/sending-a-custom-plugin-message-from-bungeecord/

icy beacon
#

ty i'll look into it

#

i was using a different tut 😛

icy beacon
#

i'll go test it

eternal oxide
icy beacon
#

i thought using "BungeeCord" was the traditional way

eternal oxide
#

your own channel

icy beacon
#

alrighty

eternal oxide
#

Bungee is for Bungees own use for pre-defined things, nothing you should be intercepting

icy beacon
#

working properly now. thanks nazarbek & elgar 🙂

grim hound
#

Is there a way to synchronize an immediate task with the main thread without using the bukkit scheduler?

eternal oxide
#

callSyncMethod

grim hound
#

also there must be a way to avoid this unnecessary CraftTask wrapping

eternal oxide
#

no, not unless you want to use Futures

grim hound
#

I mean

brisk estuary
#

Hey, I'm getting an error every time I write a command. I'm using ACF for the command and it basically opens an inventory for the player: console [11:45:53 ERROR]: [SlimeFrame] [ACF] Exception in command: slimeframe relics [11:45:53 ERROR]: [SlimeFrame] [ACF] net.minecraft.server.CancelledPacketHandleException

grim hound
#

whenever something with a packed is fucked up

#

I dunno what acf is, but in the traditional channel duplex handler you can override the exceptionCaught method and leave it empty

chilly hearth
#

e

#
public class commands implements CommandExecutor {
    private final Kill plugin;
    public commands(Kill plugin) {
        this.plugin = plugin;}
    @Override
    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args) {
        if(commandSender instanceof Player){

        Player player =(Player) commandSender;
        ItemStack itemreward = player.getItemInHand();

        if(!(itemreward == null)){

            plugin.getConfig().set("reward" , itemreward);
            player.sendMessage(ChatColor.GREEN + "The Reward has been set!");


        }else{

            player.sendMessage(ChatColor.RED + "Your slot is empty");


        }
#

its not chaning the value in the config

echo basalt
#

oh god this is starting to get big

chilly hearth
#

lol

#

@echo basalt can u help me

echo basalt
#

no

chilly hearth
#

wow

chilly hearth
#

: (

remote swallow
#

and the issue is you dont save it

#

plugin.saveConfig

magic gazelle
#

how do I get the imports for CraftWorld ?

remote swallow
#

but pls go look at naming coventions

chilly hearth
#

why iam this dum

#

: (

magic gazelle
chilly hearth
#

dw about it ; )

hazy parrot
#

wait till you learn about !=

chilly hearth
#

ye iam gona change that xD

quaint mantle
chilly hearth
#

ikr

#

dectective duck here : )

chilly hearth
#

i did

#

thanks to epic : )

#

its working now

#
public class commands implements CommandExecutor {
    private final Kill plugin;
    public commands(Kill plugin) {
        this.plugin = plugin;}
    @Override
    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args) {
        if(commandSender instanceof Player){

        Player player =(Player) commandSender;
        ItemStack itemreward = player.getItemInHand();
        ItemStack air = new ItemStack(Material.AIR);
        if(itemreward == air){

            player.sendMessage(ChatColor.RED + "Your Slot is Empty!");
        }else{
            plugin.getConfig().set("reward" , itemreward);
            plugin.saveConfig();
            player.sendMessage(ChatColor.GREEN  + "The Reward has been set");

        }
``` wtf is this i set so if the item is Air send the msg but
remote swallow
#

ow

#

if (itemreward.getType() == Material.AIR)

chilly hearth
#

OK IAM QUITING

#

: ___ (

quaint mantle
#

Bros prob uses more js

chilly hearth
#

nah

#

xd

#

iam just dumb

young knoll
remote swallow
#

eat pant

echo basalt
#

@small current

#

indentation looks like ass because notepad++ does 4 spaces or something

smoky anchor
echo basalt
#

I don't think I can make commands

smoky anchor
#

I'm not telling you to add it
but @ Choco on the other hand

echo basalt
#

y'all can bother him

#

it'd make me happy but this is really basic at the moment

#

there's a lot of code still being perfected that'll go here

#

I should probably migrate this to the wiki

lilac dagger
#

It doesn't makes sense to me why scoreboard update is a phase

echo basalt
#

It makes the end code look nicer

#

Everything should be a phase so that it follows your order

#

You can still call Game#setScoreboard and it applies the scoreboard instantly

#

there you go

hazy parrot
shadow night
#

An*

silent steeple
#

does anyone here know anything about minecraft mappings

eternal night
#

I have heard of them

opal juniper
#

north is upwards generally

#

and i only recently learnt that you can change the scale of maps :(

silent steeple
opal juniper
#

that doesn’t have anything to do with mappings does it? lol

eternal night
#

nor do I findthat method in 1.20.1 mappings

#

I am confused

river oracle
#

anyone wann explain how this field isn't "Guarenteed" to be initialized I stg this is how it works in later java versions wtf is wrong with java 8

    public static final List<String> EXPERIMENTAL_WARNING;
    public static final List<String> LATEST_WARNING;

    static {
        final List<String> experimentalWarning = new ArrayList<>();
        experimentalWarning.add("/!\\    WARNING    //    WARNING    \\\\    WARNING    /!\\");
        experimentalWarning.add("Experimental builds should not be run in production unless you know what you are doing!");
        experimentalWarning.add("");
        experimentalWarning.add("These builds are meant for developers to test out potential upcoming changes and are EXTREMELY likely to break plugins!");
        experimentalWarning.add("You will NOT receive support if you use an experimental jar to run your server.");
        experimentalWarning.add("YOU HAVE BEEN WARNED!!!");
        EXPERIMENTAL_WARNING = Collections.unmodifiableList(experimentalWarning);

        final List<String> latestWarning = new ArrayList<>();
        latestWarning.add("NOTE: 'latest' refers to the latest stable version and may not necessarily correlate to the absolute newest version available!");
        latestWarning.add("");
        latestWarning.add("A buffer window is given to recent releases, giving time for any critical issues to be resolved and any new features to be finalized.");
        latestWarning.add("");
        latestWarning.add("If you selected latest and did not receive the version you were expecting, select the correct version from the dropdown menu and try again.");`
        LATEST_WARNING = Collections.unmodifiableList(latestWarning);
    }```
chrome beacon
eternal night
chrome beacon
river oracle
#

that's it

#

that's all the code

#

I'm not joking

chrome beacon
river oracle
kind hatch
#

It gets initialized in the static block.

chrome beacon
river oracle
#

yes it is

misty current
#

same for the second one

eternal night
#

final there is wrong

river oracle
kind hatch
river oracle
#

I thought you could do final static and use the static block

#

I've done it in the past

#

so why is now any different

chrome beacon
#

You can do that

#

Now what is the actual problem

#

How do you know they aren't initialized

river oracle
#

that's the problem

#

intellij is telling me there's no guarentee they are initialized

#

and its pissing me off because it is guarenteed unless the program crashes are fails during the static block

silent steeple
#

in the entity Class

chrome beacon
silent steeple
#

the obf entity class is called "Pk"

river oracle
eternal night
#

@river oracle

#

#add may throw

#

sry my brain lagged there

#

I blame the heat

river oracle
chrome beacon
silent steeple
eternal night
#

but yea, List#add may throw

chrome beacon
#

I had a feeling it was that since you appear to use MCP mappings

eternal night
#

so you'd have to try catch finally

river oracle
eternal night
#

just use List.of

river oracle
#

its not in Java 8

#

according to intellij

eternal night
#

it isn't

#

sucks kekw

river oracle
#

BuildTools 😭

eternal night
#

Arrays.asList

#

should be in java 8

river oracle
#

does that produce an unmodifiable list

eternal night
#

no

#

you'd still have to wrap it

river oracle
#

alr

#

still easier

eternal night
#

yeee

river oracle
#

this is why I hate java 8 😭

#

List#of my love

silent steeple
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

silent steeple
#

bruh just give me pic perms#

flint coyote
#

Just make a spigot account or upload it to an image page

silent steeple
#

@chrome beacon hurtResistantTime the field

kind hatch
#

?img

undone axleBOT
silent steeple
#

happens when i regen health too

chrome beacon
silent steeple
eternal night
#

forge discords?

silent steeple
#

can i get an invite

eternal night
#

at least I think forge are those that mainly used those mappings

chrome beacon
#

I hope you're not about to break MC Copyright by redistributing Minecrafts code

silent steeple
#

of course not

chrome beacon
#

What exactly are you doing?

silent steeple
#

why does that matter

chrome beacon
#

Where you should ask for help depends on what you're trying to do

silent steeple
#

i am creating a jni application

#

so where would i ask

river oracle
chrome beacon
#

I'll just assume you're trying to make hacks and not help you

silent steeple
#

how would u make hacks

#

if i were to make hacks i would just use fabric or forge

eternal night
#

you are creating a JNI application for the server using MCP mappings ? kekw

#

I am confused

silent steeple
#

for the server?

eternal night
#

Like, for a spigot server ?

#

"A jni" application can be a lot

silent steeple
#

no

#

client side jni

eternal night
#

Then yea,head to forge or fabric I guess

#

tho honestly, you are pretty on your own

#

if you are just making something new lol

silent steeple
#

well its just a simple question..

eternal night
#

Well no idea what that field is called in mojang mappings

#

just look at the remapped client ?

#

and figure out why it is changing I guess

silent steeple
#

where can i find the remapped client

chrome beacon
#

Start MCP?

eternal night
#

ye lol

#

but also like

#

why the fuck are you using MCP

#

unless you are on some ancient version

chrome beacon
#

They are on 1.8.9

eternal night
#

ah

#

I mean the question of "why does this client code, released 8 year ago modify this variable" is pretty rough

silent steeple
misty current
#

how can I rotate a block?

#

Blockdata#rotate() throws nosuchmethoderror

#

on 1.19.4

young knoll
#

Update spigot

chrome beacon
silent steeple
#

it is not a mcp project

chrome beacon
#

Then create one

misty current
#

i'll try to download latest

#

yea works fine

#

thanks

young knoll
#

Man that is almost identical to the whereami clip

#

?whereami

silent steeple
#

where do i create a mcp project

inner mulch
#

@EventHandler public void test(InventoryCloseEvent event) { Player player = (Player) event.getPlayer(); if(event.getReason() != InventoryCloseEvent.Reason.OPEN_NEW) { if(SocialPlugin.getInstance().hashMap.get(player) == "socialEditorInv") { SocialPlugin.getInstance().hashMap.remove(player, "socialEditorInv"); } } }
Why does it throw the Error NoSuchMethod?

eternal night
#

Provide the stacktrace

#

beyond that, comparing strings is done via .equals

#

not ==

livid dove
#

Anyone know what events / mechanics influence XP orbs "tracking" / following the player on drop?

Trying to make a small class that can drop a custom xp orb that wont track anyone but the player who caused the drop

smoky anchor
livid dove
inner mulch
inner mulch
eternal night
#

The error

inner mulch
#

Caused by: java.lang.NoSuchMethodError: 'org.bukkit.event.inventory.InventoryCloseEvent$Reason org.bukkit.event.inventory.InventoryCloseEvent.getReason()'

smoky anchor
eternal night
#

could it be that you are running spigot

livid dove
inner mulch
eternal night
#

you are developing against the paper-api

inner mulch
#

maybe

#

idk

eternal night
#

given that that is paper specific API, I'd say yes

#

You need to run paper if you are going to use the paper-api

livid dove
#

This is starting to sound like you need to go back to learning java concepts and the context of the bukkit vs spiggot vs paper. such as the difference between APIs

inner mulch
#

idk all of my other plugins are working fine, how is that possible even tho im apprently using 2 different apis

livid dove
#

Ive got this one

#

lynx

#

lemme

eternal night
#

👍

livid dove
#

So long story short Bukkit came first.

Then Spigot is a fork of bukkit.

Then Paper is a fork of spigot.

#

because of this

#

They share a SHIT TONNE of methods

#

But there are subtle differences here and there

inner mulch
#

isnt paper the best one then, it got some cool methods?

livid dove
#

That

#

...

#

Is a very complicated question lol

inner mulch
#

i heard that it is better perfomance wise as well

eternal night
#

Well, you are on the spigot discord

#

Try both

#

pick the one you like more

inner mulch
#

can i get banned for saying paper is better?

eternal oxide
#

if you code for paper it won't run on Spigot and you eliminate over 30% your possible clients.

eternal night
#

no

#

yea, the general argument for spigot-api at least is, well paper supports it

#

so if you code against spigot-api you can run on spigot and paper

inner mulch
#

guys i think im using spigot and paper plugins, could this be harmful in the long run?

eternal night
#

where coding against paper-api means you can only run on paper and its fork

inner mulch
# livid dove

i did not find this discord, i didnt even knew i was coding paper

eternal night
#

how does one randomly stumble into paper-api

#

lol

livid dove
inner mulch
#

all the spigot tutorials i watched worked for paper too

eternal night
#

Yes spigot works on paper

#

hence why they probably use the spigot-api

inner mulch
#

ok, so its not harmful in the long run to use paper and spigot plugins on one server?

eternal night
#

well, paper plugins do not run on spigot

#

if you are running paper, then yea

#

you can use plugins developed against paper and spigot

livid dove
inner mulch
eternal night
#

Your plugin uses an/is developed against a server API

#

in your case, from the looks of it paper

#

but you could also code against spigot

kind hatch
eternal night
#

that all happen at compile time

eternal night
#

soft spoon*

#

not hard fork

inner mulch
eternal night
#

yea that doens#T work tho

livid dove
#

Makes me wonder how we as developers will react to it. As I imagine that if it does end up being harder than we assume rn, I imagine one community would likely end up winning out over the other :S

eternal night
#

Probably

inner mulch
#

for the last 3 plugins i created, it worked until i discovered inventoryclosevent

eternal night
#

Yea, if you use paper-api but only use methods that also exist in spigot-api

#

you wont notice it

inner mulch
#

ok

livid dove
inner mulch
#

so now the question is, which one is better paper or spigot, which side should i go on with?

livid dove
#

They both have their pros and cons

eternal night
#

Try both, pick the one you like more

livid dove
#

^

eternal night
#

spigot server is going to tell you, pick spigot

inner mulch
#

i mean the inventorycloseevent from paper is pretty charming

eternal night
#

paper server is going to tell you, pick paper

livid dove
#

Speak for yourself we should all code in bukkit lynx smh

eternal night
#

Then grab paper and run with it until you hit something that you don't like

#

¯_(ツ)_/¯

inner mulch
#

i still couldnt find the paper discord

livid dove
#

Lynx think i can get away with linking it here

#

or is that a step too far

eternal night
#

idk, just go to the website

kind hatch
eternal night
#

damn

livid dove
#

Yay shadowmaster is bae

eternal night
#

shadow with the balls

inner mulch
#

delete it shadow, i got it

livid dove
#

QUICK SCATTER! I HEARD MD_5 COMIN

#

xD

eternal night
#

RUNN

chrome beacon
kind hatch
#

Welp, I'll be heading out.

livid dove
#

*Nah we are actually pretty chill round here

inner mulch
#

wait wtf is waterfall

#

is this another fork

eternal night
#

bungeecord

chrome beacon
#

Bungeecord fork

eternal night
#

forked

livid dove
#

End of the day im still in the spock camp of "we can all be friends, lets just join forces and compromise guuyyyyyys lmao

eternal night
#

what paper is to spigot, waterfall is to bungeecord

inner mulch
#

ok

eternal night
livid dove
#

Oh man bungeecord! I loved their game about the aliens and the rings n stuff

eternal oxide
inner mulch
#

guys you think i should stay here?

lilac dagger
#

i really hope spigot will remain

livid dove
eternal night
#

True I tend to send kekw and dogekek

livid dove
#

And 99% of em are just randows

lilac dagger
#

by far i think spigot is better than paper

eternal night
#

I wonder, maybe spigot just becomes a paper fork kekw

#

that would be kinda funnny

carmine mica
#

Yeah, i get better performance with spigot. ||/s||

eternal oxide
eternal night
#

yank all the paper bugfix patches

#

call it spigot

livid dove
# eternal oxide the tone is generally set by the devs/mods

I mean ive not really had that. Like say the utter MEME that was my get holder stuff. When I went to paper with it they did a whole "let sget a ticket open and discuss this" sorta deal that ended up with a pretty productive convo imo.

I think both communities have their... ahem... interesting members... but overall both sides are just nerds who wanna make cool stuff in MC ❤️

eternal night
#

True, paper is full of fucking nerds

#

terrible to work with

#

Anyway @river oracle is your build tools GUI going to be a separate project or are you working on build tools. I'd love to sugges a few other things taht could go into build tools

livid dove
#

Ive never had much of a problem with em tbh.

I think leigitimatly it comes down to the fact the stuff they do is god tier in terms of functionality. But the reason they probably forked off in the first place was due to how they approached adressing legitimate issues.

Ive had a fair brunt of "i am right and you cant convince me otherwise" but... tbh.. ive expreienced that in paper and spigot lol

remote swallow
eternal night
#

oh

remote swallow
#

anti nerd

eternal night
#

are you working on it xD

remote swallow
#

no, coll started it

#

i just test it

eternal night
#

ah

livid dove
eternal night
#

do you know if it targets the buildtools project itself

remote swallow
#

it does

eternal night
#

or if it is a third party tool

#

nioce

livid dove
#

What is it exactly?

remote swallow
#

a gui, for buildtools

#

shadow can explain more of it

eternal night
#

If people touch build tools, I'd really would not mind like, an in built runDev

kind hatch
#

GUI frontend for the noobs.

livid dove
#

Oh thats pretty neat

#

Im still on the edge of doing my "inventory menus app that works like scene builder for javafx" idea lmao

kind hatch
livid dove
#

Huh noice

#

Need someone to be a NERD and do the java docs?

kind hatch
#

Wouldn't be opposed. :3

young knoll
#

Javadocs for buildtools?

eternal night
kind hatch
#

It probably wouldn't hurt considering that it's now going to be something that has to be maintined.

#

All that GUI code go brrr

livid dove
#

:L might have a gander after this weekend. Currently waiting for our final PR on my teams library project

eternal night
#

where is the branch for it ?

eternal night
#

for the BT interfacce

kind hatch
#

It's on the stash. My fork has the GUI changes, Y2K's branch has the code cleanup.

livid dove
eternal night
#

stash moment

#

does someone want to send me the .patch kekw

livid dove
#

lmao

kind hatch
#

We have this funny thing.
BuildTools > Coll's Fork > My Fork > Y2K's Fork

eternal night
#

oh wait, collins repo is public nice

#

Sounds very fun kekw

remote swallow
#

collins

remote swallow
#

@young knoll hi collin

eternal night
#

fuck off

remote swallow
#

no

eternal night
#

coll's

#

just sounds weird

remote swallow
#

blame him

livid dove
#

Man you guys are right, paper is much more toxic

inner mulch
#

dont tell me velocity is a fork of paper

remote swallow
#

younger coll couldnt spell cool so its coll

eternal night
#

velocity is a different proxy

#

not a fork of anything

livid dove
#

they are in their own little corner

kind hatch
#

I thought they were a fork of waterfall. ¯_(ツ)_/¯

livid dove
#

*it was a joek

eternal night
#

jeok

slender elbow
#

l
y
n
toxic

livid dove
#

I thought they were a spoon of roblox

eternal night
slender elbow
#

hey lynx

#

check #general

eternal night
#

hey emily

#

oh

slender elbow
#

❤️

eternal night
#

fuck

slender elbow
#

who

livid dove
#

So back to dev help....

What are the events / general classes that cause exp orbs to track so differently to other items

eternal night
slender elbow
#

owo

eternal night
#

actually no

#

cat

#

😏

remote swallow
#

what about choco

eternal night
#

oh trueee

remote swallow
#

poor tableless man

eternal night
#

So many people without tables 😭

eternal night
#

exp orbs are not items whatsoever

livid dove
eternal night
#

Well, they have logic to merge themselves

river oracle
livid dove
#

What about the tracking to players?

river oracle
#

I can probably just add your features as I go

eternal night
#

I doubt it makes a lot of sense in the GUI PR

#

I was just wondering if we now have people that know BT code

#

we might see some improvements to the tool

kind hatch
#

Yes. 💀
I know more about it than I should.

remote swallow
#

like spigotclip

river oracle
#

Yeah I was thinking of cleaning up the rest of it but its out of scope

remote swallow
#

i would love spigotclip

eternal night
#

spigotclip stonks

river oracle
#

maybe later

livid dove
#

Why are you guys not just PRing into a universal development branch and then PR the whole thing in one go so you have full traceability and can test all ur bits n bobs together beforehand?

remote swallow
#

what would spigotclips name be

#

spigotvalve

eternal night
livid dove
eternal night
#

Yea, its part of the exp orbs tick logic

livid dove
#

God damn it.

eternal night
#

it calls a entity target event

#

if you wanna mess with it

livid dove
#

Oh shit it does? Perfecto

eternal night
#

Yea

livid dove
#

This makes me happy :L

#

Wanting to make "custom xp" for a classes plugin

eternal night
#

Noice

#

We love classes

vast ledge
#

Gotta Love Java

eternal night
#

gotta go back to school

kind hatch
livid dove
vast ledge
#

Nah

#

Ive done worse

#

imma go to hell anyways

livid dove
remote swallow
#

were all going to hell

vast ledge
#

yes

vast ledge
#

This is probably the best class ive ever made

livid dove
# livid dove

We just did it for our library and it came in clutch! Plus gives that super mega dopamine rush when you see all of em merge into development ❤️

livid dove
# vast ledge

I have serious doubts about all those needing to be public haha

vast ledge
#

why should they not be public?

livid dove
#

Well i mean, how are they utilised? Its a rare day to see a class like that with no internal logic

kind hatch
# livid dove We just did it for our library and it came in clutch! Plus gives that super mega...

I'd need someone to explain it to me because the tutorials don't do anything for me. No one explains the nuances. Like, when do you need to create a branch? How many should your branches be used to structure your project? How do you deal with multiple people working on the same branch? How does one get updates from a specific branch instead of the master?

No one covers these for some fucking reason. Aren't these the things you should be teaching in a tutorial?

vast ledge
livid dove
# kind hatch I'd need someone to explain it to me because the tutorials don't do anything for...

Basically every feature should have its own branch, no branch should have cross over. Usually its one person per branch in smaller projects, you dont get updates from branches. Once you know you cant proceed without functionality from another branch, youve already goofed up some of your develppment plan. But in those cases you get everything that can be completed in that branch done, merge with development, wait till the other branch is also done with everything possible on its own, merge with development, then make a new branch from that point.

#

E.g: If you are in branch A but need a feature from branch B, then you get Branch A merged with Dev branch moment everything possible is done (with TODOs set up), wait for Branch B to do the same, then you re branch for the new features.

#

To make Branch C

#

If you are grabbing shit from branch B and sticking it in Branch A, youve sorta missed the point of having seperate branches

hazy parrot
livid dove
#

E.g:

Out branches for our library:

TCCL-12 rework was a separate approach the dev wanted to take with TCCL-12 but didnt wanna screw with the already near complete TCCL-12.

#

So he branched off of TCCL-12

#

And then remerged back into it when done with the rework

#

*TCCL-14 was commands

#

We originally named the branches after our you track task IDs but went for a more obvs approach in the end

#

ALso as a side note: Branches saved my ass when I had a 1am oopsie:

Lmao.

#

If I hadnt done the branches using proper workflow, i'd of likely accidentally bricked the project hard

kind hatch
#

Ok, I get branching off of each other for changes, but instead of trying to merge back into the branch you originally branched off of, you want to merge into master?

livid dove
#

The idea is if you do it into a development branch, the master is ONLY changed (hence deployed) when all the features have been tested when integrated together

#

Imagine you merge changes straight into the master and it fucks it up

#

bad bad ju ju

#

Just cause a merge succeeds, dont mean it wont cause ungodly errors

spare hazel
#

how can i add TabCompletions depending on the command? is it TabCompleteEvent#getBuffer for getting the command inputted?

kind hatch
# livid dove Imagine you merge changes straight into the master and it fucks it up

Yea, I get that. I've seen the memes and heard that you shouldn't be working on the master branch directly.
How could the workflow be improved with our setup?

If you refer to the chain I said earlier, we have just been branching off of each other, but merging back into the original branch.
Meaning that, Person 1 commits their changes, Person 2 takes over and makes their changes, then Person 3 takes over and makes their changes. Once person 3 is finished, they merge back with person 2, person 2 merges back to person 1, and person 1 merges to master.

spare hazel
kind hatch
#

The same way you'd check argument length in your command.

if (args.length == 1) {
  // Fill completions for when the command is ready for the first argument.
}
spare hazel
#

not on the CommandExecutor

kind hatch
#

TabCompleteEvent#setCompletions()

spare hazel
#

yes but i want to do it after the user has entered the command
if that was the case, then when they press "/" they are gonna get "LAVA_DRIP, WATER_DRIP, FLAME, NOTE, CRIT"

#
public class TabCompleteListener implements Listener {

    @EventHandler
    public void tabListener(TabCompleteEvent e){
    }
}```

this is the class i have
hazy parrot
#

Or you can just setTabCompleter on Command instance

#

getCommand(foo).setTabCompleter

spare hazel
#

and then i can add this class i made inside the setTabCompleter(...)?

hazy parrot
#

Yes

spare hazel
#

ok alr thx

sinful edge
#

Would it be appropriate to ask a question about an implementation detail regarding the biome format in 1.15 (which i assume is also relevant for the biome format in 1.19)?
Specifically, the wiki mentions the 4x4x4 biome blobs are laid out in the integer array as follows:

These 4×4×4 volumes are arranged by Z, then X, then Y. That is, the first 4×4 values in the array are for the 16×16 chunk, at Y levels 0–3, the next 4×4 is for Y levels 4–7, etc.
Does that mean to get the position of a blob in the array i need to calculate index = z + 4 * (x + 4 * y)? The thing is, i am reasonably certain the blocks are laid out x first, then z then y, so for blocks the calculation would be index = x + 16 * (z + 16 * y). I don't see why there should be two different approaches to calculate this. So am i misunderstanding the wiki or is it actually different (or did the method to calculate the index for the blocks change, too?)

icy beacon
#

what item could i use in a GUI to indicate account sharing? boosting? ban evasion?

spare hazel
#

is there a way to convert an enum list into a string list
and by list i mean ArrayList

icy beacon
#

take Enum#values() and collect them into a list

spare hazel
#

no i dont want all of them

eternal oxide
#

stream and filter

icy beacon
#

i've worked for 11 hours today my mind is drained lol

spare hazel
#

i have a list in my main class that says which particles are allowed as trails
and i want to put those allowed trails in the setCompletions

hazy parrot
#

Call that on enum list stream

spare hazel
#

my code is ugly and i will probably get banned for it but anyways

public final class IranSkyTrails extends JavaPlugin {

    ArrayList<Particle> trailsList = new ArrayList<>();
    HashMap<UUID, Particle> trailedPlayers = new HashMap<>();

    private static IranSkyTrails plugin;

    @Override
    public void onEnable() {
        // Plugin startup logic
        plugin = this;
        trailsList.add(Particle.FLAME);
        trailsList.add(Particle.NOTE);
        trailsList.add(Particle.CRIT);
        trailsList.add(Particle.DRIP_LAVA);
        trailsList.add(Particle.DRIP_WATER);
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }

    public ArrayList<Particle> getTrailsList() {
        return trailsList;
    }

    public HashMap<UUID, Particle> getTrailedPlayers() {
        return trailedPlayers;
    }

    public static IranSkyTrails getPlugin() {
        return plugin;
    }
}
public class TabCompleteListener implements Listener {

    @EventHandler
    public void tabListener(TabCompleteEvent e){
        e.setCompletions(IranSkyTrails.getPlugin().getTrailsList());
    }
}

dont mind the plugin name. its a private plugin for my server

icy beacon
#

in the future for text walls please use ?paste

spare hazel
#

?paste this doesnt work for me

undone axleBOT
icy beacon
#

then use pastebin

spare hazel
#

sam

brisk estuary
#

Hey, I asked it earlier but I still have the problem and idk how to solve it. The following error is thrown when I run a command I set up using ACF (a framework for commands). Here's the command that throws the error java @Subcommand("%inventory") @CommandPermission("slimeframe.anyone.inventory") @Description("Show your relic inventory") public void showRelicInventory(CommandSender sender) { if (!(sender instanceof Player p)) return; RelicInventory relicInventory = relicMan.getRelicInventory(p); Bukkit.getScheduler().runTask(plugin, relicInventory::open); } and here is the error thrown: ```console
[11:45:53 ERROR]: [SlimeFrame] [ACF] Exception in command: slimeframe relics
[11:45:53 ERROR]: [SlimeFrame] [ACF] net.minecraft.server.CancelledPacketHandleException

spare hazel
#

e

icy beacon
spare hazel
icy beacon
#

use it then

#

if nothing works for you

#

but don't resort to filling the entirety of the visible channel with a snippet of code

spare hazel
icy beacon
#

what item could i use in a GUI to indicate account sharing? boosting? ban evasion?

spare hazel
icy beacon
#

yes, there is.

#

you call it on a stream

eternal oxide
#

map is a function of stream

kind hatch
icy beacon
#

seems good, ty

spare hazel
#

stream is an interface

icy beacon
#

List#stream

spare hazel
#

getTrailsList().stream().map()

#

?

icy beacon
#

ye

#

lgtm

spare hazel
icy beacon
#

looks good to me

spare hazel
flint coyote
#

nothing

#

foo creates a variable inside your map call

icy beacon
spare hazel
#

it gave me a Stream instead of a ArrayList<Particle>. should i cast it to ArrayList?

#

idk if thats possible

hazy parrot
#

Just call toList at the end

lilac dagger
#

nope

brisk estuary
#

.toList()

spare hazel
#

oh ok

lilac dagger
#

^

spare hazel
#

Usage of API documented as @since 16+

#

why is intellij using java <16 i have java 20

hazy parrot
#

So ur using old java version, call collect(Collectors.toList()) instead

#

Oh, change project sdk in project settings

spare hazel
#

nothing changed

#

even after reloading maven

#

<java.version>17</java.version>

brisk estuary
#

CancelledPacketHandleException

kind hatch
# spare hazel <java.version>17</java.version>

That tag doesn't do anything unless you use it in the build section.
You likely want these instead.

<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
spare hazel
#

where do i put them?

kind hatch
#

Under the <properties> tag.

spare hazel
#

ok got it thx

#

nothing chnged

#

lemme try invalidating cches

#

why tf is it indexing java 16

kind hatch
#

Because of your project SDK settings.

#

File > Project Structure > Change it to Java 20