#help-development

1 messages · Page 1897 of 1

supple token
#

The plugin runs great but the shutdown is not fun

#

It gives a ton of errors

#

And i don't get why its doing that

spiral light
#

well then parse that error to find out what it is 🙂

#

seems like something with your logging is wrong

supple token
#

Yea

#

Let me fix it

#

And get the other stupid error

#

This was the old log

sage dragon
#

If you were about to make an unbreakable block breakable, how would you do it?

buoyant viper
#

modified client and server wombo combo

young knoll
#

Probably packet jank

buoyant viper
#

if player mining unbreakable block, send block break status packet

fervent gate
#

I've seen some people using "WorldServer" in their plugins, I can't seem to import that. What is the thing I can use for that? CraftWorld, World?

spiral light
#

do you use remapped mojang ?

young knoll
#

ServerWorld under mojmap iirc

buoyant viper
#

plot twist its ServerWorld

fervent gate
#

yes

sage dragon
hardy swan
#

plot twist it is ServerLevel

fervent gate
buoyant viper
fervent gate
#

haha thx

young knoll
#

Use that

supple token
fervent gate
hardy swan
#

do people forget that buildtools literally clones the repository into your computer

spiral light
sleek turret
#

Anyone have any good resources to learn how to store things like warps into a warps.yml file in the plugin dir?

fervent gate
spiral light
hardy swan
#

just, use the repo cloned by buildtools....

spiral light
#

you can click on single class to get a static webpage of that data too

fervent gate
buoyant viper
#

new to plugin dev and first thing u do is nms? pop off shawty

fervent gate
#

Found it quite hard 😅

hardy swan
fervent gate
#

Yes

hardy swan
#

in the same directory as BuildTools.jar do you see other generated files?

fervent gate
#

mhm

hardy swan
#

if you want the full remapped minecraft code, go to work > decompile-latest > net...

#

if you want to read nms with craftbukkit's patches open the CraftBukkit repo instead

flint blaze
#

sorry where to install the server spigot 1.16.5, the bukkit site does not work

hardy swan
#

use buildtools

flint blaze
#

what do I do?

hardy swan
supple token
#

I have a small questionn

supple token
flint blaze
#

java -jar BuildTools.jar --rev 1.16.5: how do I start this code? with the bat?

supple token
#

I know its build tools why should i use it

spiral light
hardy swan
supple token
#

I meant what is the use of buildtools

hardy swan
flint blaze
late sonnet
hardy swan
#

no one can refuse the official methods

supple token
hardy swan
#

You may

tardy delta
#

for what is Maps.newHashMap useful rather than being fancy?

hardy swan
#

for one thing, you kind of need a test server for your plugins. So yes, you need

red sedge
#

smh

#

flaws are for the weak /s

flint blaze
hardy swan
#

for another you may need sth outside of spigot-api

hardy swan
tardy delta
hardy swan
tardy delta
#

com.google.common.collect package

flint blaze
#

Error: Unable to access jarfile BuildTools.jar
why? @hardy swan

hardy swan
#

because, you do not have the jar in that directory

hasty prawn
#

It's amazing to me how many people don't understand Java errors, I feel like it's so explanatory lol

#

Java: "File not found :("

"what does that mean"

eternal oxide
#

Most don't read it in a Paste, so its confusing

hasty prawn
#

They should make their terminals bigger so they can see it lol

eternal oxide
#

Looks like a jumble of messages

hardy swan
#

who uses that hahahah

#

jk i know people uses that for some weird reasons

flint blaze
hardy swan
#

😮

#

the current one

tardy delta
hardy swan
#

damn

#

they must have found an excuse to include all kinds of libraries

#

apache langs

flint blaze
#

@hardy swan which directory?

hasty prawn
#

The one you're running BuildTools in

hardy swan
#

the one you are intending to run the buildtools in but currently does not have a buildtools.jar, in which you may want to download it from a website and put it into that directory or change directory to whichever directory that the buildtools.jar is downloaded to before running the command 😄

hasty prawn
#

Are you using a .bat file

flint blaze
hardy swan
#

it is written in the javadocs for google commons

hasty prawn
left swift
#

How can i check if task was scheduled?

#

BukkitTask

stone light
#

does anyone know how I would go about making it so every time someone joins the game they start in a separate box?

glossy venture
#

i think they return task id -1 if it fails to schedule

glossy venture
#

like a spawn point?

stone light
#

yeah basically just an area they spawn so they can't leave until the game is started

glossy venture
#

store a list of locations and remove used ones i guess

#

or a list of locations and a list of booleans indicating if they are occupied

stone light
#

oh ok

#

thanks

glossy venture
#
Location[] boxSpawns = ...
boolean[]  boxSpawnsOccupied = new boolean[boxSpawns.length];

/*
* Make methods like "setOccupied", "isOccupied" and
* "getLocation".
*/

public int findFirstNonOccupied() {
  for (int i = 0; i < boxSpawns.length; i++)
    if (!boxSpawnsOccupied[i]) return i;
  return -1; // all spawns are occupied
}
left swift
compact crane
#

Does anyone use the Spigot WebAPI to read out the buyers? Does anyone know or has an example code.

glossy venture
#

if it throws an exception you know it didnt get scheduled right

#

i dont think it throws any exceptions after scheduling it

#
int taskIdOrFailed;
try { 
  taskIdOrFailed = /* schedule */;
} catch (Exception e) { taskIdOrFailed = -1; }

boolean failed = taskIdOrFailed == -1;
tardy delta
#

can i do this more efficient?

buoyant viper
dusk flicker
#

not sure why you have a boolean

glossy venture
dusk flicker
#

I guess if you want to get a result but like not really required

buoyant viper
tardy delta
#

to return if it worked

glossy venture
#

although you could put that inside computeIfAbsent

buoyant viper
#

yeah

glossy venture
#

but its not really neccesary

#

it does the same

#

its cleaner

#

not more efficient

glossy venture
#

also from what i can see its O(1)

#

i dont know what happens in channel.join(...) tho

dusk flicker
#

I feel like the return really isnt needed

glossy venture
#

when they run the command

#

or something

dusk flicker
#

yeah maybe

buoyant viper
#

looks like it

tardy delta
#

liek this?

dusk flicker
#

how is that not throwing an error im stupid

buoyant viper
#

u dont need .put if u .computeIfAbsent @tardy delta

tardy delta
#

oh right

buoyant viper
tardy delta
#

i'm rewriting a few weeks of code :C

vague mason
#

Does anyone else have problems with HikariCP

tardy delta
#

in which way?

vague mason
#
[17:32:35 INFO]: [com.zaxxer.hikari.HikariDataSource] HikariPool-1 - Starting...
[17:32:37 ERROR]: [com.zaxxer.hikari.pool.HikariPool] HikariPool-1 - Exception during pool initialization.
java.sql.SQLException: Access denied for user 'adminbans'@'localhost' (using password: YES)
dusk flicker
#

looks like you just have a password incorrect

vague mason
#

Someone reported that HikariCP can't connect to the database.

dusk flicker
#

or perms not granted

vague mason
#

I have tested that on their system and mysql client with the same information works.

#

I have also downloaded MariaDB on my own computer using Fedora

#

database works and mysql client can also connect to it just normal

#

but again HikariCP has problems with connecting to the database

#

using localhost

tardy delta
#

i'd make a new user in mysql for spigot stuff and grant it all perms

vague mason
#

User does have permissions to manage this database

buoyant viper
#

fedora pog

dusk flicker
#

interesting

vague mason
#

Do you think it can be new MariaDB update?

#

like it suddenly stopped working

#

Last time I have updated this plugin was on Jul 4, 2021 and everything worked great until now.

#

The same HikariCP version and everything

#

I have also updated HikariCP to 5.0.1 (Latest version) and used Java 17 to compile the plugin.

#

Java 11+ is required for HikariCP 5.0.1.

#

and it doesn't work either.

#

Tried with root user and also creating new user and grand him all permission to this database

#

nothing worked.

carmine urchin
#

@glossy scroll Ty!

sacred mountain
#

how do i get the location of a placed water source in 1.8.8

vague mason
#

Does anyone here even use HikariCP in their plugins?

tardy delta
#

yes

vague mason
#

Is this plugin open source, so I can check your implementation?

tardy delta
#

i'm recoding my whole plugin

vague mason
#

You have used setDataSourceClassName

#

Probably Jdbc doesn't work anymore with MariaDB

tardy delta
#

because jdbc url wasnt working

vague mason
#

Yeah this is strage

#

as it was working few months ago

#

but I didn't tested that until now, that someone has reported that it isn't working

tardy delta
#

their github page says to use it but it isnt working

vague mason
#

Exactly and it was working great until now.

sacred mountain
#

how do i get the location of a placed water source in 1.8.8

vague mason
#
            hikari = new HikariDataSource();
            hikari.setMaximumPoolSize(10);
            hikari.setJdbcUrl("jdbc:mysql://" + getConf().getString("mysql_host") + ":" + getConf().getString("mysql_port") + "/" + getConf().getString("mysql_database"));
            hikari.setUsername(getConf().getString("mysql_user"));
            hikari.setPassword(getConf().getString("mysql_password"));
            hikari.addDataSourceProperty("useSSL", getConf().getString("mysql_useSSL"));
            hikari.addDataSourceProperty("cachePrepStmts", "true");
            hikari.addDataSourceProperty("prepStmtCacheSize", "250");
            hikari.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
#

This is how I'm currently using it.

wary harness
#

hey anyway to cancel dismount passenger when player enters water ?

wary harness
#

that event works only on boats and mine cart

#

I got passenger on top of player head

hollow bluff
#

EntityDismountEvent then?

wary harness
#

I will try thanks

wary harness
fervent gate
#
MinecraftServer nmsServer = ((CraftServer) Bukkit.getServer()).getServer();
ServerLevel nmsWorld = ((CraftWorld) player.getWorld()).getHandle();
GameProfile gameProfile = new GameProfile(UUID.randomUUID(), "CosmicPvP");
ServerPlayer npc = new ServerPlayer(nmsServer, nmsWorld, gameProfile);
Player npcPlayer = npc.getBukkitEntity().getPlayer();
ServerPlayerConnection connection = ((CraftPlayer)player).getHandle().connection;
connection.send();

Which packets would I need to send for this to work

#

I've seen some vids where the guy did "PacketPlayOutPlayerInfo" and "PacketPlayOutNamedEntitySpawn"

#

But I can't seem to import those

chrome beacon
#

Everyone do be following that npc tutorial recently

fervent gate
#

Well yea

tardy delta
#

yea

fervent gate
#

But all of these functions and methods have a different name, even though he is using the same version

chrome beacon
#

You're using mapped and they're using unmapped

fervent gate
#

And I am having such a hard time translating these functions

waxen plinth
#

Just use citizens 🙃

chrome beacon
#

^

fervent gate
#

Can they do custom mobs?

chrome beacon
#

Yes

#

They have a great api for it actually

fervent gate
#

Is there good documentation out there?

chrome beacon
#

They have some. Still better than undocumented nms

fervent gate
#

Mk, I'm going to try that

manic furnace
#

What is the best way to store persistent data?

waxen plinth
#

Of what kind

#

How much

#

How often does it change

hollow beacon
manic furnace
#

i mean in my plugin

#

because i create a new file for every player in the moment

hollow beacon
#

i mean that will do

#

depends on the context

#

what kind of data, how frequently do you save and read, etc

manic furnace
#

i mean two strings

hollow beacon
#

then why would you do that

#

what kind of strings

manic furnace
#

a player-name and another string

hollow beacon
#

so a simple key value pair

#

like

#

Kyllian: "the value you have"

manic furnace
#

I do it with JSON in the moment

#

I mean if it is unefficient to read out of files

hollow beacon
#
{
  "kyllian": "string"
}
#

like that?

manic furnace
#

yes

hollow beacon
#

I'd personally just throw it all in one file

#

also, don't use player names

#

use UUID's

manic furnace
#

The file is in a folder with the name of the uuid and inside is the name

hollow beacon
#

if you have one file

#

for example

#

data.json

#

you can do

{
  "player1-uuid": "Cool string",
  "player2-uuid": "Cool string but longer",
}
#

and do

file.get(player.getUniqueId())

#

or something like that

#

instead of going into the folder, reading the file, getting the player name, and then the string

manic furnace
#

Yeah but I think when i read the file from multiple methods, i become an error, or am I wrong?

hollow beacon
#

shouldn't be

manic furnace
#

ok

hollow beacon
#

unless you really mess something up

#

why not use YML though?

#

it's built into spigot

#

for a simple key value pair it will be okay

manic furnace
#

Yeah but i already wrote like 1000 lines of code in which i'm using json-simple so

hollow beacon
#

is it the position logger plugin

manic furnace
#

No

#

But you remember?😂

hollow beacon
#

no I was looking at your github haha

manic furnace
#

no this is because of another project of mine. A guild-plugin

#

And i have to save/create guilds, move players to them and remove them and stuff like that

#

And so i have to update all the files everytime

hollow beacon
#

so your structure is like

#
{
  "player": "guild 1"
}
#

or something

manic furnace
#

yes

#

And a guild-file:

{"head":"b527a5ab-a21c-4afd-b647-12e42058c609","color":"&b","tagColor":"&b","players":["b527a5ab-a21c-4afd-b647-12e42058c609"],"name":"ÜÜ","tag":"ÜÜ"}
#

And i have to edit this file and the player-files several times

hollow beacon
#

i'd consider using sqlite or something

#

or something related to databases

#

if you're planning to scale it up ofcourse

#

it will work, but it's cool if it's faster

manic furnace
#

I want to publish this. So not everyone sadly has a database like mysql or something

manic furnace
hollow beacon
#

you can always use a caching layer

#

so you write changes to for example a hashmap

#

and the hashmap is saveable to the config

#

so you do like

guilds.addPlayer(uuid).save();

#

so everything works immediately, but gets saved later

manic furnace
#

true and i save it every 30 mins and when the server stops

hollow beacon
#

yes and no

#

cuz if a server crashes you lose progress

kind hatch
#

That’s the point of saving frequently. Not just on disable like he said.

manic furnace
#

i mean both

hollow beacon
#

i'd save more frequently, that was my point

#

30 minutes of progress can be alot

manic furnace
#

yes or I say by default like 10 min and you can change it in the config

hollow beacon
#

every tick :p

kind hatch
hollow beacon
#

thats why i suggested sqlite

kind hatch
#

H2 is also pretty good, but it’s a little different.

tardy delta
#

can someone help me, i commited my project to github but i dont see code there?

kind hatch
#

Refresh the page.

ivory sleet
#

Push?

kind hatch
#

Check to make sure your push actually went through.

#

No errors and whatnot

manic furnace
hollow beacon
#

git reset --hard

#

make sure your codebase is ready for that, though

tardy delta
#

i pushed

kind hatch
manic furnace
hollow beacon
#

for a simple guild plugin?

tardy delta
#

well i cant click it

kind hatch
#

Have you actually created a commit?

tardy delta
warm mica
#

Make sure to connect your project with a repo

tardy delta
#

how do i do that?

kind hatch
# hollow beacon for a simple guild plugin?

I mean, he could use files as the default, but if the server gets large enough, he should have a message or system in place to not only encourage upgrading to a database, but a data conversion method.

hollow beacon
#

well i'd use a repository layer

warm mica
#

then move your existing files into that folder and voila

hollow beacon
#

so you can do like guild.addplayer

#

and depending on the data provider it either provides the database or local file

kind hatch
hollow beacon
#

yep

tardy delta
#

what do i need to fill in the lowest box?

manic furnace
#

Ok i don't even work with interfaces at the moment

paper viper
#

like add a slash then add a directory

#

for whatever you want the folder name

#

to be

warm mica
#

so that you can later move all changes back in

tardy delta
#

can that be the same directory as where i saved my files?

tardy delta
#

it says the directory already exists and isnt empty

warm mica
#

It's only temporary

tardy delta
#

and now?

warm mica
#

Did you clone it?

#

Then move all the content (excluding the .git folder) of your old project into the new one

tardy delta
#

yes

warm mica
#

With that, all differences from the repo should appear on the commits page

#

I'm afraid of ShadowMasterG23's message

kind hatch
# manic furnace Ok i don't even work with interfaces at the moment

That’s alright. Interfaces are pretty simple. Making an switchable database system is a great way to learn how they work.

Normally you create a method and call it to do things. Interfaces are similar, except the logic for the methods is in another class that implements the interface.

So if you have two classes, one for JSON files and one for SQLite, they will both implement your interface and the logic required for each system is handled within the respective class.

Then all you have to do is choose which one to use when your plugin loads.

kind hatch
tardy delta
#

ah it kinda worked

warm mica
tardy delta
#

i think i need a gitiignore

warm mica
#

it kinda sucks with intellij but it works most of the time

manic furnace
quaint mantle
warm mica
tardy delta
#

well it looks different than with other people's project

warm mica
warm mica
#

The easiest way to get rid of them now is by doing it directly on github

#

or wherever your git repo is

tardy delta
#

so just add it in the root folder?

warm mica
#

Yup

#

You can also right click on it and click on "add .gitignore"

#

this should be located somewhere

hoary pawn
#

shouldnt this print a msg to console when a player has been hit?

warm mica
hasty prawn
hoary pawn
#

lol

#

hmm

hasty prawn
#

Google how to register listeners

kind hatch
# manic furnace Ok I don't understand evrything, but a little. Can you give me an simple example...

So let’s say a server owner is using your plugin and you have options on what database they can use.

Let’s say you offer MariaDB, SQLite, and YAML.

You need your code to be the same when it comes to calling the methods like createGuild() or deleteGuild().

So what you need is an interface. It’s a class that has the methods, but that’s it. No logic is contained within. Because you can’t expect MySQL code to work with a YAML based file system.

This is where you would need to create your classes to handle the actual logic. You would end up with three. One for MariaDB, SQLite, and YAML.

They would all implement the interface that you created and would all share the same methods. (createGuild(), deleteGuild(), etc)

Then you would add the logic to the classes. Once that is done, you would head back to wherever you originally loaded your database and change it to one of the three classes depending on what’s in the config.

tardy delta
warm mica
# tardy delta gitea?

Gitea is an open source and self-hosted alternative to GitHub. Your screenshot looks exactly like it was taken from that software

manic furnace
warm mica
tardy delta
#

idk how to enable it

#

but i added all the stuff and now i have to commit it?

warm mica
tardy delta
#

ok

solid thunder
#

um hi
i make my plugin for about my server
but i don't know how to get player name who light up tnt after tnt explode to another player using EntityDamageByEntityEvent?

tardy delta
#

i guess the event.getEntity() is the player who got damaged

#

for the lighter you'd need the playerinteract event i think

hoary pawn
tardy delta
#

plugin#getLogger?

hoary pawn
#

hmm

hoary pawn
tardy delta
hoary pawn
dull whale
#
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5</version>
                <configuration>
                    <source>16</source>
                    <target>16</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <finalName>Bridges</finalName>
                            <relocations>
                                <relocation>
                                    <pattern>com.zaxxer.hikari</pattern>
                                    <shadedPattern>me.mc2.internal.hikari</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
``` I get the error Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.1:shade (default) on project Bridges: Error creating shaded jar: Index 12299 out of bounds for length 10193
what am i missing
tardy delta
#

🥺

hoary pawn
tardy delta
#

use dependency injection to get your plugin's instance and call getLogger() on the instance

#

?di

undone axleBOT
sharp flax
hoary pawn
#

AHHHHH

#

ffs

sharp flax
#

Just do

getPlugin(YourMain.class).getLogger()

replace YourMain with the name of your main class

hoary pawn
#

i see the problem

#

i was trying to use the plugin thing without having it defined

tardy delta
#

do smtng like this```java
public Class MyPlugin extends JavaPlugin {
private final Logger logger = getLogger();

public Logger getLogger() { return logger; }
}

public class MyListener implements Listener {
private final MyPlugin plugin;

public MyListener(MyPlugin plugin) { this.plugin = plugin; }

@EventHandler
void blablabla (SomeEvent idk) {
plugin.getLogger().info("mooooooooo");
}```
}

tardy delta
#

no

sharp flax
#

Thats how I do it all the time

tardy delta
#

thats singleton

#

use di instead

#

its alot cleaner

spiral light
wary harness
#

how does Tab plugin make space between armor stands which are riding player

sharp flax
wary harness
#

because every armor stand is a bit up

ivory sleet
#

and you can literally cache the instance

spiral light
tardy delta
#

i did private MyPlugin plugin = JavaPlugin.getPlugin(MyPlugin.class) before :D

ivory sleet
#

well I mean maybe its not being invoked every millisecond

spiral light
#

just use System.out.println(" error ");

wary harness
spiral light
#

how do you set them to passengar ?

wary harness
spiral light
#

you will need to set Holo1 as the passengar from the player and Holo2 from Holo1 and Holo3 is passengar of Holo2

wary harness
#

e.setPassenger(pa);
pa.setPassenger(pa1);
e is palyer entitity
pa is firstarmorstand
pa1 second armorstand

left swift
spiral light
#

uh ^^ markers suck

wary harness
#

so how is this acomplished

spiral light
#

you may try setBaby instead of setMarker

wary harness
#

in Tab plugin

#

that will be big space

#

and Tab plugin uses big ones

spiral light
#

hmmm did you try the passengar tree ?

wary harness
spiral light
#

holo1 passengar of player
holo2 -::- of holo1
holo3 -::- of holo2

tardy delta
#

:kekw:

young knoll
#

Prepared Statements

spiral light
#

actually Tab Plugin uses Scoreboard Teams too

late sonnet
tardy delta
#

:D

young knoll
#

I assume they use the team combined with a single armorstand

spiral light
#

hmm guess team is just for tab and not name above players

young knoll
#

You can be text below the name with scoreboard

left swift
#

But with armorstand nametags you can make unlimited lines

tardy delta
#

goodnight :(

left swift
#

I tested something similar before, teleporting armorstands with every tick works fine

left swift
young knoll
hoary pawn
#

ahh well guess ill wait to tomorrow

late sonnet
hoary pawn
#

fuck

#

i think i see the problem lol

sacred mountain
#

is there an equavalent of event.getBlock().getLocation() for 1.8.8?

late sonnet
#

"Caused by" its the best form to check mistakes xd

sacred mountain
#

for playerbucketemptyevent

#

and playerbucketfilllevent

left swift
tardy delta
#

event.getentity() returns a entity not specifically a player you have to check first

#

if (event.getEntity() instanceof Player)

left swift
quaint mantle
tardy delta
#

hmm lets take a nap

hoary pawn
tardy delta
#

check first

left swift
#

but normally the player can't see their nametag, so I'm guessing it will be hidden

vague swallow
#

Hey uh for some reason I can save things in the config and save the config and read this from the config but if I restart the server I can't do these things andmore and I'm getting huge error messages. Only if I clear the config before the restart it's working. Has anyone an idea what my problem is?

young knoll
#

?paste errors

undone axleBOT
left swift
upper vale
spiral light
#

ping

hollow beacon
#

pong

left swift
#

well, you can possibly use some really small hitbox to position the lines, but it will be difficult to manipulate the height

spiral light
spiral light
#

not on names O.o

hollow beacon
#

whoops

quiet ice
#

Is there any real difference between

public class Outer {
    public enum Inner {}
}

and

public class Outer {
    public static enum Inner {}
}

? If no, what is usually preferable?

spiral light
#

yes

ivory sleet
#

iirc enums become static by default

lost matrix
#

Wait enums are always static

hollow beacon
ivory sleet
#

yeah

lost matrix
#

I thought you meant the class structure in general

hollow beacon
#

i usually just replace 'class' with enum

#

usually easier

quiet ice
#

Nope, talking about enums, interfaces and records which are static by default according to the JLS, but it could be that there is some difference, so I wanted to ask

ivory sleet
#

afaik they compile down to the exact same thing

hollow beacon
#

only if your value is dependent on the static constructor you should use static enum

quiet ice
hollow beacon
#

confirm = true;

quiet ice
#

No Idea why I asked this in the first place when I could've just used javap. AAAAH, I'm getting in the mindset of the spoonfed people

hollow beacon
#

you're forgiven

round finch
#

i'm guilty of that very much

vagrant stratus
#

About to show just how little I touch basic java nowadays. I'm trying to do character incrementation, which while easy on its own doesn't exactly fit what I need to do.
I need to append to the end of a arbitrary string. The strings themselves will be a form of A.B.C.D where D is the incremented string. A, B, and C however are entirely unknown in terms of length.

So, assuming we were to loop through a list of 26 strings it would print out a list consisting of A.B.C.A - A.B.C.Z where as 27 would print out A.B.C.A - A.B.C.Z and A.B.C.AA, incrementing as much as needed i.e. 28 would print out the previous as well as A.B.C.AB, 29 printing previous as well as A.B.C.AC, etc, etc

lost matrix
dull whale
vagrant stratus
lost matrix
lost matrix
vagrant stratus
#

Could grab the last .'s value and work with that now that I think about it more 👀

#

hmm

#

but yea, essentially.
The issue is the recursion & appending however

lost matrix
#

I hope that splitting the String at . is an obvious solution to getting the last value.,

vagrant stratus
#

Yea lol

#

It needs to recurse at Z and append to that pretty much
i.e. 26 prints a-z, 27 a-z & aa, 28 a-z & aa & aab etc, etc

26 prints a-z
27 prints a-z and aa
28 prints a-z, aa, ab

lost matrix
#

Wait.
26 is equal to Z and 27 is equal to AA
Right?

vagrant stratus
#

That would be correct

lost matrix
#

So a base 26 system starting at A

quiet ice
#

I wrote code like that not too long ago, though it was capped at two chars

vagrant stratus
#

My thing is it's completely arbitrary 😂

quiet ice
#

Was a bit of a pain to get it working right

lost matrix
vagrant stratus
#

The incremental amount

hollow beacon
#

isnt that like incredibily easy to do

vagrant stratus
#

I do not touch basic java much lol

hollow beacon
#

explains alot

vagrant stratus
#

Yea, I've been mainly doing ASM work & decompiling given what I do

#

?paste

undone axleBOT
quiet ice
#
            if (counter > 25) {
                int first = counter / 26;
                int second = counter % 26;
                return String.valueOf(new char[] {(char) ('`' + first), (char) ('a' + second)});
            } else {
                return String.valueOf((char) ('a' + counter));
            }

was my version with two chars, I think you could expand it for more

young knoll
#

I mean

hollow beacon
#

add another variable called repeat

young knoll
#

Are you really going to have 26^2 different variations

hollow beacon
#

which is the Math.min of the length / 26

vagrant stratus
quiet ice
#

Likely, minecraft has over 26^2 classes

young knoll
#

Why can’t the standard just use a number

#

Smh

vagrant stratus
#

This is pulling info for my Anti-Malware.
i.e. in this case strings, hence the incremental string at the end

quiet ice
#
builder = new StringBuilder();
while (c > 26) {
   int a = c % 26;
   c /= 26;
   builder.append((char) ('`' + a);
}

something like that would work I think

#

haven't tested it

vagrant stratus
#

fuck doing the incrementing manually lol

hollow beacon
#

do you write unit tests?

quaint mantle
#

yea

hollow beacon
#

cool

vagrant stratus
quaint mantle
#

How do you create custom entities in 1.18?

quiet ice
#
public class Test {

    static void toString(int c) {
        StringBuilder builder = new StringBuilder();
        while (c > 26) {
            builder.append((char) ('a' + (c % 26)));
            c /= 26;
        }
        builder.append((char) ('`' + c));
        System.out.println(builder.toString());
    }
    public static void main(String[] args) {
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
        toString(i);
        }
    }
}

works, though it outputs the characters in the inverted order

wet breach
vagrant stratus
wet breach
#

o.O

vagrant stratus
#

hence the completely arbitrary-ness

wet breach
#

well so far, you have . to look at, and do you have a way of knowing how many strings are in there?

vagrant stratus
#

afaik, unless objectweb asm has a way. No.
Unless I were to count them all first & then re-go through the list

wet breach
quaint mantle
dusk flicker
#

?google

undone axleBOT
vagrant stratus
vagrant stratus
#

I'm aware lol

#

Gimme a sec, I'll just ?paste the code I'm using to pull the strings

#

?paste

undone axleBOT
quiet ice
#

Just enumerate the constant pool \s

wet breach
vagrant stratus
austere bone
#

hey, quick question: how do i change a player's tablist name, p.setPlayerListName(); isn't working..

lost matrix
#

Just realised after some testing that this cant be done by just converting your number to a different base system as you dont have
an equivalent to 0
Usually
after Z there would be A0 but in your case its AA

vagrant stratus
#

The test jar I'm using has strings with a length of 2 all the way up to 58.
The length of the string however does not matter.

As for how many strings are in this specific jar, its 158. This is also arbitrary too due to the string size being different per jar. It could be 0, it could be 1000

vagrant stratus
#

That however, can easily be dealt with via a variable & list lol

#

pain

#

could gen it outside the entire loop by saving each string to a list and looping that instead, but we'd still be in the original issue though possibly more easier to solve lol

lost matrix
# wet breach base 9 goes to 27

base 10 -> 9:

0, 1, 2, 3, 4, 5, 6, 7, 8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22

I dont see how this invalidates my statement.

#

I think i didnt even understand what "base 9 goes to 27" means to be honest....

wet breach
#

do you know your base systems? o.O

lost matrix
#

I hope so...

#

Again. Not sure what this means. Was that sarcasm? Is my conversion wrong?

wet breach
#

Base 9 is basically Ternary but can be use compacted form. Or we could just Ternary only and just keep it at that.

#

Base 9 is also known as nonary

sick herald
#

does anyone know how i can do this without disabling movement?

onyx fjord
vagrant stratus
#

?paste

undone axleBOT
sick herald
#

well it freezes the entity in place

young knoll
#

AI also disables gravity

round finch
#

isn't AI for path finding and walk

sick herald
#

i simply want the entity to exist but with physics still

young knoll
#

Use setAware(false)

sick herald
lost matrix
#

Might be a paper method...

onyx fjord
#

mob.setAware(false);

sick herald
#

im using paper

onyx fjord
#

its not a paper method

lost matrix
#

What spigot version?

onyx fjord
young knoll
#

It’s a part of Mob

#

So you may need to cast

sick herald
#
<dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.17.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.17.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.17.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
sick herald
onyx fjord
#

remove paper api

eternal night
#

and spigot-api

onyx fjord
#

why do u use it lol

eternal night
#

if you are depending on spigot already

sick herald
#

i just added the spigot api to make surer that wasnt the problem

#

i can confirm it was not the problem lol

round finch
onyx fjord
#

maybe send us your code

young knoll
#

A zombie will always be a mob, so the cast should be safe

vagrant stratus
sick herald
#

Mob has that method not livingEntity so ive casted it lemme test

round finch
#

i thought tooo @onyx fjord

onyx fjord
#

good example of different actions on entity

sick herald
#

it works now 🙏

#

thank you guys ❤️

wet breach
#

empty means no characters at all so that is fine. But up to you if you care about them other blank characters lol

vagrant stratus
#

I have to take into account "" too

young knoll
#

Quick someone get the zero width space

wet breach
#

indeed, but " " to most would mean there is a space in the string, when in reality that could just be a control character being shown as a space since control characters don't have a character to display them.

vagrant stratus
#

true 🤔

#

that however still does not solve my original question, however putting each string into an list first simplifies it though :p

wet breach
#

just treat it like octals for strings. I mean IP addresses are arbitrary for the most part if you wanted to create or check random ones, the only reason we know ipv4 limits is based on the rules it was created on. You can do the same with your strings. We have . to separate or know where to append, and then we know at most you only need to loop 26 times. And if you wanted you could map the letters to numbers to simplify the process.

#

or you could just pre-generate strings as well and do an arbitrary check lmao

vagrant stratus
wet breach
#

if we are only looking at the ASCII alphabet, its 26 A-Z

vagrant stratus
#

we'd still have to recurse and append though 😉

wet breach
#

appending isn't hard, you just know that on the 26th run of the loop it has reached the end

#

but its always good to know what the rules are so you know where the boundaries are at. But because of the things I said is what is already known you can easily create worker threads for this with little problems to speed up the process

young knoll
#

Optic is scared of parallel processing :p

vagrant stratus
#

Nah, I'm just dumb

#

and ya know, don't touch basic java much 😂

wet breach
young knoll
#

Why do we need threads for this

wet breach
#

because if you are going to just keep adding characters until something matches

#

it takes a long time for arbitrary lengths to do this

young knoll
#

Wait that’s what’s going on

#

I thought these were just for id

wet breach
#

it is for id's?

vagrant stratus
#

In this case there's few bounds.

There's a constant, in this case String. which would be the start of every string. This constant in the real project would be completely arbitrary, so we'd have to pull everything from the last ..

A valid string in the real program would most likely be String.Spigot.<arbitrary_string>.<incremented_value>.

We know there's 26 characters in the alphabet, however we also know the amount of strings we're going to loop through are completely arbitrary. It could be 0 or it could be Integer.MAX_VALUE

wet breach
#

if that is the case then I really don't see the issue then 🤔

young knoll
#

I’m pretty sure this is just for id

vagrant stratus
#

^

wet breach
#

then I don't see the problem? If we are creating the id's then you are the creator of the rules of it

young knoll
vagrant stratus
#

The program it self would pull every string, assign it an id e.g. String.Spigot.PluginName.IncrementedValue.

The fun part is making sure it increments properly

String.Spigot.PluginName.A
...
String.Spigot.PluginName.Z
String.Spigot.PluginName.AA
...
String.Spigot.PluginName.AZ
String.Spigot.PluginName.AAA
...

young knoll
#

That would be nearly 12 million iterations to cover the word “hello”

young knoll
#

If you can’t do it character by character it would be

vagrant stratus
#

lets say there's 27 strings, yea? 26 for A-Z and 27 for the recurse

String 1 -> String.Spigot.PluginName.A
String 2 -> String.Spigot.PluginName.B
String 3 -> String.Spigot.PluginName.C
String 4 -> String.Spigot.PluginName.D
String 5 -> String.Spigot.PluginName.E
String 6 -> String.Spigot.PluginName.F
String 27 -> String.Spigot.PluginName.AA

young knoll
#

Ah nah I was talking about using it to find strings

vagrant stratus
#

Finding the strings themselves is taken care of, so is putting them into a list to make said found strings easier to work with

young knoll
#

Yeah

vagrant stratus
#

The issue is creating the above output with said list of strings

young knoll
#

Now I want to make a stupid program that just keeps incrementing letters until it matches a provided word

#

10/10 efficiency

vague swallow
#

Hey uh for some reason I can save things in the config and save the config and read this from the config but if I restart the server I can't do these things anymore and I'm getting huge error messages. Only if I clear the config before the restart it's working. Has anyone an idea what my problem is?

vagrant stratus
#

The main issue with the above though, is the amount of strings is completely arbitrary which means one can't just loop A-Z and call it done. It would have to recurse to A and continue until every string as a proper output

vague swallow
vagrant stratus
vague swallow
vagrant stratus
vague swallow
young knoll
#

To be fair I can’t wrap my head around this either

#

It seems so simple

vague swallow
#

sorry for some reason I couldn't screenshot the console @vagrant stratus

vagrant stratus
sterile token
#

What are you talking about I didnt understand your system

vagrant stratus
vagrant stratus
young knoll
#

Isn’t the constant just something you prepend on at the end

sterile token
wooden fable
#

Any player#sendTitle alternatives? (Deprecated) Or can i just use it?

young knoll
#

Yeah but like, at the end of the calculation

dense geyser
#

BufferedReader returning empty array in spigot server, but not in maven test (junit)

vagrant stratus
#

true, but either way each string would have to be correct

young knoll
#

IE calculate AAG -> stick constant on the beginning

vagrant stratus
#

ofc, however if you had lets say 4 strings the output would have to be

String.A
String.B
String.C
String.D

young knoll
#

Which takes 3 ints

vagrant stratus
#

27th in this case would be String.AA, and it increments as as much as needed whether it's switching a character to A-Z or appending a brand new character to the end starting at A

vague swallow
# vagrant stratus How are you saving values?
public void setOwner(UUID id, Chunk chunk) {
  FileConfiguration cfg = main.getConfig();
  String chunkID = chunk.getX() + ";" + chunk.getZ() + ".";
  cfg.set("Chunks." + chunkID + "Owner", id);
  main.saveConfig();
}
round finch
#

I'm not sure if i'm right about it?
but is it some how possible to edit Chat Messages

#

i believe i have seen it somewhere

wooden fable
vague swallow
vagrant stratus
young knoll
#

Oh

#

No BA, BB, etc

vagrant stratus
#

there'd be those too

#

I just got tired of typin lol

young knoll
#

Ah

vagrant stratus
#

hence the ...

#

The program should be able to output String.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ on its own, if there's enough strings for it anyways

hollow beacon
#

but also bbbbbbbbbbbbz

#

😎

ancient plank
young knoll
#

Yes

vagrant stratus
#

or AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZZ or any variation as long as it's properly incrementing, which means no AAAAAAAAAAAAAAAZAAAAAAAAAAAAAAAAAAAZ bullshit lol

round finch
#

it is possible to edit chat message already sent?

#

and remove them

young knoll
#

No

vagrant stratus
#

Actually, there was a message remover plugin from ages ago

#

I can find that

round finch
#

ChatControl?

vagrant stratus
#

Nah, years old

young knoll
#

You would probably just resend the chat history minus the message you want to remove

worldly ingot
#

idek how that would work. Send the whole chat log to the player again with the message removed?

round finch
#

i believe it have seen it too some plugin do that

worldly ingot
#

Yeah lol

vagrant stratus
worldly ingot
#

That'd be the only way to do it as far as I'm concerned

vagrant stratus
#

I just have to hope its not deleted 😂

worldly ingot
#

and it's ugly aPES_Laugh

young knoll
#

TIL people still post updates on bukkitdev

ancient plank
#

since they have a dedicated section for it and people still post there kek

south sparrow
#

question:
is there some kind of base plugin without any features to it I can use as a template for a plugin? I'm new to plugin development but I've coded mods and some other stuff before. Thanks in advance, and ping when reply please.

wet breach
vagrant stratus
#

This is for the Anti-Malware, specifically notification

#

I'm however, trying to create a tool to pull the strings and create said strings automatically cause goddamn there's so many

young knoll
#

What’s wrong with numbers

wet breach
#

be much faster if you just put numbers instead, then later after its done, do some formatting use base 3 to do it.

vagrant stratus
#

That however, becomes an issue if I were to document things properly

round finch
#

sending chat cach agein?

vagrant stratus
#

A full entry in the DB is as follows
69ccf32eeef6030442f28b4651fe79ee493463ae:String.Spigot.HidePl.A

The first half is the string hash, and the second half is what's logged to console when found

young knoll
#

Is MaliciousCommand.Spigot.HidePl.1 not acceptable?

round finch
#

learning to do packet Chat edit / remove

vagrant stratus
young knoll
#

Boooo

vagrant stratus
#

😂

#

Glory to standardization!

tall nova
#

Yea there are definitely chat edit plugins

young knoll
#

They are just hacky

wet breach
#

when it should be split into two processes

tall nova
vagrant stratus
tall nova
#

Packets might be the more efficient way than clearing up the chat

young knoll
#

You just gotta record all outgoing packets into a list so you can resend them later

#

With whatever you want removed

wet breach
#

personally I would just use numbers

#

because you can just use the loop number to easily plug that in, not entirely sure why it matters that every string get a letter lol

vagrant stratus
tall nova
wet breach
tall nova
young knoll
#

Can’t capture outgoing messages with the API

vagrant stratus
tall nova
#

Oh

wet breach
#

unless you trying to capture messages from other plugins

young knoll
#

Mhm

vagrant stratus
wet breach
#

but if you are trying to capture messages the plugins broadcast or what not, yeah might need to use packet capturing or reflection, but I mean also not hard to edit plugins themselves since most are open source anyways.

#

so if we are doing just chat related things from players, then API is sufficient

young knoll
#

True, you can just use the chat event

vagrant stratus
young knoll
#

Dang that plugin is an old boy

wet breach
tall nova
#

Yeah, I think the only case where you would actually need packets is for editing messages after they’ve been sent. Not many cases where this is useful but I’ve been thinking maybe it could be useful if you had a discord bridge plugin, so when a message gets edited on discord it does on Minecraft as well

young knoll
#

No

#

You only need packets to capture messages not sent by players

wet breach
tall nova
#

Oh

#

Never mind

young knoll
#

The method of “editing” them is just resending the entire chat history

tall nova
#

Hmmmm

#

I see I see

vagrant stratus
#

well, some anyways lol

#

However in my case, I'm not dealing with just the jar, but everything in the jar too

#

and of course, many different variants of the same malware

young knoll
#

Having a button to edit your own chat messages actually sounds really cool

#

But very exploitable

vagrant stratus
#

so in my case, the variant is very important, even more so if I need to go and verify a jar for one reason or another

young knoll
#

DDoSing people with chat message editing

vagrant stratus
#

👍

young knoll
#

I guess if you limit it it might be okay?

#

Idk

vagrant stratus
#

I mean, ig if I really wanted to I could do numbers as an intermediate step lol

#

could then use the num length to generate the correct char sequence

foggy estuary
#

How do i add a method inside another method?

young knoll
#

You don’t

vagrant stratus
#

what are you trying to do exactly?

vagrant stratus
young shell
foggy estuary
#

using playermoveevent plus runnable

quaint mantle
#

so what cant you do?

tall nova
#

Just move one block at all?

#

You can save the runnable and call cancel on it

quaint mantle
#

do you need a runnable in a event?

foggy estuary
#

yes

#

well no i already have that

#

i need the playermove event inside the runnable for it to work

#

doesnt like that and spawns 500 sheep in the 5x5 every second instead

quaint mantle
#

ok so put the runnable in the thing?

tall nova
#

That’s not how it works bruh

#

Yeah

#

Just have the runnable somewhere else

eternal oxide
#

Events are just that, event driven. They do not belong in tasks

tall nova
#

And cancel it when it’s inside the event

wet breach
tall nova
#

I mean you COULD have an API for the plugin and warn people that it messes up natural logging

little elm
#

How would I determine if getOfflinePlayer(String name) actually exists? In the JavaDocs, it says that "This will return an object even if the player does not exist."

lost matrix
little elm
#

thanks!

quasi patrol
#

Small question, how can I allow other plugins to change my plugin’s variable or config data?

tall nova
#

What will be in the object if they don’t exist lol?

worldly ingot
#

Anything public will be accessible

lost matrix
tall nova
#

Yea and if you don’t want them to have to make an instance you could make it static

worldly ingot
#

Well, I mean... be smart about where to use that lol

#

There is also the services manager

lost matrix
worldly ingot
#

Kappa Yes, the Vault manager

#

The underused API that really, really should be used more often

#

Bukkit's got lots of underused APIs. Conversation APIs, chat pagination APIs, services manager, (proper use of) metadata API

lost matrix
#

There is a chat pagination API?

lost matrix
#

TIL

worldly ingot
#

Super handy for splitting up text in lore

lost matrix
#

gonna member that

ancient plank
#

wtf

kind hatch
nova sparrow
#

Can someone help me with why my gradle project isn't showing up in package/project explorer in eclipse

kind hatch
patent horizon
#

are there any data types in java like hashmaps that can contain multiple value types

ivory sleet
#

Type parameters technically

patent horizon
#

i wanna shove the entire playerdata config of a player into a hashmap, but some values are ints, others are strings, etc.

ivory sleet
#

Use a class

worldly ingot
ivory sleet
#

Like Map<K,ClassName>

#

Since classes are types

patent horizon
#

so if i was just theoretically grabbing a player's level (int) from that, what would it return

#

a class?

kind hatch
worldly ingot
#
public class YourDataClass {

    private int yourInt;
    private String yourString;

    public int getYourInt() { } // implement this

    public String getYourString() { } // implement this

}```
#

Then yeah, if the value is YourDataClass, just operate on it as you normally would

#

The value can be any type you want

ivory sleet
#

^ no idea how choco writes code so fast but ^^^^

worldly ingot
#

~magic~

wary harness
#

From some reason removePassenger method is not working

#

if you loop again thru all passengers they are still in list

wet breach
#

are you sure it is not working? maybe they weren't a passenger and instead the driver 🤔

open current
#

When i do /msg (MESSAGE HERE) it adds the prefix (Console -> {username}) how can i take this away or change it

young knoll
#

Wait wait wait

#

There’s a pagination API

wet breach
young knoll
#

The heck

#

I wonder if it does what I need

#

Probably not actually

wet breach
# wary harness

just fyi, half my comment was a joke. Not entirely sure why it isn't working.

wet breach
young knoll
#

If a line ends with a certain color/formatting, will the next line start with it

wet breach
#

why would it end with that?

#

o.O

young knoll
#

Well if the ending of a line is “&6This is red”

#

I would want that next line to start red

wet breach
young knoll
#

For example “&6This is red, this is also red.” Should be split into
“&6This is red,”
“&6this is also red.”

wet breach
#

well not exactly sure if it does that

#

don't think it does

young knoll
#

Meh, I already have my own solution anyway

wet breach
#

but it should return an array

#

so basically it does some things for you easily 🙂

young knoll
#

Yeah mine returns a list

patent horizon
#

whats the best way to do type conversions without making an individual method to return every type from a config?

ivory sleet
#

Wym

#

Maybe just a Something.<T> with get(Class<T> type, String path) and what not

young knoll
#

That’s what spigot does iirc

patent horizon
# ivory sleet Wym

like in my old config system, i had an individual method to grab data from a config like getString(), getInt(), etc. this is very painful and i want to evolve

ivory sleet
#

Yeah

#

I mean arguably create an interface for the configuration (not to be confused with java interface)

#

and then have a method for every property

patent horizon
#

im using redlib's config manager

ivory sleet
#

Idk never used that

#

I used redlib for cmds b4

patent horizon
#

yeah thats kinda their main thing

ivory sleet
#

Let’s just have an example

#
interface BlahConfigurationInterface{

  void load() throws Exception;
  
  int getLevels(); //instead of config.getInt("levels");

}```
#

Then just implement that

#

And so you could ofc encapsulate a normal FileConfiguration

#

Or do sth completely else

#

Pog is, this interface will serve as a nice facade to reduce the complexity and details of things

kind hatch
#

Hey @worldly ingot, do you have some examples of how to use the ChatPaginator properly?

little elm
#

Is there a way to access keys/values of a YML configuration file by its index?

low temple
patent horizon
#

yes

paper viper
#

yeah ```java

low temple
#

woah I didnt know you could do that

patent horizon
#

you can do it for almost every language

paper viper
#

```java
[code here]
```

patent horizon
#

even weird ones like xml and gradle

quaint mantle
#

really?

buoyant viper
#

gradle is just groovy

#

ezpz

paper viper
#

Yeah lol

#

or kotlin dsl

patent horizon
#

no gradle is rad

paper viper
#

its not weird

low temple
#

thats wicked

quaint mantle
#
<hi>
buoyant viper
#

well groovy is pretty weird

#

so by extension so is gradle

young knoll
#

Says you

paper viper
#

lol

buoyant viper
#

wTTF

young knoll
#

Scala

quaint mantle
#

bois what are you talking about? Maven is rad

low temple
#

ive only learned maven, gradle seems less understandable ot me

quaint mantle
#

I tried something on gradle

#

IT TOOK SO LONG I QUIT

young knoll
#

Poms are so big

quaint mantle
#

not rlly

#

they are organized at least

low temple
#

yeah but poms arent hard to read

quaint mantle
paper viper
#

you sure?

#

id argue the opposite

low temple
#

plus lets you auto-download libs (dunno if you can on gradle)

paper viper
#

??

low temple
#

idk its pretty simple to read

paper viper
#

you can do everything maven on gradle

quaint mantle
#

ok its not THAT hard to read

young knoll
#

You can’t specialsource

#

Well you probably can but shh

low temple
paper viper
#

its a different team

low temple
#

I just like how organized it is

paper viper
#

Lol

#

and you are saying gradle isnt?

#

lol

low temple
#

no but im more used to maven

paper viper
#

you are telling me you dont prefer

shadowJar {
  relocate("org.someshit", "com.someshit")
}

over

<relocations>
  <relocation>
    <pattern>org.someshit</pattern>
    <shadedPattern>com.someshit</shadedPattern>
  </relocation>
</relocations>
low temple
#

ok lemme say it again since you dont understand

#

I have only ever really used maven

#

so I know how to use it

#

I dont use gradle

quaint mantle
#

YES

#

THE MAVEN ONE LOOKS SO MUCH NICER

low temple
#

So yes I prefer the latter because I dont have experience with the first

quaint mantle
#

meh the maven one looks nicer for me lol

paper viper
#

so you prefer typing verbose stuff

#

:sadge:

#

lol

quaint mantle
#

meh I like the pom.xml over the gradle one

low temple
#

id rather spend the extra 10 seconds typing verbose stuff then spending an extra 3 minutes waiting for it to run

quaint mantle
#

lol

young knoll
#

Grade runs faster

#

Usually

paper viper
#

you are going to have to use it at some point

quaint mantle
#

tru

ancient plank
#

gradle runs slower in my experience !

quaint mantle
patent horizon
#

what do i put in a method's parameter type if i want to pass an instance of a class?

quaint mantle
#

or I just have crappy laptop

young knoll
#

The heck

#

Wack

quaint mantle
#

bruh

patent horizon
#

no

paper viper
#

Yeah no, gradle is definitely faster and its proven lmao

patent horizon
#

what do i put there

low temple
#

?

quaint mantle
#

OHHHH

low temple
#

put ?

quaint mantle
#

generics

patent horizon
#

mhm

ivory sleet
#

Pass a type

quaint mantle
#

a name you want give

low temple
#

Yeah either pass a type of do Class<?>

young knoll
#

Real pros do Class<? extends Object>

quaint mantle
ivory sleet
#

<T> void epicMethod(Class<T> epic);

patent horizon
#

why would i need to pass a type?

paper viper
#

? extends ? extends Object

quaint mantle
#

oh god

young knoll
ivory sleet
#

because you’re using a parameterized type?

quaint mantle
#

hey you guys...

#

java question