#help-development

1 messages Β· Page 1836 of 1

stone sinew
#

Yes but 1.8 added a 1-3 tick cooldown for hits. 1.7.10 didn't have a cooldown

calm star
#

how do u make it so that only server ops can run my command?

quaint mantle
#

if not op, run a message

hybrid spoke
#

if not op, ban them

quaint mantle
#

then return:
true: nothing appear
false: the message usage will send to the player

calm star
#

is it not a permisison thing

tardy delta
#

is HikariDatasource#close() the same as HikariDatasource#getConnection().close()?

calm star
quaint mantle
#

so I have a system where I'm trying to delete a few worlds from the server (they regenerate on start), but they keep saving on stop so the deletion process gets interrupted every time. Whats strange is 1) this only started happening in 1.18.1, and 2) this does not happen on my test server, even in 1.18.1; it's only on the hosted one. I tried setting autosave to 0 in bukkit.yml, i tried disabling autosave through World#setAutoSave, i tried unloading the worlds first and then deleting them, even running /save-off doesn't work. And like I said, I can't reproduce this in my test server, so I have zero clue why it would be different on my hosted server. This is my code for deleting the worlds: https://paste.md-5.net/otawefixev.cpp

calm star
#

i thought you have to add command permissions

quaint mantle
calm star
#

how

quaint mantle
#

2 ways

#

might be more but i know two ways:
check if player have a specific perm, example: if (p.hasPermission("string")) // do some wunky things here
do it in the plugin.yml

eternal oxide
quaint mantle
#

if you do it in plugin.yml you dont really need to make another

#

check

quaint mantle
eternal oxide
#

that executes before worlds are loaded

quaint mantle
#

alright I'll try that

calm star
#

would i go like htis

permissions:
  condense_wand.*:
    description: Ops only
    default: op
eternal oxide
#

you need to define and assign the child nodes under the .*

#

some permission plugins do not understand *

burnt current
#

Quick question: I am trying to create a method to insert different values into my MySQL database table. This has also worked well so far. However, I have now added another column to the data table that is not to be filled by the method and accordingly can also have the value null. Since this column exists, I now get the following error message when trying to insert values there:
java.sql.SQLException: Field 'chunkid' doesn't have a default value
chunkid is in that case the table column I mean. Does anyone happen to have an idea what I might have done wrong?

calm star
tribal holly
#

All blocks of minecraft have a BlockState ? or only oriented block, stairs, banner... ?

#

i'm making my own system of schemtatics and i'm trying to save all data of oriented blocks

#

maybe i only need to use BlockData ?

quaint mantle
#

how to make a basic command

tribal holly
#

google

proud basin
quaint mantle
#

command no

#

'-'

#

how to make a basic scoreboard ****

#

sorry

quaint mantle
#

hey does anyone know where gameprofile is in the new spigot api for 1.18?

opal juniper
#

thats not in the API

quaint mantle
#

hey guys

#

how to use placeholderapi in my plugin gradle?

quaint mantle
opal juniper
quaint mantle
#

how do import that onto my plugin

#

w/o using maven

opal juniper
misty current
#

can you listen for plugin disabling? I wanna check if a plugin that is not mine is disabled

misty current
#

interesting

#

thanks

sleek pond
#

How could I store an item specifically as it is? For example, if I try to store the itemMeta of a dye, then it doesn't save the dye color and stuff

#

Currently, I just store enchatlnts, name, and material

#

I need something more specific though

misty current
#

iirc itemstacks are serializable

#

so unless i got your question wrong, you can serialize it

#

can you always cast Plugin to JavaPlugin?

jade grove
#

I'm trying to subcribe players to a channel using jedis Bukkit#getServer#getScheduler#runTaskAsynchronously, however it returns with this error:

Cannot resolve method 'runTaskAsynchronously(java.util.stream.Stream<capture<? extends org.bukkit.entity.Player>>)'```
#

Im trying to stream my players through Bukkit and filtering them

silk hamlet
#

Is it correct that they removed the footstep particle from the regular spigot api? I cant find it

#

Its not in the nmc and in the spigot api

pallid forge
#

is there an event which can be listened to before the server stops? the closes thing i can find to it is WorldSaveEvent or WorldUnloadEvent

misty current
#

put code in your onDisable method

fervent gate
#

onDisable?

misty current
#

the one extending JavaPlugin

jade grove
# misty current code?
public void onMessage(String channel, String message) {
            () -> Bukkit.getServer()
                    .getScheduler().runTaskAsynchronously(Bukkit.getServer().getOnlinePlayers().stream().filter(player -> player.hasPermission("command.staff")));
          }```
fervent gate
#

yea

pallid forge
misty current
#

yes

misty current
#

what are you tryna do

pallid forge
#

when is it specifically called before the save when the world stops?

misty current
#

it's called when your plugin is disabled

jade grove
misty current
#

you mean send?

#

and why do you want to send it async?

jade grove
misty current
#

just do something like:

#
public void sendMessage(String message, String perm){
  for(Player p : Bukkit.getOnlinePlayers()){
    if(p.hasPermission(perm)) p.sendMessage(message);
  {
}

pallid forge
silk hamlet
#

destroy the entity when the world unloads then

misty current
#

destroy it inside the onDisable method

#

as i told ya

stone sinew
misty current
#

also on world unload if you need that

#

edited

pallid forge
#

oh ok i was just confused would it be still saved into the world on the unload event

misty current
#

if you want it to not save in worlddata you can make it not persistent

#

but it won't save on chunk unloads either

lethal coral
misty current
#

hello

#

oh hi hapily

#

why hexicdragon2

#

lol

#

btw can you always cast Plugin to JavaPlugin?

silk hamlet
tall dragon
misty current
tall dragon
#

how did you get plugin?

misty current
misty current
tall dragon
#

well

#

in that case you know its gonna be a javaplugin

misty current
#

in what case could it not be instance of JavaPlugin

tall dragon
#

i cannot think of any case off the top of my head

#

but it might still happen

#

but you can just check for it and then cast right?

misty current
#

yea sure

#

also i have realized i can just use the plugin name

#

for what i'm doing

little trail
#

What's the code for a custom hex color chat color

#

(Not the bungee api ChatColor enum class thing)

tender shard
#

&x&f&f&0&0&0&0

#

πŸ‘πŸ‘„πŸ‘

little trail
#

is that for fff000

tender shard
#

ff0000, yes

little trail
#

Ty

tender shard
#

np

unreal quartz
#

πŸ‘€
πŸ‘…

tender shard
#

uuuh

#

staahp

tardy delta
#

is hikaridatasource.close() the same as hikaridatasource.getConn().close()?

quaint mantle
#

how to make my scoreboard not static?

little trail
#

Hm does it not work in an MOTD (custom chat color)

tardy delta
#

remove the static keyword :kekw:

quaint mantle
tardy delta
#

its true

unreal quartz
quaint mantle
#

for automatic update

tardy delta
tardy delta
quaint mantle
tardy delta
#
Bukkit.getScheduler().runTaskTimer(this, () -> setScoreboard(event.getPlayer()), 20, 40);```
quaint mantle
#

Hey fourteen, you can help me?

tardy delta
#

with?

quaint mantle
#

wait 1 minute

#

the order isn't correct ._.

#

code:

#
    public void setScoreboard(Player p) {
        Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard();
        Objective obj = board.registerNewObjective(getConfig().getString("Scoreboard.Title").replace("&", "Β§"), "dummy");

Object[] lista = getConfig().getStringList("Scoreboard.Description").toArray();

        for (int i = 0; i < lista.length; i++) {
            Score onlineName = obj.getScore(PlaceholderAPI.setPlaceholders(p, lista[i].toString().replace("&", "Β§")));
            onlineName.setScore(i);
        }

        obj.setDisplaySlot(DisplaySlot.SIDEBAR);
        p.setScoreboard(board);
    }```
tender shard
#

it's always sorted by alphabet

quaint mantle
#

i need in this sequence ;_:

#

how to?

tall dragon
#

then why are you sorting it

ancient plank
#

^

#

just don't sort it

quaint mantle
#

can send the fixed code? idk how

ancient plank
#

na

quaint mantle
#

ignore :O

#

the correct code:

acoustic pendant
#

Hello! for some reason papi is sending this error:
But i'm using other 2 placeholders in the same way and they work, could anyone help me?

tall dragon
#

its very simple, you dont need a list of objects, just get a list of strings

quaint mantle
#

Object[] lista = getConfig().getStringList("Scoreboard.Description").toArray();

#

is the correct

tall dragon
#

the type is still Object[]

ancient plank
#

try to actually learn about what you're doing instead of asking for code

quaint mantle
#

String[] lista = getConfig().getStringList("Scoreboard.Description"); ?

#

or List<String> lista

quaint mantle
#

and for it?

ancient plank
#

Hmm to string array or to string list for a string list....

quaint mantle
acoustic pendant
tender shard
#

then you fucked up big time

acoustic pendant
#

what

tender shard
#

because the stacktrace shows the error is in line 68

#

at me.jasperjh.animatedscoreboard.core.PlaceholderHandler.replacePlaceholderAPI(PlaceholderHandler.java:68)

acoustic pendant
#

that's the last line

tender shard
#

then you didnt compile it again or sth

acoustic pendant
#

anytime there was a line 68 lol

ancient plank
#

the stacktrace doesn't lie!

tender shard
#

the stacktrace doesn't lie unless you are using some stuff messing with your bytecode

#

lol

acoustic pendant
#

ehm

#

so what am i supposed to do lol

tender shard
#

open a decompiler and see what line 68 is

quaint mantle
#
        lista.stream().map(s -> {
            Score onlineName = obj.getScore(PlaceholderAPI.setPlaceholders(p, s.replace("&", "Β§")));
            return onlineName.setScore(what i insert here);
        });```
acoustic pendant
tender shard
#

I prefer luyten but jd-gui is fine too

quaint mantle
tender shard
acoustic pendant
#

bruh

#

oh wait

quaint mantle
acoustic pendant
#

the file or the code?

quaint mantle
#

is needed?

quaint mantle
tender shard
#

what are you trying to do?

acoustic pendant
#

but there is no line 68 in the papi class and the line 68 in the file is a comment

quaint mantle
tender shard
quaint mantle
#

I need to set the items from a List<String> in my score.

tender shard
#

no you want to set the objective to have your strings as name

acoustic pendant
#

but mfnalex, you are meaning the class where i create the placeholder expansion?

tender shard
#

the score itself is always only a number

tender shard
acoustic pendant
#

that isn't my plugin

tender shard
#

oooh

acoustic pendant
#

is animatedscoreboard

tender shard
#

what's your plugins package name?

quaint mantle
acoustic pendant
#

me.fragment.minespaceskills

tender shard
#

then show PlaceHolderApi line 49

acoustic pendant
#

this return

tender shard
#

either plugin is null or plugin.health is null or plugin.health.effectiveHP(player) is null

acoustic pendant
#

this is my effectiveHP class

tender shard
#

where do you set plugin.health ?

quaint mantle
acoustic pendant
tender shard
acoustic pendant
tender shard
quaint mantle
acoustic pendant
#

so, like this?

tender shard
#

you basically want to get the score's objective and set its name

quaint mantle
acoustic pendant
#

ok, ty

tender shard
#

sorry but

#

?learnjava

undone axleBOT
tender shard
#

that's really something you should know lol

ancient plank
#

i need to make a meme

quaint mantle
#

'-'

tender shard
#

whyyy is my craftbukkit broken D:

quaint mantle
#

idk

#

F

#

RIP

tender shard
quaint mantle
#

RIP

ancient plank
#

did u run the correct scripts!

tender shard
#

which ones? I didn't run anything yet

ancient plank
#

actually ngl i dont think you have to run anything except build tools

#

idk

#

lemme try opening up cb on my local env

tender shard
#

I don't think I have to run buildtools at all. I compiled / installed bukkit, and now am up to doing a change in craftbukkit but yeah

#

D:

#

but anyway, I already ran buildtools anyway soooo that can't be the problem 😦

ancient plank
#

rip

tender shard
#

and the funny thing is

#

it worked yesterday

#

and I have not changed ANYTHING in craftbukkit at all, not yesterday, not today

ancient plank
#

coding moment

#

you change nothing and it breaks

tender shard
#

yeah lmao

#

now it tells me my LazyPlayerSet class is broken - i never opened that file at any point in history lol

#

i'll just clone it again - probably the easiest solution πŸ˜„

quaint mantle
#

[17:32:50 WARN]: [KScoreBoard] Task #388 for KScoreBoard v1.0-SNAPSHOT generated an exception
java.lang.ClassCastException: java.util.stream.SortedOps$OfRef cannot be cast to java.util.List
at me.koddydev.KScoreboard.setScoreboard(KScoreboard.java:62) ~[?:?]
at me.koddydev.KScoreboard.lambda$onJoin$0(KScoreboard.java:56) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]

quaint mantle
#

List<String> lista = (List<String>) getConfig().getStringList("Scoreboard.Description").stream().sorted();

tender shard
#

you can't cast a stream to a list

#

you will need to use collect() on the stream

quaint mantle
#

'-'

tender shard
#

e.g. collect(Collectors.toList())

quaint mantle
#

.stream().sorted().collect()?

ancient plank
#

i dont even see the point to this

quaint mantle
#

oh ok

tender shard
#

seems like they want to sort their list

agile jackal
#

@tender shard your game looks pretty cool

tender shard
tender shard
agile jackal
#

I like the graphics

tall dragon
tender shard
#

yeah it's what 26 year old idiots produce when they have access to a legal version of photoshop lmao

#

definitely wasn't worth the money lol

tall dragon
#

getStringList() already returns a list of strings

tender shard
agile jackal
#

I bought the creative cloud on black friday and have barely used it since

#

I feel you

tall dragon
ancient plank
#

adelemThonk weren't you just annoyed because you were sorting it and you didn't want it sorted

tender shard
#

yeah D: I got it for the student price

tender shard
tall dragon
#

yeaaaa

tender shard
#

erm

ancient plank
#

ima dm u rq mf

tender shard
#

then ffs just don't sort it and use the list directly lmao @quaint mantle

ancient plank
#

to explain what's going on

tender shard
#

okiii

quaint mantle
#

guys

#

sorry for my codes

#

i need for fix the scoreboard but in the chat works

#

in scoreboard

tender shard
quaint mantle
#

the sequence

tender shard
#

I already told you

#

that

quaint mantle
tender shard
#

the scoreboard automatically gets sorted by alphabet

quaint mantle
tender shard
#

soooo prefix every line with a number or something similar

ancient plank
#

adelemThonk if you set the score with the objective it'll go from highest number to lowest

tender shard
#

maybe color codes would work too, no idea

tender shard
tender shard
#

I think that's how my former employer did it too

ancient plank
#
Objective 1     5
Objective 2     4
Objective 3     3
...
#

they're the red numbers on the far right

tender shard
quaint mantle
#

i using 1.8

tender shard
#

that's bad but doesn't matter

tender shard
#

okay I'll explain it one more time

ancient plank
#

this

quaint mantle
#

oh

#

ok

tender shard
#

every line in the scoreboard has an objective (the name/string) and the score (the number)

quaint mantle
#

ohhhhhhh ok

tender shard
#

lines with the same score are sorted by alphabet

#

and all others are sorted by their score

ancient plank
#

idk about how it is in 1.8 tho so gl

tender shard
#

so give your first line the highest score, your last line the lowest score, etc

tender shard
ancient plank
#

here's to hoping

#

doesn't seem like something that'd change much in 7 years

tender shard
#

yeah I think scoreboard api was added and then it just silently existed since then lol

quaint mantle
#

onlineName.setScore((lista.size() - i));

#

'-'

#
        for (int i = 0; i < lista.size(); i++) {
            Score onlineName = obj.getScore(PlaceholderAPI.setPlaceholders(p, lista.get(i).replace("&", "Β§")));
            onlineName.setScore((lista.size() - i));
        }
#

thanks everyone

tender shard
#

btw you should stick to english names for your variables, makes it easier for other people to help you

tender shard
#

πŸ™‚

ancient plank
#

:)

tender shard
#

uuuh for real why is this happening D:

#

I just cloned it again

#

still it can't resolve all that stuff

ancient plank
#

:(

tender shard
#

e.g. it cannot find EntityPlayer.timeOffset

quaint mantle
#

verify the version

tender shard
#

and it's actually not inside EntityPlayer

tender shard
quaint mantle
#

'-'

tender shard
#

and yeah, it's 1.18.1-R0.1-SNAPSHOT πŸ˜„

ancient plank
#

I'm not having the same issues tbh

#

just ran buildtools and then opened the cb local env in the folder that it builds

tender shard
#

hm yeah that might work but shouldn't I use the code from spigot stash instead?

#

at least that's what the contrib guidelines say

young knoll
#

That page is old and weird

#

Just run buildtools and open the project from there

tender shard
#

hm well okay

#

will try, ty

ancient plank
#

old things are old

tender shard
#

I just wonder - how am I supposed to create a PR if I'm not using my forked repo to clone it?

#

yeah the buildtools code works but as said - how am I supposed to commit sth now?

ancient plank
#

adelemThonk now my buildtools code is borked

quaint mantle
#

how to remove scoreboard of a player

ancient plank
quaint mantle
#

RIP

tender shard
#

I'll wait for md_5 to come online lol

quaint mantle
tender shard
#

create a new scoreboard for that player

young knoll
#

You just commit to your forked repo

#

Well, push

tender shard
crude hound
#

entity summoning problem

quaint mantle
ancient plank
#

ngl I just copy paste my changes to the web editor of my fork then push

young knoll
#

You can push to whatever repo you want

tender shard
tender shard
young knoll
#

But they are

tender shard
#

hm

#

let me check πŸ˜„

golden turret
young knoll
#

Your fork should be kept up to date with master automatically

tender shard
#

no idea what that means

young knoll
#

Uhh

#

yes

tender shard
quaint mantle
#

i have best internet

tender shard
quaint mantle
tender shard
#

πŸ˜›

quaint mantle
#

:O

#

you are rich!?

tender shard
#

no I'm poor

#

I spend everything I have for servers, internet, rent and food lol

eternal oxide
#

lucky you, you get food

lethal coral
quaint mantle
tender shard
lethal coral
tender shard
#

so?

ancient plank
#

mwaha now i have ur ip im gonna do funky things with it!!!!

lethal coral
#

your priorities are interesting

tender shard
#

who cares about someone's ip

rough drift
#

the EventPriority.LOWEST is the one that gets executed first right?

rough drift
#

so the lowest priority is the highest, and the highest priority is the lowest? (apart monitor)

ancient plank
tender shard
#

lowest is first to execute, highest (and then monitor) is the last

rough drift
#

yes

#

so in terms of priority

#

lowest is the highest

tender shard
#

no

#

lowest is the lowest

tall dragon
#

its a bit confusing, but the highest piority gets executed last. hence having the most influence on the event

rough drift
#

i don't get it

quaint mantle
tender shard
#

yes, if you do something on lowest, someone on highest can override your changes

random epoch
#

Highest priority has the final say in the event.

tender shard
#

^

tall dragon
#

indeed

rough drift
#

ohhhhhhhhhhhhh

ancient plank
#

so imagine in squid game

#

glass bridges: you wanna be last

tender shard
#

maybe we should go back to Map<String,Object>

ancient plank
#

kekw

young knoll
#

I'll map you to a string

tender shard
tender shard
quaint mantle
#

i have the best internet of the world

tender shard
#

but

#

your ping

#

is awesome

quaint mantle
#

Brazil :v

#

tempo = ping

tall dragon
tender shard
#

just wondering about the ping brazil <> germany

quaint mantle
tender shard
#

thats kinda good

#

also 222 is my birth date

ancient plank
#

im on wifi

tender shard
#

evil adel

tall dragon
tender shard
#

wifi bad

ancient plank
#

145 ping avg to jeff

tender shard
#

where are you from again?

ancient plank
#

florida

#

west florida

tender shard
#

ah okay that's also quite good

tall dragon
#

ahh florida

#

the place of madlads

tender shard
#

my servers are basically next to DE-CIX so I kinda expected good pings, but not that good

#

okay everyone google your birthdate + "florida man"

#

lmao

ancient plank
#

not the place for this

tender shard
#

oh yes sry

ancient plank
tender shard
#

I thought we were in #general sry

tall dragon
#

sowwy boss

golden turret
#

any help pls, im stuck on that

tender shard
#

did you read the replies you got? two people said slimes probably don't have pitch

golden turret
#

it is not about pitch

tender shard
#

but you asked about the pitch and yaw

golden turret
#

rotation basically

tender shard
#

okay so only yaw

tall dragon
#

yaw then

tender shard
#

y(eeh)aw*

#

hm no idea. did you try adding some debug stuff to see whether it actually sets the yaw?

#

e.g. print the yaw before and after tping the slime

golden turret
#

they are the same

#

because it dont rotate 🀑

tender shard
#

I'll test it myself, gimme some minutes pls

golden turret
#

ok

#

remember that this is a custom slime

tender shard
#

should not matter if it extends Slime and you aren't overriding any teleport logic

#

although not sure, I never ever worked with NMS entities besides some NPC stuff

golden turret
#

im removing the pathfinders

tender shard
#

but as said, not sure

#

I'll just do some testing things

golden turret
#

well, i googled a bit and some people related that they had the same problem AFTER removing the ai or pathfinders

tender shard
#

hm yeah probably then this is the issue πŸ˜„

#

you use mojang mappings right?

golden turret
#

no

#

im on 1.16.5

tender shard
#

oh yeah

#

I forgot

#

well I

#

I'll try with 1.18.1

tender shard
#

btw what makes me mad is

#

World has a method spawnEntity but still requires the location, that I already used to get the world from

#

there should be a static Bukkit.spawnEntity(Location, ...) thing or a Location.spawnEntity() thing lol

#

oh wait @golden turret

#

how do you even spawn custom entities?

#

I only get World#spawnEntity that takes an EntityType

golden turret
#

CraftWorld#addEntity

tender shard
#

thx

golden turret
tender shard
#

wait that method is totally different in 1.18

#

hm I have no idea how it works in 1.18 lol sorry I'm out

#

my CustomSlime constructor looks like this:

golden turret
#

these people that only use recent versions...

tender shard
#
        public CustomSlime(EntityType<? extends Slime> entitytypes, Level world) {
            super(entitytypes, world);
        }
tender shard
golden turret
tender shard
#

yeah but no idea what "level" is supposed to be

golden turret
#

world

tender shard
#

what world?

#

craftworld? bukkit world?

#

NMS world?

young knoll
#

NMS world

tender shard
golden turret
#

nms

#

.getHandle

tender shard
#

to what?

ancient plank
#

or smth

#

yknow what

#

ima just try too

#

lets all make custom slime nms projects

tender shard
#

oh yeah

#

indeed ServerLevel extends Level

tall dragon
#

brb making custom slime project

tender shard
#

I wonder what other Levels exist beside ServerLevels

#

also Level is a horrible word for World lol

#

but

#

why would I need to cast a ServerLevel to a Level when ServerLevel extends Level

#

that makes no sense to me

ancient plank
#

that's how its called in mojna'gs mappings yup

tender shard
#

I really don't get it lmao

#

I can't help, sorry πŸ˜„

ancient plank
#

nms is hard bro

quaint mantle
#

how to edit my tab

tender shard
#

what do mean?

#

edit the tab list?

quaint mantle
#

yes

tender shard
#

s?

#

create fake players by sending packets

quaint mantle
#

example

tender shard
#

dont have any

#

you are on this ancient MC version right?

quaint mantle
#

?

misty current
#

how can I check if a generic of an object is of a certain type?

#

let's say i have a Consumer<?> and i wanna check if it is a Consumer<Player>

#

how would I do that?

golden turret
#

wait

#

maybe

#

nvm

vale ember
misty current
#

it's a bit different in my case

#

I'm using a Consumer and well you can't stream a consumer

#

or can you

acoustic pendant
#

is there any api for creating islands in a void world?

golden turret
#

before spawn, i will get its yaw

#

and then check for every field on the class

#

and see who is equal to the yaw

tender shard
quaint mantle
visual tide
#

neat

golden turret
#

i forgot what is yaw and pitch

misty current
tender shard
misty current
#

god that sounds confusing

visual tide
tender shard
#

what kind of object do you have?

golden turret
#

Consumer

misty current
#

i have a BiConsumer<?, String[]>

#

and i wanna check if the wildcard is a Player

#

or a ConsoleCommandSender

tender shard
#

should return an array of Type[]

misty current
#

yeah it does

#

what's Type

quaint mantle
#

hello
i want to get a skin signature and value for GameProfile for npc plugin
what should ido

tender shard
misty current
#

oh so i check the instance of that

#

executor.getClass().getGenericInterfaces()[0].getClass().isInstance(Player.class) something like this?

tender shard
#
test.getClass().getGenericInterfaces()[0].getClass().equals(Player.class);
vale ember
tender shard
#

isInstance is to check an whether an INSTANCE is of a certain class

#

you just need to check whether the class of your first (0th) type equals the Player.class

quaint mantle
tender shard
#

pls let me know whether it works. I just made that all up and have no idea if that works lmao

#

it should work though

misty current
#

if i used isInstance it would get subclasses too

#

right?

tender shard
#

erm hm no

#

well

#

you're right about the subclasses

#

that might be an issue

#

one sec

misty current
#

like if the consumer had <CraftPlayer, String[]> it would return true with isInstance

#

or na?

tender shard
#

well wait

#

your Consumer will always take a Player

#

never a CraftPlayer, right?

misty current
#

yea

tender shard
#

yeah then what I sent should work

misty current
#

it can either be a Player or a ConsoleCommandSender

tender shard
#

otherwise, get the Types.getClass.getInterfaces and check whether one of that is Player

vale ember
misty current
#

aight thanks

tender shard
misty current
#

i'll finish it up and let u know if it works

quaint mantle
tender shard
#

you CANNOT check whether it equals to a superclass, you have to check those two interfaces explicitely

#

and yeah pls let me know whether it works πŸ˜„

#

although I have no idea why anone would need this πŸ˜›

tender shard
#

they can easily just use fake names

#

just dont do offline servers lol

visual tide
#

^

misty current
#

coding a command api that uses a biconsumer so the developer can put in what does the command execute

misty current
#

the first object of the biconsumer is the sender

golden turret
tacit drift
#

what

quaint mantle
misty current
#

i used to have my own functional interfaces but i thought might as well use java's functional interfaces

#

but at this point i think it would've been better doing so ;-;

tender shard
#

functional interfaces are scary

#

because

#

I don't know how they work

#

lmao

#

if you got any good example for functional interfaces pls let me know @misty current :3

misty current
#

well a biconsumer is a functional interface

golden turret
tender shard
#

I maybe need to read something about it then lmao

unreal quartz
misty current
#

probably you know how they work but not the name

tender shard
#

I mean, ofc I know what consumers are etc, but no idea what's meant with functional interface

tender shard
#

and I nearly killed myself, that language is so fucked

unreal quartz
#

FunctionalInterface is an annotation so you can represent it with a lambda

misty current
#

functional interfaces are basically ones used with lambda statements

ancient plank
#

command frameworks are pog can confirm

tender shard
misty current
#

yeah pretty much

unreal quartz
#

the annotation yeah

tender shard
#

alright then I know what it is lmao

tender shard
ancient plank
#

yes

#

i implemented ACF into a plugin yesterday when helping a guy organize his first plugin, and it's sooo good

tender shard
#

yeah although it's sometimes a bit stupid

ancient plank
#

was a bit confusing to get into tbh but I got it now

tender shard
#

e.g.

public static void whatever(CommandSender sender, Player argument) {
...
}```
#

it does proper tab complete for player names

#

buuut

#

it's still possible to provide a value with no proper player name and argument will just be null

ancient plank
#

took me like 10 minutes to figure out how tf to actually make a command after extending basecommand

tender shard
#

I learnt it from looking at example code or at other plugins using it

somber hull
#

wait

#

nvm

tender shard
#

wdym with "it just doesnt work"?

#

oh

#

seems like a moment of enlightenment lol

somber hull
tender shard
#

haha

#

gg

somber hull
#

i was using yaml to store data 😳

#

switching to json fixed it

tender shard
#

nothing wrong with that, it was made to save data πŸ˜›

somber hull
#

idk abt that one chief

tender shard
somber hull
#

ye, but its slow because its meant for config files that are human readable

tender shard
#

yeah but I doubt that you read the files synced on every tick

#

reading files in general is slow. the difference between json and yaml is basically non-existent if you also take into account the fact that the OS has to actually read the bytes of the file in the first place

#

unless maybe you have a 7GB YAML file

#

and you probably don't πŸ™‚

#

but yeah technically json is better if you store large stuff that doesn't need to be edited ever

#

although I wouldnt care about switching if I'd already have it done in yaml

somber hull
#

but the api/library/framework (idk what to call it) is super easy to use

tender shard
#

of Yaml?

golden turret
#

see what i found

tender shard
#

fun

golden turret
#

so in some moment of the tick

#

the yaw is changed

#

tried to add breakpoints but didnt worked

mighty sparrow
#

It's a playerInventory, why does it show a chest inventory ?

tender shard
#

you just can't force a player to see another players inv

#

it will just look like this

mighty sparrow
#

Oh

#

I was trying to get an inventory like this

tender shard
#

you'll have to either

  1. set the actual player's inventory contents to something else or
  2. send the player packets to make them believe their inventory changed
mighty sparrow
#

Ok its intended

golden turret
#

GGGGGGGGGG

#

ITS FUCKING WORKING

tender shard
#

what did you change?

golden turret
#

wait

#

i will record

foggy estuary
#

does anyone know how to make a bee always angry. when i set it to be angry it hits you then becomes passive. how to i prevent that

mighty sparrow
golden turret
#

?paste

undone axleBOT
golden turret
#

the code

tender shard
#

nice

#

so you had to overwrite the tick method?

golden turret
#

yes

#

just to force the yaw related variables to be set at what i want

somber hull
#

shouild i have a runnable that runs every 5 mins or so that saves my config as well as on disable?

solid cargo
#

is there a material that counts in all types of glasses?

quaint mantle
mighty sparrow
#

Monokai Pro from Material Theme UI plugin

quaint mantle
#

Thanks ❀️

mighty sparrow
#

I would love to have high contrast mode but I must pay the full license

#

which im too broke

#

np bro @quaint mantle

ivory sleet
#

But in principle

#

You should NEVER need to save your config

#

Because it is simply a way for your users to change certain behavior of your plugin

torn oyster
#
    <repositories>
        <repository>
            <id>jitpack</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    </dependencies> 
        <dependency>
            <groupId>com.vexsoftware</groupId>
            <artifactId>nuvotifier-universal</artifactId>
            <version>2.6.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>```

Why is this dependency not working? It is how it is listed on the GitHub page.
glossy scroll
#

can anyone here read kotlin?

#

need some help with something

#

trying to understand what level.let{} does

torn oyster
glossy scroll
#

line 25

left swift
#

Heyo! I register my fully custom entity and it has no asstributes, it's attributes are null. I want to set default attributes for my custom entity, but idk how currently, because my currently soultion sometimes does not working. No attributes error

Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeProvider.a(java.util.function.Consumer, net.minecraft.world.entity.ai.attributes.AttributeBase)" because "this.d" is null
    at net.minecraft.world.entity.ai.attributes.AttributeMapBase.e(SourceFile:48) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at java.util.HashMap.computeIfAbsent(HashMap.java:1224) ~[?:?]
    at net.minecraft.world.entity.ai.attributes.AttributeMapBase.a(SourceFile:48) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityLiving.getAttributeInstance(EntityLiving.java:2333) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityLiving.<init>(EntityLiving.java:292) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityInsentient.<init>(EntityInsentient.java:132) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityCreature.<init>(EntityCreature.java:17) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at pl.tuso.xentitydev.entities.type.EntityDev.<init>(EntityDev.java:70) ~[?:?]
    at pl.tuso.xentitydev.entities.Snail.<init>(Snail.java:26) ~[?:?]
    at pl.tuso.xentitydev.events.DevCommand.onCommand(DevCommand.java:25) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    ... 19 more```
pallid forge
#

WorldLoadEvent listener is being called twice? Is this normal?

waxen plinth
#
Set<Material> glasses = Arrays.stream(Material.values()).filter(m -> m.name().contains("GLASS") && m.isBlock()).collect(Collectors.toCollection(() -> EnumSet.of(Material.class)));```
#

πŸ‘

#

That should count every type of glass block

#

That is, every material which is a block and has "glass" in the name πŸ₯²

foggy estuary
#

How do i give entities more health than vanilla

#

using attributes

#

what not

#

every time i try it doesnt give it more health

wooden fable
#

use entity.setMaxHealth() and entity.setHealth()

eternal oxide
#

no

#

getAttribute(GENERIC_MAX_HEALTH).set

#

or somethign close

wooden fable
#

oh

eternal oxide
#

then setHealth

foggy estuary
#

ok thanks

wooden fable
#

Is this the correct way to get the color of a string?

ChatColor color = ChatColor.valueOf(ChatColor.getLastColors(kingdom.getDisplay()));

If for example, kingdom.getDisplay() == &4Test, will it return ChatColor.RED?

mighty sparrow
#

How could I add an identifier to a block I place by plugin, so I dont select every block ?

#

I would like to distinguish them

eternal oxide
#

You can only add data to blocks which have TileStates

mighty sparrow
#

Where can I see that ?

mighty sparrow
#

?javadoc

grim ice
#

so if im doing something like

#

smth like a countdown

#

and i wanna store it in a database

patent horizon
#

could anyone help me setup a plugin in intellij for kotlin/

grim ice
#

i should just store it in a hashmap

#

and when the player leaves

#

i save it to database

#

and remove from hashmap

#

right?

eternal oxide
#

if its a count down per player just throw it in the players PDC

grim ice
#

1.8.9

eternal oxide
#

slit wrists and give up

grim ice
#

why

eternal oxide
#

1.8.9

grim ice
#

cant i use databases :P

eternal oxide
#

yes you can πŸ™‚

#

map player UUID to timer

grim ice
#

so is editing the database every second better than changing hashmap and only editing database when player leave or kicked

karmic stream
#

hello

eternal oxide
#

does the timer stop when the player logs off?

grim ice
#

Yes

eternal oxide
#

then just store it and restart when they log back in

karmic stream
#

Hi, do you know what variables are to put in my score to know how much money you have?

#

???

karmic stream
#

Hi, do you know what variables are to put in my score to know how much money you have?

#

Hi, do you know what variables are to put in my score to know how much money you have?

#

???ΒΏ?ΒΏ

eternal oxide
grim ice
visual tide
eternal oxide
#

possibly

karmic stream
#

grax

grim ice
#

if it has glass in its name it will surely be a block

karmic stream
eternal oxide
#

glass bottle?

visual tide
lavish hemlock
grim ice
#

OH

lavish hemlock
#

'twas secretly an OpenGL call

karmic stream
visual tide
#

not sure what you mean by that

karmic stream
visual tide
#

still
not really sure what you mean

karmic stream
#

.v

young knoll
#

That's up to you

#

Setup whatever money making methods you want

karmic stream
waxen plinth
grim ice
#

Yes i realized that

waxen plinth
#

If they do then they can remove that

grim ice
#

i wouldve prob just split the item name

#

and check if it ends with GLASS

waxen plinth
#

Why do you need to split for that

#

And that wouldn't match glass panes

#

STAINED_GLASS_PANE

grim ice
#

thats probably better isnt it

#

or did the guy want to count those

waxen plinth
#

Probably did

lavish hemlock
#

easier solution:

#

don't use streams

#

that fixes everything 😎

sullen marlin
#

no because getLastColors will return both the section sign and formatting iirc

#

why do you need to know that it is red

wooden fable
#

I'm creating a discord role for the kingdom and discord roles have colors

#

Is there any way to do this?

quaint mantle
#

Hello

#

Placeholderapi not work

#

Code: ```java
package me.koddydev.kvender.util;

import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.OfflinePlayer;

public class Placeholders extends PlaceholderExpansion {
@Override
public String getAuthor() {
return "KoddyDev";
}

@Override
public String getIdentifier() {
    return "Bolsa";
}

@Override
public String getVersion() {
    return "1.0.0";
}

@Override
public String onRequest(OfflinePlayer player, String params) {
    if(params.equalsIgnoreCase("%kvender_bolsa%")) {
        return (Settings.valorBolsa < 50 ? "Β§c" + String.valueOf(Settings.valorBolsa) : (Settings.valorBolsa == 50 ? "Β§6" + String.valueOf(Settings.valorBolsa) : "Β§a" + String.valueOf(Settings.valorBolsa))) + "%";
    }
    return null;
}

}

quaint mantle
#
name: KVender
version: '${version}'
main: me.koddydev.kvender.KVender
api-version: 1.8
depend: [Vault, PlaceholderAPI]
authors: [ KoddyDev ]
commands:
  vender:
    description: Comando de vender
wooden fable
#

use %KVender_bolsa% as placeholder

quaint mantle
#

ok

wooden fable
#

with capital k and v

short wren
#

how could you transfer logs to someone, but that someone cant use console or cant access server files directly (say a player does some action and in some way they can get a potentially larger amout of information)?

quaint mantle
#

if(params.equalsIgnoreCase("%KVender_bolsa%")) {
or
if(params.equalsIgnoreCase("KVender_bolsa")) {

wooden fable
#

wait, do ```java
if(params.equalsIgnoreCase("bolsa")) {

quaint mantle
#

ok

#

trying

wooden fable
#

because KVender is you're plugin name

quaint mantle
mellow gulch
quaint mantle
#

/papi parse uVini__ %KVender_bolsa%

quaint mantle
# wooden fable And in-game use %KVender_bolsa%
    @Override
    public String onRequest(OfflinePlayer player, String params) {
        if(params.equalsIgnoreCase("bolsa")) {
            return (Settings.valorBolsa < 50 ? "Β§c" + String.valueOf(Settings.valorBolsa) : (Settings.valorBolsa == 50 ? "Β§6" + String.valueOf(Settings.valorBolsa) : "Β§a" + String.valueOf(Settings.valorBolsa))) + "%";
        }
        return null;
    }```
#

not work

short wren
quaint mantle
#

fixed

#

matt

wooden fable
#

okay, nice

quaint mantle
#

fixed by:

mighty sparrow
#

Is it possible to create a custom block implementing the TileState interface ?

#

or

quaint mantle
mighty sparrow
#

is it possible to implement TileState on already existing block ?

quaint mantle
quaint mantle
wooden fable
#

Ah

proud basin
#

Would you guys say Redis is better to communicate to other servers than bungee for plugins?

mighty sparrow
#

Ok so my goal is to set an id to each petrified slab block so I can have an unique inventory for each of em

#

TileState is not on blocks ?

ancient plank
#

:squint:

#

poor conclure

eternal oxide
#

certain blocks have a TileState. You can;t add one to a different block

ivory sleet
#

helo

echo basalt
#

You need to have a player online to receive messages

torn oyster
#
    <repositories>
        <repository>
            <id>jitpack</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <dependencies> 
        <dependency>
            <groupId>com.vexsoftware</groupId>
            <artifactId>nuvotifier-universal</artifactId>
            <version>2.6.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>```

Why is this dependency not working? It is how it is listed on the GitHub page.
desert loom
#

try removing the / on the start dependencies tag.

torn oyster
#

i have more than just 1 dependency

#

and i wanted to keep it straight forward

desert loom
#

hmm I have no idea then. I haven't used maven that much.

torn oyster
#

sigh

#

all good

#

ill figure it out myself

quaint mantle
#

java.lang.IllegalArgumentException: bound must be positive
at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_312]
at me.koddydev.kvender.KVender$1.run(KVender.java:55) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[server.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]

#

Random r = new Random();
int result = r.nextInt(getConfig().getInt("BolsaDeValores.Maximo")-getConfig().getInt("BolsaDeValores.Minimo")) + getConfig().getInt("BolsaDeValores.Minimo");

left swift
#

Heyo! I register my fully custom entity and it has no asstributes, it's attributes are null. I want to set default attributes for my custom entity, but idk how currently, because my currently soultion sometimes does not working. No attributes error

Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeProvider.a(java.util.function.Consumer, net.minecraft.world.entity.ai.attributes.AttributeBase)" because "this.d" is null
    at net.minecraft.world.entity.ai.attributes.AttributeMapBase.e(SourceFile:48) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at java.util.HashMap.computeIfAbsent(HashMap.java:1224) ~[?:?]
    at net.minecraft.world.entity.ai.attributes.AttributeMapBase.a(SourceFile:48) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityLiving.getAttributeInstance(EntityLiving.java:2333) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityLiving.<init>(EntityLiving.java:292) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityInsentient.<init>(EntityInsentient.java:132) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at net.minecraft.world.entity.EntityCreature.<init>(EntityCreature.java:17) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    at pl.tuso.xentitydev.entities.type.EntityDev.<init>(EntityDev.java:70) ~[?:?]
    at pl.tuso.xentitydev.entities.Snail.<init>(Snail.java:26) ~[?:?]
    at pl.tuso.xentitydev.events.DevCommand.onCommand(DevCommand.java:25) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.17.1.jar:3284a-Spigot-3892929-0ab8487]
    ... 19 more```
#
    private static <E extends Entity> void setDefaultAttributes(EntityTypes<E> type){
        try {
            final Field field = AttributeDefaults.class.getDeclaredField("b");
            field.setAccessible(true);
            Map<EntityTypes<?>, AttributeProvider> attributes = new HashMap<>((Map<EntityTypes<?>, AttributeProvider>)field.get(null));
            attributes.put(type, EntityInsentient.w().a());
            Utils.setField(field, null, attributes);
        } catch (NoSuchFieldException | IllegalAccessException exception) {
            exception.printStackTrace();
        }
    }```sometimes it works and sometimes it doesn't, as if it didn't have time to add attributes.
mighty sparrow
late socket
#

Any1 having something to help me recreate bungeecord protocol?
I want to buy small ovh server and recreate something like tcpshield just for my servers

wooden fable
#

Hey, can someone help?
How can i get the ChatColor from a string like this "&4test"?
I don't want to set the chatcolor, i want to get the chatcolor

ember estuary
#

does itemMeta.getLore return a reference or a copy ?

chrome beacon
#

Copy probably

ember estuary
#

alright

#

ty

regal dew
#

find the group, then map the letter to its chatcolor

wooden fable
#

Dutch?

regal dew
#

mhm

#

something as simple as \&([0-9|a-f|k-o|r]) should do the trick for the basic chat colors

young knoll
#

You can also use getLastColor

wooden fable
#

not a chatcolor

wooden fable
young knoll
#

Yes, use the string as a map key

silver latch
#

Hi,

I want to change one thing in a big bukkit plugin and I cant figure out to open it to change it and close it and save it as a jar again. I have been trying for hours. I am editing a prexisting plugin btw.

#

anyone know a fix

#

idk how to open a jar and edit

chrome beacon
#

Do you know Java

#

If not you should hire someone

silver latch
young knoll
#

You need a decompiler

silver latch
#

but idk how to decompile in eclipse

young knoll
#

Eclipse doesn’t have one built in

silver latch
young knoll
#

Find a decompiler online

#

Or install an eclipse plugin

young knoll
#

Or use IntelliJ

wooden fable
silver latch
wooden fable
young knoll
#

You make one

wooden fable
#

Ohhh, thx

wooden fable
# young knoll You make one

        Map<String, ChatColor> colors = new HashMap<>();
        colors.put("&4", ChatColor.DARK_RED);
        colors.put("&c", ChatColor.RED);
        colors.put("&6", ChatColor.GOLD);
        colors.put("&e", ChatColor.YELLOW);
        colors.put("&2", ChatColor.DARK_GREEN);
        colors.put("&a", ChatColor.GREEN);
        colors.put("&b", ChatColor.AQUA);
        colors.put("&3", ChatColor.DARK_AQUA);
        colors.put("&1", ChatColor.DARK_BLUE);
        colors.put("&9", ChatColor.BLUE);
        colors.put("&d", ChatColor.LIGHT_PURPLE);
        colors.put("&5", ChatColor.DARK_PURPLE);
        colors.put("&f", ChatColor.WHITE);
        colors.put("&7", ChatColor.GRAY);
        colors.put("&8", ChatColor.DARK_GRAY);
        colors.put("&0", ChatColor.BLACK);
        //-----

        ChatColor color = colors.get(ChatColor.getLastColors("&4Test"));

So like this?

young knoll
#

Pretty much

#

Assuming getLastColors works with &

regal dew
#

that does not work with multiple colors

vestal moat
#

In gradle, got 3 modules, core spigot and bungee, currently i shade just in the root project and make universal jar but does anyone know how to apply shadowJar properties on every module without putting it in every build.gradle? allProjects doesnt work

wooden fable
#

I'm confused, how does getLastColors even work then?

regal dew
#

it really just returns the last chat color

#

e.g. "&cHello this is red &aand this is green" will result in &a as an output from getLastColors

#

&c is ignored

wooden fable
#

So why doesn't it work then?

regal dew
#

&c is ignored

#

you wanted all colors from a string right

wooden fable
#

Oh, like that. getLastColors is enough. Now i need to convert it to a java Color

quaint mantle
#

How to format number?

Example
1000
1k
1000000
1m

#

1500000
1.5M
1789000
1.78M

wooden fable
#

Thx

quaint mantle
left swift
#

Hi, im coding using intellij and maven, but i have one problem. When i'm debugging the stacktrace is not parse to my code, why? for example at net.minecraft.world.entity.ai.attributes.AttributeMapBase.a(SourceFile:48), when i click it it show me that, why?

worldly ingot
#

because decompiled code isn't going to line up 1:1 with what's running on the machine

young knoll
#

I’ve always wondered how the JVM knows what line

#

Does bytecode contain line numbers still or something?

wooden fable
#

Will getLastColors return null if there are no colors codes?

left swift
worldly ingot
quaint mantle
#

can someone please help me with nms?

#

i have both 1.18 and 1.8 buildtools

#
<dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.18-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
#

this is my xml

west pecan
#

I am trying to port an old plugin to a newer version, but I'm not sure if the API changed and if this package still exist or what the equivalent would be now
org.bukkit.craftbukkit.v1_16_R3.inventory.CraftItemStack I'm trying to get this updated for 1.18, any help would be appreciated

quasi stratus
#

I may just be stupid and not know where to look (a bit new to this), but is there any documentation/tutorials on how to make a plugin depend on another? I know how to add it in it's plugin.yml, but not how to use the independent's methods, etc. in the dependent plugin.

quaint mantle
#

plugin needs to have api

quaint mantle
pseudo onyx
#

Hello, i have problem with LuckPerms API
How i can get Expire time from group?

pseudo onyx
#

Even so I couldnt do it

quaint mantle
quaint mantle
short adder
#

@quaint mantle did you run the build tool?

quaint mantle
#

yes

#

as I said

#

i have both buildtools that I need

sullen marlin
#

You can’t use multiple versions in the same project

quaint mantle
#

and how do I make these nms work?

paper viper
#

you can use multiple nms versions in the same project

#

you have to just use modules

quaint mantle
#

how

paper viper
#

what buildtool are you using?

#

like gradle, maven, etc

quaint mantle
#

maven

paper viper
tidal hollow
#

How do i install NMS for spigot 1.16.5?

stone sinew
quaint mantle