#help-development

1 messages · Page 1576 of 1

granite stirrup
#

wtf

#

this bug is seriously not fixed yet bruh

chrome beacon
#

The wireless redstone thing was marked as "works as intended" by mojang if I remember correctly

granite stirrup
#

theres nothing powering it tho

#

it retracts after i update it

chrome beacon
#

Yeah that's normal

granite stirrup
#

whats weird if you put a line of redstone like next to a piston but it isnt on the piston it works

#

like ik the power is transmitting to the blocks but why does the piston extend if the redstone isnt even near it

ivory sleet
#

@prisma needle are you online on the backend server which receives the message?

fluid cypress
#

how do i check if the owner of a uuid string is op? even if the player is not connected

ivory sleet
#

Server#getOfflinePlayer(UUID#fromString(uuid))#isOp() @fluid cypress

fluid cypress
#

thanks

ivory sleet
#

Well thing is plugin message channels depend on a player connection, in order to send and receive you need a player to be on the server providing a connection the plugin message can use to transport through.

prisma needle
#

well I was online typing the command which should have run the method

#

I was on the spigot server

#

since the bungeecord is the proxy

ivory sleet
#

Hmm, then it’s weird. From what I’ve red and seen it looks good.

#

No exceptions either?

chrome beacon
#

Have you tried using the ProxyServer#registerChannel method in your onEnable I'm not sure if it's required for sending data

ivory sleet
#

It is yeah

prisma needle
#

oh ok lemme check

#

I can just send the entire class here, how should I go about sending large amounts of code?

granite stirrup
#

?paste

undone axleBOT
chrome beacon
#

Upload everything to github or use this ^^

ivory sleet
#

GitHub would be the superior way, if you don’t want to share it to everyone you could add significant people whom have access to read the code.

prisma needle
#

oh I really don't mind people "stealing" my code, it's really not worth using 😂

#

just me messing around

granite stirrup
#

4*2(2*4?) piston door (worst ever)

prisma needle
ivory sleet
#

Fair lol, well not everyone thinks like that, frankly some are over protective

#

Oh bungee:bridge isn’t same as bungee:channel

#

Probably has to be the same

prisma needle
#

oh man how do I miss these simple mistakes 😅

#

ok lemme try fixing that

ivory sleet
prisma needle
#

nope still nothing :/

#

If I knew whether it was a problem of sending or receiving the message it would be easier to troubleshoot

chrome beacon
#

I'm setting up a quick test using your code I'll see if I can get it running

prisma needle
#

👍

ivory sleet
#

Olivo taking one for the team 😌

chrome beacon
#

For some reason the bundled java version is broken which makes it a pain to switching Minecraft versions

ivory sleet
#

Lol yeah

chrome beacon
#

Alright things are loading I'll see if it works

sly bison
#

Is there a way for chunk generation in the overworld to remove all the generators apart from the "bedrock floor generation" that you see at Y0 to Y5

chrome beacon
#

If you want just flatbedrock use a superflat world. If you want just bedrock with vanilla gen create your own world generator and look at the Minecraft source to find how bedrock is generated

prisma needle
ivory sleet
#

CommandGeek

#

The channel has to be the same everywhere

#

For instance my:channel and bungee:channel are different

chrome beacon
#

Conclure do you have any idea how to fix high CPU usage with Intellij

ivory sleet
#

Do you use gradle?

chrome beacon
#

Reopening projects seems to fix it temporarily but it keeps going to 90%

#

Maven

prisma needle
ivory sleet
#

Ah well even in bungee you’d use the same as the spigot one

#

Olivo I believe you can change min and max ram alloc

#

Not sure if it helps (maybe it uses off heap)

prisma needle
#

hold on guys

#

breaking news

#

it just started working

ivory sleet
prisma needle
#

man I feel super dumb rn

chrome beacon
#

Nice what did you do

#

Were channel names mismatched?

prisma needle
#

I didin't reload the spigot plugin

#

xD

chrome beacon
#

oh

prisma needle
#

man this is a smol brain moment

chrome beacon
#

eh Don't worry about it, it happens to all of us at least once...

prisma needle
#

thank you guys so much for your help tho :)

ivory sleet
#

Oh well do you unregister the channel btw? (In spigot)

prisma needle
#

no I don't, should I?

ivory sleet
#

Like in onDisable

#

Yeah that would make your plugin support reloads

#

?pmc

#

Uh

chrome beacon
#

What's pmc 👀

ivory sleet
chrome beacon
#

oh yeah ofc

ivory sleet
#

So check the onDisable there 🙂

prisma needle
#

perfect, thanks!

ivory sleet
undone axleBOT
#

Custom command successfully added.

ivory sleet
#

?pmc

ivory sleet
chrome beacon
#

oh nice you can add commands

ivory sleet
#

Hehe

granite stirrup
#

is discord helper like admin?

ivory sleet
#

Hmm I mean what’s the definition of an admin in your POV then?

granite stirrup
#

idk really

#

but if you can interact with all bots add things to the server or add any channels or maybe some other stuff like changing people nicknames i consider it as admin

#

¯_(ツ)_/¯

ivory sleet
#

Oh I can’t do that

#

Not yet at least

unreal quartz
granite stirrup
#

is this good for 48 chunks on 1.17.1(optifine)?

chrome beacon
#

Is that on a server?

granite stirrup
chrome beacon
#

Aight

granite stirrup
#

singleplayer world

#

but technically a server kinda

worn tundra
granite stirrup
granite stirrup
worn tundra
#

Oh you were asking whether the fps was good?

fluid cypress
#

Map.of(k, v) returns an inmutable map? if so, how can i make it return a mutable map?

ivory sleet
#

The point of it is to return an immutable one

eternal night
#

pass the immutable map to the constructor of a mutable one

bright jasper
dire marsh
wild inlet
#

Do I need to cleanup bossbars when I'm done with them?

#

Or will GC do it?

hoary remnant
#

Hey small litle question, whenever I generate my yml for storing data something weird gets added to the file.. as you can see there is a ==: with the className in it.. why does this happen?

sharp bough
#

thats why you did something like ..getInstance().set(path, player) right?

unreal quartz
#

that is your class and it's so the parser knows how to deserialize it

hoary remnant
unreal quartz
#

no

sharp bough
#

wdym, you can

unreal quartz
#

show me then

sharp bough
#

now you making me rethink my entire life

#

@hoary remnant send your code

unreal quartz
#

this person has implemented serializable into his own class so that the yaml parser knows what to do with it

hoary remnant
#

Correct

unreal quartz
#

if they want to retrieve this object then all they do it get("player-data") and it will return an instance of PlayerHomeRepo

#

the ==: just tells the parser what type it is

hoary remnant
#

Oh, thanks! 🙂

sage swift
#

what does 8==D mean

quaint mantle
#

o.0

final monolith
#

any way to do an getConfig().get("uuid.*") to get all these values inside the UUID?

hasty prawn
#

getConfig().getConfigurationSection(uuid).getKeys(false) will return name1, name2, name3, name4

sage swift
#

but also it's a map

#

"name1": "Com whatever"

final monolith
final monolith
#

what the getKeys(false) do?

#

will return the values?

hasty prawn
sage swift
#

false is the deep boolean, meaning it won't return subsections

final monolith
sage swift
#

Like if you had yml something: something_else: "hi"
getKeys(false) returns just something while true will return both

final monolith
#

thanks, i will study about that

sage swift
#

i actually used getKeys true in a plugin of mine, but it's a very rare use case

sharp bough
final monolith
#

its that not a config.yml

#

its a data.yml (player's uuid.yml)

#

im making an "variable saver"

unreal quartz
#

wat

exotic scroll
#

can anyone help me, how to make a timer that ticks once

hasty prawn
exotic scroll
#

ok

#

imma search it uo

#

up

restive burrow
#

How do you silently send a command as console via the spigot api?

#

Bukkit.dispatchCommand seems to always log

hasty prawn
#

Why would you want to do that

restive burrow
#

other plugins without an api

frosty osprey
#

so I have a question about what spigot/bukkit can do
I want to make a "new block" (which spigot can not do), but this block only exists serverside, it is sent to the client as an existing item frame entity. Is that possible? Its not adding a new block client side after all.

drowsy helm
frosty osprey
#

not in this case

#

ultimate goal of this is to make the server think of itemframes as blocks (like lichen) instead of entities

drowsy helm
#

ah so put a block texture as a map?

frosty osprey
#

but to report old itemframe entites to the player

drowsy helm
#

I mean its possible to register new materials but its very iffy and i dont know if it would work well with itemframes

sage swift
#

yeah good luck

frosty osprey
#

basically, the player just gets a regular item frame entity when it looks at it

#

no fancy texture packs

#

but the server thinks of it as a really small chest or something

sage swift
#

yeah good luck

#

With sponge, maybe

#

Have no experience, but probably not with spigot

frosty osprey
#

I was affraid of that

spring canopy
#

Hi, does anyone know the maximum expected wait time for a premium plugin to be accepted? I've waiting two and a half weeks and am curious how much longer the process might take.

restive burrow
#

i dont have a spigot account. i have a life

hexed hatch
#

Based

quaint mantle
twilit vector
#

Hey guys I want to make a pvp plugin but I am not able to find any tutorial on yt so it would be great if someone can share a video
Thanks!

quaint mantle
twilit vector
#

Hmm

#

I can do that

#

But

#

I am a begginer

#

So ill have to watch a hundred tuts for that

#

XD

quaint mantle
#

how much java do you know?

twilit vector
twilit vector
#

in spigot

quaint mantle
#

the spigot api is just another api that you have to learn, theres written guides for it and javadocs to reference

spring canopy
quaint mantle
#

take a look at the wiki and the javadocs, try to work it out, and you can always come back here if you need help

undone axleBOT
glossy scroll
#

eh he left

shut field
#

how can I make an Entity to an EntityCreature?

#

specifically a villager?

#

I know you can't directly cast them

glossy scroll
#

?

sharp bough
#

ops

glossy scroll
#

EntityCreature… what is that

shut field
glossy scroll
#

i know

sharp bough
#

cant you make the entity typ ea villager?

glossy scroll
#

but which package

shut field
#

this, apparently

glossy scroll
#

yea

#

are you using mojang mappings?

glossy scroll
#

just to make sure

#

and what package is Entity

shut field
glossy scroll
#

if you dont know then probably not

restive burrow
#

yo gamers... why doesnt this filter out lines with login in it?"
getServer().getLogger().setFilter(record -> record.getMessage().contains("login"));

glossy scroll
#

?paste

undone axleBOT
restive burrow
#

non lambda version for yall

getServer().getLogger().setFilter(new Filter() {
            @Override
            public boolean isLoggable(LogRecord record) {
                return record.getMessage().contains("login");
            }
        });
#

dk why it doesnt work

shut field
glossy scroll
#

… err nevermind then

#

what do you use to access spigot api

hasty prawn
shut field
glossy scroll
#

im just confused why EntityCreature is appearing in your nms

#

unless im mistaken

hasty prawn
#

EntityCreature is Spigot's mappings

glossy scroll
#

otherwise i was gonna suggest what Dessie did

hasty prawn
#

Which is what he's using

glossy scroll
sharp bough
#

are you on your phone or is it like a google theme?

glossy scroll
#

iPad

restive burrow
sharp bough
#

whats serFilter?

#

its not on the docs

restive burrow
#

its logger bruh

#

its apart of java

restive burrow
#

im just getting the servers logger

#

but it wont let me filter it

glossy scroll
#

what are you trying to do

#

?xy

undone axleBOT
restive burrow
#

disable the logs and output to console if it contains the string login

glossy scroll
#

well

#

right now

#

it says that if it has login its loggable

#

you want the opposite?

restive burrow
#

i tried both ways

#

it doesnt work

#

even just setting it to be always no logging

#

doesnt work

restive burrow
#

found the solution

#

if anyone wants i can tell

hasty prawn
#

Go for it

candid silo
#

is there any good way to heal a set amount besides?

if (player.getMaxHealth() - 2 >= Math.ceil(player.getHealth())) {
  player.setHealth(p.getHealth() + 2);
 }
#

thought of a better way to do it

#
p.setHealth(Math.min(p.getHealth() + .20,p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
sage swift
#

player.damage(-2)

candid silo
#

it just doesn't deal damage sadly

pliant copper
#

Heyo, I have a security query. I currently have a problem with clients purchasing custom java plugins from me. They pay half of the invoice, then I send them a file and 25% of the time they block me without paying the remaining 50%.

How should I protect my plugins while still giving my clients a file before they pay the remaining part of the invoice?

Here is what I've come up with so far:

  • Obfuscate the program using ProGuard (or other programs)
  • Loading the jar during runtime by downloading the classes into ram from my api server
  • Including a license feature which queries my api server on startup

What should I do, and are there better ways? Thanks! (if you respond, ping me please <3)

drowsy helm
#

charge 20% before you start then show them the plugin, make them pay the remaining 80%

#

NEVER charge after you give your product

#

If they dont trust you, their bad. You are providing the service

sage swift
#

but also licensing for plugins 🤮

drowsy helm
#

and there always ways of getting around authentication

pliant copper
sage swift
#

(if they're paying for a plugin they probably don't know how)

hybrid spoke
hybrid spoke
pliant copper
#

If its obfuscated it becomes much harder, plus they need to have (or know someone that has) Java experience.

hybrid spoke
#

ofc., its java

solemn shoal
#

maybe a stupid question, but how can i prevent a concurrentModificationException from happening here?

#
private double calculateAverage(List<Double> list) {
        List<Double> _list = new ArrayList<>(list);
        return _list.stream()
                .mapToDouble(d1 -> d1)
                .average()
                .orElse(0.0);
    }```
#

its happening at the mapToDouble line

quaint mantle
#

How to get offlineplayer?

#

getOfflinePlayer is deprecated

sage swift
#

by uuid, username may be inaccurate which is why it's deprecated but sometimes it's all you've got

#

it also does a network lookup so do it async

quaint mantle
solemn shoal
#

d1 -> d1, yes

quaint mantle
#

I need to pull a player offline to see a list of houses

solemn shoal
#

replaced with Double::doubleValue and seems not to happen anymore?

sage swift
#
#

magical what the internet contains

solemn shoal
#

my code runs sync tho

#

oh wait nvm not that part

#

regardless the source list is being updated in that same task

#

and nowhere else

sage swift
#

wasn't talking to you

quaint mantle
#

😩

sage swift
#

don't make a BukkitRunnable

#

just lambda

#

scheduleAsyncTask(plugin, () -> {/*code here*/}

#

that way at least that part won't be deprecated

quaint mantle
#

Someone know why when player join it change scoreboard to his scoreboard to everyone like set username entry to his name
like if my name is Player
and Player2 join i saw in my sidebar
Username: Player2
after he join

Main.java:
https://haste-bin.xyz/efokizoray.java

PlayerJoinEvent.java

public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
player.setScoreboard(PVP.board);
}
sage swift
#

Main.java 😋

quaint mantle
#

it PVP.java

#

so i use PVP.board to get public variable from there

sage swift
#

static abuse 😋

#

it's because everyone has the same scoreboard, that should be pretty straightforward

quaint mantle
#

so how i need to save it for that will dont be happend?

#

Do I need to use async to pull information?

sage swift
#

everyone sees the same thing

#

make a unique one for each player

sage swift
#

also, i would, yeah

quaint mantle
sage swift
#

the sky is blue

#

I can't help you if you don't understand basic english bro

#

I'm being mean i can't help it

hardy swan
quaint mantle
#

i mean how i do that like

board.player_uuid?

quaint mantle
sage swift
#

Map<UUID, Scoreboard>

#

join, add player; leave, remove player

#

make a separate scoreboard for each one, update appropriately when needed

hardy swan
#

actually, Map<Player, Scoreboard> works too

#

up to you

quaint mantle
#

if i remeove static i cant use PVP.board in join event

hardy swan
#

fetch from hashmap

sage swift
#

Well then you should learn how to use dependency injection

sage swift
limber dust
#

^

solemn shoal
#

fun stuff

#

apparently it happened anyways

hardy swan
#

doesn't really matter here since the player doesn't change when logged in

sage swift
#

For consistency's sake, since player objects are not equal when a player relogs

#

Yes, doesn't really matter, but I'm trying to teach the correct way here.

hardy swan
#

well, if a player relog, he is reput back into the hashmap

solemn shoal
hardy swan
#

hmm

sage swift
#

sugarcane

#

kek

quaint mantle
#

so i need every event that need to fetch all online player instend use the player joined?

solemn shoal
hardy swan
#

I would think player has a better abstraction barrier

solemn shoal
#

oh it moved to the .average now

quaint mantle
drowsy helm
#

Underscores in java 🤔

solemn shoal
quaint mantle
#

Is this the best way to get an offline player? I saw on spigot

solemn shoal
#

yes underscores

quaint mantle
sage swift
#

i like that you're casting OfflinePlayer to OfflinePlayer

#

that's very smart

quaint mantle
#

k

#

i view now

#

🥲

limber dust
#

mainly the colors

hardy swan
#

args[0] is a string? convert into UUID

solemn shoal
#

can someone tell me what im doing wrong?

private double calculateAverage(List<Double> list) {
    List<Double> _list = new ArrayList<>(list);
    return _list.stream()
            .mapToDouble(Double::doubleValue)
            .average()
            .orElse(0.0);
}```
quaint mantle
sage swift
#

following tutorials while simultaneously asking for help

limber dust
#

lol

solemn shoal
#

keeps throwing ConcurrentModificationExceptions even though i know of nowhere where im modifying the list

quaint mantle
solemn shoal
#

since the only place i modify it is about 20 lines or so above it, same runnable

quaint mantle
#

😕

solemn shoal
#

nvm not even, its 5 lines above it

#

still same function

sage swift
#

not sure why you're making a copy (which is just a shallow copy anyways)

drowsy helm
#

^ youre not modifying it so no point making a copy

sage swift
#

maybe try running it from another place in your code other than a runnable

#

not sure what else could be causing it

solemn shoal
#

yeah thats what i thought yet it keeps throwing ConcurrentModificationException

#

about every time i call it

#

but not always, only after a while

#

my code shouldnt be too slow to run for >1 tick tho

hardy swan
solemn shoal
#

here's my entire runnable

#

i have a feeling its running more then once per tick somehow

#

though its only in that calculateAverage function that it throws an exception

#

(the bukkit runnable gets started in my command's init)

#

mm terminology flying past my head rn

sage swift
#

holy moly

solemn shoal
#

hm?

sage swift
#

what happened to formatting

#

current_tps

#

MemUsed

solemn shoal
#

thats already refactored

#

it was ctps before

#

ah yeah no its because i was renaming variables

#

snake case or camel case tho

sage swift
#

and what happens if you run it sync instead

solemn shoal
#

no clue

#

that code shouldnt be too slow to run sync

hardy swan
solemn shoal
#

i dont know java semantics off the top of my head lol

hardy swan
#

only language like ruby uses snake

solemn shoal
#

in C# it depends on where

quaint mantle
#

On which site do you put your code and share it with others?

solemn shoal
sage swift
#

?paste

undone axleBOT
quaint mantle
#

thx

solemn shoal
#

unless you meant source control

#

in that case, me personally, gitlab

quaint mantle
#

It's just to show my code, what do you think? it's a house system

#

I'm new to all this.

#

👉 👈

sage swift
#

it moves very far to the right

hardy swan
#

It is ok for new programmers i guess

solemn shoal
#

what is that indent level lol

hardy swan
#

nothing too wrong

#

2 or 4

solemn shoal
#

oh its tab indented

#

hes using tab indents and md-5's paste thing shows it as 8 spaces

hardy swan
#

ok class name UpperCamelCase

sage swift
#

if (!(sender instanceof Player player)) return;
boom code stays in line

hardy swan
#

or PascalCase

solemn shoal
#

tfw i dont see the difference between UpperCamelCase and PascalCase lol

hardy swan
#

the same thing

solemn shoal
#

why is it rendering as 8 spaces -_-

hardy swan
#

just I not sure which one you prefer to call it

#

what ide

#

most probably configurable

#

use vim

#

jk

solemn shoal
#

lol

quaint mantle
#

What do you think about the code? Bad? Normal?

#

👉 👈

hardy swan
#

not good

#

XD

#

enough

solemn shoal
#

WHY DO BROWSERS RENDER TABS AS 8 SPACES

#

why

hardy swan
#

they shouldn't be tabs

solemn shoal
#

i selected a single tab there

quaint mantle
hardy swan
solemn shoal
#

nobody should ever use tabs

hardy swan
#

even a tab in ide should be converted into spaces

solemn shoal
#

most ides do that to my knowledge

quaint mantle
hardy swan
quaint mantle
solemn shoal
#

i fixed chrome

sage swift
#
if (args.length == 0) {
  return response(sender, "&cNot enough arguments!");
}

private boolean response(CommandSender sender, String message) {
  sender.sendMessage(ChatColor.translateAlternateColorCodes(message));
  return true;```
solemn shoal
#

document.body.style.tabSize = 4; in console

hardy swan
#

?paste

undone axleBOT
quaint mantle
hardy swan
#

CSComd is another abstract class I wrote

#

then I will execute the logic separately

quaint mantle
sage swift
#

holy moly

quaint mantle
hardy swan
#

separation of concerns, baby

solemn shoal
#

youre welcome

sage swift
solemn shoal
#

i made a userscript to change tab width to 4 spaces on the paste site

quaint mantle
solemn shoal
#

perfect

hardy swan
quaint mantle
hardy swan
#

oh wait nvm

quaint mantle
sage swift
#

oh yeah i forgot that

solemn shoal
hardy swan
#

two params

sage swift
#

was typing it with two twiddling thumbs on my phone

quaint mantle
#

it need the char symbol for replace

sage swift
#

still am

solemn shoal
sage swift
#

('&', message)

hardy swan
#

Intellj not an ide?

solemn shoal
#

no idea who thought tab = 8 spaces was a good idea in a browser but it seems standardized

oblique pike
#

Is there any way to cancel console messages about named entity killing someone or dying?

solemn shoal
#

unname the entity lol

#

watching linux system logs is fun

hardy swan
#

my eyes

solemn shoal
#

hm?

hardy swan
#

hm?

solemn shoal
#

your eyes what

hardy swan
#

what

solemn shoal
hardy swan
#

nothing

solemn shoal
#

you talking about those system logs?

hardy swan
#

yea

solemn shoal
#

whats wrong

#

black bg or inconsistent coloring?

hardy swan
#

nothin is wrong

hardy swan
solemn shoal
#

cant beat the colors

solemn shoal
hardy swan
#

oh

solemn shoal
#

if the tab size bothers u

#

heres a userscript to change it to 4 spaces

hardy swan
#

nah tab size doesn't bother me

solemn shoal
#

it bothers the living hell out of me

hardy swan
#

the lowerCamelCase is more bothering

solemn shoal
#

oh my code is worse

hardy swan
#

omg lol

oblique pike
hardy swan
#

that's one of the more irritating thing I had when working with react on rails

solemn shoal
#

idk

hardy swan
#

cuz rails uses snake but js or ts uses camel

solemn shoal
#

fun

#

is it weird to write your APIs in C#?

#

like, web apis

hardy swan
#

nvr touched C#

#

pipelines are weird

solemn shoal
#

fun fact: bing is C#

#

they seem to have hidden the dotnet version

#

ok so turns out, that code i was running async is really slow

#

when i disable the code my mspt = 1ms

#

when i enable it, it jumps to 38ms

solemn shoal
#

whats the most efficient way to get cpu usage?

sage swift
#

return response(...

quaint mantle
#

My god, how could I be so blind.

solemn shoal
#

time to run timings on the server lol

#

man im impatient lol

#

okay so turns out getProcessCpuLoad is slow

dire marsh
#

lmao

#

method to get cpu load causes cpu load

#

sounds like something mojang would make

solemn shoal
#

but this is base java tho lol

#

also doesnt cause load, its just slow

sage swift
#

the sun is heavy

#

lots of gas

solemn shoal
#

lol

#

is there a better way to get cpu usage aside OperatingSystemMXBean

#

lets see how spark does it

#

nope, they use OperatingSystemMXBean

#

maybe i should learn to use the RollingAverage class

#

i moved the cpu thing into its own async runnable

#

making sure nothing else touches those variables

hybrid spoke
night copper
#

can someone help me I dont understand the thinking of this stupid computer

hybrid spoke
night copper
#

this is the code

#

good luck understanding it

#

its just an inventory

#

but it doesnt work

solemn shoal
#

simple code

hybrid spoke
#

okay and what exactly

solemn shoal
#

anyways

hybrid spoke
#

what does not work

night copper
#

I can screenshare

solemn shoal
#

any reason why paper doesnt stop tasks?

hybrid spoke
#

i will not just stare at your code

#

and trying to figure out

#

whats not working

solemn shoal
#

like, nowhere in paper's waitForAsynkTasksShutdown does it actually stop the task

night copper
#

ok

solemn shoal
#

lol

night copper
#

the line on the rightclick.onclick is where I open the inventory

solemn shoal
#

ok then paper

night copper
#

spacedash your thing is less important than mine

hybrid spoke
night copper
#

oh god

solemn shoal
#

no it isnt

night copper
#

its an api

#

this thing idk

#

its somehow out of bounds

#

i dont know how thats even possible

#

but when I try it with like if(Main.plugin3.blabla) it works but when I add "!" at the start it doesnt work

#

thats what i dont understand

hybrid spoke
#

and i know exactly what you mean

night copper
#

good

#

I think i found the problem

#

I am illiterate

#

yeah i dont know how to write

#

I wrote "TeamSpeak" in the config but in the code "Teamspeak"

reef wind
night copper
#

I fixed it

night copper
#

broke the whole thing

reef wind
#

Well don’t copy paste code in the future if that is what you did

night copper
#

i didnt

reef wind
#

You should know how it works then

#

But whatever

supple elk
#

this converts a list of UUIDs to a list of players right?

#

in the parameter of the sendPacket function

hybrid spoke
#

samn

worn tundra
supple elk
#

dude the site does't work

#

xD

#

(that was a joke)

reef wind
hybrid spoke
#

not sure why testitandsee doesn't exist yet

supple elk
reef wind
#

sights

hybrid spoke
#

i think he means that you spelled side wrong

reef wind
hybrid spoke
supple elk
reef wind
#

I do a bit of trolling

reef wind
supple elk
#

the joke being that I was pretending that the site was actually going to be a useful resource and was confused that it didn't work when it was obviously just an unhelpful link?

#

whether you find it funny or not doesn't really matter much anyway, there's still no need to be rude.

supple elk
#

🤦

analog inlet
#

Do anybody know why snakeyaml can't find my kotlin data class?
I tried the same code without the spigot server and it works.

Caused by: org.yaml.snakeyaml.constructor.ConstructorException: Can't construct a java object for tag:yaml.org,2002:cn.thelama.homeent.warp.LocationEntry; exception=Class not found: cn.thelama.homeent.warp.LocationEntry
 in 'string', line 3, column 6:
      a: !!cn.thelama.homeent.warp.Locati ...
eternal oxide
#

LocationEntry is not registered

analog inlet
eternal oxide
#

You do know Location itself is serializable

analog inlet
#

yeah i know but it isn't Location

eternal oxide
#

then read the javadoc on ConfigurationSerializable

#

?jd

quaint mantle
analog inlet
#

alright thanks

analog inlet
sand rune
#

Guys , how to make luckperms show the owner name yellow and every player can see it , i know how to use the api but , how to do this and also show him on Tab list ???

analog inlet
#

My code

    val yaml = Yaml()
    val data = f.loadAsString()
    val d = yaml.loadAs(data, MutableMap::class.java) // Gets the exception when run this code on server
eternal oxide
#

LuckPerms, nor any permission plugin affects the display in any way.

sand rune
#

no

eternal oxide
#

It is simply a store of information. How you alter tab and chat is upto your plugin or whatever plugin you are using.

sand rune
#

when u see the ranks in servers , the people who have ranks have colored names ? @eternal oxide

#

how ?

eternal oxide
#

A tab/Chat plugin

sand rune
#

No

reef wind
#

Yes

sand rune
#

when u see the Player himself

#

not the chat

eternal oxide
#

Are you asking for code to do it?

sand rune
#

yes how ?

reef wind
sand rune
#

@reef wind YES

#

thats it !

eternal oxide
#

player#setDisplayName I think

sand rune
#

@reef wind

chrome beacon
#

Display name changes chat only

#

Stop pinging him

sand rune
#

okay but how to change the nametag

chrome beacon
#

All I know is packets

reef wind
sand rune
#

._.

#

.___.

reef wind
#

not everything is one line of code mate

sand rune
#

i know

#

but also how ??

reef wind
#

?google

undone axleBOT
eternal night
#

I mean if only there was a search engine that spews out solutions for this

reef wind
#

You can always find answers

eternal night
#

impossible I don't believe you

#

only spigot support channel can answer my questions

ivory sleet
obtuse basin
#

Is there a way getting the TPS of a specific world?

chrome beacon
#

Worlds don't have different TPS

quiet ice
#

but what if spigot goes multithreaded?

chrome beacon
#

Then someone will have to add that

#

;/

quiet ice
#

Which means mojang has to do it

drifting halo
#

mc is already multithreaded lul

quiet ice
#

but not in a form where the tickrate would differ from world to world

sly bison
#

how would I make respawn anchors explode in the nether like they do in the overworld?

drowsy helm
#

Like stop them from exploding?

sly bison
#

no

#

make them explode like when you place glowstone in them and hit them/place 4 glowstone in them they explode in ov

drowsy helm
#

Just check for interact event and explode if it’s an anchor

sly bison
#

is there no way to override the block functionality and make it have same functionality from overworld in nether

quiet ice
#

not without modifying nms source

sand rune
#

Guys , How to change name tag of player luckperms (setdisplayname code don't work)

solemn shoal
#

what field in ExperienceOrb actually denotes value?

#

count or value?

#

because merge is merging the count lol

solemn shoal
#

dont ping random people

sand rune
#

No

solemn shoal
#

i dont know

#

i dont really do plugins

sand rune
#

:(

solemn shoal
#

or well thats not what im currently doing

eternal oxide
main dew
#

How get command list?

quaint mantle
#

Have you tried looking at the Javadocs?

main dew
#

Yea xD

chrome beacon
#

You want every command registered to the server?

main dew
#

But on this server (no MC)

chrome beacon
#

?

#

You want all commands exept vanilla ones

#

?

hybrid spoke
#

?cc list

undone axleBOT
#
Custom Command List

?1.17 Install 1.17 with BuildTools: <https://www.spigot...
?ask If you have a question, please just ask it. Don't...
?basics Here are some links to get you started on learnin...
?bt https://www.spigotmc.org/wiki/buildtools/
?cba {author} definitely regrets to for the most part ...
?changelog https://spigot.club/changelog
?changename Name changes on the forums are granted to those w...
?cla https://www.spigotmc.org/wiki/cla/
?contribute You can find information about contributing to Sp...
?conventions Java Coding Conventions: <https://www.oracle.com/...
?details Please provide your server version, relevant serv...
?di Guide to dependency injection: <https://www.spigo...
?discord Invite others with the official invitation URL: h...
?dmca An unofficial explanation of the DMCA can be foun...
?email support@spigotmc.org
?eta There is no ETA. Having an ETA leads to unrealist...

main dew
#

Thanks xD

#

?CC list

quaint mantle
#

Probably shouldn’t have asked that in this channel lol

main dew
#

A yea xD

#

?cc list

undone axleBOT
#
Custom Command List

?eventapi https://www.spigotmc.org/wiki/using-the-event-api/
?fixmuhlag https://www.spigotmc.org/threads/283181/
?flags Aikar's garbage collection flags: <https://aikar....
?fw https://www.spigotmc.org/wiki/firewall-guide/
?google Google your question before asking it: <https://w...
?howtopostathread https://gfycat.com/healthymeatydogwoodclubgall
?irc IRC Chatroom: https://www.spigotmc.org/pages/irc/
?ischocoreal No, Choco is not real. I was not programmed to sa...
?issamreal Yes Sam is real. I was not programmed to say this...
?java16 Install Java 16 at <https://adoptopenjdk.net/?var...
?java16_linux ```apt-key adv --fetch-keys https://adoptopenjdk....
?javadoc Spigot: <https://hub.spigotmc.org/javadocs/spigot...
?jd Spigot: <https://hub.spigotmc.org/javadocs/spigot...
?jd-bc <https://ci.md-5.net/job/BungeeCord/ws/api/target...
?jd-bcc <https://javadoc.io/doc/net.md-5/bungeecord-chat/...

quaint mantle
#

Go to #text to use commands also so you don’t spam this channel

main dew
#

Oke

sly bison
#

This is really weird, the respawn anchor won't be set to a diamond block until the anchor is fully charged (4 charges)

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    Block block = event.getClickedBlock();

    if (block != null && block.getType().equals(Material.RESPAWN_ANCHOR) && event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
        RespawnAnchor anchor = (RespawnAnchor) block.getBlockData();
        World world = event.getPlayer().getWorld();

        if (anchor.getCharges() > 0) {
            world.getBlockAt(block.getLocation()).setType(Material.DIAMOND_BLOCK, false);
        }
    }
}```
opal juniper
#

Use == for enums btw

#

What does the getCharges return

#

You should probably check

sly bison
#

I logged getCharges() before this if statement

if (anchor.getCharges() > 0) {
    world.getBlockAt(block.getLocation()).setType(Material.DIAMOND_BLOCK, false);
}```
#

I'm stumped

#

Okay this is weird, I placed 5 anchors with one at each charge level, changed the code to below and I right clicked each one and turned into diamond block ;-;

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    Block block = event.getClickedBlock();

    if (block != null && block.getType() == Material.RESPAWN_ANCHOR && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
        RespawnAnchor anchor = (RespawnAnchor) block.getBlockData();
        World world = event.getPlayer().getWorld();

        world.getBlockAt(block.getLocation()).setType(Material.DIAMOND_BLOCK, false);
    }
}```
#

nvm fixed

analog inlet
eternal oxide
#

yes

analog inlet
#

and my data structure is really complicated

#

Map<String(Modules name), Any(Modules Configuration for this case should be LinkedHashMap<String, LocationEntry>)>

analog inlet
#

It shouldn't be

spare mason
#

how i can nerf the strengh by 50%

analog inlet
#

try listen to damage event and reset the damage

#
@EventHandler
fun event(e: EntityDamageByEntityEvent) {
    if(e.damager is Player && e.entity is Player) {
        e.damage /= 2
    }
}
#

if you don't want target/damager is Player just remove it

sand rune
#

@eternal oxide
But how to change the player nametag

ivory sleet
analog inlet
# ivory sleet He probably does it in Java btw

hmm then```java
@EventHandler
public void event(EntityDamageByEntityEvent e) {
if(e.getDamager() instanceof Player && e.getEntity() instanceof Player) {
e.setDamage(e.getDamage() / 2)
}
}

ivory sleet
#

setDamage

eternal night
#

getDamager() getEntity()

ivory sleet
#

java boilerplate PES_Blush

analog inlet
#

fixed

unreal quartz
#

pure java > kotlin
runs

analog inlet
#

kt let write things easier

ivory sleet
#

Yup

desert marten
#

I never ever saw a plugin made in kotlin

analog inlet
#

Even Gradle build script

desert marten
#

Nice, what do you think of kotlin?

unreal quartz
#

obviously they hate it

ivory sleet
#

Kotlin is nicer than java but for gradle nah

#

Groovy dsl all the way

unreal quartz
#

traitor!

ivory sleet
#

👀

eternal night
#

naturally pure java and maven xml is superior

analog inlet
quaint mantle
#

how can i check the config string is "test"??

analog inlet
#

When accessing my class with reflection

quaint mantle
#

for example
test1: test

#

i want to check test

slow oyster
analog inlet
worldly ingot
#

@slow oyster instead of adding new methods, change the access levels of the fields so you can access them directly

eternal oxide
worldly ingot
#

i.e. private final InventoryCraftResult resultSlots; to
public final InventoryCraftResult resultSlots; // PAIL private -> public

quaint mantle
#

can anyone help me?

slow oyster
#

Sure

analog inlet
quaint mantle
#

that doesn't work

analog inlet
#

exception?

quaint mantle
#

i want to check if example is test example: test

worldly ingot
#

Outside of that, just add some Preconditions.checkArguments(player != null, "player must not be null"); to all your arguments in CraftBukkit

#

(Use that instead of Validate too btw)

analog inlet
eternal oxide
#

if ("test".equals(getConfig.getString("example")))

hardy swan
sand rune
#

@eternal oxide
Other the tab list
The name tag of main player not the tab

analog inlet
#

well kt is lot better then java in null safe

slow oyster
eternal oxide
sand rune
#

@eternal oxide
Yes how ??

worldly ingot
#

Oh that's probably fine then, james, yeah

#

Didn't see those

#

But yes, Preconditions#checkArgument() is best. Used throughout most of the project

analog inlet
worldly ingot
#

The Validate ones are much older and should probably be replaced lol

spare mason
analog inlet
#

btw why this server can't send any image?

#

its really hard to show something when its long

eternal oxide
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

eternal oxide
#

or

#

?paste

undone axleBOT
analog inlet
#

!verify Lama3L9R

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

timid kraken
#

is it possible for a plugin to set a resource pack for your server if yes what methods should i use?

slow oyster
worldly ingot
#

LGTM 🙂 I'm sure md will have comments

eternal night
#

@slow oyster the javadocs on the getCraftingRecipe mention a player parameter being required, while there is none (crafting events are also not published). probably just forgot to remove them during the copy of the docs 😅

worldly ingot
#

lol, I'm guilty of that sometimes

eternal night
#

happens lol ¯_(ツ)_/¯

slow oyster
#

Oh yeah nice catch, I decided not to send a crafting event on the getCraftingRecipe method since you only want to find the recipe.

eternal night
#

Yea I agree, that method should not publish any events to handlers 👍

worldly ingot
#

If anything does call an event you should document it

eternal night
#

also just a design question, but are we actually happy with itemstack AIR being returned if the recipe was not found ?

#

I know spigot/bukkit loves to be inconsitent af with these

worldly ingot
#

Bukkit's ItemStack nullability is extremely inconsistent, yeah

#

I'd personally rather null tbh

eternal night
#

Same, if you wanna stick to AIR then at least document that in the @return

worldly ingot
#

imho, if it's to do with inventories, use air. If it's fetching data from anywhere, null

#

The Inventory methods shouldn't ever return null sadge but we're stuck with it for now

analog inlet
#

when i using a mongodb(on local machine) for player data storage should i fetch all the data when onEnable or fetch only when feature need?

worldly ingot
#

Depends on what kind of data and how urgent it is

#

Claims, for instance, should be loaded immediately

analog inlet
slow oyster
#

NMS returns AIR for the recipes that are not found so I stuck with that since PrepareItemCraftEvent's may expect it

worldly ingot
#

Might as well stick to NMS behaviour then

#

Would include that in the @return statement then

sharp bough
#

choco im bored give me an interesting thing to do

eternal night
#

^^

sharp bough
#

related to java

worldly ingot
eternal night
#

fix spigots itemstack itemmeta cloning in equals

#

pls

#

there

#

something to do

worldly ingot
analog inlet
#

with passwords last login date and ip

worldly ingot
#

If you're able to query for a password, you're doing it wrong

slow oyster
#

And their mother's maiden name, first pet and name of their first school?

analog inlet
worldly ingot
#

Okay. Well, in that case, still best to query on a need-be basis

#

No reason to load that immediately

#

It can be queried async when requested

analog inlet
#

ok thanks

eternal night
#

@slow oyster are you sure that the resulting item stack is AIR ? I am looking at CraftInventoryCrafting rn and the result method returns null if the stack is empty

eternal oxide
timid kraken
#

is it possible for a plugin to set a resource pack for your server if yes what methods should i use?

worldly ingot
#

Server#setResourcePack() iirc

#

Something to that degree

slow oyster
worldly ingot
#

Oh, no, Player#setResourcePack()

timid kraken
timid kraken
worldly ingot
#

Because it's sent to each individual player

eternal night
#

well yes that is the internal representation but existing API returns null for crafting inventories that do not have a valid result

worldly ingot
#

So you'd set it on player join

timid kraken
eternal night
#

which would be the one called during the pre craft event no ? I am not talking about passing null around internally, but you might want to convert to null at the end of your stack if the item is empty

#

tho I guess, that is also just preference on my end. bukkit is just too inconsistent with air vs null

quaint mantle
#

how can i do like this getConfig().getInt("Example") - args[1]

#

is it possible?

#

i want to remove amount of int that was in config smth like 500 - 100

sharp bough
#

i think

slow oyster
sharp bough
#

remember to check if the value from config is not null and the args[1] is an int

eternal night
#

Well more or less

#

the event only has the inventory

#

which, internally represents the result as AIR

#

but when accessing it through bukkit it would be null

analog inlet
sharp bough
#

config.set(path,value)

rapid meteor
#

Can anyone recommend me a yml tutorial?

#

Everytime I do it, it throws an error.

hidden delta
#

You need to be aware about spaces

#

😋

#

And move on

rapid meteor
#

"??

quaint mantle
#

with this?

rapid meteor
slow oyster
sharp bough
quaint mantle
#

noo

#

i know how config works

hidden delta
quaint mantle
#

i want to set the config with this value

eternal night
#

but then again, maybe md has some input on that

rapid meteor
#

And I even asked for help, but no one could do anything about it.

hidden delta
#

What error it throws to toy

#

You

rapid meteor
#

I'll send you later if it's ok?

#

I'm doing C++ right now.

#

I'll send you later :)

hidden delta
#

Take your time

#

👍

rapid meteor
#

Thanks!

slow oyster
#

Although CraftItemStack.asNMSCopy() makes a null ItemStack return AIR 😄 😄 😄

eternal night
#

yeaaaaa, it is a mess

slow oyster
#

I guess I'll leave it to just return AIR then. The prepareItemCraftEvent still gets sent null so it doesn't affect anything interally

eternal night
#

okay, note it in the javadocs and wait for more md input 👍

quaint mantle
eternal oxide
timid kraken
#

any way to access a custom sound introduced by a player's resource packs using spigot?

slow oyster
#

I can't wait to get this PR sorted since I can hopefully completely remove NMS from my plugin for future versions!

sharp bough
#

whats the api called to open a sign, enter a value and on close it gets what you typed in the sign?

torn shuttle
#

ok can someone tell me how it is possible for a living entity to be tagged as not valid on the tick it is meant to spawn in

supple elk
#

hey guys, for some reason my sidebar looks like this:

#

see how the numbers on the right are red?

supple elk
#

I print the display name in chat

torn shuttle
supple elk
#

in my set display name function I always add ChatColor.RESET to the end of the name...

sharp bough
torn shuttle
#

for whatever reason the 1.17 update broke a very specific portion of this code

sharp bough
#

show error

torn shuttle
#

there's no error

#

?paste

undone axleBOT
torn shuttle
#

as it currently stands

supple elk
#

I even printed it out before i send the packet to myself

sharp bough
supple elk
#

and you can see in the screenshot I sent earlier it's white

supple elk
torn shuttle
#

actually I stand corected, it works literally 2/10 times

#

wtf

supple elk
#

for some reason the colour of the objective name being displayed is influencing the colour of the numbers

#

oh wait

#

are they always red???

torn shuttle
#

but also it works 10/10 times if I do it after startup

#

somehow

supple elk
#

I may just be really stupid

sharp bough
supple elk
#

lmao

#

I'm dumb

obtuse basin
supple elk
#

yes they are always red

obtuse basin
#

there's a overall TPS and for each world a TPS

#

the world TPS can affect the overall TPS

sharp bough
#

you have 600 lines of code with almos tno documentation in the main method

#

and i cant go 1 by 1

#

to see what they do

#

i would recommend you debug it

#

do you know wheres the problem?

torn shuttle
#

all that matters is line 70-71 and 80-82

#

every time it reaches line 82 it says the entity isn't valid

#

the one I spawned on 70

#

except

#

well

sage swift
#

no they don't Irgendwer tf

torn shuttle
#

randomly when it doesn't

#

and it is truly random, it doesn't even really work for the same entity consistently

obtuse basin
chrome beacon
#

No

sage swift
#

if only each world ran on a different thread lol

ivory sleet
#

Worlds tick method is called by the main heart beat thus the same tps

torn shuttle
#

so why are living entities saying they're not valid on the tick they spawn in?

#

what can cause that and how can I fix it

sharp bough
#

if (!this.villager.isValid())
new DeveloperMessage("Villager isn't valid");

torn shuttle
#

yeah that makes less sense

sharp bough
#

when the spawned entity is valid

torn shuttle
#

unless it manages to spawn AND despawn on the same tick and before my code has a chance to run

sharp bough
#

meaning it died for some reason

torn shuttle
#

and only does it for some of them

sharp bough
#

or despawned

#

that returns false

#

!false returns true

#

a

torn shuttle
#

surely it's not getting killed before 2 lines of code have run

sharp bough
#

why is that red lol