#help-development

1 messages · Page 578 of 1

warm mica
#

This is so cool

zealous osprey
#

Tried that, the passangers don't rotate with the origin

warm mica
#

Ignore what I have said

zealous osprey
#

rotations are weird, idk if they are relative to the direction they are facing or not

compact haven
#

translateAlternateColorCodes doesn’t translate rgb does it?

#

if so in what format

eternal oxide
#

ChatColor import from md5 not bukkit

#

I don;t think the bukkit ones does

worldly ingot
#

Yeah I don't think it does

#

GEE IF ONLY WE HAD COMPONENT SUPPORT aPES2_WTF

compact haven
#

are there any requirements for the md5 package? does it need to be a bungee cord server or nah

worldly ingot
#

No, Spigot shades the BungeeChat module

compact haven
#

sounds good, thanks

worldly ingot
#

Worst case, you alienate your probably 3 CraftBukkit die hard users

vocal cloud
#

Won't someone think of the children craftbukkit users

zealous osprey
zealous osprey
noble cairn
#

do I need any other plugins for Executable Items to work on my server?

orchid trout
#

should i use dependency injection, JavaPlugin#getInstance or does it just depend on the situation?

cinder abyss
#

Hello, how can I get a Arrow's shooter ?

zealous osprey
cinder abyss
worldly ingot
#

See child interfaces

cinder abyss
# worldly ingot See child interfaces

I have another question, how can I make a recipe like this?java recipe.shape( "S", "F", "", "S", "E", "F", "S", "F", "" );Because I get this error:java java.lang.IllegalArgumentException: Crafting recipes should be 1, 2 or 3 rows, not [9]

quaint mantle
#

How do u set a skull texture in 1.20 again? i keep forgetting and google is being useless

worldly ingot
quaint mantle
#

yea

quaint mantle
remote swallow
#

blame alex

agile hollow
#

how can i change the display name on the head?

quiet ice
#

Does anyone happen to know whether recursive stuff is possible with CompleteableFutures? So something like

CF<Object> fun(int arg, CF<Object> cf) {
  return cf.thenAccept((obj) -> {
    if (arg < 0) {
      fun(arg++, cf);
    }
    Sysout(arg);  
    return obj;
  });
}
quaint mantle
#

dont u love intellij using 70% cpu usage and just crashing

remote swallow
#

paper moment

quaint mantle
#

i loveee paper

remote swallow
#

phyiscal paper is great

#

binary paper isnt

#

change the scale and/or rotation

quaint mantle
#

are persistendatacontainers more usefull or nbttagcompounds (id have to use bukkit)

quaint mantle
#

or they basically the same

orchid trout
#

if (!u.isProxy() && !address.equals(u.getLastIp())) return; !u.isProxy() returns true and !address.equals(u.getLastIp()) returns false, why does it not return?

dawn ledge
#

Hi there,
I'm trying to colorise my console output message but I don't suceed.
My best attempt was with this : System.out.println(Ansi.ansi().fg(Ansi.Color.YELLOW) +"Initialisation des Shematics ignorer"); it don't display error or color code before the text but it don't colorise.
Can somebody help me please ?

remote swallow
#

use a command or something to modify the values

quaint mantle
#

i forgot to implement thaaat

#

also idk why im doing it like that

young knoll
#

&& means both sides have to be true

dry forum
#

if i have a link thats like
mysql://some_stuff
do i just add jdbc: before mysql?

kind hatch
#

No, the JDBC format is different from the mysql format.

orchid trout
dry forum
#

im using a pebblehost db and it just gives me that link and a host and database name so what would i use?

kind hatch
dry forum
#

ight ty

haughty storm
chrome beacon
#

That looks like a Citizens error

#

Make sure you're up to date

haughty storm
haughty storm
chrome beacon
#

Are you giving knockback to mobs?

#

Or attacking them?

haughty storm
#

yeah, sometimes, but it doesn't always crash, so I don't know which attacks or actions are causing it

chrome beacon
#

You could make it ignore npcs

earnest prawn
#

Is there a way to retrieve a list of permissions without the names being turned into lower case? I'm making a prefix plugin and all the permissions are lower case

eternal oxide
#

permissions are all checked lowercase

#

however permissions are not prefix

#

all permission plugins support some for of getPrefix

earnest prawn
#

LuckPerms and other plugins use permissions for prefixes and suffixes and they have the correct case

eternal oxide
#

no they use meta

#

changed is past tense. Detect in teh teleport event

chrome beacon
#

End portal fires respawn event doesn't it?

young knoll
#

Yes

#

Only the exit one tho

orchid trout
#

i was rushing and the ! confused me

eternal oxide
#

Why are you linking it to me?

earnest prawn
#

They're permissions

chrome beacon
#

Are you making a permissions plugin?

earnest prawn
#

No, I want to retrieve the permission list without it being lower case

eternal oxide
#

even teh page you linked says they are meta, just converted to permissions. Use the correct get method to retrieve meta

chrome beacon
#

If you're not the one storing and handling the permissions then you probably won't be able to access them in the original case

earnest prawn
#

So how do I retrieve meta?

eternal oxide
#

No clue with LuckPerms

ivory sleet
eternal oxide
#

as I said, meta

#

You should implement a universal API to access though, else you are restricted to only LP

smoky anchor
#

@quaint mantle Look how quaterions work lol
You ain't gonna get that by just gessing

agile hollow
#

how can i make on right click with an item in the hand send something?

eternal oxide
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
noble lantern
#

im surprised someone has pr'd a MainHandPlayerInteractEvent and OffHandPlayerInteractEvent

young knoll
#

Too late now

worldly ingot
#

I don't see why the interact event would be special?

carmine mica
young knoll
#

MD has said that firing it twice was a mistake

carmine mica
#

well I'm saying its not too late to add those events, but it would be dumb to just do that for interact event and not the dozens of other events that have hands

#

you'd still have the base interact event, just those 2 sub events could exist too

worldly ingot
#

I honestly kind of don't mind it firing twice. Makes supporting two hands very easy

#

Fairly confident that both of those methods have getHand() methods

#

I added getHand() to every event that had been missing it up until the time I committed it

#

Well those were added in 1.19.1

#

So you're SOL

#

I mean if the value isn't exposed then you've not got any way to know which hand was used

#

I'm not sure I understand the need for forwards compat

#

Anyone using 1.19 should be on 1.19.4

#

Yeah, bare minimum 1.19.1 if you're really dead-set on this

#

Oh it was .2

#

Misread the commit dates

young knoll
#

Interact event

zinc lintel
#

does anyone knows a getlocation alternative for 1.8? i can't get it to work

opal juniper
#

what

#

what do you mean getLocation alternative

zinc lintel
#

so the 1.8.8 spigot api doesn't find the .getLocation

opal juniper
#

On what

#

What class

zinc lintel
#

in a spawnCommand class

opal juniper
#

Not what I mean

#

do you mean like Block.getLocation

#

or what

zinc lintel
#

its a config.getConfig().getLocation("Location");

opal juniper
#

oh

zinc lintel
#

how do i need to add it to my code then?

noble lantern
#

ConfigurationSection#getLocation should work

#

its likely your getting the wrong key / config is empty

zinc lintel
#

the getLocation is red

hazy parrot
#

there is no getLocation in 1.8

#

just call get on path and cast it to location

#

and consider upgrading

noble lantern
#

why dont javadocs use @since ?

#

i feel like this is a lil important tbh

young knoll
#

Why do you need it

worldly ingot
#

Not really

young knoll
#

You should be using latest

#

:p

noble lantern
#

i agree :p but in the cases like this its nice to know when somethings added xD

undone axleBOT
worldly ingot
#

That's what we have the blame for

noble lantern
#

but then again thats code is old asl and adding @since to every single method available rn would be annoying, mainly just saying for like new things that get added

young knoll
#

I’ll do it for payment

zinc lintel
#

because its a pvp server

noble lantern
zinc lintel
noble lantern
#

but idk why people hate new pvp combat mechanics

worldly ingot
#

Of course

young knoll
#

Nah man PvP was removed in 1.9

#

Too violent

noble lantern
#

its nice compared to just spam clicking hoping you click faster than some dude with a macro

young knoll
#

Not family friendly

noble lantern
#

speaking of that

Hows the gun situation with minecraft are they still gonna eula it :((

hazy parrot
#

no if you call it pew pew instead of ak47

young knoll
#

Pew

worldly ingot
#

Apple did it first 🔫

young knoll
#

And now everyone follows

#

Don’t worry though

#

🚬 is fine

worldly ingot
ancient plank
#

on a scale of 1 to apple what is appling on here

young knoll
#

💣

worldly ingot
#

With a hint of green

ancient plank
#

how do you feel knowing that one day 1.8 is gonna be older than some of the people in here

worldly ingot
#

That's okay

noble lantern
#

pew p 5 (mp5)

trail coral
#

should i handle player profiles via UUID or playername?

so:
profilesFolder.dito.yml
profilesFolder.heshwidhdieheusis.yml

online-mode is set to false

#

playernames would be easier to navigate

#

or maybe i shouldnt create seperate files for each player

hazy parrot
#

uuid

noble lantern
#

i think uuids change in offline

trail coral
#

yeah that was my concern

#

like what if dito and Dito get different uuids

hazy parrot
#

why would you use offline mode

noble lantern
#

welcome to offline ^

trail coral
#

not relevant

#

alr ill use names whatever

#

its a private plugin anyways

eternal oxide
#

is online mode set to false just for offline or do you use a proxy/bungee?

trail coral
#

i use proxy

noble lantern
#

oh dear

#

your fine then lol

trail coral
#

wdym

eternal oxide
#

then UUID will be the online one, so long as you setup bungee correctly

young knoll
#

Maybe the proxy is also offline

noble lantern
#

i would hope not

trail coral
#

why would i not let cracked players join my proxy but let them join my gamemodes

#

this is so stupid

young knoll
#

Maybe the line was never on to begin with

noble lantern
hazy parrot
#

your proxy should be online, subservers must be offline as all traffic is going trough proxy, it will not allow cracked players anyway

trail coral
#

stop trying to change my mind about onlinemode

#

just help me for Gods sake

hazy parrot
#

im just correcting your statement

#

and i will not help you if you allow cracked players

noble lantern
young knoll
#

I still vote we ban like paper does

trail coral
#

whats the difference

trail coral
noble lantern
#

offline-mode jars should be something only plugin/spigot/paper devs get ong

#

keep it out of public hands CH_Kek

trail coral
#

okay mister inclusive and tolerant burchard

#

that respects everyone except for cracked players

hazy parrot
#

gl getting help with that attitude

noble lantern
#

as you should

trail coral
#

bro what

#

i asked a question and you critiqued my server dawg how is that relevant

noble lantern
#

why should you support cracked players lmao

They offer no incentive or good for your server

trail coral
#

yes they do

#

other than hypixel

#

the next like

#

6 biggest servers

#

are cracked

hazy parrot
#

???

trail coral
#

theres a HUGE player counr

hazy parrot
#

that statement is just false xd

noble lantern
#

ah yes the person who cant afford 25$ and is likely under the age of 8 will be a great community member

trail coral
#

second biggest derver is cracked

trail coral
noble lantern
#

they bought the pc/device to play minecraft no?

#

sooo

trail coral
#

so what

trim creek
#

Yeah but every country's currency is different

trail coral
#

just because you bought a house dowsnt mean you need a 200k kitchen

trim creek
#

and its not sure if 20 dollars are affordable for a VPS

#

lol

trail coral
#

i got no help whatsoever rn

#

its like u guys get hard when someone mentions offlinemode or cracked players

#

get over it

hazy parrot
trim creek
#

Offline mode isn't overall supported here lol

trail coral
#

very tolerant and inclusive of the server 👍

hazy parrot
#

try asking in paper discord, they will probably help Kappa

trim creek
#

But the question is still right: if you had the money to buy your device, why don't you have money to buy a 30 dollars game?

#

-at least if the device is even bought by you xD-

trail coral
#

this is a completely stupid statement

#

id you had the money for a 600k house why didnt you spend an extra 200k for a stupidly expensive kitchen?

noble lantern
#

if you buy a 600k house its likely the kitchens are already 100k

trim creek
#

Actually yes

#

lol

#

Sooo

trail coral
#

dawg

#

just leave me alone

trim creek
#

Whose question is useless?

hazy parrot
#

also its one-time purchase, I literally bought premium 9 years ago, that makes it 3 dolars a year lmao

trail coral
#

it wouldve made it 0 dollars a year

noble lantern
#

plus kitchen comes includede with the house

Thats like saying if you bought a 500$ pc why did you spend 100$ on a cpu

because... you did lmfao, its comes with what you buy

hazy parrot
trail coral
#

its mt choice not to buy minecraft and its my choice to support cracked players

trim creek
trail coral
#

i asked a simple question how is offlinemode even relevant

#

and even if it is

#

just answer the goddamn question

#

instead of@giving me a lecture

trim creek
#

Depends on the question

trail coral
#

about offlinemode

#

i dont need it anymore

trim creek
#

lol

#

What was their question?xd

noble lantern
#

saving player data for offline mode servers

trim creek
#

.....

#

in what part?

noble lantern
#

uuid or names basically

trim creek
#

Ugh

#

Offline mode also supports saving for uuids

#

idk why you guys really couldn't just answer him

young knoll
#

Uuids change based on name

#

Then again name also changes based on… name

trim creek
#

That's irrelevant.

#

If the user decides to get a new name, its their decision.

#

The server may or may not support it.

young knoll
#

Online mode would

#

:p

trim creek
#

...

noble lantern
#

i thought uuids change based on what mojang sends?

trim creek
#

I was meaning the server can ban players for changing names for example.

noble lantern
#

or does offline mode do something funky to keep uuids the same?

trim creek
#

It's just one exmaple.

#

It may not give a fuck about it as well.

young knoll
#

Offline mode UUIDs are based on the username

trim creek
#

If you want to change your name you basically accept that you lose all your stats in offline mode.

eternal oxide
#

if just a server, offline mode UUID is calculated on the server using the players name. Online they are retrieved from Mojang. If behind a proxy they depend on the proxy settings

trim creek
#

Either way, doesn't matters.

#

Yous really could just answer him, instead of fucking make him angry.

trail coral
#

how do i make "clickable" test and also put it inside a book lmao

#

im trynna make fake books with packets

young knoll
#

Components

#

Books are one of the two places that support them atm

trail coral
#

yk what nevermind ill just make a gui

wet breach
trail coral
wet breach
eternal oxide
#

get lost with inclusive and tollerant shit

trail coral
delicate lynx
#

it's against discord TOS to discuss piracy

eternal oxide
#

just an excuse for bad behavior and a self entitled attitude

kind hatch
#

Inclusive and tolerant does not mean supporting law breaking.

delicate lynx
#

glhf

trail coral
young knoll
#

That’s not very inclusive and tolerant of you

trail coral
#

"you should be inclusive and tolerant"

#

i mean

#

i dont support it but ive never spread hate towards lgbtq

wet breach
trail coral
wet breach
#

You are free to ignore them

trail coral
#

💀

#

alr frost

river oracle
wet breach
#

Yeah, i am sure there was more to it lol

river oracle
#

if you say that in other places, yeah maybe. Here probably not

trail coral
eternal oxide
#

Sounds like you are just being toxic and provoking an argument

trail coral
river oracle
#

the first, one is unecessary though you probably should have told staff about that

trail coral
#

and i answered the question

river oracle
#

though it's likely too late now

trail coral
#

choco told me to stop talking

#

and i alr reported rhat dude so

#

idrc

eternal oxide
#

Yeah, "you were asked" means you were already in an argument and someone was pushing your buttons

trail coral
#

and someone brought up abortion

#

and asked me what i thought about it being legal/illegal

river oracle
#

that was probably me, we were just discussing. Not sure at what point it got out of hand, probably after I left lol

eternal oxide
#

Choco does not tell people to stop talking about somethign unless you had already been warned

wet breach
#

I remember all that and it wasnt quite that elegant as you put it lol. However what you said wasnt also the worst either

trail coral
#

ill link you all the messages id you dm me

wet breach
#

Choco just didnt want you to rile up more people and it turn worse theb what it was at

eternal oxide
#

defend Choco? Just I've know this crowd for a long time so I know how they react

river oracle
#

usually if chat is too heated staff want to cool it down

trail coral
swift shell
#

Let‘s just keep wasting our times in the development chat

trail coral
#

this*

eternal oxide
#

I do not believe for one instant that Choco said that

river oracle
trail coral
#

yeah wtvr

river oracle
#

minimod ftw

eternal oxide
#

link his message where he threatened to burn down your church

kind hatch
#

^

trail coral
eternal oxide
#

thought so

trail coral
#

#general message

trail coral
river oracle
#

lol fucking simple

eternal oxide
#

ha completely OUT of context

trail coral
#

go read the messages

#

then

#

😭

tall furnace
trail coral
#

theres like 7 other messages i reported

buoyant viper
#

what if we didnt talk about this again

eternal oxide
#

I did, you said there shoudl be one day a year where nothign was a crime

river oracle
#

what's poppin

buoyant viper
#

especially not in development

tall furnace
#

It's clear that assumptions were made and things were handled poorly.

eternal oxide
#

he was replyign to YOUR statement

tall furnace
#

Can we take it out of this channel?

trail coral
#

but youre only tolerant when it suits you 🤷‍♂️

tall furnace
trail coral
#

im used to it

#

and i dont get bothered

eternal oxide
#

I'm not tollerant at all. I hate everyone equally

river oracle
#

MD5 ADDED A SCHNITZEL EMOJI

#

HOLY SHIT

trail coral
#

but its unfair how me not supporting lgbtq is a huge deal but him sayinf stuff like that is nothing

river oracle
tall furnace
trail coral
#

#general message

#

@eternal oxide very inclusive and tolerant of him

#

very respectful gentleman

eternal oxide
trail coral
#

lmao

#

so what if i say i hate all gay people?

eternal oxide
#

Be polite but respect is earned

trail coral
#

am i homophobic and need to be banned?

eternal oxide
#

yes

trail coral
#

and he was being polite

#

as i recall

#

right?

eternal oxide
#

I really don't care

trail coral
#

you did before i linked you the messages and proved you wrong;)

eternal oxide
#

um, you proved nothign, You seem to live an a fantasy world

tall furnace
#

In order to be more included and tolerated, just use

  if(e.getAntagonist().isBeingIntolerant() || e.getAntagonist().isBeingExclusive()){
    e.setCancelled();
  }
}```
#

Spoonfeeding ik, but still

river oracle
river oracle
#

I don't wanna spoonfeed, but I'll help you

tall furnace
#

<3

river oracle
#
public void onRespond(PlayerRespondToCommentEvent e){
  if(e.getAntagonist().isBeingIntolerant() || e.getAntagonist().isBeingExclusive()){
    e.setCancelled(true);
  }
}
kind hatch
trail coral
eternal oxide
#

Yeah I can see why you were told to stop talking

river oracle
#

god this channel is slow, gotta wait for an actual dev question for this to clear up

tall furnace
#

Everyone needs to keep that to themselves

echo basalt
#

Single letter naming

#

ew

river oracle
wet breach
river oracle
#

god no

#

I used to do Player p;

#

but I've turned from my ways

trail coral
tall furnace
trail coral
delicate lynx
#

everyone who uses e for event names, please rename them right now

echo basalt
#

You still recommended Event e

#

rename it to event

river oracle
tall furnace
#

^

trail coral
#

but

#

i only have 1 event variable and 1 player variable

#

whats there to be clear

tall furnace
wet breach
river oracle
tall furnace
#

So if ALL players and ONLY players are listed as p, then it's fine

#

but that's hard to do if you have a killer and a killed

river oracle
#

I prefer to just be more direct

trail coral
#

comments are overrated tbh

river oracle
#

I don't comment my code. I do right docs though

trail coral
#

most codes dont need comments but need better naming and more readable code

tall furnace
tall furnace
#

I've been working on documenting my code better and it honestly is the most satisfying thing to never have to go back and read my code to know what it does, I just hover my mouse and boom, full sentences.

trail coral
#

i forget what my code does in like 2 hours

wet breach
tall furnace
wet breach
tall furnace
#

I just wanna code

wet breach
tall furnace
#

Did you think I expected you to care? XD

trail coral
wet breach
trail coral
#

and im the one that gets blamed for being harassed lmao

tall furnace
trail coral
tall furnace
kind hatch
#

Ya'll missed the sarcasm in that response.

tall furnace
#

Well guys I'm out. Too much butthurt here.

#

I'll return when the code comes back

trail coral
#

being respectful and polite towards a person you dont know is really easy idk why everyones so rude here

wet breach
trail coral
wet breach
eternal oxide
#

When you get the same kind of response from everyone you really should work out the common denominator is you.

trail coral
#

ive always been taught that youre the reflection of your home, your manners and the way you act around people says a lot about where you grew up and how youve been taught as a child

wet breach
#

That was what you were taught

#

Whoever taught you isnt the rule maker of the world

trail coral
#

still mad for no reason frost

#

can you talk like a human being?

eternal oxide
#

Lil you are still pushing buttons and can;t work out why you are riling people up

wet breach
#

I do, just dont care for peoples emotions is all

trail coral
#

its about you tho isnt it

#

you being polite

wet breach
#

Thing is i choose when i want to be polite, not because some rando on the net said so

trail coral
#

it should be the other way around but you do you

wet breach
#

Well unfortunate for you i suppose. Here in the US we get to choose

river oracle
#

Is there any disadvantage to start imports? I just noticed IJ has been using them. I've always shyed away from them, I was wondering whether I should just turn this IJ setting off

wet breach
#

Star imports, causes the compiler to import everything in that package whether you use it or not

tall furnace
#

I read start imports and was thoroughly confused

wet breach
tall furnace
#

For efficiency's sake, you should only import exactly what you need

worldly ingot
#

Welcome to #help-development where helping developers is often overshadowed by unnecessary, over-drawn out conversations leading to nowhere

river oracle
#

God IJ making this annoying, I just added 9999 imports required lol for star

worldly ingot
#

Can we not, please?

echo basalt
#

Any idea why WorldCreator#createWorld is nullable?

tall furnace
echo basalt
#

I don't see anything in the docs for it

tall furnace
wet breach
#

He was enjoying the fire

river oracle
#

or whatever canadians do

tall furnace
#

Dancing with mooses

echo basalt
river oracle
#

lets see

#

?stash

undone axleBOT
tall furnace
compact haven
#

so the bungeecord code makes it seem like

echo basalt
#

It'd load the world in that case

#

Time to look at nms

compact haven
#

translateAlternateColorCodes doesn't parse rgb tags, but ChatColor#of does. BUT the problem is that ChatColor#of seems to hardcode the section symbol

#

should I just translateAlternateColorCodes(of("...")), double it up?

#

ah no of() doesn't do what I want either

young knoll
#

translateAlternateColorCodes should parse them if you use the correct format

#

But the correct format is wack

compact haven
#

whats the correct format?

young knoll
#

&x&r&r&g&g&b&b

compact haven
#

what the fuck

kind hatch
#

Yea, but doesn't ChatColor#of() do that formatting?

young knoll
#

This is why most people make their own parser for &#rrggbb

river oracle
compact haven
#

nah just if the string starts with the code Shadow

#

I misread the code

echo basalt
#

why do they create the server level here instead of after the check

#

This is dumb

tall furnace
compact haven
#

is there a regex or method someone made to convert a nicer RGB tag to the bungeecord parseable one

echo basalt
#

nvm apparently the serverlevel adds itself on its constructor

#

which breaks SRP but ok

compact haven
#

or maybe somewhere in this channels history

wet breach
compact haven
#

idk I just need something to parse a nice looking tag

kind hatch
#

I think this is what most people do.

public static final Pattern HEX_PATTERN = Pattern.compile("#[a-fA-F0-9]{6}");

public static String formatHexColorCodes(String string) {
  Matcher matcher = HEX_PATTERN.matcher(string);
  while (matcher.find()) {
    string = string.replace(matcher.group(), "" + ChatColor.of(matcher.group()));
  }

  return string;
}
young knoll
#

Yeah that’s basically it

echo basalt
#
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.md_5.bungee.api.ChatColor;

/**
 * Represents a utility class for text.
 */
public class TextUtils {

    private static final Pattern hexPattern = Pattern.compile("#([A-Fa-f0-9]){6}");

    /**
     * Colors a String, replacing all hex colors with their respective ChatColor.
     *
     * @param message The String to color
     * @return The colored String
     */
    public static String color(String message) {
        Matcher matcher = hexPattern.matcher(message);
        while (matcher.find()) {
            String color = message.substring(matcher.start(), matcher.end());
            message = message.replace(color, String.valueOf(ChatColor.of(color)));
            matcher = hexPattern.matcher(message);
        }

        return ChatColor.translateAlternateColorCodes('&', message);
    }

    /**
     * Capitalizes a String. (e.g. "hello" -> "Hello")
     *
     * @param toCapitalize The String to capitalize
     * @return The capitalized String
     */
    public static String capitalize(String toCapitalize) {
        return toCapitalize.substring(0, 1).toUpperCase() + toCapitalize.substring(1);
    }

    /**
     * Removes a file extension from a String (e.g. "hello.txt" -> "hello")
     * @param fileName The String to remove the file extension from
     * @return The String without the file extension
     */
    public static String removeFileExtension(String fileName) {
        return fileName.substring(0, fileName.lastIndexOf('.'));
    }
}
#

Enjoy

tall furnace
#

The whole mess, look at that

compact haven
#

thank you

#

love you all

young knoll
#

Smh you don’t force the rest of the string to lowercase

compact haven
#

very much

echo basalt
young knoll
#

Your capitalize method would turn HELLO into HELLO

#

0/10

echo basalt
#

It's in the name

#

Capitalize

young knoll
#

Literally unplayable

#

The opposite of capitalize is communize

echo basalt
#

lowercaseize

wet breach
#

Lol

echo basalt
#

checkmate

young knoll
#

We have uppercase and lowercase

#

But what about just case

kind hatch
#

middlecase

rigid otter
#

Java doesn't want us to dynamically load classpaths. But Bukkit force it in order to load plugins. Bukkit doesn't want us to dynamically register commands. But I ... ?

hazy parrot
river oracle
#

that's about it. I dynamically load my commands

#

I might end up making a gradle / maven plugin for it though

rigid otter
#

But Bukkit doesn't provide an API

river oracle
#

no it doesn't

rigid otter
river oracle
civic apex
#

can anyone help me understand [04:10:29 ERROR]: Error occurred while enabling Uhc v1.1-SNAPSHOT (Is it up to date?) java.lang.VerifyError: Bad type on operand stack Exception Details: Location: me/blendy/uhc/npc/NPCManager.handlePacket(Lnet/minecraft/server/commands/CommandBanIp;Lorg/bukkit/entity/Player;)V @188: invokespecial Reason: Type 'net/minecraft/tags/TagDataPack' (current frame, stack[3]) is not assignable to 'net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage' Current Frame: bci: @188 flags: { } locals: { 'net/minecraft/server/commands/CommandBanIp', 'org/bukkit/entity/Player', 'java/util/Iterator', 'me/blendy/uhc/npc/NPC' } stack: { 'org/bukkit/entity/Player', uninitialized 179, uninitialized 179, 'net/minecraft/tags/TagDataPack', integer }

#

i particularly would like to know what class the @188 is referring to

#

this error occured when i ported my plugin from 1.18.2 to 1.20, in 1.18 it run just fine and in 1.20 (after a couple adjustments) i got it to compile but to throw this at runtime

civic apex
quaint mantle
#

hey

#

Anyone know how to find out the new packet names? I am porting smth from 1.12 that creates a PacketPlayOutSpawnEntityWeather packet and I cant find the equilivent for 1.20

kind hatch
quaint mantle
#

I already have 2 tabs open comparing both 1.12 and 1.20

#

I cant finda nything I will try again but nothing related to weather exists in 1.20

kind hatch
#

What does that packet even do? Change the weather for the player? For the world?

#

Set the type of weather?

young knoll
#

I don’t think there’s a special packet for that anymore

#

I imagine it’s just spawn entity

worldly ingot
#

Yeah that's for lightning or thunder or something iirc

kind hatch
#

Or are they looking for player specific packets?

#

Wait. wtf?

#

Why's that one categorized under loot?

worldly ingot
#

It's a loot table predicate

#

e.g. for fishing

kind hatch
#

The weather affects fishing?

worldly ingot
#

yes

kind hatch
#

Wut

#

All fishing in general, or with specific enchantments?

worldly ingot
#

Higher catch rates, I think unique types of loot

kind hatch
#

Did not know that. lol

#

Has that always been the case kinda like local difficulty or was that mechanic introduced sometime later?

worldly ingot
#

Since the fishing rework

#

I think in 1.9

#

Maybe slightly earlier

kind hatch
#

Welp. Been doing it all wrong then. xD Never knew about it.

noble lantern
#

can you send players messages async i cant remember

kind hatch
#

Yes, there's the AsyncPlayerChatEvent.

noble lantern
#

ah neat

young knoll
#

Yes messages are safe to send async

young knoll
#

It’s just a packet

noble lantern
noble lantern
young knoll
#

That is very wack

#

Why are you getting low level errors

noble lantern
#

huh

civic apex
#

that method doesnt even have reflection (directly) 😭

civic apex
#

thats why im so confused

noble lantern
#

where are you using TagDataPack ?

civic apex
#

noo

#

neither was i using PathfinderGoalDefendVillage

noble lantern
#

whatthe

civic apex
#

nor CommandBanIp

noble lantern
#

maybe bad nms remap?

civic apex
#

¯_(ツ)_/¯

young knoll
#

^

#

Recompile is my first recommendation

civic apex
#

the plugin?

#

ive done so

noble lantern
#

and buildtools

civic apex
#

i did buildtools

young knoll
#

Are you depending on the right version

civic apex
noble lantern
#

i dont wanna seperate from the convo too much but

what cli is that?

young knoll
#

Remove the spigot-api dependency

young knoll
#

spigot includes spigot-api

civic apex
kind hatch
#

Ah, so OhMyZsh

civic apex
young knoll
#

Should

civic apex
noble lantern
#

oh is a intellij plugin interesting

civic apex
#

no

#

its just being used by intellij

kind hatch
#

Wrong reply but whatever

kind hatch
# civic apex

What does your build section for the special source look like?

civic apex
noble lantern
civic apex
# kind hatch What does your build section for the special source look like?
<plugin>
                <groupId>net.md-5</groupId>
                <artifactId>specialsource-maven-plugin</artifactId>
                <version>1.2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-obf</id>
                        <configuration>
                            <srgIn>org.spigotmc:minecraft-server:1.20.1-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
                            <reverse>true</reverse>
                            <remappedDependencies>org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
                            <remappedArtifactAttached>true</remappedArtifactAttached>
                            <remappedClassifierName>remapped-obf</remappedClassifierName>
                        </configuration>
                    </execution>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>remap</goal>
                        </goals>
                        <id>remap-spigot</id>
                        <configuration>
                            <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
                            <srgIn>org.spigotmc:minecraft-server:1.18.2-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
                            <remappedDependencies>org.spigotmc:spigot:1.18.2-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
civic apex
#

it compiled and worked totally fine with that same setup when it was on 1.18.2

#

and it did on various other plugins i made

#

but ill remove it sure

kind hatch
#

Are you making this plugin for 1.20.1 or 1.18.2?

civic apex
#

now 1.20.1

#

this is me porting my old 1.18 plugin to 1.20

kind hatch
#

Cause you missed the section at the bottom that still says 1.18

civic apex
#

ooooo

#

that might be it

#

i swear i had searched for 1.18 on pom.xml

kind hatch
#

Plus, you should be using version 1.2.4 of the special source plugin

#

If you are working on 1.19+

civic apex
#

i dont know how to check which version i should use

#

thanks ill try recompiling now

young knoll
#

Ah yeah that’ll do it

civic apex
#

it worked!

#

well im getting other exceptions but they are unrelated and not throwing bytecode i dont understand at me

#

ty

kind hatch
civic apex
#

if you want i can share my dotfiles @noble lantern

noble lantern
noble lantern
civic apex
kind hatch
#

I think they've been around for quite some time now.

civic apex
#

called dotfiles because they usually are in .config or dirs that start with a dot (hidden in linux)

civic apex
#

depends on what you mean

#

outside of eye candy

#

zsh and its plugins are really useful

noble lantern
#

mainly just the eye candy :p

civic apex
kind hatch
civic apex
noble lantern
#

developers on the otherhand want pretty :p

#

except for my mc console

civic apex
#

also look up colorls

#

its pretty cool

kind hatch
#

Ah, I use exa.

civic apex
#

btw you also need a nerd font @noble lantern

kind hatch
civic apex
noble lantern
civic apex
#

you can use wsl

kind hatch
# civic apex

Those icons would be nice, but I don't think it would play nicely with exa.
That uses the normal ls command right?

civic apex
#

and you should prob try to switch it to linux if you can (if its not like for windows)

civic apex
#

i also aliased neofetch to neofetch | lolcat

kind hatch
#

Wait, what's lolcat?

noble lantern
#

i aint heard that name in a fat minute

civic apex
#

aliases

civic apex
kind hatch
#

Ohhhh

#

right

#

I think I remember seeing that in some neofetch tutorials.

civic apex
noble lantern
# civic apex

idk why but the thing on the bottom looks like the shadow outline of a reddit mod lol

noble lantern
#

nothin nvm xD

young knoll
#

Ah geez I see it

civic apex
#

btw its showing the colors of the theme

kind hatch
#

Ooo, can you share those?

civic apex
kind hatch
#

Those look clean.

civic apex
#

with jetbrainsmono nerd font

civic apex
# kind hatch

also even if you use bash you can get some customization of the ps1

#

this is how i have my bash (which use when i ssh as then i lose stuff like nerdfonts, truecolor etc)

#

then paste it into your .bashrc

unreal willow
#

Can anyone create a plugin for me?

#

it is simply a plugin that after death a chest menu will appear with 2 options, if the user chooses option (A) they will lose 10 experience and keep the item in their inventory, and if they choose (B) they will lose the same item as normal and of course they won't lose experience. If they don't choose or leave the server, the plugin will choose (B)

vocal cloud
#

You can probably go on the forums and offer someone $5 to do it lol

undone axleBOT
noble lantern
#

ide do it for 5$ shit

#

you know me i made you the other one for free :p

unreal willow
dry forum
#

if i have a link thats like
mysql://some_stuff
do i just add jdbc: before mysql?

sterile axle
#

for a single-host connection yes

dry forum
#

well it doesnt work

agile laurel
dry forum
#

all i have is the username, password, port, and host im just trying to connect to database google isnt very helpful

dry forum
# agile laurel Show us the connection code
        String password = "pass";
        String username = "user";
        try {
            database = new Database(url, password, username);```

```    public Database(String url, String password, String username) throws SQLException {
        connection = DriverManager.getConnection(url, username, password);
    }```
agile laurel
#

what library you use for database (what provide the Database class)

dry forum
#

java.sql.*;

unreal willow
#

please help me code a free plugin

dry forum
#

if thats what you ment?

agile laurel
#

encapsulate DriverManager.getConnection in a try catch

#

and print the exception if any

dry forum
#

it is

#

java.sql.SQLException: No suitable driver found for <my wrong link>

eternal oxide
#

you didn;t load a driver

dry forum
eternal oxide
#

Class.forName

dry forum
#

huh?

eternal oxide
dry forum
#

i didnt need to do any of this last time :p

hybrid spoke
unreal willow
#

...

hybrid spoke
#

i will do the plugin for 20€

#

why

#

just do what elgar told you

grave kayak
#

hello, id like to make a plugin that disables the console messages that op's get in the chat. I've seen some people saying it is impossible to do. does anyone know if it is actually possible/impossible to do. to add, the gamerule settings do not work

smoky anchor
#

can you provide example of what messages

smoky anchor
hybrid spoke
#

how does that not work

smoky anchor
#

I assume they mean some plugin response

#

In which case.. it would be hard

grave kayak
smoky anchor
#

again, provide example

grave kayak
#

wont let me post pics here for some reason

smoky anchor
#

?verify

#

oh not that
You need to verify to post images

hybrid spoke
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

smoky anchor
grave kayak
#

/gamerule commandBlockOutput false

smoky anchor
#

it-
That's not coming from command blocks is it

noble lantern
#

hahaha

#

logAdminCommands is the right rule

grave kayak
#

yep im..... yeah

#

thank you

noble lantern
#

😛

fierce whale
#

Is there any force resouce pack plugin for proxy server?

noble lantern
fierce whale
#

Yeah only one pack

noble lantern
#

ah you want multiple packs per server?

Setting in properties.yml per each server should be fine

#

hash's are broken on 1.17+ too btw so change names if you want packs to update from an old one your using

fierce whale
#

I wanna send resource pack when player connect to proxy server only once

noble lantern
#

To do that your gonna need to send the pack manually to your players, or just use https://www.spigotmc.org/resources/forcepack.45439/ and deal with the load times between servers

To the client, resource packs are bound to the specific server, meaning even if you send the same pack on another server in your bungee network the player will be forced to load it in again

One way around this possibly is just send them the resource pack in the hub, when they change to a new server they should still have the resource pack equipped as long as you arent sending a new one to them

noble lantern
unreal willow
#

please help me code a free plugin

smoky anchor
#

what
We can help you with the spigot plugin coding
If you're looking for someone to code you a plugin for free then
GL and

#

?services

undone axleBOT
quaint mantle
#

idk if it's good, no coding experience and simple concept, doesn't do database or any threads

quaint mantle
severe folio
#

It is probably not the best

warm drift
#

am no good bout java ._.

smoky anchor
minor otter
#

how does leaf decay work? does every block check in an area for logs during physics event?

tender shard
noble lantern
#

needs to stay alive like the amogus one

smoky anchor
#

Or something like this

severe folio
quaint mantle
severe folio
minor otter
#

sorry i said that in a way that makes no sense

smoky anchor
#

I think it checks around the 6 touching blocks and gets the one with the lowest distance and then adds one to its own state

#

and then sends an update to update the other leaf blocks

minor otter
#

ohh okay, so to replicate leaf decay youd have to make a custom tag that serves as the distance tag

#

thanks

smoky anchor
#

I don't understand what you're trying to do or how but I hope my explanation was understandable enough and helped you.
I actually dug thru the leaves block code quite a bit when I was trying to replicate them in a minecraft clone

minor otter
#

Oh I'm just trying to add custom leaves but for that I need to replicate leaf decay

smoky anchor
#

Ooooh GL!

minor otter
#

Ty

native gale
#

How computationally intensive is player. getPersistentDataContainer().get(..., ...)?

#

Like, would it be a big performance issue if I call that for every player online in a single tick, and there are ~100 of them?

hybrid spoke
#

its mapped internally

native gale
#

Oh, awesome

hybrid spoke
#

but you should still do some kind of distribution

unreal willow
#

please help me code a free plugin

obsidian plinth
#

Whats the best listerner to use to see what a user is wearing

hybrid spoke
hybrid spoke
obsidian plinth
#

just thjat its their

smoky anchor
obsidian plinth
#

could use player move

#

but wanted to see if their was sometihng better

hybrid spoke
#

you dont want to check the players inventory everytime he moves

#

rather use a scheduler

#

what exactly are you trying to do

green prism
#

Is it possible to set player's max health to like 5 hearts? (Only 5 hearts would be displayed)

smoky anchor
#

yes

green prism
#

this is a good start point

#

How can I do that?

smoky anchor
#

player.setAttrubute(Attribute.GENERIC_MAX_HEALTH, 10, Operation) or something

green prism
#

Thank you! I am testing it right now

smoky anchor
#

player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(aDouble);

green prism
#

Is it a permanent attribute?

smoky anchor
#

yes

#

you can also add another attribute that will substract hp

green prism
#

AMAZING!

#

Thank you so much

smoky anchor
#

it is permanent until the player dies at least
not sure if it persists even thru death

eternal needle
#

?paste

undone axleBOT
fervent gate
#

when I package my plugin using maven, there is no remapped version in the target folder. The mojang mapping work as they're supposed to. This is my POM.xml:
https://paste.md-5.net/yolezeposa.xml

smoky anchor
#

There is maven config

shy rock
#

I am making levels for each mob, is there a more effiecent way than creating a class for each mob?

smoky anchor
#

Probably yes

shy rock
#

You know any?

smoky anchor
#

no, since you have not provided any useful info

hazy parrot
#

Have level integer field and calculate every stat based on that?

minor otter
#

how can I change block hardness using nms

#

I want the player to not be able to mine a paticular material at all (no breaking animation)

smoky anchor
#

you can't in the way you want

minor otter
#

I already got the mining animation done with packets

#

just want to prevent potential issues

smoky anchor
#

the breaking progress is client sided
The only way you can influence that is with mining fatigue iirc

minor otter
#

im using mining fatigue currently but theres small ways to make it glitch

smoky anchor
#

if you're trying to create your own mining system, don't forget insta-mineable blocks exist.. like hypixel did

minor otter
#

I already made my own mining system I just wondered if I can make the block unmineable

smoky anchor
minor otter
#

I apply on mining abort event

#

and remove if mining any block thats not mushroom

#

also on join, death, ect

smoky anchor
#

ye I don't believe you can solve that

minor otter
#

unfortunate

smoky anchor
#

But try asking later if someone else has a better idea

wet breach
#

No need for events if you just set that tag

minor otter
#

alright, cool

wet breach
#

I cant remember its exact name but the bedrock block uses it and is why you cant mine it lol

smoky anchor
#

I can't seem to find it
I believe that property is controlled by hardness tho
Bedrock having -1 so unmineable

minor otter
#

so ill have to figure out how to change hardness of block to -1?

smoky anchor
#

again, you can't

minor otter
#

alright

wet breach
#

Will be able to look when i get home

smoky anchor
#

nope, that property is not synched to clients

chrome beacon
#

You should use Mining fatigue and handle all the block breaking server side

#

That is the only real way to do what you want

smoky anchor
#

They are using it, but they remove the mining fatigue and that causes small timeframe where players can start mining the block

chrome beacon
#

Yeah don't remove it

wet breach
chrome beacon
#

It needs to be there all the time

trail coral
minor otter
#

if I dont remove it then id have to simulate block mining for every vanilla block

wet breach
#

To give you an idea on how to change the hardness

minor otter
chrome beacon
#

Again hardness is not synced to the client

#

It doesn't matter if you change it

young knoll
#

If you have custom blocks you only need the mining system for them

chrome beacon
#

The problem is there will be a slight delay before the mining fatigue activates

#

Which is why they can't remove the mining fatigue

#

And as such need to handle mining of all blocks

unreal willow
#

Please help me convert the code into a plugin

chrome beacon
#

No

#

?services

undone axleBOT
wet breach
chrome beacon
wet breach
#

I will have to test when i get home

unreal willow
chrome beacon
#

Which is what they want to prevent

young knoll
#

I don’t recall having that issue

#

I gave the mining fatigue when they started mining

chrome beacon
#

Low ping I assume

wet breach
young knoll
#

True

#

It is localhost XD

wet breach
#

Not sure why thr animation would be important lol

chrome beacon
#

So it looks right

wet breach
#

Well they said unminable or that was what i read, in that case it wont help using that tag then

young knoll
#

Does ItemsAdder reimplement mining for all blocks

#

Or Oraxen

#

Sounds annoying

wet breach
#

Again if its in regards to the animation, then the tag is still no good. Personally i wouldnt care about the animations if its a block not intended to be destroyed lol

buoyant viper
dire bluff
#

hello i have a question\

#

how to put a number of the CustomModelData i need to use

glad prawn
#

setCustomModelData?

dire bluff
#

set not get ok

glad prawn
#

?:D

dire bluff
#

thanks

#

im idiot srr im learning

smoky anchor
#

Are you learning English ?

minor otter
#

lmao

dire bluff
#

wow...

#

what a community

blazing ocean
#

hello, i can't seem to figure out how to get the entity a player interacted with in an PlayerInteractEntityEvent, currently using a raytraceresult, using this code: java @EventHandler public static void onPlayerInteract(PlayerInteractEntityEvent e) { RayTraceResult res = e.getPlayer().getWorld().rayTraceEntities(e.getPlayer().getLocation(), e.getPlayer().getEyeLocation().getDirection(), 5); e.getPlayer().sendMessage(res.getHitEntity().getName()); }
and res is just null, what am i doing wrong? there seems to be no e#getEntity method for some odd reason...

smoky anchor
#

e.getRightClicked()

blazing ocean
#

ohhh

flint coyote
blazing ocean
#

hi again, is there a item property to disable picking it up for one instance?

#

item#setPickupDelay

vital sandal
blazing ocean
#

just set it to a billion

vital sandal
#

Yeh so what you are asking?

tall furnace
#

Or -1

blazing ocean
unique shuttle
#

Hello guys
How can I change the position of the axis of rotation of a quaternion? Basically I want to do the same as "Translation" of display but in quaternion. is this possible for the display entity?

somber scarab
#

@wet breach

#

my game is finished!!!

#

Ima upload it on spigot soon

#

first i need a repo before that

#

and Id also like to stress test it

wet breach
somber scarab
#

I wont sell this one.

wet breach
somber scarab
#

just ask to look at the code?

compact haven
#

no a PR is an open source concept

#

you still open source it

wet breach
#

no open source is good, allows people to make those PR's. PR means pull request, in order to make a pull request someone has to clone your repo to their account, and then make changes. Then there is a button where you can submit a pull request and this will go directly upstream, which would be your repo and it gives you the option to look at the changes they are asking for you to pull into your repo that they made.

somber scarab
#

yeah I know that. Just thought you meant that I can only allow certain ppl to get access since u said "its better to do that"

#

I thought you meant mutually exclusive

wet breach
#

I said what is better if its going to be open source of other then people just commenting on your code

#

is that they instead just go ahead and submit changes for you

somber scarab
#

yeah true

#

nice

#

also

#

before I publish it... I wanna stress test it first

#

how can I get 10 ppl to use my plugin at the same time on the same server

#

xd

#

I want others to try to break it and find bugs im unaware of

hybrid spoke
somber scarab
hybrid spoke
#

oh we're back in 2017 now

somber scarab
#

and get teleported on a plot of land where a vanilla generated area is placed. and then lava slowly rises. last to survive, wins

orchid trout
#

what am i supposed to add to this pom.xml?

somber scarab
orchid trout
#

the jar is 3kb

somber scarab
#

otherwise called "API"'s

orchid trout
#

its empty

somber scarab
orchid trout
#

just stfu if you dont know what youre talking about