#help-development

1 messages · Page 1824 of 1

sullen marlin
#

because you already made spigot provided

#

its being pulled in by another depend

young shell
#

Ohhh, So another Dependency is pulling spigot without having provided

#

I see

sullen marlin
#

use the graph or whatever above to figure it out

thick gust
#

Hey guys, I am already searching so long for this.. Now I got a new api built with BuildTools.jar and Git (the latest one, so 1.18.1..) but I figured out I can't import anything of it (JavaPlugin/etc...) Do you know how to fix my problem? As IDE i am using Eclipse (dunno if that's important)

young shell
#

Whats the correct way to create a Dyed Item like a Glasspane in 1.8, the Constructor with the byte for the color is deprecated

paper viper
#

if you look at your server jar

thick gust
#

Change the metadata using setMetaData @young shell

paper viper
#

is the code somewhere else and its a isolated library loader?

#

Have you tried running remapped option for buildtools?

young knoll
paper viper
#

and also how are you importing it

thick gust
#

I got it in a seperated workspace folder.

#

@young knoll Yeah but besides that you can just use setMetaData as well and dye it like that i think.

young knoll
#

No

#

That’s not how materials work

young shell
young knoll
#

Yes

#

Isn’t that what you wanted

thick gust
#

@paper viper I use the import function of eclipse

young knoll
#

Oh you want it for 1.8

paper viper
#

smh

young shell
#

Yeah

paper viper
#

man, use maven or gradle

#

or something

young knoll
#

The proper way was with MaterialData, but using the byte is fine

thick gust
#

@young shell Now I'm pretty sure I've done it for 1.8 using the metaData (method: setMetaData)

#

Ah MaterialData yeah

#

MetaData 🤣 Im sry

young knoll
#

Not like the byte is going anywhere

young shell
#

Yeah, don't like using deprecated stuff tho

young knoll
#

You say this using 1.8

thick gust
#

There's no other known way you gotta use setMaterialData..

waxen plinth
#

I used to do it that way with eclipse

#

You really should use a build system

#

It saves you so much time and effort

thick gust
#

What do you exactly mean with that?

#

How should I start to setup such stuff

#

Back then it was so easy why did they changed it xD

woeful crescent
#

anyone know the protection multipliers for 1.8?

#

Pretty sure the wiki only shows post-combat update

young shell
magic dome
#

anyoen know the answer to this or a way to get around it?

young knoll
#

Oh god entity move event

#

Use a runnable when you launch the projectile

young shell
thick gust
#

@young shell

ItemStack i = new ItemStack(Material.STAINED_GLASS_PANE, 1, DyeColor.LIGHT_BLUE.getData());

This is one way you can potentially use it.

young shell
#

Is there a method instead of getData() thats not deprecated

dusty sphinx
#

Is there an easy way to add a map to a list in the configuration?

vestal matrix
#

why am i getting this error https://pastebin.com/WbyYjS4c from

                    Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/jdbc-video", "<user name>", "<password>");
                    Statement statement = connection.createStatement();
                    ResultSet resultSet = statement.executeQuery("select * from people");
                    while (resultSet.next()) {
                        Bukkit.getLogger().info(resultSet.getString("firstname"));
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }``` yes the sections exist and i tried this on a normal java project and it worked fine but when making it a spigot project it isnt working
and my maven is
```        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.27</version>
        </dependency>```
thick gust
young shell
#

Yeah using a magic number would be even worse

#

Guess I'll have to live with that

young knoll
#

There is a non deprecated way

#

But idk what it is

thick gust
#

@young shell Why aren't you fine with deprecated stuff? Just add SupressWarnings lol

young shell
#

Because usually it's not good style to do it. So if there is a non-deprecated way to do something, I prefer that

young knoll
#

Look around on google

#

We don’t really support 1.8 here

young shell
#

I already did that but didn't found anything helpful

#

But I'll just use that deprecated Method

thick gust
#

Of course it's a better style, but if there's only a deprecated method which can be found, I recommend you to prefer using that rather than keep searching half an hour for it, which you could invest into your further plugin development 😄

#

However, everyone got to decide that for himself.

young knoll
#

If this was a normal scenario I would keep looking

#

But in this case you have 0 risk of the deprecated method being removed

young shell
#

True

thick gust
young shell
#

Thanks man

thick gust
#

use this to deprecate stuff KEKW

young shell
#

Set that up earlier today, but didn't actually think anyone would do that

#

I'll use the deprecated stuff

#

😄

thick gust
#

You got it right in your profile LOL

#

Ofc people will use it.

young shell
#

Yeah, but I don't expect people to pay money to someone they don't know

thick gust
#

I often donate little amounts to ppl if I got the money left lol

young knoll
#

Level 20

young shell
#

Thanks man. I'll pay it forward if I can

thick gust
#

xD yeah that's how I deal with randoms lol

young knoll
#

I like that way to depict age

young shell
#

😄

thick gust
#

Still didn't figure out how to deal with this silly apis

#

Gosh it's so freaking frustrating they should have just kept it the way it was

#

It was so easy and uncomplicated importing stuff to your Java project

#

And now they made an entire university topic out of that.

#

For the love of god change it. It's crap

young shell
sullen marlin
thick gust
#

Thank you @sullen marlin

vestal matrix
thick gust
#

w...w8 do I understand this right? You got to download Java 17 so it works?

#

Or do you have to pay attention to anything else?

#

You know I don't want to read the entire article including the xml script ._.

sullen marlin
vestal matrix
#

i just tried it on my java project and it works fine

#

(one without spigot api)

waxen plinth
#

Does the server have mysql installed and running

sullen marlin
young shell
#

That MySQL Driver Version bump was definitely needed

sullen marlin
#

Why

vestal matrix
sullen marlin
#

Yes

#

You need MySQL to use MySQL

waxen plinth
#

lol

thick gust
#

@sullen marlin Can you also gain such a bootstrap using the same BuildTools.jar you are using to download the actual api itself? Also, is it possible to get a bootstrap file for PaperSpigot as well? 😮

sullen marlin
thick gust
#

Why is there no tutorial to do this... Like things have changed a lot and still there's no random guy on YouTube showing how the new stuff works

sullen marlin
#

Use the correct IP and database name in your code

vestal matrix
#

my database is on the mysql workshop though

#

so why would i use that if i cant modify the data in it

thick gust
#

Still don't get why the dev team of Spigot didn't just kept the libraries in one jar, that's much more uncomplicated! That way you don't need an external manager such as Maven or Gradle or however they're called....

young knoll
#

Because Mojang didn’t keep the libraries in one jar?

thick gust
#

And I still dunno how to setup such stuff cuz there's no one showing how to do that. Back then when I started coding with Bukkit, people explained things, now you gotta go to school to get used to it or what..

sullen marlin
#

Because then people would be complaining that we did keep them in one jar

thick gust
#

@young knoll Yeah but Spigot did that previously all the time

#

@sullen marlin Why would they? xD

ivory sleet
#

fat jar

young knoll
#

There are hundreds of people who will show you how to set up maven/gradle

ivory sleet
#

🤢

sullen marlin
#

spigot being outdated and not following mojang!!!!!!!!!

#

whatever we do is always the wrong move

dusty sphinx
#

Is there an easy way to add a map to a list in the configuration?

ivory sleet
#

yeah and maven/gradle are generally just superior whenever you start to actually code software

young knoll
#

Hell, you can probably find a full build.gradle or Pom with a bit of searching

dusty sphinx
young knoll
#

Find an open source 1.18 plugin and look at its build file

young knoll
dusty sphinx
# dusty sphinx Is there an easy way to add a map to a list in the configuration?
channels:
  - name: global # The name of the channel. This will be what the player sees.
    sameworld: false # If players should be in the same world in order to see messages in this channel.
    distance: -1 # How far players must be from each other to hear them.
    # A value less than or equal to 0 means infinite.
    # If sameworld is false, distance will scale 1:8 for the Nether, and not at all for the end.```
My config.yml looks like this, whats the best way to add a map to the list?
quaint mantle
#

okay im using real spigot now, and this is the error that i ran into the first time i tried this, hence the reason i switched to spigotclip.
when i enter the "1.17" version in the .bat for buildtools, i always run into this error

*** Please note that this is a beta feature, so if it does not work please also try a manual install of git from https://git-for-windows.github.io/ ***
Could not successfully run git. Please ensure it is installed and functioning. Error running command, return status !=0: [C:\WINDOWS\system32\cmd.exe, /D, /C, git, --version]
Press any key to continue . . .```
dusty sphinx
#

the list being channels

thick gust
#

The entire spigot webpage's design is outdated and it seems like it also got no updates for ages.

dusty sphinx
#

cope?

thick gust
sullen marlin
young knoll
#

Like I said, you can find tons of examples from open source plugins

thick gust
#

@sullen marlin The content is alright, but the design is just oldschool, now take a look at lots of webpages which had a huge gap in between some years related to it's design!

sullen marlin
#

seems perfectly fine to me

young knoll
#

It needs more auto play videos and ads over the content

thick gust
#

@young knoll Gosh no I got my adblocker for a reason XD

quaint mantle
thick gust
#

Okay let's say I got Maven setup for Eclipse. What then? I still need a bootstrap library which I kinda attach to Maven, don't I? Where do I get that from?!

sullen marlin
quaint mantle
#

hello, how i can verify if player has item in hand in PlayerInteractionEvent in Material?

quaint mantle
young knoll
quaint mantle
young knoll
#

Check event.getItem != null?

thick gust
#

@quaint mantle Yeah that's what I'm thinking of but less people will use Spigot if it's divided into several parts you gotta watch more tutorials for. Like some years ago, you created a Java Project, and imported ONE API and you were good to go and could start to code fun projects. Now you gotta go through brainfuck and download multiple files, and some addons like Maven or whatever that is

sullen marlin
#

no you dont

young knoll
#

Lol it’s still one dependency

quaint mantle
sullen marlin
#

Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar

quaint mantle
# young knoll Check event.getItem != null?

My Code

@EventHandler
    public void onBlockInteract(PlayerInteractEvent e) {
        Player p = e.getPlayer();
        Block bloco = p.getTargetBlock((Set<Material>)null, 5);

        if(p.getItemInHand().equals(Material.AIR)) {
            Inventory i = (Inventory) Bukkit.createInventory(null, 9, "§b§lMenu da Maquina");
            p.openInventory(i);
        } else {
            ItemStack hand = p.getItemInHand();
            if(bloco.hasMetadata("Maquina")) {
                List<String> loresList = new ArrayList<String>();
                loresList.add("§f");
                loresList.add("§fCombustivel de Maquinas!");
                loresList.add("§fTempo: 1 Minuto");
                loresList.add("§f");

                if(hand.getItemMeta().getDisplayName().equalsIgnoreCase("§eCombustivel 1MIN") && hand.getItemMeta().hasLore() && hand.getItemMeta().getLore().equals(loresList)) {
                    startMachine(bloco.getLocation().add(0, 0, +1), p, bloco);
                }
            }
        }

    }

    private void startMachine(Location l, Player p, Block b) {
        ArmorStand as = (ArmorStand) l.getWorld().spawnEntity(l, EntityType.ARMOR_STAND);
        as.setGravity(false);
        as.setCanPickupItems(false);
        as.setCustomNameVisible(true);
        as.setVisible(false);
        Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
            int Seconds = 20;
            @Override
            public void run() {
                if(Seconds >=0) {
                    Seconds--;
                    as.setCustomName("§eRestam §f" + Seconds + " §esegundos.");
                    b.getLocation().getWorld().dropItem(b.getLocation(), new ItemStack(Material.SPONGE));
                }
                if(Seconds == 0) {
                    p.sendMessage("§cAVISO → §fO combustivel acabou!");
                    as.remove();
                }
            }
        }, 0, 20);
    }```
sullen marlin
#

if you were depending on the server jar not the API you were doing it wrong to begin with

young knoll
#

Don’t question the last link

quaint mantle
#

@sullen marlinwhat do i do, you didnt tell me anything

young knoll
sullen marlin
quaint mantle
#

alr did that

#

welp back to youtube i go :I

thick gust
#

@quaint mantle Same here and I'm tired of setting up something for spigot plugins for like 2 hours XD

#

Where do I get Maven from? can i just rely to the eclipse marketplace?

sullen marlin
#

dude

#

the simple solution

#

instead of spigot.jar

young knoll
#

If you don’t want to use a build tool just depend on the right jar

sullen marlin
#

spigot-api.jar

#

Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar

#

repeated several times

#

plenty of jars available there too

thick gust
#

Yo relax, I got to follow 2 ppl besides spam in the chat, you and Coll.

#

It's not that easy when 5 ppl write in the same time and sometimes write multiple times in seconds.

#

However, thanks for your effort..

#

Guess I will make a bookmark on my browser for such a link so I won't miss it for future things. Thanks.

quaint mantle
#

How i can verify if is RIGHT click?

thick gust
#

Use PlayerInteractEvent and ask for the Action of the event.

thick gust
#

Using an if case? 😄

quaint mantle
#

'-'

#

event.?

thick gust
#

"PlayerInteractEvent"

quaint mantle
#

e.getAction()?

thick gust
#

Yes

quaint mantle
#

ok

thick gust
#

Use == to compare it with Action

quaint mantle
#

this return "RIGHT" and "LEFT" ?

thick gust
#

I didn't do that for a while think it was smth like that. Action.RIGHT_CLICK

quaint mantle
#

Cool

#

I'm new in Spigot, trying now

thick gust
#

Should be an enum you compare to the Action of the event which you get returned using your previously mentioned method (e.getAction())

#

Watch a few tutorials, they cover most important events such as the PlayerInteractEvent as well.

#

At least you made it to setup your Spigot Workspace, not like me, a member for years being fked up atm.

quaint mantle
#

RIGHT_CLICK_BLOCK?

#

Action.RIGHT_CLICK_BLOCK?

thick gust
#

Yeah RIGHT_CLICK_BLOCK is the correct value for the Action you're looking for.

quaint mantle
#

Trying, wait

thick gust
#

Like adding the spigot libraries

#

Entire desired example:

public class Events implement Listener {
  @EventHandler
  public void onClick(PlayerInteractEvent e) {
    if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
      //Do your other stuff here.
    }
  }
}
#

Think I don't need to mention that the imports at the class head are important as well, you should know that already ^^

#

Don't forget to use the PascalCase to name your classes!

thick gust
#

No problem.

quaint mantle
#

<3

thick gust
#

@sullen marlin Sorry that I ask, but can I actually download the lib using your pasted website? Like all I can find is an xml script for Maven but not a download btn for the lib itself.

sullen marlin
#

you can find it in buildtools Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar

#

otherwise there is the jar and shaded jar links in the side of that website

thick gust
#

Aight I just found a different link on a small lable lol

#

Clicked that tiny label

#

Think that will do it as well, right?

sullen marlin
#

or the download button in the bottom right

thick gust
#

Oh wow.

#

Haha that's so tiny I gotta zoom in xD

#

Yeah the shaded didn't work for me, but the normal one did I just mentioned on the screenshot.

#

Thanks man 🤗

quaint mantle
#

@sullen marlin in gitbash it says "Error: Unable to access jarfile buildTools.jar"

#

😐

sullen marlin
#

its BuildTools.jar

#

and make sure correct folder

quaint mantle
#

yes

#

everything is in its place

#

it just wont fucking owrk

thick gust
#

Correct Java Version?

quaint mantle
#

yes its 16

thick gust
#

Okay

quaint mantle
#

actually its 17

thick gust
#

Uh system path correct?

quaint mantle
#

whatever still works

#

uh

#

the command is just

#

java -jar BuildTools.jar --rev 1.17

thick gust
#

Yeah but is your system path correct xD

quaint mantle
#

huh

#

tf is that

#

holy shit

#

im a dumbass

#

but how do u add it

magic dome
#

isnt that where like you have to set your java path in your system or something??

quaint mantle
#

nvm i see it

thick gust
#

Yeah

#

Exactly.

magic dome
#

environment variables right

#

something like that?

thick gust
#

Yup

quaint mantle
#

AHA

thick gust
#

That should be it

#

XD

quaint mantle
#

nevermind

#

this shit

thick gust
#

Lmao

quaint mantle
#

same error ive gotten for like 10000 years

thick gust
#

Also why are external server emotes forbidden on spigot discord? LOl

magic dome
#

Yeah I had change my path in the environment variables not long ago

quaint mantle
#

isnt this just so fun

thick gust
#
Please try comment your error messages out like that
quaint mantle
#

ik i forgot

thick gust
#

Just much more readable 😄

magic dome
#

"error: could not write config file C:/Users/james/.gitconfig: Permission denied" run as administrator?

quaint mantle
#
Java Version: Java 17
Current Path: C:\Users\user\Downloads\BuildTools\.
git version 2.34.1.windows.1
Git name not set, setting it to default value.
error: could not write config file C:/Users/james/.gitconfig: Permission denied
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [git, config, --global, user.name, BuildTools]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:964)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:895)
        at org.spigotmc.builder.Builder.main(Builder.java:249)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
thick gust
#

Wait so you gotta boost so you gain access to all server emotes? Bruh..

sullen marlin
#

idk your system just seems whack

#

is it a work/school PC with security measures

quaint mantle
#

should i disable antivirus

magic dome
#

lmao thats not good if the creator doesnt even know whats going on ha

thick gust
#

Run as admin or grant access by changing the properties of the file!

#

@quaint mantle No that's not necessary. As long as there's no Java Virus detection you won't need to do that.

quaint mantle
#

i mean al the security permissions are granted

#

so

#

idk wtf is happened

thick gust
#

File owner has to be you

#

And you gotta be an admin

#

Your os is windows i assume

quaint mantle
#

spigot is one of the most infuriating things ive ever dealt with

#

tf u mean file owner

thick gust
#

@quaint mantle Nah old spigot is fine

quaint mantle
#

how do i do that

thick gust
#

KEKW

magic dome
#

I had a question... Im trying to track the movement of a fireball. I really just don't want to use a scheduler because of keeping track of the tasks and such... I was wondering if any event was triggered when a fireball moves. I know EntityMoveEvent only tracks LivingEntities... so thats not helpfull. I really just dont wanna use repeating task... I willl if I have to but i jsut wanted to see if you guys have any ideas

young knoll
#

EntityMoveEvent isn’t even spigot

thick gust
#

Right click on the permission denied file > Properties > Security Tab > Extended > Change label (little blue label next to the Owner of the file)

young knoll
#

No, there is no event for that because it would be incredibly heavy on the server

thick gust
#

Should look kinda like that @quaint mantle

magic dome
thick gust
#

LUL

magic dome
#

um so I will be leaving now

thick gust
#

gn8 😄

quaint mantle
#

ok lemme send a pic

#

lemme verify

thick gust
#

lawl

quaint mantle
#

asd

#

yay

thick gust
#

Can you actually just code your spigot plugins and import them into your paperspigot server without any doubts or are there a few things to consider

quaint mantle
#

okay

young knoll
#

For now

quaint mantle
#

how i get a ArmorStand by location in world?

#

ok so this is what i have right

#

now what

#

@thick gust

thick gust
#

Click on Change

#

The blue label

quaint mantle
#

then

thick gust
#

Try to watch out if you have multiple users, if so, use the admin one.

young knoll
thick gust
#

If you only got one user, then you are good to go!

quaint mantle
#

but i clicked change

#

and now what

thick gust
#

Uh

quaint mantle
thick gust
#

Try type in "Admin" into the textbox

quaint mantle
#

I using spigot 1.8

thick gust
#

Does it give you an error?

young knoll
#

What class

thick gust
#

Ah no

#

Type in "Administrators"

#

Into the textbox

quaint mantle
thick gust
#

Click ok, then if the windows closes, click apply, and then keep click okay.

#

Also make sure your directory your file is located in, is not read-only!

quaint mantle
#

okay i claimed it

thick gust
#

Good.

young knoll
#

Ah world probably didn’t have a get nearby entities in 1.8

#

You can only use it on an entity

thick gust
#

You can get Entities by World

quaint mantle
young knoll
#

Spawn a dummy entity or loop over all entities in the chunk and check the distance

thick gust
#

getWorld().getEntities() i think? 😄

quaint mantle
#

oh my fucking god

#

this shit WONTY WORK

young knoll
#

Don’t brother with the entire world

thick gust
#

KEKW

young knoll
#

Chunk.getEntities exists

#

Well it does now, I assume it did back then

quaint mantle
#

i hate this software so fucking much

thick gust
#

I told you make sure you applied your changes AND your directory your file is located in is read-only

quaint mantle
#

I have an armorstand on top of the block, how do I get it?

#

read-only

#

tf is that

young knoll
#

We just told you

thick gust
#

It's not a software, it's a library you can develop cool plugins with once you set it up 😄

#

@quaint mantle Don't you know your OS ? XD

quaint mantle
#

bro im not a developer

#

i dont know this shit

#

im trying to host a server for my friends

#

i just realized im in the wrong channel

#

well shit

thick gust
karmic grove
#

What do i use to change a players skin server side only ofc

thick gust
#

That's how you remove the attribute read-only for your file.

quaint mantle
#

thank you

young knoll
thick gust
#

Make sure you did that for your file itself AND the directory, the file is located at.

quaint mantle
#

its already turned off tho

thick gust
#

For directories, it's the same step you just repeat.

#

Try to do it then for the directory of the file

quaint mantle
#

ok

thick gust
#

If that's turned off already as well I don't know any other fix but running your git as admin...

quaint mantle
#

ok i turned that off in the directory

thick gust
#

I hope you know how to start things as admin xD

quaint mantle
#

yes yes im not that entirely dumb lol

thick gust
#

Aight retry

#

Some ppl are XD

quaint mantle
#

omg

thick gust
#

?

#

Did it work?

#

xD

quaint mantle
#

NO

#

😢

thick gust
#

XDDD

quaint mantle
#

this shit is ass

thick gust
#

Did you start your git as admin? This really seems like it's not run as admin

quaint mantle
thick gust
#

I know that's a dumb question but it's an important question lol

#

Cuz if it's not admin it won't work

quaint mantle
#

but how do you run it as admin in the directory tho

#

thats what i dont know hwo to do

thick gust
#

YOU SAID YOU KNOW IT XD

young knoll
#

Isn’t it in the right click menu

quaint mantle
#

LISTEN

quaint mantle
young knoll
thick gust
#

RIGHT CLICK MENU SECOND ENTRY XD

quaint mantle
#

WHAT

young knoll
#

You could run it as admin and then cd to that folder

quaint mantle
#

yes how

#

just cd [directory]?

thick gust
quaint mantle
#

what

thick gust
#

Yeah use cd to change your current directory

#

What what

#

Just run Git as an admin

quaint mantle
#

yes i am

#

but its not in the directory

thick gust
quaint mantle
#

YES THAT WHAT I DID LOL

#

WHAT THE FUCK

thick gust
#

That's wrong.

#

You can't use : in your path.

quaint mantle
#

oh

#

ok

thick gust
#

try cd c/users/James/Downloads/BuildTools

#

And calm down

quaint mantle
#

omg

thick gust
#

You won't have success without being calm

quaint mantle
#

i am going to git bash my head in

young knoll
#

Clam

thick gust
#

XDD

#

Lmfao xD

quaint mantle
thick gust
quaint mantle
#

im convinced git is working against me at this point

thick gust
#
cd c/users/James/Downloads/BuildTools
#

It's not.

drowsy helm
#

try forward slash

#

not back

thick gust
#

Just use my command.

quaint mantle
#

ok

thick gust
#

Already told him twice now @drowsy helm

quaint mantle
#

r u kidding me

thick gust
#

I am not.

quaint mantle
#

too many arguments??

#

what is this supposed to mena

thick gust
#

Okay last try

quaint mantle
#

LOL

#

I JUST REALIZED

drowsy helm
#

you did cd twice

thick gust
#

you used cd twice

#

XD

drowsy helm
#

did oyu just wake up or something lmao

quaint mantle
#

i did

young knoll
#

oyu

drowsy helm
#

oyu

quaint mantle
young knoll
#

Did you just wake up?

quaint mantle
#

thats it

thick gust
#

okay if cd c/users/James/Downloads/BuildTools does not work just try it in several steps:

cd c
cd users
cd James
cd Downloads
cd BuildTools

drowsy helm
#

case sensitive

#

users

thick gust
#

It sucks but that's another way.

drowsy helm
#

capital U

thick gust
#

Think about if ur user is starting with big letter or small letter

quaint mantle
ivory sleet
#

isnt it C: ?

quaint mantle
#

what

thick gust
#

No

#

You can't use : in bash

quaint mantle
#

is my pc cursed

thick gust
#

Did you rename your main drive?

#

It's not

young knoll
#

Maybe

thick gust
#

For the love of god stop cry

ivory sleet
#

works fine?

young knoll
#

I haven’t really seen anyone else have issues with the portable git version

thick gust
drowsy helm
#

oh

#

you need a forward slash before c

#

cd /c/Users/etc

thick gust
#

Yeah that could be it

quaint mantle
#

a

thick gust
#

Press Windows Key + E and please tell me if your main drive is called C @quaint mantle

quaint mantle
#

Could not pass event BlockBreakEvent to KMaquinas v1.0-SNAPSHOT
org.bukkit.event.EventException

Caused by: java.lang.ClassCastException: java.util.stream.ReferencePipeline$2 cannot be cast to org.bukkit.entity.ArmorStand
at me.koddydev.kmaquinas.events.BreakBlockListener.onPlayerBreakedBlock(BreakBlockListener.java:22) ~[?:?]

drowsy helm
#

no it is it

#

not could be

thick gust
#

@quaint mantle Please give us THE ENTIRE ERROR, and not just the description..

young knoll
#

What on earth are you trying to cast

thick gust
ivory sleet
#

anyways you're casting a stream to armorstand

magic dome
#

how would I check if the fireball is destroyed is Fireball.isDead() valid?

thick gust
#
cd /c/james/Downloads/BuildTools
young knoll
magic dome
#

cool thanks

quaint mantle
#

FINALLY

thick gust
#

You could also check if the Fireball is null

young knoll
#

Not actually sure what isValid does

thick gust
#

XD

thick gust
#

isValid should be checking if its null @young knoll

quaint mantle
ivory sleet
#

wut

young knoll
#

Isn’t that what == null does

#

:p

ivory sleet
#

the entity wont turn null just like that

drowsy helm
#

why are you using git bash for that anyway

#

just use cmd

quaint mantle
#

i did that before

drowsy helm
#

cmd in admin

ivory sleet
#

like the instance itself will always be the instance

sullen marlin
#

cmd wasnt working

drowsy helm
#

ah

sullen marlin
#

I suspect they have some security settings

thick gust
#
at me.koddydev.kmaquinas.events.BreakBlockListener.onPlayerBreakedBlock(BreakBlockListener.java:22)

@quaint mantle

young knoll
#

Also if it was null isValid would throw an NPE

quaint mantle
#

ill try cmd again

ivory sleet
#

yuh

quaint mantle
#

since i changed security of the directory

ivory sleet
#

you need to do smtng like .findAny().orElse(null) Vinicius

#

(or findFirst)

thick gust
#

@quaint mantle

grand flint
#

dm me for bee movie script

#

sorry wrong channel

ivory sleet
#

no worries

thick gust
#

@quaint mantle Bro it's completly wayne if u try cmd or Git XD

quaint mantle
#

same error

thick gust
#

That means it works

quaint mantle
thick gust
#

@quaint mantle Do you want to spawn an ArmorStand at a specific location in a world, or what?

quaint mantle
#

it doesnt work

#

i hate spigot so much

young knoll
#

They want to get the one at that location

quaint mantle
#

can someone just send me a server file thats complete and ill just fix it myself

#

because this is actually pissing me off

young knoll
#

No that’s illegal

quaint mantle
#

bro what

drowsy helm
#

we legally cannot

quaint mantle
#

im done

ivory sleet
#
Arrays.stream(bloco.getLocation().getChunk().getEntities())
    .filter(entity -> entity.getLocation().equals(bloco.getLocation().add(0, 0, 1)))
    .findFirst()
    .ifPresent(Entity::remove);

@quaint mantle then maybe?

young knoll
#

May want to use distanceSquared over equals

quaint mantle
#

time after time and time and time its literally the same error what the fuck is happening

ivory sleet
#

yeah coll probably good idea

drowsy helm
#

i love streams

ivory sleet
#

yuh they're lit

somber hull
#

if i want to make a plugin where it (oversimplification) adds 1 to a number every second, should i make it save the last time a command was run by a player (every number would be different for every player) and then calculate how much to add by the difference in time?

quaint mantle
#

fr just boutta host vanilla and say fuck this

#

unless someone or something can help

#

but rn nobodys got anywhere

drowsy helm
somber hull
quaint mantle
ivory sleet
#

yeah your predicate is a bit too pedantic

somber hull
drowsy helm
#

other alternative is a scheduler every second but eh

dusty sphinx
#

Crawled the forums and couldn't find a definitive answer: is there a way to SET permissions? not just get them

somber hull
dusty sphinx
#

just realized i can use my db

quaint mantle
thick gust
#
ArmorStand as = (ArmorStand) bloco.getLocation().getWorld().getEntities().filter(entity -> entity.getLocation().equals(bloco.getLocation().add(0, 0, +1)));

@quaint mantle

ivory sleet
#

that'd still yield ClassCastException

young knoll
#

And also you are adding on the Z not y

ivory sleet
#

about?

somber hull
#

Argue

young knoll
#

Sus

quaint mantle
#

Working

#

<3

ivory sleet
#

oh pog

somber hull
#

😠 who deleted argue lol

young knoll
#

Conclure found love!

thick gust
#

@quaint mantle Still don't get why you used Arrays.stream method lol

quaint mantle
#

so i guess nobody knows whats wrong

thick gust
#

@quaint mantle Np but you told that Conclure lol

somber hull
thick gust
#

@quaint mantle xD

somber hull
thick gust
#

@somber hull Pls fix ur icon, it looks damn ugly

ivory sleet
#

hyperlink no need to be capsing about it

#

but yeah

somber hull
ivory sleet
quaint mantle
thick gust
#

@somber hull So just fix it urself in 30 sec? LOL

thick gust
#

@quaint mantle That's okay just ignore him lol xD

wide solstice
#

Does anyone know if it's possible to have intellij display chat colours? I'm running a spigot server inside of it

ivory sleet
#

it is

somber hull
ivory sleet
#

tho Idr exactly how

thick gust
#

@wide solstice Just use §2

quaint mantle
thick gust
#

@wide solstice Use regular chatcolors but replace & with §. There's a method to use alternating chatcolors. ChatColor.translateAlternateColorCodes('&', "&2Test");

crisp arch
thick gust
#

@quaint mantle Wait you got it fixed didn't you? XD

quaint mantle
thick gust
#

There you can see it get's downloaded.

quaint mantle
#

I can stop a runnable from other file ?

thick gust
#

Check your directory where BuildTools is located at

#

Oh..

ivory sleet
thick gust
#

@quaint mantle You can stop a runnable by it's task id.

ivory sleet
#

well

#

by stopping

crisp arch
ivory sleet
#

do you mean cancelling before it runs

#

or WHILST it runs

quaint mantle
crisp arch
#

wait let me open a thread

quaint mantle
#

ik i already have it

thick gust
#

@crisp arch It's totally fine xD Nothing's broken on that. Otherwise they would update it immediately!

young knoll
#

Bukkit.getScheduler.cancelTask(id)

#

I think

atomic violet
#

so for anyone who’s used protocol lib as a dependency, do i just use the regular protocol lib plug-in or is there an api somewhere cause i can’t find much info on it for some reason (might be how i’m searching it)

young knoll
#

Just the plugin

atomic violet
#

okay thx

drowsy helm
#

the plugin is the api itself

atomic violet
#

i wanted to make sure before i did it in case it wasn’t lol

wide solstice
wide solstice
ivory sleet
#

No they don’t get compiled down to the same thing

#

However yes the string will be the same "§"

thick gust
#

@wide solstice Why is that not working for you? You simply try displaying a chatmessage using chatcolors right?

#

Does some1 know how to get the title of an inventory? previously you could get it with getTitle() (method of the Inventory class)

wide solstice
thick gust
#

@wide solstice Oh uh in cmd u display colors with "color COLORCODE" Example: color 02 would be green. it got the same chatcolors like in minecraft i think. so also 0b etc..

young knoll
#

Please don’t use title to identify inventories

thick gust
#

@young knoll ? What should be another easy way lol

#

@young knoll Colored inventory titles are impossible for normal users u know that dont u? XD

young knoll
#

Use the view returned by OpenInventory

#

Or use the inventory instance itself

ivory sleet
#

InventoryHolder fingerguns

young knoll
young knoll
thick gust
#

@quaint mantle
Example:

          BukkitTask repeatingTask = new BukkitRunnable() {
            @Override
            public void run() {
                //Your stuff
            }
        }.runTaskTimer(**instance of your plugin**, 0, 5L);
        int repeatingTaskId = repeatingTask.getTaskId();
        Bukkit.getScheduler().cancelTask(repeatingTaskId);

That should be it.

ivory sleet
young knoll
#

Inventory holder bad

#

And uhh

#

Ur bad

ivory sleet
#

repeatingTask.cancel();

ivory sleet
round finch
#

Curious I'm not at PC and i won't be for a while but how it look to save an hashmap with element hashmap in yamlconfiguration

ivory sleet
#

Element hashmap?

young knoll
#

Earth, wind, fire, water, and hashmap

ivory sleet
#

🌞

young knoll
#

I’m a hashmap bender

thick gust
ivory sleet
#

So you don’t have LuckPerms or anything like that?

thick gust
#

Nope.

ivory sleet
#

😔

thick gust
#

I just test plugins on a localhost server and that's it.

#

PermissionsEx was my most favourite plugin for perms

ivory sleet
#

🌝

thick gust
#

Also WorldEdit is fine

#

But i hate WorldGuard. it's crap.

paper viper
#

no way you like pex

#

over luckperms

thick gust
#

Pex is great

young knoll
#

What did worldguard do

quaint mantle
#

i still like pex over luckperm

#

tho i think luckperm is better

thick gust
#

You can claim your area @young knoll

paper viper
#

yall are psychopaths

#

Lol

young knoll
#

Eh?

thick gust
#

xD

#

Pex is best

#

Pex ❤️

quaint mantle
#

PEX bro

thick gust
#

@young knoll People cant grief it

young knoll
#

Yeah?

quaint mantle
#

btw they may release 3.0

thick gust
#

@young knoll Survival feature lol xD

ivory sleet
#

I mean I would use pex if it wasn’t so bad in terms of performance and ux

young knoll
#

I use worldguard for spawn and areas where I want fine control via flags

thick gust
#

Pex 3.0 best

crisp arch
#

my mans #general smh

quaint mantle
#

so idk if we can love it like old times lul

ivory sleet
#

Yeah but pex 3 isnt released tho?

#

Like a stable release

thick gust
#

LuckyPerms is just shit

round finch
#

I were thinking hashmap<string, hashmap <String, object>>

ivory sleet
thick gust
#

I tried it once and got confused a lot

#

Pex is super easy to use

ivory sleet
#

Yuck

#

No

quaint mantle
#

yeah but not that complex

thick gust
#

A plugin does not have to be complex.

young knoll
#

LP has a nice web editor

thick gust
#

Pex got groups. That's enough. 😄

round finch
paper viper
thick gust
#

You can just code your own better version of Pex / LuckyPerms. Both aren't the best perm plugins u can get

paper viper
#

id like to see u code something better

round finch
#

No PC access rn

paper viper
#

XD

young knoll
#

Just reinvent the wheel

#

Code a new worldedit too

thick gust
#

@paper viper Trust me if I would put time into developing such shit i would make a better project

paper viper
#

Mhm, thats what they all say

ivory sleet
#

string:
string: object
stringother:
stringother: object @round finch

#

Or smtng

quaint mantle
#

isnt hashmap saving in yaml mostly is just

    String:
        Object: idk```
thick gust
#

@paper viper Mhm i just say stfu

paper viper
#

🙂

young knoll
#

Oh oh

#

Is it yaml

woeful crescent
#

Hey there, anyone know the armor defense levels for 1.8? I could only find the 1.9+ ones on the minecraft wiki

thick gust
#

@paper viper Probably mysql / yaml like all plugins do.

paper viper
#

No, it has its own custom one too in general

#

Lol

thick gust
#

@paper viper Wooow so special 🌟🌟

paper viper
#

Wooowww

quaint mantle
#

🌞

woeful crescent
thick gust
#

@paper viper Seriously developing a custom file format is super easy I did that when I was 13.

young knoll
#

Ah

ivory sleet
#

LuckPerms is decently engineered however in contrast to pex it’s so much better in every possible aspect

quaint mantle
thick gust
#

@paper viper That's not why LuckyPerms should be better than Pex KEKW

quaint mantle
#

wait or is it

#

let me check again

paper viper
#

there is no absolute reason why you have to be this arrogant lmfao

thick gust
#

@paper viper There is. You said i cant code it better but I can so fuck you ☺️

paper viper
#

and besides, you're a pyke main

#

so stfu

#

Lol

woeful crescent
#

guys it's just opinion

#

pls

thick gust
#

@paper viper Shaddup fking kat main go smd xD

round finch
round finch
#

Show me then

thick gust
#

XD

#

Fking kat ult

young knoll
#

This is getting

#

Eh what’s the word

quaint mantle
thick gust
#

Jump into 5 ppl penta kill Yees

paper viper
#

its not kat

#

Lmao

ivory sleet
thick gust
#

Skill required fking shit

#

Or vladimir daughter idc

paper viper
#

nope

thick gust
#

Whatever

woeful crescent
#

Augh

quaint mantle
#
  string: object```
ivory sleet
#

Its at the level of you ask yourself whether lucko is even a human

paper viper
#

i dont paly braindead champs

#

like you

thick gust
#

Everything is the same

#

Stop talk ahri lover 69

woeful crescent
#

Can someone please tell me the 1.8 protection enchantment levels

ivory sleet
#

Guys

paper viper
#

i dont even play ahri anymore XD

wide solstice
#

Got it working : ), I just ended up changing the run config to use a bash script instead

young knoll
ivory sleet
#

Let’s not debate about this

#

We all know LuckPerms is better

round finch
thick gust
#

Fire Protection, Blast Protection, Protection @woeful crescent

ivory sleet
#

Yup

paper viper
young knoll
#

Okay look

thick gust
#

I don't think Kat is hot

#

Kat is shit

young knoll
#

Mundo is the only hot one

paper viper
#

league champs are hot

young knoll
#

Now shut

thick gust
#

cait is hot and pyke and i am hot

woeful crescent
thick gust
#

Ur not hot, in germany we call it Schrott LULW

paper viper
#

Nah Jayce is hot

young knoll
paper viper
#

🚒

ivory sleet
#

Should tell you what you need

woeful crescent
young knoll
#

Ah yeah that works too

woeful crescent
#

Or there might be ahistory

#

oh

quaint mantle
thick gust
ivory sleet
#

I didn’t mention google?

thick gust
#

@paper viper Where for the love of tyler fucking 1is jayce hot

paper viper
#

I aint tyler1 fan bro u prolly watch him 25/7 XD

thick gust
#

I have a life

#

I go to gym and fkking work my butt of

ivory sleet
#

Guys

thick gust
#

To have muscles you don' own

ivory sleet
#

Continue this in #general

thick gust
#

So stop talk

paper viper
#

Lol

thick gust
#

Okay

quaint mantle
#

🍭

round finch
#

What are some good tips to avoid terrible developed projects

ivory sleet
#

Get it to work, then CLEAN THE CODE

young knoll
#

Don’t use static for everything

ivory sleet
#

Getting it to work is just 50% of the work

young knoll
#

Isn’t there a command for this

#

?clean-code

undone axleBOT
ivory sleet
#

It’s not done lol

young knoll
#

Well

#

Finish it

ivory sleet
#

Hehe

#

2022

#

(:

round finch
ivory sleet
#

The intermediate working state code is poorly written

round finch
#

I consider fixing my mess

ivory sleet
#

Because we developers can’t think in nice abstraction layers when we want to get stuff to work

#

We just fiddle with it until it works

#

But once it works

#

You have to refactor the code

#

And make it clean and decoupled and all that stuff

round finch
#

Ok great !
Thanks for your tips and advice

ivory sleet
#

I hope it makes sense to you

#

😅

round finch
#

Goes hacker mode yes sir

#

I understand

somber hull
#

Is it safe to use spigot version <version>1.18-R0.1-SNAPSHOT</version> in a 1.16.5 plugin?

#

if not, how do i find previous version tags

ivory sleet
#

Hmm

#

Depends on what exactly you’re doing

round finch
#

Fr i get what you mean by abstraction and thinking

somber hull
#

so not much

young knoll
#

I mean you can

#

But why

somber hull
#

?

ivory sleet
young knoll
#

There is no benefit

#

And you risk using methods that don’t exist in 1.16

round finch
young knoll
#

Ah

ivory sleet
#

But essentially we want to isolate different stuff like the storage etc because it gets easy to reason about

young knoll
#

They should be in the maven repo

somber hull
#

i have no idea how to navigate that if thats correct

rough basin
#

Any guesses why the for loop isn't working?

somber hull
#

found these

#

are all spigot api versions snapshots?

buoyant viper
#

looks like it

buoyant viper
#

id also ensure that entity is not null

rough basin
paper viper
#

No

#

Null check

#

entity != null

rough basin
#

thanks

#

:D

young knoll
somber hull
buoyant viper
#

probably just couldnt be asked to change the version in POM

#

xd

somber hull
#

How do i check if a block is a mob spawner?
Instanceof creature spawner?

sullen marlin
#

Sure

dusty sphinx
#

How can I tell if a world is a nether world? I could check the suffix for _nether but that seems dodgy.

sullen marlin
#

Or just getType

#

There's only one

somber hull
#

or spawner

#

or creature spawner

#

whats the type?

dusty sphinx
sullen marlin
#

Idk search the docs for spawner

#

It's there

#

?jd

sullen marlin
#

Literally SPAWNER

somber hull
#

wtf

#

its showing up now

#

was i spelling it wrong earlier lol

#

Ive been looking at the docs

#

i did ctrl+f to find spawner and nothing showed up lol

#

and intellij wasnt suggesting spawner either

#

idk

quaint mantle
#

WTF IS WATER WORKER BRO

young knoll
#

Lol

#

Aqua affinity

buoyant viper
#

LOOL

#

what even is the bukkit naming scheme

young knoll
#

It’s from 2011

#

Mojang had weird internal names back then

sullen marlin
#

And no names in some cases

young knoll
#

Material.SULPHUR anyone?

sullen marlin
#

Emerald :>

buoyant viper
#

like from 1.8 or something

young knoll
#

Hmm

#

Lesee

#

Beta 1.9 pre 3

buoyant viper
#

what the fuk

lethal thicket
#

ok question that is destroying my souuuullll

young knoll
#

You are probably thinking of depth strider

somber hull
#

Just so ik im using the correct terms

#

If i have a class thats sole purpose is to create a specific item tuned with some things, that would be a factory?

sullen marlin
#

I guess?

buoyant viper
sullen marlin
#

Just labels maaan

somber hull
#

I heard someone use the term factory so

#

Ik, but i wanna use em correctly

crisp arch
#

Caused by: java.lang.NoSuchMethodError: 'net.minecraft.server.level.ServerPlayer org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer.getHandle()'

#

am i missing something?

#
CraftPlayer craftPlayer = (CraftPlayer) p;
ServerPlayer sp = craftPlayer.getHandle();
sullen marlin
#

You used Mojang mappings without remapping

#

Also why do you need nms

crisp arch
#

ohhhhhhh

crisp arch
#

i want to learn nms

#

so im gonna make a simple NPC plugin so i can learn on the way

crisp arch
lethal thicket
#

I have exported something with mineways as obj/mtl, imported into 3ds Max and remodelled and have maintained the material/texture mappings. it also exports and re imports maintaining the block materials. But how the hell can I get it back into MC with the right blocks mapped.

sullen marlin
#

See 1.17 or 1.18 release thread

crisp arch
#

ok

heavy perch
#

it was super OP and efficient for PVP practice with pots

#

or soups

lethal thicket
#

I think I am going to laydown in a field and just wait until I starve to death, just thinking about the elusive castle import

buoyant viper
#

pain

lethal thicket
#

so tired

#

lol

#

I am actually

crisp arch
sullen marlin
#

Yes

crisp arch
#

ok, is there a way for it to build the remapped jar into a different path on my system? i like to build it straight into my plugins folder

dusty sphinx
#

How do I make an event async? I'm going to be firing it from a listener of an async event.

dusty sphinx
#

That doesn't tell me how I make the event async in the first place

sullen marlin
#

I think so, it was discussed at some point <outputDirectory> maybe? But really not recommended because then others can't build your plugin

dusty sphinx
#

Is there a marker I need to set?

young knoll
#

Yes

dusty sphinx
#

Like is there a field that needs to be true?

young knoll
#

Iirc you pass true to the super constructor?

sullen marlin
#

^

dusty sphinx
#

Could you provide an example of that or link to the doc

thick gust
#

Are there new classes for EntityPlayer & PacketPlayOutSpawnEntityLiving?

crisp arch
young knoll
#

public MyEvent(args) {
super(true);
}

crisp arch
thick gust
#

@crisp arch Trynna use packets to crash a client

crisp arch
#

i-

dusty sphinx
thick gust
#

you-

crisp arch
#

i was never part of this

young knoll
#

No, you can fire it async

thick gust
#

Coll

sullen marlin
#

*must

dusty sphinx
#

I can fire it from the listener of another async event?

thick gust
#

Colin

dusty sphinx
#

ok awesome

thick gust
#

Colin my bro

young knoll
#

Yo

thick gust
#

How t o fix

dusty sphinx
#

you have to import the damn class

thick gust
#

It's not there in the api dumbass @dusty sphinx

dusty sphinx
#

yeah because its nms

#

its in the server jar

#

add that dependency

thick gust
#

@dusty sphinx Tell me how XD

crisp arch
spare marsh
#

Calculating if a block is inside a certain region for every region created, I’d that thread safe? Should I run it Async? It’s just checking the comparing blocks x y and z then comparing for every block in the region

crisp arch