#help-development

1 messages ยท Page 886 of 1

spring stag
#

Or is this better?

agile anvil
#

Depends on what you describe "where they're looking at". If you mean "the block they're looking at", you can rayCast the player direction and find the nearest block in sight. Then teleport to the block location

#

If you just want to teleport x block further, you can multiply the direction vector of the player and add it to the location of the player to get the new location

agile anvil
spring stag
#

what event should I call to teleport the player?

agile anvil
#

What do you mean? You don't need to call an event when you teleport the player. It's automatically thrown

#

To teleport just Player#teleport(Location)

tribal zephyr
#

yeh

spring stag
#

oh lol

#

i didn't realize it was that easy

#

lmao

agile anvil
#

Please note that Player#getEyeLocation returns the current location of the player

#

And not the "looking at" location

tribal zephyr
#

he can rayCast the player direction

spring stag
#

I would have to return the Location#getDirection?

agile anvil
#

So

#

Player#getLocation & Player#getEyeLocation both gives the current location of the player. (Eye location just corrects the y position to match the eye's height)

Direction of a location is a vector pointing the player's direction. You can use that to multiply and add this vector to some location to get the resulting location in that given direction.

Other possibility is to rayCast: you throw rays in the direction of the player and get all the entities and or blocks in that direction.

spring stag
#

So this?

#

or something like that?

agile anvil
#

Might work. You should test

#

But you should be careful as the player might be teleported in blocks. + adding to the player location might pose some issues if you don't clone the location (to be verified)

spring stag
#

Gotcha, how would I avoid spawning in blocks?

agile anvil
#

Using getTargetBlock could help you. Really depends on how you want to implement that

#

For instance if the #getTargetBlock returns a location closer to the player, teleport him here, otherwiser further

rotund ravine
kindred solar
#

Bumping problem

wet breach
#

chat reset only works if there is a character after it, so try adding a space?

#

or put the reset in the message instead

summer skiff
# wet breach or put the reset in the message instead

I need help i place a crate and it was working properly but them i thought to remove it and place at a new place but mistakely when i crouched and left clicked it gets removed but the crate name is still hovering in air please help i tried removing the plugin also but it didnt worked
the error is with crate plus reloaded plugin

wet breach
#

just kill the entity near you, you can get its uuid by using some commands I believe

#

once you have the uuid, kill the entity using its uuid ๐Ÿ™‚

summer skiff
#

i did i diid /killall entites

#

its a armor stand

#

cuz i triend placing a helmet on it

wet breach
#

indeed and that doesn't work on invisible ones

summer skiff
#

it can wear full armor

summer skiff
wet breach
#

I told you how

#

you need to fetch its UUID

#

and then use the kill command using its UUID

summer skiff
#

like can u tell a specefic cmd which can fetch its uuid

#

pls

wet breach
#

you need to add nearby entity to a scoreboard

#

which should reveal its UUID

#

once you have the UUID, you can remove the scoreboard and kill the entity

summer skiff
wet breach
#

then looks like you need to go learn how ๐Ÿ™‚

#

here is a video that should demonstrate

#

This place isn't for being spoonfed everything, you have to learn how to do stuff on your own too. ๐Ÿ˜‰

summer skiff
#

thanks soo much

kindred sentinel
#

Is there a way to find multiacc of player, besides ip

#

?

drowsy helm
#

no

tribal zephyr
#

no

wet breach
#

your best bet is just to ban the account and not worry about if they come back again

drowsy helm
#

dox them and cut their wires

wet breach
#

I imagine the wire cutting won't work out too well if they are not using wires to begin with XD

summer skiff
quaint mantle
#

What should i add to my RPG style game with custom mystic item system i made, (tiered items, custom enchantments i need ideas to think of, and vanilla enchantments are allowed up to 1 per Mystic item)

I am wondering should i continue working on items first or the actual game play. I have been dwelling on these ideas for a while, ive already begun my project and have a lot of ideas just kinda lost rn and have too many ideas i wanna start slow.

jagged bobcat
#

Continue on gameplay

ashen quest
clear elm
#

does some1 have some easy ideas what i can make as a newbie

midnight fulcrum
#

when comfortable, move it to blocks where you will gain further experience

clear elm
#

smth easier xD

quaint mantle
clear elm
#

okay ty i can try

clear elm
#

or what means combat logger

wet breach
quaint mantle
#

No,
On damage -> Send message to attacker and victim that they're in combat for like 30 seconds
If a player logs out while in combat then send it to the console (and do other stuff)

clear elm
#

okay ty

peak depot
#

yes

pliant topaz
#

Hi, does anyone know how i would go about getting a custom player head (with base64 value) as an item? thx in advance :)

clear elm
#

can some1 explain hashmaps

winged vortex
#

Hello, I have a problem with connecting the Vault plugin. Everything in the pom.xml file is correct, and I have the Vault plugin downloaded on the server, unfortunately my plugin does not detect it at all, does anyone know how to fix it?

lost matrix
#

But show us how you "detect" Vault

icy beacon
#

Anybody familiar with Docker? ๐Ÿ™
I'm trying to connect my API to 2 databases. My docker-compose.yml looks the following: https://paste.md-5.net/ginurozifo.bash
All the services launch, but the API cannot connect to either of the databases. The databases also log this:

backdb-1  | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
backdb-1  | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1   | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1   | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)

So the API technically works, but calling any request that does a database call returns an error.

icy beacon
#

By error I mean an error that indicates no database connection

#

Because, well, the API failed to connect to the database

winged vortex
icy beacon
#

I don't think there's a stacktrace actually

#

Just like an HTTP error code

#

Because that's what I made it return when a database connection is not present

icy beacon
pallid oxide
eternal night
icy beacon
#

Great question

#

I didn't assign anything myself

#

In terms of ips

eternal night
#

okay good

icy beacon
#

Do you have any idea about this?

eternal night
#

Well

#

the error log is your healthcheck no ?

#

or is this the log of your API

icy beacon
#

I am not sure. The only reason the healthcheck is there in the first place is because that was one of the "solutions" I'd found. I don't even know what it does lol

icy beacon
eternal night
#

yea

#

so like, the DB is closing connections

#

which

winged vortex
# pallid oxide show ur pom.xml, plugin.yml, do you get any error messages?

Code: https://pastebin.com/EqmnRwF5
pom: https://pastebin.com/KqU7PdCN
plugin:

name: economyplg
main: com.vaultsupport.MoneyPlugin
version: 1.0-SNAPSHOT
api-version: 1.15
commands:
  addmoney:
    description: testing
    usage: /addmoney
  removemoney:
    description: testing
    usage: /addmoney

And error: [14:11:16 INFO]: [economyplg] Loading server plugin economyplg v1.0-SNAPSHOT
[14:11:16 INFO]: [economyplg] Enabling economyplg v1.0-SNAPSHOT
[14:11:16 ERROR]: [economyplg] Disabled due to no Vault dependency found!
[14:11:16 INFO]: [economyplg] Disabling economyplg v1.0-SNAPSHOT

eternal night
#

smells like your API is fucking up ?

icy beacon
#

It was working perfectly on local machine

#

I'm trying to dockerize it to then deploy to my hosting

sand spire
#

I followed the tutorial and tried to integrate my cookie clicker code into the framework, but now the hashmap for cookies doesn't save properly. It seems to reset or clear whenever I exit the GUI. I suspect I misplaced the code within the decorate() method, but I'm unsure. Do you know what i'm doing wrong? https://pastes.dev/tS6mbmHsWe. I want the hashmap to be the same map throughout the code.

lost matrix
icy beacon
#

The IPs I provide for my API is backdb and accdb (with no ports because 3306), which should be the docker virtual network (services are named backdb and accdb)

eternal night
icy beacon
eternal night
#

didn't you like

#

change the ports

#

ports: [ "3307:3306" ]

icy beacon
#

That rebinds them on my machine but leaves them intact in the respective containers, no?

lost matrix
icy beacon
#

And if my API wouldn't be able to connect to the databases in the first place, it wouldn't be able to even attempt to authenticate

#

No?

eternal night
#

right fucking compose syntax

#

yea das nota container port mbmb

#

I mean, the log literally just looks like your API is not properly closing the connections

lost matrix
eternal night
#

your DBs are just complaining that the connection from a single container (probably your api) is no longer sending shit

#

how are you managing db connections in your api

icy beacon
# lost matrix Is the authentication successful?

No, my databases log the following:

backdb-1  | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
backdb-1  | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chbackend' user: 'btest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1   | 2024-02-06 12:01:02 4 [Warning] Aborted connection 4 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)
accdb-1   | 2024-02-06 12:01:02 3 [Warning] Aborted connection 3 to db: 'chaccounts' user: 'atest' host: '172.24.0.4' (Got an error reading communication packets)

And calling any database-related http queries fails subsequenty

lost matrix
#

Get yourself a stacktrace then

icy beacon
#

This is all that I have

#

Stacktrace of what exactly?

lost matrix
#

Your API

eternal night
#

the stacktrace of a further query that uses the DB ^

#

like, your API is failing probably because you somewhere fuck up with connections and now its trying to use a then closed connection instance

icy beacon
#

There is no stacktrace

#

Literally

#

1 sec I'll demonstrate

eternal night
#

what do you get back when running a http call against your API then confusedguy

icy beacon
#
get("/subsets") {
    coroutineScope {
      val resultSet = db.query(FETCH_SUBSETS) ?: return@coroutineScope call.respond(HttpStatusCode.InternalServerError, "Failed to fetch subsets")
      val subsets = mutableListOf<Subset>()

      while (resultSet.next()) {
        val name = resultSet.getString("name")
        val imageUrl = resultSet.getString("image_url")
        subsets.add(Subset(name, imageUrl))
      }

      if (subsets.isEmpty()) {
        return@coroutineScope call.respond(HttpStatusCode.NotFound, "No subsets found")
      }

      call.respond(HttpStatusCode.OK, subsets)
    }
  }
#

I'm receiving the 404

eternal night
#

a 404 ?

sand spire
icy beacon
#

However there should be some subsets

lost matrix
icy beacon
#

Seemingly

lost matrix
#

I thought you could attempt an authentication

icy beacon
#

I mean that's what my database is logging

#

An authentication attempt was refused

lost matrix
icy beacon
#

How can I open the terminal for one of my databases? I wanna try something

#

Is it docker attach

eternal night
#

docker exec -it <container> bash

#

attach just attaches you to the running process

#

which is not what you want in this case

icy beacon
#

Ty, 1 sec

pallid oxide
icy beacon
# icy beacon Ty, 1 sec

For some incredibly arbitrary reason deleting all the tables and letting them be recreated has solved the problem WHAT

lost matrix
icy beacon
#

I ran desc table before and after and it was the exact same

#

But the problem is no more lmao

winged vortex
icy beacon
queen apex
#

Is there a SpigotMC Api?

lost matrix
icy beacon
river oracle
icy beacon
#

O nice

winged vortex
lost matrix
winged vortex
queen apex
lost matrix
#

I mean this line

RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);

Do you have a 3rd party plugin like EssentialsX which actually creates a service provider?
Otherwise this is always null because nobody provides a class for Economy

lost matrix
#

To me it looks like you are doing a weird scramble of both

#

Your setupEconomy method seems pointless to me. Delete it.

winged vortex
river oracle
#

AFAIK

proud osprey
#

Anyone looking for custom BungeeCord or Spigot plugins?
DM -> Me

dry hazel
#

?services

undone axleBOT
eternal night
dry hazel
#

eyes sus

quaint mantle
#

Hey there. Using spigot's 1.20.4 api

var slime = owner.getWorld().spawn(target.getLocation().add(0, 1, 0), Slime.class);
slime.setSize(1);
slime.setAI(false);
slime.setInvisible(true);
slime.setSilent(true);
slime.setInvulnerable(true);

slime.setCollidable(true); // Tried both true and false

slime.setLeashHolder(owner);

Why this slime do move the player? What am I doing wrong?

eternal oxide
#

Is teh slime moving the player ONLY when it spawns or all teh time?

quaint mantle
#

all the time

eternal oxide
#

If only when spawning, use teh spawn method that takes a Consumer and change it's spawn settings in there.

#

oh, no idea then

worldly ingot
#

I don't think collideable works between players

eternal oxide
#

You could add all players and that slime to a Team

quaint mantle
worldly ingot
#

I think it's just any player collision

quaint mantle
#

oh let me try

worldly ingot
#

(and for reference, setCollidable(false) would have been the right value :p)

quaint mantle
#

yeah noticed that while trying to see if it actually sets the value

#

Yeah that did work. Thank you

ripe sparrow
#

Hi, is there any reason why DecoratedPot is not implementing Container interface? If not I would probably PR it there as it makes sense to have it...

rain marlin
#

How should i create an invisibility potion item that lasts for 30 seconds?

#

this is what i have for now

#

public ItemStack getInvisPot() {
InvisPot = new ItemStack(Material.POTION);

    PotionMeta meta = (PotionMeta) InvisPot.getItemMeta();
    meta.setBasePotionType(PotionType.INVISIBILITY);
    meta.setDisplayName("Potion of Invisibility(30 sec)");
    InvisPot.setItemMeta(meta);
    return InvisPot;
}
tender shard
#
// Create Item
ItemStack item = new ItemStack(Material.POTION);
// Get meta
PotionMeta meta = (PotionMeta) item.getItemMeta();
// Create custom effect
PotionEffect effect = new PotionEffect(PotionEffectType.INVISIBILITY, /* Duration */30 * 20, /*Amplifier/Level*/1);
// Add effect to meta
meta.addCustomEffect(effect, false);
// Set meta to item
item.setItemMeta(meta);
rain marlin
#

ty i will test

upper hazel
#

what happens if I create a fake player via protocolLib with an existing nickname on the server?

#

and player join to server with this nick

eternal oxide
#

If using PL the player won;t actually exist to anyone but the client so the server will be fine. The client is going to have a fit though

#

The server will overwrite anything you sent via PL

upper hazel
#

does that mean fake player will simply disappear for the player?

#

In order for the fake player to be visible in the tab, do you need to spawn next to each player?

warped jasper
#

Hello , I would like to ensure that when a player dies, it updates a scoreboard with the number of players alive. Problem, I can't set this up, can someone help me? Im coding in 1.8.

chrome beacon
#

What part do you need help with

warped jasper
chrome beacon
#

ok

#

We can't really help without any information

warped jasper
#

i show you wait

#

i have this

clear condor
#
public class PeriodicalDatabaseAccess extends BukkitRunnable {
    @Override
    public void run () {
        if(!PearlQueue.pearlQueue.isEmpty()) {
            HeeseLogger.getInstance().getLogger().info("Executing periodical database access...");
            try {
                Statement statement;
                statement = GetConnection.getConnection().createStatement();
                for (PearlThrowLog i : PearlQueue.pearlQueue) {
                    String sql = "INSERT INTO pearl_logs(uuid, world, x, y, z, yaw, pitch, timestamp) VALUES('" +
                            i.getPlayerUuid() + "', '" +
                            i.getPlayerLocation().getWorld().getName() + "', " +
                            i.getPlayerLocation().getBlockX() + ", " +
                            i.getPlayerLocation().getBlockY() + ", " +
                            i.getPlayerLocation().getBlockZ() + ", " +
                            i.getPlayerLocation().getYaw() + ", " +
                            i.getPlayerLocation().getPitch() + ", '" +
                            i.getTime() + "')";
                    PearlQueue.pearlQueue.poll();
                }
                statement.close();
            }catch(SQLException e) {
                HeeseLogger.getInstance().getLogger().info("Error with statement");
                e.printStackTrace();
            }
        }
    }
}```
#

why this dont work?

chrome beacon
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

chrome beacon
#

Send code in a paste

#

?paste

undone axleBOT
clear condor
torn shuttle
#

why extend a bukkitrunnable

#

and are you calling it

chrome beacon
clear condor
#

idk

chrome beacon
#

also don't concat strings to your query

clear condor
#

and added some code

#

how can i fix that

chrome beacon
#

Still missing important code

clear condor
#

it works but it wont insert into my db

chrome beacon
#

Well yeah you're never telling it to insert anything

clear condor
#

so how can i do that

chrome beacon
#

run the sql query

clear condor
#

how

#

statement.execute(sql);?

chrome beacon
#

and don't blindly copy paste code

#

It's important that you understand what it does

clear condor
#

Looks like your ad blocker is on.
ร—
We rely on ads to keep creating quality content for you to enjoy for free.

Please support our site by disabling your ad blocker.

#

how can i enter the site?

chrome beacon
#

Close the popup

clear condor
chrome beacon
#

You just said you took it from the internet

clear condor
#

no

torn shuttle
clear condor
#

no

chrome beacon
#

Yeah having the amount of people remaining in the team name will cause issues

clear condor
#

please can someone help me?

chrome beacon
#

Since the amount changes it won't work when you try to fetch the team

clear condor
#

i need this code

#

bcs someone pay me

chrome beacon
#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

clear condor
#

for this plugin

#

i get 20$

chrome beacon
clear condor
#

and it wont work

chrome beacon
#

oh no

#

You really shouldn't take payments if you have no idea what you're doing

clear condor
#

omg this is the worst code i ever seen

clear condor
#

but i have some issues

#

in my code

warped jasper
chrome beacon
#

Change the way you handle the team name

clear condor
#

i will give u half of my 20$ if u can help me

chrome beacon
#

._.

ornate heart
#

lol

chrome beacon
#

I already sent a tutorial for you

clear condor
#

PLS

#

bro

#

i need this

#

asap

#

today

chrome beacon
#

Man the guy whos paying you is getting scammed lmao

clear condor
#

no

#

can u help me please?

chrome beacon
#

I already did

clear condor
#

no u didnt

chrome beacon
#

I'm not going to write the plugin for you

clear condor
#

i will give u half of my 20$

#

if u can do this for me

chrome beacon
#

No

tribal zephyr
#

huh

clear condor
#

15?

#

please

tribal zephyr
#

what does he need help with

warped jasper
chrome beacon
#

._.

clear condor
#

no?

clear condor
#

i just need some help

open pawn
#

anybody has knowledge about MMOItems?

chrome beacon
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

open pawn
#

I have some stupid bug

compact zodiac
#

event.getPlayer().openInventory

open pawn
#

Ok sorry, I'm trying to register a custom ability to the config with API and it doesn't recognize it

clear condor
#

@compact zodiac can u help me please?

chrome beacon
#

?paste

undone axleBOT
clear condor
#

i will give u half of my 20$

#

to fix my problem

#

i need to send this plugin today to my client

#

please

compact zodiac
tribal zephyr
chrome beacon
#

so I sent them a tutorial they refuse to read

clear condor
#

if someone can help me i will give

chrome beacon
#

and instead they beg for code

clear condor
#

10$

tribal zephyr
chrome beacon
#

and they're taking a comission for it ๐Ÿ’€

tribal zephyr
#

The other dude is wasting his money

chrome beacon
#

Yeah

clear condor
#

please

chrome beacon
#

I'm not going help any further with that

clear condor
#

guys

#

can someone help me

#

omg

chrome beacon
river oracle
clear condor
#

bro

#

i will give u half on my 20$

#

if u just help me

tardy delta
#

ill help you for 100 bucks

clear condor
#

if its that easy why u dont just help me

icy beacon
#

Not a single person wants your 10$ here

clear condor
river oracle
#

I'll do it for the full 20 and an extra commission for everything the initial cost doesn't cover my hourly charge is 20 dollars an hour

icy beacon
#

Not only is this not enough for the mental anguish you bring but also you could spend 0$ if you would just read

tribal zephyr
#

bro

clear condor
#

i dont want read i just want help

icy beacon
#

lMAO

tribal zephyr
#

xd

clear condor
#

and i will pay someone

#

if someone can help me

icy beacon
#

You won't ever become a good programmer with this mindset

#

But I suppose you don't care do you

#

You just want money

#

Then attempt begging

clear condor
#

everyone told me that money is priority

#

so

tribal zephyr
#

nah he cappin

river oracle
icy beacon
clear condor
#

if i give someone my 10$ of 20 i still have profit

chrome beacon
#

If you're trying to replace the ender chest inventory you could do so in the interact event instead

icy beacon
#

You will NOT survive doing 20$ commissions, 10 of which you give away

clear condor
#

i will

river oracle
#

@young knoll this is getting annoying and not relevant to this channel

icy beacon
torn shuttle
clear condor
#

i need fix for that

#

today

icy beacon
#

Im really curious

clear condor
#

20$ is good money

#

i think

#

for plugin like this

hazy parrot
#

?

icy beacon
#

brother 20$ will not cover rent

clear condor
#

if i will do 20x plugin like this

#

everyday

#

i will have good money

icy beacon
clear condor
#

yes i will

hazy parrot
#

I hope you would have 20 commissions per month

torn shuttle
#

forget about being able to do it or not

icy beacon
# clear condor yes i will

This is not the world where 20 people a day will order Minecraft plugins from an inexperienced underage person

torn shuttle
#

he can't even code it

chrome beacon
icy beacon
#

Let alone, well, you actually completing those commissions successffuluy

hazy parrot
#

But that is still 400 dollars KEKW

torn shuttle
#

so he is going to ask here 20x a day to get 20 different people to write plugins for him

tribal zephyr
clear condor
icy beacon
#

No

chrome beacon
river oracle
tribal zephyr
torn shuttle
icy beacon
#

Are you old enough to use discord

#

It's 13+

clear condor
#

yes

hazy parrot
#

If this is your code with 3 years of experience I don't have a word

orchid gazelle
#

expirience :stonks:

clear condor
#

in my country its 16+

icy beacon
#

How does that answer my question

open pawn
tribal zephyr
clear condor
#

yes i can use discord

icy beacon
#

If you are over 16 and so delusional that you think you can code 20+ Minecraft plugins per day with no programming skill

#

Well this is just sad

clear condor
#

i have java skills

#

bro

orchid gazelle
#

you won't do 20 plugins a day as a completely professional guy too

icy beacon
#

Then go complete the ocmmission

clear condor
#

i just forgot how to use sql

young knoll
#

Oi

icy beacon
#

Look it up

young knoll
#

What is going on here

tribal zephyr
#

xdddd

chrome beacon
hazy parrot
#

You also forgot about sql injection as it seems

icy beacon
#

I really hope this dude is a troll

hazy parrot
#

And about abstracting your dB calls

torn shuttle
icy beacon
#

And not actually a real person thinking that

orchid gazelle
open pawn
chrome beacon
#

Something like that

icy beacon
opal loom
#

Can someone answer me this, when I install protocolLib on my bukkit/spigot server it turns off other plugins like venturechat, mycommands. Can anyone help me with this?

torn shuttle
icy beacon
#

Mb

young knoll
#

Ah yes you must commission the commission

icy beacon
torn shuttle
#

guys I got a $1 plugin commission who wants to do it for 98.9 cents

opal loom
icy beacon
#

Do you have at least 3 years of java expirince?

echo basalt
#

I have a 500$ commission

#

gave it to my homie for 150

#

ez profit

torn shuttle
#

I have 8 years of shitposting on irc and here combined

icy beacon
#

Holy fuck

clear condor
#

hello im back

icy beacon
clear condor
#

so can someone just help me

orchid gazelle
torn shuttle
#

no

tribal zephyr
torn shuttle
echo basalt
#

pro tip: hire broke desperate people

icy beacon
river oracle
#

Coll is clearly dead

icy beacon
torn shuttle
#

I've been a better person to people I despise

orchid gazelle
#

honestly, I'd sometimes do plugin work for 5$/hour

river oracle
tribal zephyr
#

I saw that Y2K

open pawn
river oracle
clear condor
#

i recommend write plugins for people

#

its very good money

#

really

icy beacon
#

Nah.. it's not

#

I barely ever get commissions because literally no one wants minecraft plugins lmao

river oracle
clear condor
#

i just earn 20$ for simple plugin

torn shuttle
#

buddy you can't spell experience or program, you're in no position to be giving advice

icy beacon
#

And you think you want 20 of tjhem a day

echo basalt
#

20$ projects are good when you're starting

clear condor
#

i have 3 years expirience

torn shuttle
#

he's not starting, he has 3 years of expirince

river oracle
#

Yeah he has 3 years of experience

icy beacon
torn shuttle
#

he has 3 years of getting rinsed

icy beacon
#

3 years of tutorial hell maybe?..

tribal zephyr
clear condor
#

why u guys doing fun of me?

#

i just need help

icy beacon
#

cuz you are a funny individual

#

your mindset is quite comical

torn shuttle
#

the biggest help we can give you is make fun of you until you understand why what you are doing is worth making fun of

icy beacon
#

but this is a highly unfortunate situation if you are legit 16+ and think you can make money this way

clear condor
#

in total i earn like 200$ in 10 days

icy beacon
#

You do not

clear condor
#

yes i do

torn shuttle
#

show it kid

icy beacon
#

Mhm

clear condor
#

how can i show u xD

torn shuttle
#

you must have the transfers somewhere

clear condor
#

that i earn money bro

#

xd

torn shuttle
#

or are people showing up to your house with cash envelopes

icy beacon
tribal zephyr
clear condor
#

vouches?

echo basalt
clear condor
echo basalt
torn shuttle
#

oh damn he sure told you illusion

#

fucking got you you clown

icy beacon
#

Before podkladson ofc

icy beacon
echo basalt
#

yeah pod's a god

icy beacon
#

You know, people commission you, and then they like leave a review

#

Can I get some of them to message me and tell me how good you were

clear condor
#

yes i can do that xD

icy beacon
#

I mean you easily got 10 ppl right

#

You made 200$ in 10 dayys

clear condor
#

200$ its that mutch for u that u need vouches

#

for that?

icy beacon
#

No I just don't buy your shit

#

10 people message me saying how good of a programmer you are and I rethink my decisions

torn shuttle
#

guys stop bullying the clearly underaged kid, ignore him and move on

icy beacon
#

Kids deserve to be bullied though

clear condor
#

i just going from server to server and asking server owners that he need some plugins

tribal zephyr
clear condor
#

that can i write

hazy parrot
#

Dude code you sent is awful for multiple reason, don't try to convince us about something xd

clear condor
#

and im doing it

torn shuttle
#

you can go bully him in minecraft but take that out of here

icy beacon
icy beacon
clear condor
#

no

icy beacon
#

Oh really, 200/20 is not 10 anymore?

clear condor
#

every plugins cost 20?

icy beacon
#

According to you, yes

clear condor
#

i dont ever say that

icy beacon
clear condor
#

and?

icy beacon
#

Not full quote, 1 sec

clear condor
#

i dont say

#

that every plugin

#

cost 20$?

#

xD

#

bro

icy beacon
#

Well either way

#

How many people commissioned you?

#

For those 200$ you made in 10 days

clear condor
#

like 5-6

icy beacon
#

Get all of them to message me

clear condor
#

XDDD

#

u are really that desperate that u need to take vouches from my clients

#

on 200$?

#

u dont ever make that mutch of money

#

or what

tribal zephyr
icy beacon
clear condor
#

yes i can message to some people that bought plugins from me

#

if u want

#

dm me

icy beacon
#

I don't give a fuck about your clients at least because you probably do not have any

hazy parrot
#

Zbll I wouldnt really bother that much, we already saw that his code is shit KEKW

icy beacon
#

You mean 5-6 people

tribal zephyr
icy beacon
#

When the hyperfixation is over I can go

icy beacon
inner mulch
#

What is going on ?

torn shuttle
#

every time I look at my support tickets there's more unread tickets

#

send help

remote swallow
#

hi im help

torn shuttle
#

get lost epic, didn't you read the hat

remote swallow
#

i didnt even realise there was text on it

torn shuttle
#

go read the hat

remote swallow
#

i just read the hat

torn shuttle
#

how does it make you feel

remote swallow
#

exactly the same

torn shuttle
#

I knew it, he's illiterate

remote swallow
#

epic ebic sucks and hes to stop pinging me

torn shuttle
#

can't even tell an e from an a apart

remote swallow
#

its small

#

i cant see that

clear condor
torn shuttle
#

sounds like something someone who can't read would say

modern badger
#
       for(int i = 0; i < 9; i++) {
           inventory.setItem(i, redBorder);
       }
        for(int i = 36; i < 45; i++) {
            inventory.setItem(i, redBorder);
        }

        // Set Collumn borders
        for (int i = 9; i <= 27; i += 9) {
            inventory.setItem(i, brownBorder);
        }
        for (int i = 17; i <= 37; i += 9) {
            inventory.setItem(i, brownBorder);
        }```
remote swallow
modern badger
#

Is there better way to do this please?

remote swallow
#

if i cant read how do i know how to respond

torn shuttle
remote swallow
#

what if my ears dont work

torn shuttle
#

you put the speakers in your mouth and feel the vibrations

torn shuttle
torn shuttle
#

you can insert data into a list and check as you go but eh

obtuse flare
#

Hello, how do I update my resource

torn shuttle
echo basalt
#
public boolean isBorder(int index, int size) {
  int rowSize = 9;

  return index < rowSize || // top row
         index > (size - rowSize) || // Bottom row
         index % rowSize == 0 || // left column
         index % rowSize == (rowSize - 1); // Right column
}
#

sumn like that

torn shuttle
#

and then the first request you'll get anyway is for a way to customize that menu

echo basalt
#

yeah

#

this is a poor solution

#

just use masks

torn shuttle
#

I don't even bother with these anymore

#

mine are either completely hardcoded or loaded from config and nothing in between

echo basalt
#

loaded from config is the proper approach

#

Just have a layout and items

#

and you just hardcode certain keys

torn shuttle
#

proper approach (usually*)

#

not everything can work like that

echo basalt
#

everything absolutely can

torn shuttle
#

fite me

echo basalt
#

bet

torn shuttle
#

you know it aint' true

echo basalt
#

I know it is

torn shuttle
#

this man has never made an inventory-based minigame before

echo basalt
#

woeisme you can still configure the items

#

noob

echo basalt
#

I've made tetris iirc

torn shuttle
#

ha but you can't load the positional data from config you absolute scrub

echo basalt
#

you can load a mask

#

and use the mask for positional data

torn shuttle
#

he doesn't even play minesweeper in his inventory

obtuse flare
#

i now verifed and still i have this:

tribal zephyr
#

huh

echo basalt
#
title: "Ping Pong"
layout:
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'
- 'l . . . | . . . r'

items:
  l: # left
    type: AIR # Placeholder
  left-selected:
    type: BLACK_STAINED_GLASS
shadow night
#

what

echo basalt
#

type deal

late sonnet
torn shuttle
#

ow fuck his pseudocode is so bad it actually strained my neck looking at it

tribal zephyr
#

hopefully he is not talking about the tick in his username

shadow night
lean pumice
#

hi, the block#getLoc get the vertex of the block and not the center, how i can get the center?

echo basalt
#

Location#toCenterLocation

lean pumice
#

tnx

obtuse flare
lean pumice
echo basalt
#

Using 1.8?

lean pumice
#

yes

echo basalt
#

classic

lean pumice
#

exist in 1.8 a method?

echo basalt
#
public Location toCenterLocation(Location original) {
  Location copy = original.clone(); // You can get rid of this if you want a mutable location
  copy.setX(original.getBlockX() + 0.5);
  copy.setY(original.getBlockY() + 0.5);
  copy.setZ(original.getBlockZ() + 0.5);
  return copy;
}
torn shuttle
#

this is going to be one hell of a plugin if he can't figure out how to center a block

torn shuttle
#

also does the blockpos return the bottom or the top of the block, I forget

#

I thought it was the top

echo basalt
#

just returns floored

dense raft
#

Beef?

tender shard
#

Chicken

shadow night
#

Wings

dense raft
#

Fair enough

echo basalt
torn shuttle
#

man I am doing a great job at not looking at those support tickets

obtuse flare
#

please help, i now activate 2fa and i have still this: Enable 2fa to post update

dense raft
#

You're a donor how do you even see tickets

remote swallow
#

what tickets

shadow night
dense raft
#

Idk he's the one talking about tickets

remote swallow
#

magma's tickets are in his own server

obtuse flare
dense raft
#

Then why talk about them here ๐Ÿ˜—

remote swallow
#

why not

orchid gazelle
#

yo, any ideas on how I can make those TextDisplays spawn exactly at the tip of the gun?

torn shuttle
#

gun? that's illegal

orchid gazelle
torn shuttle
#

it doesn't matter because I am pretty sure mc has different first and third person rendering for the hands

#

so if it looks right to the player it will look wrong to everyone else

orchid gazelle
#

I know

torn shuttle
#

(or in third person)

orchid gazelle
#

that's why you send the right one to the player and the other one to all other players

#

but I wanna figure out for the first person player now

torn shuttle
#

mmmmh bullet location mismatch

#

BlobShrug just keep trying, unless you have some visualization assist tool

orchid gazelle
#

unfortunately, I don't have such tool

torn shuttle
#

you could use blockbench and see it in first person, presumably that model was probably made with it

#

if you make a cube at the tip you might be able to derive is coordinates

orchid gazelle
#

yes

torn shuttle
#

though they are probably not in real units

orchid gazelle
#

yeah they aren't

torn shuttle
#

do the math or do the guessing

orchid gazelle
#

can't do maths on that

#

guessing it is ig

torn shuttle
#

I did the math on something very similar

orchid gazelle
#

oh fuck now I have to do rotation maths again

torn shuttle
#

you have to to make an animatable models plugin

orchid gazelle
#

bc relative coords to world space bla bla bla

torn shuttle
#

also why not just use bows for this

#

or crossbows

orchid gazelle
#

those aren't bows

#

my bullets aren't arrows either

torn shuttle
#

I know, that's why I am saying why not use them

#

also keep in mind unless something changed gun models are against mojang tos

orchid gazelle
#

I know

#

They are usually fine with little change once you request to them

torn shuttle
#

hmmm

#

how hard would it be to make a deep rock galactic game mode in minecraft

orchid gazelle
#

yes

torn shuttle
#

that could be fun t odo

orchid gazelle
#

also, do you by any chance know how to disable this weird grey background?

torn shuttle
#

afaik you can't

orchid gazelle
#

well I know you can, some other guy has done it

#

I saw it

torn shuttle
#

maybe with one of the more recent entity types I've not looked at too closely yet

orchid gazelle
#

hmmm

torn shuttle
#

or they just had a modded client

orchid gazelle
#

they confirmed it was vanilla

#

with resourcepack

torn shuttle
#

and not shaders?

orchid gazelle
#

core shaders in resourcepack could be

torn shuttle
#

there's barely a ceiling to what you can do with shaders

#

pretty sure you could make the client play doom

orchid gazelle
#

lmao

modern badger
#

Thanks

echo basalt
#

mm

#

this 500$ project nearly tripld in price

#

but the deadline is half as long

#

hmm

#

I'm fucked

chrome beacon
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

chrome beacon
#

You should ask Paper about Paper API

chrome beacon
trim lintel
#

omg my bad

#

sorry haha

echo basalt
chrome beacon
#

Then you can always ask someone else to help you

echo basalt
#

I got my homie with me

#

gotta build a minigame in 9 days

chrome beacon
#

๐Ÿ‘€

#

That's a short deadline

#

What minigame is it

echo basalt
#

a skywars clone

#

here's the kicker

#

200-400 players will be in this "beta"

#

original idea was 3 weeks

orchid gazelle
#

@torn shuttle I am so intelligent

chrome beacon
#

I hope they have a system for lobbies and such

orchid gazelle
#

I just used some maths

chrome beacon
#

Would be real bad if you need to handle the load balancing yourself

#

Can't have all of those players on one server

echo basalt
#

uh yeah I'll need to load balance

#

I might need to make a proxy plugin in like 3 hours

#

I might just create all the game lobbies manually as we have no load balancing service

chrome beacon
#

I'm not sure if you'll make it in time ๐Ÿ˜…

echo basalt
#

I got this

#

(I hope)

chrome beacon
#

Good luck ๐Ÿ™‚

orchid gazelle
#

now this is better

#

I gotta get this background away tho

chrome beacon
#

Time for a text shader

orchid gazelle
#

oh no

orchid gazelle
chrome beacon
#

That's the only way I'm aware of

wintry lynx
#

Anyone got some good pointers for where to learn shader stuff. I've been told they are crazy powerful and I wanna see what I can do

lost matrix
orchid gazelle
wintry lynx
chrome beacon
#

The discord has channels for both

lost matrix
wintry lynx
orchid gazelle
chrome beacon
#

also learning GLSL can be quite useful outside of Minecraft

lost matrix
orchid gazelle
chrome beacon
#

oh can you set the background color ๐Ÿ‘€

orchid gazelle
#

thanks smile, it is working :D

lost matrix
chrome beacon
#

It's just to note that it can change in the future

orchid gazelle
#

looking great

#

with some maths, hacky font stuff and Display Entities, this "particle" is possible lmao

lost matrix
orchid gazelle
lost matrix
#

Might look cool in the dark or in caves

orchid gazelle
#

I am really proud as my gun-system is finally getting great

#

this custom raytracing and maths stuff made me learn a LOT about complex mathematics and so on

round finch
#

Now make war crimes in Minecraft

lost matrix
#

What do you need custom raytracing for?

orchid gazelle
#

this makes it possible to track on which exact pixel of the player-skin the bullet hit

#

I can literally say if the bullet hit the player's eye. And yes the rotation of the torso and so on is simulated

torn shuttle
echo basalt
#

sure

#

let's pretend it's not down the street

echo basalt
#

you can do some path based on that

torn shuttle
torn shuttle
orchid gazelle
orchid gazelle
#

don't make me feel bad for wasting hundreds of hours on it plz

inner mulch
#

is using sockets for sending data across servers a good idea?

lost matrix
inner mulch
lost matrix
#

Using some sort of message broker

inner mulch
#

redis?

lost matrix
#

For example

inner mulch
#

and then i would listen for updates on a new thread, right?

lost matrix
#

You can create a topic and then publish and subscribe on this topic.
This should be done on a different threat.

inner mulch
#

okay, I've seen ppl just do while(true) and then listen to anything thats being published on a different thread, is there a better approach then just looping for eternity?

lost matrix
#

Yes... for sure

pliant topaz
#

How would I go about having keybinds displayed in lore of an item?

lost matrix
# inner mulch okay, I've seen ppl just do while(true) and then listen to anything thats being ...

Example with Redisson:

A publisher:

RedissonClient redisson = Redisson.create();
RTopic topic = redisson.getTopic("SomeChannel");

// Execute on other thread:
SomeMessageObj message = new SomeMessageObj();
topic.publish(message);

A subscriber:

RedissonClient redisson = Redisson.create();
RTopic topic = redisson.getTopic("SomeChannel");

topic.addListener(SomeMessageObj.class, new MessageListener<SomeMessageObj>() {
    @Override
    public void onMessage(String channel, SomeMessageObj message) {
        //...
    }
});

In this case the subscriber will use the common fork join pool. You can pass an executor if you want.

#

*SomeMessageObj can be any class which you support with your Codec.
Can be String.class if you want to keep it simple.

inner mulch
#

and the onMessage, gets called every time when something is gathered?

#

no further config needed by me?

lost matrix
#

onMessage will be called every time someone calls topic.publish(message); on the topic with the name "SomeChannel".
Nothing else you need to configure. Just start a Redis server, create a client and then publish or listen on a topic.

inner mulch
#

it is just called on the one server therefore only fired there ?

echo basalt
#

redisson lookin real nice

#

jedis poopy blocks your thread every time you subscribe

lost matrix
inner mulch
#

If you want and have the time the explain, sure I'd like to listen and learn about this.

lost matrix
torn shuttle
#

oh no webstorm posted cringe

#

e.g. I think it may have softlocked

#

thanks webstorm

lost matrix
torn shuttle
#

it's really not liking this pull

lost matrix
#

Ah, i thought they posted something on a forum or website -.-

torn shuttle
#

yeah I think I found some edge case with markdown editors and pulling here

echo basalt
torn shuttle
#

me adding a 1 in a billion chance to trigger thread.sleep for 3 seconds to give the poor cpu a break

#

you laugh now but who will be left alive when AI takes over?

echo basalt
#

cmarco

torn shuttle
#

well yeah

#

we can't all be as pious as him

lost matrix
#

Randomly set fields in other plugins classes to null and watch the developer trying to fix random NPEs in despair

quaint mantle
#

7smile7 how much thinking did you put into your machine plugin's architecture

river oracle
#

Probably between 0 and 100 thinks

lost matrix
tender shard
#

144 thinks are a thoss

lost matrix
lost matrix
tender shard
#

a thonker is something that galileo would convert to football fields

quaint mantle
#

I might start doing that

#

is your plugin open src

lost matrix
quaint mantle
#

That's pretty normal

spare prism
#

why is Main.getInstance() null?

NPE here: https://pastebin.com/e0U0jDau
Main: https://pastebin.com/ssDTife4

spare prism
tender shard
spare prism
chrome beacon
spare prism
#
name: testduapi
version: '${project.version}'
main: md.mirrerror.testduapi.Testduapi
depend:
  - DiscordUtils
tender shard
#

did you shade one plugin into the other?

#

show pom.xml of testduapi

spare prism
#

?paste

undone axleBOT
chrome beacon
#

yeah you're shading it

#

That's going to cause issues

tender shard
#

You're shading DiscordUtils into testduapi, and hence testduapi is accessing the "included" version of DiscordUtils, which never had any instance created - hence instance is null. Set the <scope> to provided

spare prism
#
      <dependency>
          <groupId>md.mirrerror</groupId>
          <artifactId>discordutils</artifactId>
          <version>4.8</version>
          <scope>provided</scope>
      </dependency>
tender shard
#

mvn clean package and try again

spare prism
# tender shard `mvn clean package` and try again

i got a new error and my messages are not printed at all:

[22:37:01 WARN]: [testduapi] Task #13 for testduapi v1.0 generated an exception
java.lang.NoSuchMethodError: 'net.dv8tion.jda.api.JDA md.mirrerror.discordutils.models.DiscordUtilsBot.getJda()'
tender shard
#

show your DiscordUtilsBot class

spare prism
tender shard
#

i don#t see any getJda() method there

#

oh you're using lombok

#

are you relocating JDA to another package?

spare prism
#

in DiscordUtils

tender shard
#

paste your discordutils pom

spare prism
tender shard
#

<createDependencyReducedPom>false</createDependencyReducedPom> remove this, then mvn clean install it again, then recompile the other one too with mvn clean package

spare prism
tender shard
#

remove shadedArtifactAttached too

#

looks like your other plugin is depending (in maven) on your unshaded .jar with JDA as transitive dependency at the default package location, while you're actually running the shaded .jar

#

by disabling the dependency reduced pom, and enablin shadedArtifactAttached to true, you're preventing maven from just depending on the shaded .jar

spare prism
#
[22:51:37 INFO]: [testduapi] []
[22:51:37 WARN]: [testduapi] Task #13 for testduapi v1.0 generated an exception
java.lang.NoSuchMethodError: 'net.dv8tion.jda.api.JDA md.mirrerror.discordutils.models.DiscordUtilsBot.getJda()'
    at md.mirrerror.testduapi.Testduapi.lambda$onEnable$0(Testduapi.java:15) ~[testduapi-1.0.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1558) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1482) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at java.lang.Thread.run(Thread.java:1623) ~[?:?]
tender shard
#

then try to use a normal getter instead of lombok

#

maybe lombok + relocate doesn't work

spare prism
#

and it works

tender shard
#

you're not relocating the class of the returned object there

spare prism
#

ah, I see

#

ok, lemme try that

tender shard
#

I'd write an additional getter for the JDA, because if you just use "getJda" again, then lombok will probably try to add its own getter, see "ah there is already a method like that" But then fails because it has a different return type or sth - idk I stopped using lombok

spare prism
spare prism
#

also it suggests me to use lombok ๐Ÿ™‚

tender shard
#

yeah as I said, rename the method

spare prism
#

ah

#

ok

tender shard
#

idk just use getShadedJDA() for test purposes

#

then decompile your .jar and see what the actual return types are for getJda and getShadedJda

spare prism
#

ok, then i have to redeploy my maven package, it may take some minutes

sullen marlin
#

?whereami

spare prism
#

i just had to redeploy

#

cause now it works for the both getters

#

lmao

#

tysm bro

tender shard
#

np

worthy yarrow
#
private final List<String> vaultsPermissionsList = Arrays.asList(
            "rg.allowedvaults.one",
            "rg.allowedvaults.two",
            "rg.allowedvaults.three",
            "rg.allowedvaults.four",
            "rg.allowedvaults.five",
            "rg.allowedvaults.six",
            "rg.allowedvaults.seven"
    );

    private ItemStack createVaultItem(Material material, String displayName, int i) {
        ItemStack itemStack = new ItemStack(material);
        ItemMeta itemMeta = itemStack.getItemMeta();

        itemMeta.setDisplayName(ChatColor.AQUA + displayName.replace("%int%", String.valueOf(i)));
        List<String> itemLore = new ArrayList<>();
        itemLore.add(ChatColor.translateAlternateColorCodes('&', "&fClick here to access your&l&c #%vaultNumber% &rvault!".replace("%vaultNumber%", String.valueOf(i))));
        itemMeta.setLore(itemLore);
        itemStack.setItemMeta(itemMeta);

        return itemStack;
    }

    private Inventory createVaultsInventory(Player player){
        Inventory vaultsInventory = Bukkit.createInventory(player, 27, ChatColor.AQUA + "Vaults");
        
        int vaultSlot = 0;
        for (int i = 0; i < vaultsPermissionsList.size(); i++) {
            String permission = vaultsPermissionsList.get(i);
            if (player.hasPermission(permission)) {
                
                Material material = Material.ENDER_CHEST;
                String displayName = "Vault %int%";
                vaultSlot++;
                ItemStack vaultItem = createVaultItem(material, displayName, vaultSlot);

                vaultsInventory.setItem(i + 10, vaultItem);
            }
        }
        return vaultsInventory;
    }
    public Inventory getVaultsInventory(Player player){
        return createVaultsInventory(player);
    }```

Any notes other than not using pdc?
#

This is just the inventory creation for the vaults gui where based on a players permissions, only that many vaults will be shown

orchid gazelle
#

does anybody have an idea how I could possibly improve the performance of this piece of code significantly? This is getting ran A LOT of times. I am thinking about some sort of caching or sth

inner mulch
#

what does maven want?

orchid gazelle
#
          if((current.getX() % 1) == 0 || (current.getY() % 1) == 0 || (current.getX() % 1) == 0 ) {
          Material material = location.getWorld().getBlockAt(current).getType();
          if(material != Material.AIR && material != Material.WATER && material != Material.LAVA) {
              return new RayCastResult(RCType.block, current, null, null);
                  }
          }
#

current is the position of the ray at the moment

#

this checks against any hits against blocks

river oracle
inner mulch
#

how do i change it, i changed it in the pom but doesnt work

orchid gazelle
river oracle
inner mulch
#

im not sure, how do i check?

#

project properties?

river oracle
#

Prey sure iirc

inner mulch
#

this here?

river oracle
#

Yeah what's your output version set to

#

In maven

inner mulch
#

i think it is 16, this here is java version right?

toxic lodge
#

Hello, I would like my ArkaziaLobby Plugin to need My ArkaziaLibs plugin to work but I don't know how I can put it locally because it is in the same file

river oracle
#

Yeah should be fine not sure tbh

toxic lodge
#
plugins {
    `java-library`
    `maven-publish`
    idea
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
    mavenLocal()
    maven("https://repo.maven.apache.org/maven2/")
    maven("https://jitpack.io")
    maven("https://repo.opencollab.dev/maven-releases/")
    maven("https://repo.opencollab.dev/maven-snapshots/")
}

dependencies {
    //Check it out https://jitpack.io/#PowerNukkitX/PowerNukkitX
    compileOnly("com.github.PowerNukkitX:PowerNukkitX:master-SNAPSHOT")
}

group = "fr.arkazia.lobby"
version = "1.0.0"
description = "ArkaziaLobby"
java.sourceCompatibility = JavaVersion.VERSION_17

idea {
    module {
        isDownloadSources = true
        isDownloadJavadoc = false
    }
}

java {
    withSourcesJar()
}

tasks.build {
    dependsOn(tasks.shadowJar)
}

sourceSets {
    hand {
        resources {
            srcDirs("src/main/resources")
        }
    }
}

tasks.compileJava {
    options.encoding = "UTF-8"
    options.compilerArgs.add("-Xpkginfo:always")
    java.sourceCompatibility = JavaVersion.VERSION_17
    java.targetCompatibility = JavaVersion.VERSION_17
}

tasks.test {
    useJUnitPlatform()
    jvmArgs(listOf("--add-opens", "java.base/java.lang=ALL-UNNAMED"))
    jvmArgs(listOf("--add-opens", "java.base/java.io=ALL-UNNAMED"))
}

tasks.withType<AbstractCopyTask>() {
    duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
quiet ice
#

what is the purpose of these JPMS hacks?

toxic lodge
quiet ice
#

Yeah. Are you reflecting into java.io and java.lang?

#

oh, junit - disregard my comment then

toxic lodge
#

but I'm looking for how to depend on my ArkaziaLibs plugin for my ArkaziaLobby

worthy yarrow
quiet ice
#

Use the maven-publish-plugin and depend on the library as a maven dependency?

quiet ice
#

Alternatively you could use gradle's project(...) dependency, but I am not a fan of that approach

toxic lodge
#

or how to do it

quiet ice
#

I cannot think of any minecraft-specific ones from the top of my head (I generally use maven heh)

toxic lodge
#

because I just started using gradle

rough harness
#

is there a plugin that adds another slot next to shield for wings or backpacks or someone that can help me make one

worthy yarrow
quiet ice
#
plugins {
    id 'maven-publish'
    // [...]
}

publish {
    dependsOn publishToMavenLocal // Gradle doesn't quite like this line but otherwise I get issues when publishing so what gives?
}

publishing {
    publications {
        plugin(MavenPublication) { publication ->
            groupId project.group
            artifactId project.archivesBaseName
            version '2.0.0'
            from components['java']
        }
    }
    repositories {
        if (System.getProperty('publishRepo') != null) {
            maven {
                url System.getProperty('publishRepo')
                allowInsecureProtocol = true
            }
        } else {
            mavenLocal()
        }
    }
}

in your library gradle file and including the dependency should be trivial afterwards

worthy yarrow
quiet ice
#

Just remember to run the ./gradlew publish task on the library

toxic lodge
#

maybe use mavenLocal()

quiet ice
#

Oh yeah, you also need to add the mavenLocal repo on your consuming gradle project

#

but you already did that though

toxic lodge
#

no because it is not in the m2 directory

#

๐Ÿ’€

#

I still do not understand

quiet ice
#

You need to actually invoke the publish task

#

It is comparable to maven's install goal

#

Well technically ./gradlew publishToMavenLocal would be mvn install while ./gradlew publish is mvn deploy, but generally it is the same

worthy yarrow
#

Hey geol, wouldn't happen to have a free couple minutes to give my system a lookover perhaps?

quiet ice
#

Problem is I plainly don't understand the problem

worthy yarrow
#

Eh might be more fit for code review thread then... was just looking for notes on how I'm achieving my goal... maybe there is a better / easier way to do it

quiet ice
#

Well the only issue I can forsee is with how you open these vaults and handle interactions with them but otherwise I don't see any glaring deficiencies (but remember that I am rather lenient when it comes to bad code)

worthy yarrow
hushed spindle
#

would it be fine for me to use Server#getEntity(UUID) on entities that might be in unloaded chunks? like does it load the chunk to get the entity or is null returned if the entity isnt loaded

mellow edge
#

when I drink inivis and the color of the player's nametag is colorful, his nametag won't hide!

quiet ice
hushed spindle
#

epic

worthy yarrow
worthy yarrow
lament maple
#
    @EventHandler
    public void onEntitySpawn(EntitySpawnEvent event) {
        if(event.getEntityType() == EntityType.PAINTING || event.getEntityType() == EntityType.ARMOR_STAND || event.getEntityType() == EntityType.ITEM_FRAME) {
            return;
        } else {
            event.setCancelled(true);
        }
    }

Does someone know why this doesnt work? It works that it doesnt spawn other things then the if conditions but it doesnt let me spawn the things in the if condition

quiet ice
worthy yarrow
tender shard
quiet ice
#

Does the EntitySpawnEvent even fire for BlockEntities?

tender shard
#

for item frames and paintings, there's HangingPlaceEvent

lament maple
#

why would this work though

tender shard
#

what is your goal? prevent all entity spawns except paintings, armor stands, and itemframes?

lament maple
#

(No errors in console)

lament maple
quiet ice
#

is the listener even being called - that is does it log something if you add a log statement in it?

lament maple
lament maple
inner mulch
#

ok

lament maple
quiet ice
#

o h I an dumb. I'd still log the spawned entity types though

lament maple
#

im really confused why it wouldnt work with it

tender shard
#

the code should work fine. are you listening to any other events?

lament maple
# quiet ice o h I an dumb. I'd still log the spawned entity types though
    public void onEntitySpawn(EntitySpawnEvent event) {
        if(event.getEntityType() == EntityType.PAINTING || event.getEntityType() == EntityType.ARMOR_STAND || event.getEntityType() == EntityType.ITEM_FRAME) {
            System.out.println("Placed: " + event.getEntityType().getName());
            return;
        } else {
            System.out.println("Placed: " + event.getEntityType().getName());
            event.setCancelled(true);
        }
        System.out.println("Placed (Outside if statements): " + event.getEntityType().getName());
    }```
#

like this?

quiet ice
#

ye

lament maple
#

lets see...

lament maple
# quiet ice ye

it logs other entitys that are being spawned but not the ones in the if statements wtf

#

like

#

the { else doesnt even get logged

#

even though its a whole different entity. It only logs the outside if statement thing

quiet ice
#

Uh now you are confusing me. Could you give us an excerpt of the logs?

lament maple