#help-development

1 messages · Page 2274 of 1

dire marsh
#

point is: we don't need the grey bar at all

river oracle
#

Too late now

#

Everyone mad at chat reporting and new chat mad at the wrong thing it's too late to reverse better off looking to crack the system

dire marsh
#

I just modified my patch and it should work correctly and broadcast as a system message now

chrome beacon
#

Honestly I don't see the problem with 1.19.1 chat. You're not a racist or terrorist or doing illeagal things. You'll be fine

jagged thicket
#

Lmao

#

no

chrome beacon
#

Microsoft has been doing moderation on other games

river oracle
#

You say that right now:)

dire marsh
#

It's okay, until it isn't.

chrome beacon
#

This isn't something new

jagged thicket
#

imagin if ppl started to play only cracked servers

#

because of chat report

river oracle
#

Lol

#

Wouldn't happen

#

Maybe

eternal oxide
#

Its a slow move towards Face recognition to login and then your social credit score to be able to play

river oracle
#

You'd probably get an influx of cracked players thougj

#

Do to bans

chrome beacon
#

Oh will we get china edition of Minecraft

dire marsh
#

They'll probably add text filtering like bedrock next lol

river oracle
#

Isn't it already on realms

#

Or no

dire marsh
#

It already exists on realms, yes

jagged thicket
river oracle
#

Amongus

lost matrix
dire marsh
#

At first, you're right, it will probably only be the most serious offences.

#

Until they start to automate and scale up.

jagged thicket
#

me and the boys talk about legal drugs for fun

chrome beacon
river oracle
chrome beacon
#

Have you ever used the chat on any of their other games

river oracle
#

It sucks

jagged thicket
#

but in any other game chat isn't that important

#

but in minecraft chat is essential

river oracle
#

Roblox is proof that this system doesn't work anyways lol

jagged thicket
#

yea saying gay is bannable

#

(roblox is homophobic)

river oracle
#

Roblox chat makes me wanna impale myself with a spear

eternal oxide
#

luckily we can mod the shit out of MC and remove any CCP style crap

iron glade
#

@eternal oxide found the solution, after saving the default config I actually had to load it. A simple plugin.reloadConfig() solved the problem. Comments are finally saved now

eternal oxide
#

Good to know. Must be a paper issue though as it doesn;t happen on spigot

iron glade
#

spigot probably manually reloading the config after saving the default one

eternal oxide
#

probably

lost matrix
river oracle
#

Probably not unless you do some weird shit

eternal oxide
river oracle
#

Server side atlwast client side

#

You can do whatever

eternal oxide
#

Worst case, we mod all chat to go through PMC

river oracle
#

What is pmc

eternal oxide
#

Plugin Messaging channels

dire marsh
#

even if, for example, mojang banned everyone who launched 1.20, the community would just go back on some version, mod the shit out of it, and continue having fun

river oracle
#

Mojang should just recode the game in a language that can't be easily decompiled so they can enforce their bullshit and nobody can do anything

waxen plinth
#

Literally every other platform has moderation from the platform itself

#

Why are we acting like this is the worst thing ever

#

Personally I think the game NEEDS some kind of moderation like that as long as it's handled well

#

Whether it will be handled well remains to be seen, but I have no reason to assume they're going to overdo it

#

The community response has been pretty embarrassing honestly, the amount of fearmongering and alarmism is off the charts

#

A measured response is "we only want this if you use it strictly to ban the worst of the worst people, but if you take away the agency of servers to moderate themselves by banning minor offenders we're going to have a problem"

#

Child predators and nazis SHOULD be banned, it's pretty essential for a game played by a huge portion of children to be (as close as possible to) free of predators

#

Decentralized moderation is not effective against them

#

They will just hop to another server

#

It's a bit like the vaccine mandate

#

The paradigm could be problematic if misused

#

But much like making people get a life-saving vaccine that saves them and others from a deadly disease is a good thing, making servers subject to moderation that removes the most dangerous people from the platform is also a good thing

#

You can remove the real-world context to make either of these things sound authoritarian and threatening, but by leaving the details out you intentionally obscure their purpose to fight them on ideological grounds where you can hand-wave the context away or make a slippery slope fallacy

#

It's a really annoying right wing tactic and I'm frustrated to see it have so much traction here. Yes, there is reason for concern, but the response has been so extremely negative it's like people don't think it's worth getting rid of child predators if it means being subject to any amount of moderation from mojang

river oracle
#

try learning java before you continue with spigot

#

scope should be something you learn pretty early on

quiet ice
#

myeh

#

This isn't really an issue with not knowing java

#

This is more of an issue that this is a seriously dumb idea

#

Whatever you want to do - there is a better way

#

for what?

river oracle
quiet ice
#

And what command?

reef lagoon
waxen plinth
reef lagoon
waxen plinth
#

That just sounds like a guideline

river oracle
#

otherwise your out

lost matrix
#

What am i coming back to? Redempt ranting about sacrificing privacy for security.
How about we implement a moderation system for all messaging services then? Lets
spy on every form of communication. This will surely get rid of all illegal conversations XD

quiet ice
#

Yeah no, this system will do absolutely nothing to catch child predators

river oracle
#

it doesn't exist anymore

quiet ice
waxen plinth
quiet ice
#

Privacy is not the issue there really

reef lagoon
#

#general

river oracle
waxen plinth
#

It's not like every single message is being sent to mojang

pastel juniper
#

can sb help spawn Particles, this is my code
player.spawnParticle(Particle.FLAME, event.getBlock().getLocation(),15);

waxen plinth
#

Only reported messages are sent

river oracle
reef lagoon
#

no

quiet ice
#

It's more that the server admins have less control

worldly ingot
#

mfw they literally don't but okay

waxen plinth
#

If it's just you and your friends running a server you're not going to be reporting each other

quiet ice
# reef lagoon no

To some degree you could try to use a custom command sender or whatever cursed shit

river oracle
waxen plinth
#

Mojang isn't gonna come in and ban you for your jokes

river oracle
waxen plinth
#

And that's the answer to everything

#

Not necessarily

quiet ice
#

It's more the public servers - those where you don't know the admins or other players of it

waxen plinth
#

Because we still haven't seen how they're going to use this yet

#

I say give it a chance

river oracle
quiet ice
#

I am also not entirely convinced that it would catch predatory acts

waxen plinth
quiet ice
#

Someone that would report these messages would not fall for these acts

river oracle
#

if I'm a predator why keep it on minecraft and not goat people onto other platforms

waxen plinth
#

It starts on minecraft

quiet ice
#

I haven't played much on the more problematic servers, but I have yet to see that happening

lost matrix
river oracle
#

I'd also like to see stats ^

waxen plinth
#

How could we have statistics without reporting

quiet ice
#

Though I estimate this is going to happen mostly on the DMs so eh

quiet ice
river oracle
#

if its such a huge issue

quiet ice
#

I am sure that the logs of some big servers have been leaked in the past

waxen plinth
#

Then you would need to independently contact tons of servers and convince them to give you their chat logs to conduct such a study

#

And to be fair it's not just child predators

quiet ice
#

What I am saying is that there are already chat logs out there most likely

waxen plinth
#

Nazis should go too

river oracle
#

the worst thing thats happened to me on a minecraft server is someone called me a bad word

quiet ice
river oracle
#

someone has leaked my address and stuff too but I don't really care about that

#

tthey just got banned

waxen plinth
#

If not then no

quiet ice
#

From history I can say yes

lost matrix
quiet ice
#

They are the most genocidial ideology out there

lost matrix
#

By far

waxen plinth
#

That's a hell of a stretch

#

You can make that argument for tankies

#

But not for communists as a whole

river oracle
#

I say we get rid of everyone who doesn't agree with my political ideology problem solved tbh

waxen plinth
#

Is banning Nazis really such a bad idea?

#

We want to keep them around?

river oracle
#

if you wanna go around killing them to get rid of them go ahead I'm sure thats much your style

waxen plinth
#

Thanks for putting words in my mouth

eternal night
#

wtf is this

waxen plinth
#

Deplatform Nazis = kill them all

quiet ice
#

While sure, I can agree that it makes sense to limit these extremists in every way possible - but it is particularly hard to do that without damaging the very basis of democracy

river oracle
quiet ice
#

Not as if democracy works anyways

ivory sleet
#

Perhaps we can all chill a bit, also #general would be more suitable

waxen plinth
#

It's difficult

#

But if you don't do it then...

#

Well

lost matrix
#

But i agree that any form of (objectively) fanatic ideology should be banned.
Not sure if i would in put nazis in todays world as the poster child for this but the general idea is reasonable.

waxen plinth
#

Look at the US right now

#

Fascism is back with a vengeance

waxen plinth
#

It's on the rise in a lot of places

river oracle
#

oh shit I forgot to turn off the water 💀

eternal night
river oracle
#

I like #general

ivory sleet
#

Ya

waxen plinth
#

I gotta go to work anyway

ivory sleet
#

Well

#

I mean generally I would want to dissuade political discussions

charred blaze
lost matrix
charred blaze
#

Cannot make a static reference to the non-static method getDataFolder() from the type JavaPlugin

eternal night
#

Well

#

Yes

#

that statement is correct

lost matrix
quiet ice
#

(or just lazily populate that field)

ivory sleet
#

But it’s not a rule that political discussions are strictly forbidden, all we have is that people must be respectful when approaching one

eternal night
#

almost like java is object oriented and static state might not be the best 🤔

quiet ice
#

(e.g. in the consutrctor)

charred blaze
quiet ice
quiet ice
quaint mantle
#

tf did I mess up now

charred blaze
quiet ice
#

You must have an object to call it on

lost matrix
quiet ice
ivory sleet
#

Honestly, mono state is underrated

#

Sure it does prevent a heck lot of flexibilities

quiet ice
#

And initialise it as soon as you have an instance of the class (in that case your plugin)

charred blaze
quiet ice
#

Well when do you need it?

ivory sleet
#

but sometimes it might just simplify the architecture

quiet ice
#

You need it after the plugin was initalized

charred blaze
quiet ice
#

So just do it when your plugin was initialized

charred blaze
#

uh

#

i found out that i dont need dir to create file

#

i dont need

#

right?

quiet ice
#

So you have something like

public class MyPlugin extends JavaPlugin {
    private static File dir;
    public MyPlugin() {
        dir = getDataFolder();
    }
#

(of course you'd need to move everything that uses dir directly)

charred blaze
#

nvm i dont need dir

quiet ice
#

For this however I'd really follow the advice of everyone else and not make that field static

charred blaze
#

it prints

#

la1
la2
la3

#

when i have

#

bla1
bla2
bla3

#

in config

#

lol

#

why?

eternal night
#

i < r.read(); 👀

#

that eh not how that works

charred blaze
#

isnt r.read(); returns size of lines?

eternal night
#

might wanna read the javadocs

quiet ice
#

no, it returns the byte that was read

charred blaze
#

and what returns size of lines?\

eternal night
#

nothing

quiet ice
#

If it is below 0 it is the end of stream

#

Just check if the result is null or not

eternal night
#

yea you basically wait for EOF

#

or just, use any of the 1 million utils

#

to read a file completely

#

throw a uuid at the item pdc

quiet ice
#

Depends

charred blaze
#

instead of bla1

eternal night
#

I-

#

it literally is

charred blaze
#

why

eternal night
#

because you read the first byte ?

#

afterwards that byte is read

#

e.g. readLine will not include it

charred blaze
#

aaaaa

#

.read()

quiet ice
#

Yeah, it discards that byte from the stream

charred blaze
#

reads all line's first char?

quiet ice
#

Let's be honest here - it is quite obvious that .read is NOT a getter method

eternal night
#

there is literally Files.readAllLines(Path, Charset)

#

which returns a List<String>

charred blaze
#

anyways

#

how can i get size of lines?

eternal night
#

[18:09] LynxPlay: nothing

#

you'd have to read through the entire file and count

charred blaze
eternal night
#

Like you are reading now ? but like, please just use any of the existing methods

#

there are only a few reasons to read a file manually like this

eternal night
#

[18:12] LynxPlay: there is literally Files.readAllLines(Path, Charset)

charred blaze
#

how does that work?

eternal night
#

wat ?

#

it reads all lines ?

charred blaze
#

i need size of max lines

#

last line number

eternal night
#

why ?

charred blaze
#

like 3 there

charred blaze
eternal night
#

why

charred blaze
#

why are you intrested

#

storing things

eternal night
#

because whatever you are doing sounds pretty dumb ?

#

and instead of you going down a dumb path, maybe someone here knows a better solution

charred blaze
#

sulotion?

#

i only asked for max line number

quiet ice
#
int lineCount = 0;
for (String readLine = br.readLine(); readLine != null; readLine = br.readLine()) {
    lineCount++;
}
#

It's easy as this

eternal night
#
long lineCount;
try (Stream<String> stream = Files.lines(path, StandardCharsets.UTF_8)) {
  lineCount = stream.count();
}
#

or this

#

but like

charred blaze
eternal night
#

whatever you are doing with a line count for storing things sounds pretty not good

charred blaze
#

in plugin

#

and i need storing things

#

in

#

Discord's temp ban

eternal night
#

okay ? How does that need the line count tho

#

or are you trying to count bans

#

like, how many bans exist rn

marble copper
#

Can someone give me a cool faction server spawn

charred blaze
#

in config

#

and

quiet ice
#

REEEE

charred blaze
#

i need to check every line

eternal night
#

to check for bans ??

charred blaze
eternal night
#

I-

quiet ice
eternal night
#

or like

#

sqlite

quiet ice
#

But not yml

charred blaze
#

why sql and not yml

eternal night
#

because one is indexed

#

the other isn't

charred blaze
#

what you call "indexed"

eternal night
#

Well, for yaml you have to load the entire thing into memory

#

or read through it all

charred blaze
#

im not making extra large community where 5k users are banned lol

eternal night
#

Well, if you want to stick to yaml, the read line by line method is still not clever

#

why not just use like, the bukkit yaml api

charred blaze
sage patio
#

I've hashmap, if i put the an existant key and value it will update that?

quiet ice
#

What I mean like disc space can be saved by using DataOutputStream/DataInputStream

eternal night
#

what the fuck do you need the line for xD

quiet ice
charred blaze
quiet ice
charred blaze
#

im checking every line

eternal night
#

that is not how yaml works 😭

sage patio
eternal night
#

you parse it into a yaml object tree

#

and then traverse that

charred blaze
#

and if sysoldtime in that line - sys.now.time is bigger than user's ban time ill unban em

eternal night
#

and if you just wanna check every line, even then you don't need the total line number

charred blaze
#

how to check every line then

eternal night
#

scroll up and check mine and geols answers

charred blaze
#

reply it

eternal night
#

you are trolling right ? XD

eternal night
#

Yes but do you see how like

#

that thing already reads each line

#

and how using that to getting the line count just to then read it all again is dumb

quiet ice
#

#putIfAbsent will not however

charred blaze
#

i understand now

#

xd

#

me dumb

eternal night
#

thanks 😅 I was about to loose hope

charred blaze
#

how does System.currentTimeMillis() work?

surreal ingot
#

does any1 know what could this error be? ```# A fatal error has been detected by the Java Runtime Environment:

Internal Error (sharedRuntime.cpp:2370), pid=8919, tid=8997

Error: ShouldNotReachHere()

JRE version: OpenJDK Runtime Environment (17.0.3+7) (build 17.0.3+7-Debian-1deb11u1)

Java VM: OpenJDK 64-Bit Server VM (17.0.3+7-Debian-1deb11u1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

Problematic frame:

V [libjvm.so+0xcb8b5c]

Core dump will be written. Default location: /home/minerlands/skyblock/core

An error report file with more information is saved as:

/home/minerlands/skyblock/hs_err_pid8919.log

If you would like to submit a bug report, please visit:

https://bugs.debian.org/openjdk-17

#```

charred blaze
#

java 17?

#

why are you using that

lost matrix
river oracle
lost matrix
sage patio
#

how i can create a for loop for a hashmap?

eternal night
#

either use the map's for each method

river oracle
#

Map#forEach

river oracle
#

use a lambda

sage patio
#

thanks

eternal night
#

or iterate over the entry set

quiet ice
eternal night
#

geol uses arch btw kekw

quiet ice
#

Just use latest Adoptium/Zulu/JBR etc

quiet ice
surreal ingot
sage patio
river oracle
#

💀 please don't use player objects

quiet ice
river oracle
#

please lord god

#

use UUID

quiet ice
#

No, use WeakHashMap

surreal ingot
river oracle
quiet ice
surreal ingot
#

kay

quiet ice
#

From my experience vendor JDKs have serious issues

#

Zulu is stable as shit and Adoptium is meh

#

The official OpenJDK JDK is pure garbage

river oracle
sage patio
#

thanks

river oracle
# sage patio thanks

or

// don't get getKeySet is the right getting tbh I forgo
for(Player p: map.getKeySet()){
  int wow = map.get(p);
}```
surreal ingot
quiet ice
#

okay, that is a bit strange

#

What is the java --version output? Also are you sure that the terminal is not locked?

eternal oxide
quiet ice
#

that's still a JRE from ~3 months ago

surreal ingot
#

oh shoot

#

i didnt found a newer one

surreal ingot
#

is there a newe version of zulu

#

or only java 11?

#

oh wait i see

#

still

#

frezzing here

quiet ice
#

Try using a fork of spigot then ig

river oracle
#

Persistent Data Containers

#

ItemStack#getItemMeta#getPersistentDataContainer#setPersistentData

lost matrix
#

?pdc

river oracle
tacit drift
#

has anyone tested mongodb vs mysql on a minecraft server?

lime moat
#

MySQL just wins in every situation

flint coyote
#

I still prefer postgres

worldly ingot
#

I wouldn't say every situation

#

There are times where NoSQL is definitely better than SQL

waxen plinth
#

When does it have the advantage?

worldly ingot
#

When a table-like structure just doesn't make any sense. Whole object handling is a bit nicer rather than having to break it up into a table, or multiple tables if necessary

#

I'd still take SQL is a majority of cases though ;p

#

It's just not fair to say that "every situation" should be SQL

river oracle
#

I'ma Mongo Simp :)

#

I don't even know any SQL probably should at some point

crimson terrace
#

tag blocks which are placed with something maybe or save them somewhere, then check against that when a block is broken

#

theres an event for those I believe, do the same there

#

probably

tacit drift
flint coyote
river oracle
quaint mantle
#

?paste

undone axleBOT
quaint mantle
#

?paste

undone axleBOT
quaint mantle
flint coyote
#

SQL is pretty easy to learn. Atleast what you need 90% of the time. Selects, subselects, insert, create table and join and primary/foreign keys

Obviously there's a lot more like views, procedures, indices etc

quaint mantle
#

how can i fix

tardy delta
#

best thing to do

quaint mantle
#

wdym me ?

#

lemme see

flint coyote
quaint mantle
#

its fixed

#

thx

somber hull
#

I am having a shit ton of issues with gradle multiproject

tardy delta
#

it was a real story: 4000 lines of C code with that comment on top

somber hull
#

Can anyone help me in that area?

tardy delta
#

area 51

ivory sleet
#

@somber hull ask away

tacit drift
somber hull
river oracle
ivory sleet
#

Is your shared project a su project in your gradle setup?

somber hull
#
rootProject.name = "BetterSpawners"
include 'Freemium'

settings.gradle

#

For my shared

ivory sleet
#

okay

tacit drift
#

we even have sql as a BAC subject

somber hull
#

project structure

river oracle
ivory sleet
#

You should include the java plugin iirc for both modules

somber hull
ivory sleet
#

yes

#

tho idr how to do that with groovy dsl

#

Since I use kotlin dsl only

#

But let me see if I have a project that can showcase just that

somber hull
#

Alr

tacit drift
#

@river oracle wdym normal highschool

ivory sleet
tacit drift
#

where are you from

river oracle
#

we don't like do specialization we have like a couple electives but a majority of our classes are required to graduate

somber hull
#

Nothing changed

#

However, the problem is that the subproject has no dependencies, and cant see code from the root module

ivory sleet
ivory sleet
#

Yes

#

You need to apply the java plugin

#

And then add your sub projects to your other subproject

#

like:
compileOnly findProject('something')

#

iirc

river oracle
ivory sleet
#

Idr groovy syntax but sth along those lines

somber hull
#

oh

#

i see

ivory sleet
#

Well whatever subproject/module you want to

#

Or if you prefer implementation findProject(…)

#

Assuming you’re composing a single jar

somber hull
#
dependencies {
    implementation findProject(":BetterSpawners")
}

this isnt working

ivory sleet
#

Well you can refer to it by simply rootProject

#

implementation rootProject

#

iirc

tardy delta
#

fun i have no idea what this means

somber hull
ivory sleet
#

(:

somber hull
#

Now im reunning into probably the weirdest bug of all

#

lmao

ivory sleet
#

🥲

somber hull
#

It can see code from the root project. But not its own???

#

The GuiManager is in the same project

ivory sleet
#

Did you apply the java plugin to the root project as well?

somber hull
#

i think

tardy delta
#

its hikaricp which is telling that message, i fked up their logging prefix

somber hull
ivory sleet
#

Where is that then?

#

Looks like that part should be in root

#

Since root runs first

somber hull
#

Wdym?

ivory sleet
#

The root project initializes everything

#

Thus you better be including the java plugin for subprojects in your root project

#

Put simply

somber hull
ivory sleet
#

Yes but is that declared in your root project’s gradle build script?

somber hull
#

Like the roots plugin area in the build.gradle file??

ivory sleet
#

./build.gradle

#

That’s the root project’s build script

somber hull
#
plugins {
    id "java"
    id "com.github.johnrengelman.shadow" version "7.1.1"
}

group "me.silentprogram"
version "1.0-SNAPSHOT"
sourceCompatibility = JavaVersion.VERSION_17

repositories {
    mavenCentral()
    maven {
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
}
subprojects {
    apply plugin: 'java'

    repositories {
        mavenCentral()
        maven {
            url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
        }
    }

    dependencies {
        implementation 'org.bstats:bstats-bukkit:3.0.0'
        compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
        implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.6'
    }
}
dependencies {
    implementation 'org.bstats:bstats-bukkit:3.0.0'
    implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
    implementation 'com.google.code.gson:gson:2.9.0'
    compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
    implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.6'
}
shadowJar {
    relocate "com.github.stefvanschie.inventoryframework", "me.silentprogram.inventoryframework"
    relocate "org.bstats", "me.silentprogram.bstats"
}

#

this is my root build.gradle

#
dependencies {
    implementation rootProject
}

this is my subprojects build.gradle

ivory sleet
#

Okay and where do you get the issue of accessibility?

somber hull
#

From my subproject, to other classes in the subproject

#

this is the subproject

#

And the issue is that it cant see GuiManager in BetterSpawners

ivory sleet
#

Within a single subproject?

eternal night
#

watch that gui manager to be like package private or smth xD

ivory sleet
#

Or between two different ones?

somber hull
ivory sleet
#

But else try to restart and invalidate

somber hull
somber hull
ivory sleet
#

Invalidate caches

somber hull
#

Welp.

#

Restarted IJ

#

Fixed it lmao

ivory sleet
#

Pog

somber hull
#

thanks for the help

ivory sleet
#

No worries, glad I could help ya

somber hull
#

Last thing

#

How do i build it for the specific subprojects?

#

Oh

#

nvm

#

I now have a category for that on the right

ivory sleet
#

Ye

lavish folio
#

what is check_decay in leaves block?

somber hull
#

Oh no

#

How do i add shadow plugin to a subproject?

#

Ok ill have to come back later

#

But its not including my root project in the built jar file

ivory sleet
#

Oh yeah

#

Switch to implementation

#

and you can include the shadow jar plugin the same way you did with the java one for submodules

#

Without version tho

lavish folio
ivory sleet
#

Cuz that was already declared

ivory sleet
tardy delta
#

could it be possible that /kill @e doesnt throw a PlayerDeathEvent?

ivory sleet
#

Could be

#

Think you might have to use the damage event alternatively

tardy delta
#

hmm it was for my vanish plugin, /kill seems to make the target stop flying

flint coyote
#

what are you doing inside a death event then?

woeful flicker
#

Could anyone help me out? I'm trying to ignore my src folder and other folders through .gitignore but they still get pushed

crude crystal
#

BuildTools - TransportException

final sapphire
#

how to i make sspercific portals not teleport you to the end / nether?

tall dragon
final sapphire
tall dragon
quaint mantle
#

Is there a way to add a command to tab completion without it being in the plugin.yml?

tall dragon
#

yes

quaint mantle
#

How?

tall dragon
#

well you know how you can extend CommandExecutor

final sapphire
tall dragon
#

its.. supposed to stop the teleport from happening like you wanted?

final sapphire
tall dragon
#

random?

final sapphire
#

what am i looking for?

final sapphire
#

a plugin?

crisp steeple
tall dragon
#

this is a development chat...

tall dragon
#

and register it

final sapphire
#

wrong one

#

mb

final sapphire
tall dragon
#

could just disable the nether 😄

#

or ask someone to make you a plugin haha

final sapphire
tall dragon
#

well looks like you gonna need a plugin then

final sapphire
#

do u think one will already exist?

tall dragon
#

uhhh not sure

#

there might

tall dragon
#

this one perhaps?

quaint mantle
tall dragon
#

uhhh not completely sure about that one

#

shoulnt it do that automatically?

quaint mantle
#

No, the only way a command shows in tab is when it is registered in the plugin.yml

tall dragon
#

well i dont do that

#

and mine work

final sapphire
#

is there one for end portals too?

tall dragon
#

well

#

?google

undone axleBOT
final sapphire
tall dragon
#

so all you want is to completely disable both nether and end portals

final sapphire
#

so for e.g

#

in parkour i do NOT want players teleporting to the end in the end portal in a parkour map

#

but

#

in the survival world i DO want players to be able to make and teleport to the end / nether

tall dragon
#

riiight right

#

if u still got nothing after my league game i might make u one

final sapphire
final sapphire
tall dragon
#

well no

final sapphire
long elm
#

has anyone a idea why my tablist is not working and why i see the vanilla tablist..

package de.maurice.mcp.menu;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

import net.md_5.bungee.api.ChatColor;

public class TabList {

   public void setComponents(Player player) {
       player.setPlayerListHeader(ChatColor.GOLD + "TEST SERVER");
       player.setPlayerListFooter("" + ChatColor.GOLD + Bukkit.getOnlinePlayers().size() + ChatColor.GOLD + "/"
       + ChatColor.GOLD + Bukkit.getMaxPlayers());
       player.setPlayerListName(ChatColor.RED + player.getName());
   }
    
}
tall dragon
final sapphire
eternal oxide
#

When are you setting the TabList?

wild wharf
eternal oxide
vocal cloud
#

mvn package

eternal oxide
#

command line? mvn installIn the directory with the pom

vocal cloud
#

install installs it into your local mvn repo as well tho sadge

eternal oxide
#

true, package is better

#

clean package deletes all previous build files before recompiling

#

did you run it -o ?

#

looks to be in offline mode

vocal cloud
#

Did you run buildtools for the version gag 1.8

#

Sigh. I mean that works but it's so much more difficult than just using buildtools.

eternal oxide
#

you are using an HTTP repository and should be using HTTPS

#

looks like

#

it can, IF all your dependencies are in your local .m2

vocal cloud
#

You're using multiverse right?

#

You have their repo apparently as http

drifting halo
#

check if all the repo's are https

vocal cloud
#

Those are deps I'm talking repos

formal bear
#

Why does tabComplete does not work?

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {

        if (args.length == 1) {

            return serverNames;

        }

        return null;
    }

If i print out serverNames to the console it displays without a problem

[22:13:42 INFO]: Testowy przemek_testowy
vocal cloud
#

For security reasons

#

The clown you can go and talk to them for that info

drifting halo
#

they recently enforced https

buoyant viper
#

yes

hardy crystal
#

Hello, i try this, but i get error:

            s.sendMessage("Roleplay Utilities Version " + this.getDescription().getVersion());
        }````
drifting halo
#

thats unfortunate

buoyant viper
#

gradle doesnt allow http either iirc

drifting halo
#

then you're shit out of luck

buoyant viper
#

or it yells at u repeatedly for it

eternal oxide
#

install it local

vocal cloud
#

Step 1. Bitch at them.
Step 2. Either downgrade maven or download it locally and install

drifting halo
#

does https not work?

vocal cloud
#

Heck even I got my maven repo to have https

drifting halo
#

it most likely already redirects to https anyway

hardy crystal
drifting halo
#

probably cuz its an 8 year old repo :))

formal bear
#

Unknown host repo.tigerhix.me

vocal cloud
#

Doesn't have https or http, that url doesn't exist?

#

Maybe use dependencies that are still around kek

#

1.8 moment

drifting halo
#

gonna have to install it locally anyway then lul

drifting halo
quiet ice
#

What are you doing here, ded?

drifting halo
quiet ice
#

Ah

drifting halo
#

why are you

quiet ice
#

No idea why I prefer spigot over paper

drifting halo
#

more chaos = better

vocal cloud
#

Cause paper = flammable

formal bear
drifting halo
noble lantern
#

dont forget to register it too

noble lantern
#

send the outside scope

formal bear
noble lantern
#

or entire scope of that method

#

your only returning null under it?

#

so ofc it would work because its nothing

drifting halo
formal bear
noble lantern
#

just but a log inside the if statement

#

and see if it fires to your console

formal bear
#

It does not 🙃

noble lantern
#

If something doesnt work in java best bet is to just start debug logging

Also dark eye remote debugging doesnt rly work for minecraft because it needs the server, but its brilliant for standalone apps

formal bear
#

So theres something wrong with it

noble lantern
manic furnace
#

I know thats a silly question, but when i create a class that extends thread, is only the code in the run() method in a new thread or everything in that class?

noble lantern
#

would save so much time

noble lantern
#

and start it with start()

#

or if you want

drifting halo
manic furnace
#

But code that isn't in the run method wouldn't be in a new thread?

noble lantern
#

you can have a method referance to a thread without extending thread

noble lantern
#

all other code is not

manic furnace
#

yeah but in the same thread

noble lantern
#

your constructor is in the calling classes thread

#

run() is the actual new thread

#

sec

noble lantern
#

actually i do my threads different but yeah thats what it is

formal bear
noble lantern
#

I do new Thread(Runnable/ThreadHere).start()

formal bear
glass mauve
noble lantern
#

plus these thread are long running dont want them cleared by jvm

#

for scheduling i use chains of CompletableFuture that return theyre results in sync

Similar to NodeJS promises in a sense

vocal cloud
#

I've had runnables run for 6 months. I don't think you need to worry about the JVM clearing them lol

glass mauve
#

lmao

ivory sleet
glass mauve
#

yeah its a bit different when working with Minecraft and Spigot/PaperMC

ivory sleet
#

Using a raw thread is more when a single short lived task is to be executed

#

And sadly if you have a poop pc/bad jvm flags CompletableFuture will start a new thread per task

formal bear
#

Apparently it works lol

[22:37:06 INFO]: botprzemek[/176.97.28.105:43207] logged in with entity id 19 at ([world]-5.5, 208.0, -13.5)
[22:37:09 INFO]: Works
[22:37:10 INFO]: Works
[22:37:10 INFO]: Works
[22:37:10 INFO]: Works
    public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) {

        if (args.length == 1) {

            Bukkit.getLogger().info("Works");

            return serverNames;

        }

        return null;
    }
noble lantern
#

My logs have theyre threads logged into the console, only ever uses about 2-3

ivory sleet
#

That’s fine

#

Unless it’s remote yk

somber hull
#

Conclure

noble lantern
#

locally its all on one thread

ivory sleet
#

In which you might wanna think about the setup a bit differently

#

well not necessarily

noble lantern
#

On my remote machine i havent tested it yet

ivory sleet
#

FJP’s workers might steal work

somber hull
#

When building the subproject, it doesnt include the root project or any dependencies

ivory sleet
#

Since is has a task queue per worker

noble lantern
noble lantern
#

I should just use threads ngl

#

for that part at least

ivory sleet
#

Yeah, well generally it’s fine

#

As long as you’re not involving yourself with io tasks when using common pool

noble lantern
#

No local IO, but it does contact mongodb

ivory sleet
#

Hmm

noble lantern
#

and google services

ivory sleet
#

Could be problematic if the latency is bad

noble lantern
#

Latency wont be an issue

#

this is an authentication droplet so its gonna be running in the same data center as the other game servers

ivory sleet
#

Since a lot of other stuff also uses common pool, if your io tasks occupies it, it will end up affecting performance on several other places internally and possibly externally also

#

Wel even io generally

ivory sleet
#

Since those tasks are always a bit resource intensive

noble lantern
#

Is there a way to get CompletableFutures to not use FJP?

#

Or just use runnables/threads is only way

ivory sleet
#

CompletableFuture#runAsync(action,executor)

noble lantern
#

I just like CompletableFuture.runAsync)runnable_

ivory sleet
#

Which takes any executor

noble lantern
#

LOL

#

okay so im just missing the executor argument

ivory sleet
#

So you could pass a custom work stealing pool, or fixed size one

#

🥲

noble lantern
#

Hmm ill have to look into making pools havent worked with thread pools because

ivory sleet
#

Yeah Dw Dw java made it fairly simple to work with :3

ancient basin
#

Someone know the modern usage of PlayerPickupItemEvent ? Because this event is deprecated

maiden thicket
noble lantern
#

oh it is its one line

#

nice was hoping it wasnt like websockets and needing to abstract and implement half the shit i write

maiden thicket
#

@ancient basin

ivory sleet
#

^

ancient basin
#

Seriously, it's just entity instead of player

ivory sleet
ancient basin
#

IntelliJ didn't display this xD

daring maple
somber hull
#

this is returning null

    public MainClass getPlugin() {
        return plugin;
    }

However it is declared in the cconstructor

    public StartupClass(MainClass plugin) {
        this.plugin = plugin;
        startup();
    }

plugin cannot be null as it is what is extending JavaPlugin, and running the plugin.

ancient basin
#

Ok ok, I'll remember

somber hull
#

The supposedly null class

somber hull
#

Myclass extends JavaPlugin

maiden thicket
subtle folio
#

abstraction

ivory sleet
#

Very hard to figure out given the references you given us so far

noble lantern
maiden thicket
#

aka where do u do new StartupClass

noble lantern
ivory sleet
somber hull
somber hull
#

But i pas sit through with this

maiden thicket
#

where do you do new StartupClass

somber hull
#
    public void onEnable() {
        startupClass = new StartupClass(this);
        this.guiManager = new GuiManager(startupClass);
    }
maiden thicket
#

is onEnable being called

#

at all

somber hull
#

As i said

#

Nothing would be running

#

its an NPE

#

So something ran

ivory sleet
#

I kinda wanna resend the debug wiki page now 🌝

noble lantern
#

LOL

maiden thicket
somber hull
#
        KEYS = new Keys(this);
#

Well

#

public final NamespacedKey ENTITY_TYPE_KEY = new NamespacedKey(plugin.getPlugin(), "bs.entityType");
This line, inside of KEYS

noble lantern
#

I basically just wrap each onMessage in a runAsync for rn

The server itself is also on its own thread outside the main

somber hull
#

this is not null, its .getPlugin() that is null

ivory sleet
#

What type of thread pool do u use

noble lantern
#

just the fixed thread pool i set it to 12 for now

drifting halo
#

why are you calling get plugin on plugin 🤔 shouldnt plugin already be an instance of javaplugin?

ivory sleet
#

Have u configured time to to live and core pool size etc?

#

Or r u using default settings

somber hull
noble lantern
somber hull
#

Imma go back and fix everyhting later

maiden thicket
ivory sleet
#

Yes well the futures get completed

somber hull
somber hull
ivory sleet
#

Burchard I’d use a fork join pool/ work stealing pool

#

It’s almost always superior to the fixed thread pool

somber hull
#

Ohhh

#

I see

#

I think

ivory sleet
#

Even without forkable tasks

maiden thicket
ivory sleet
#

And then just have it set to a max number of workers/threads yk

#

And then send it to the CF just

noble lantern
ivory sleet
#

Threads as of now are platform threads thus get mapped to os threads

somber hull
somber hull
# somber hull Still null
    private StartupClass pluginClass;
    private MainClass plugin;
    
    public Keys(StartupClass pluginClass) {
        this.pluginClass = pluginClass;
        this.plugin = pluginClass.getPlugin();
        
    }
ivory sleet
#

But with fork join pool you don’t care about threads

noble lantern
#

oh

ivory sleet
#

Since it’s gonna be limited to the available processor amount anyway

noble lantern
#

perfect then

somber hull
#

O

ivory sleet
#

Yeah instead you have workers

maiden thicket
#

declare this variable in a constructor

ivory sleet
#

And a fjp can create more threads than its specified parallelism

#

If needed

#

It’s quite optimal

noble lantern
#

I just needed something like NodeJS's style of doing things async with Promises, would be 10x nicer if i could do it without threads cause thats how NodeJS does it but meh java

#

kk ill look into that

ivory sleet
#

Yes well in the future we get what you call virtual threads

#

Then you can use Executors.newThreadPerTaskExecutor()

#

Since virtual are gonna be dead ass cheap

noble lantern
#

ohh

ivory sleet
#

But as of now, fork join pool is usually what I prefer

#

Cached one is good also but it gets out of control when it comes to throughout sometimes this can allow ddos to happen

#

At least the one with Executors.newCachedThreadPool()

#

It’s great if you’ve full control over the tasks

#

Cuz then ddos is likely not gonna happen regardless

noble lantern
#

and how about the Thread class itself, are those virtual threads when executing with a fork join pool?

And yeah i have a socket rate limited that wont even open a new thread if it detects someones sending requests to fast

#

I wanted to run each ConnectedClient in its own Thread so i can have an event based system

ivory sleet
#

No Thread as of now will always yield instances of platform threads

#

But FJP will in simple terms create a thread executor per thread, basically each thread has a queue of tasks

#

As opposed to fixed thread pool or cached one where there’s a single queue for tasks

noble lantern
#

I think FJP will be perfect for the requesting part definatly

#

gonna work on switching that over rn

ivory sleet
#

Ye

#

It’s usually most optimal anyway

#

But people used the other two mainly when work stealing wasn’t a thing in java yet

noble lantern
#

oh all these pools are one liners lmfao

#

thats nice

ivory sleet
#

Well unless you wanna configure one specifically

noble lantern
#

Dont think i rly have much needs for configuration too much

ivory sleet
#

Altho the methods you have there are quite optimal if you don’t care that much

#

Ye

#

I do have an example in case you’re very curious but I doubt you’ll actually need it, my code is usually a mess anyway

noble lantern
#

so sad .07ms execution time thats gonna take like .2 when put on a remote server z_aCRYYY

noble lantern
#

code for mines weird

#

i made a api jar so i can handle shiz easier haha

#

i stole spigots event system in a sense

#

Any message from the socket server, will attempt to verify the message schema against the second argument of the annotated method

And will only fire the event if valid json and schema was sent

ivory sleet
#

An

#

Nice

somber hull
#

Thank you

noble lantern
maiden thicket
ivory sleet
#

ill go take a shower so brb

formal bear
#

Is it possible to get index of element in list when i check it with list.contains(element)?

#

I want to get index when players enters it

ivory sleet
#

iirc nope

#

since an element can be contained multiple times

#

thus making the index ambiguous since the element can have more than one index

thick gust
#

what are these options good 4? i can assume that Log Prefix is the prefix in the console, but all the other things are unknown for me.

ivory sleet
#

load before, depend and soft depend are all about other plugins

#

and relative loading order

thick gust
#

so they are irrelevant tbh..

formal bear
# ivory sleet iirc nope

I want to make something like, just use switch or how?
/command arg1
say bruh
/command arg2
say lmao

ivory sleet
#

Well let’s say you depend on placeholder api

#

Then you probably want placeholder api to load before your plugin

#

Thus the order becomes highly relevant

dawn plover
#

how do i set/send text in someones action bar (with commandblocks its /title @s actionbar) but i cant find it anywhere, its not player.sendTitle

eternal oxide
#

player.spigot.sendMessage

ivory sleet
#

player.spigot().sendMessage(ChatMessageType.ACTION_BAR, message);

unreal maple
#

Hey, anyone know if there's a more efficient way of setting player permissions within an attachment
Currently I have a list of around 150 permissions, and running on the main thread to set them all is causing a large payload and causing the tick length to reach 100+ms

Any ideas?

formal bear
eternal oxide
#

redesign and get rid of some permissions

ivory sleet
#

Switch is fine if you don’t have a lot of responses

#

arg[0].toLowerCase(Locale.ROOT) tho

eternal oxide
#

also set them all at once so there is only one update and not individually

formal bear
unreal maple
ivory sleet
#

Yea

eternal oxide
#

use reflection on teh Map

formal bear
#

but it does not scale if player adds another element, i read them from config section hmm

dawn plover
ivory sleet
#

It is supported

#

Because the method gets overridden in the implementation

dawn plover
#

did i do something wrong then?

#

cus it does nothing

ivory sleet
#

UUID.fromString

#

Yes

#

You’re supposed to pass a component

#

UUID is just the sender

dawn plover
#

and how do i make one?

#

its an abstract class

ivory sleet
formal bear
#

Idk pseudo

rare flicker
#

I'm making the typical mermaid kinda plugin where you can't breathe on land, and this works all fine, you air goes down on the surface and up in water. What i can't figure out if how to get the drowning damage to trigger. Do i have to manually damage the player or am i missing something?

rare flicker
#

the manual damage or the me missing something

chrome beacon
#

Have you checked the nms implementation to see where it damages the player

rare flicker
thick gust
#

@ivory sleetBut did I assume that right?

ivory sleet
#

Yes

rare flicker
#

only procs if the eyes are underwater

#

so manual damage it is

thick gust
#

Is there a way to have a preset template for the main class of future plugins being created by the minecraft development plugin (spigot plugins) in IntelliJ?
I know that @tender shard got something similar so i wanted to get that done as well so i don't have to copy the foundation again and again

river oracle
rare flicker
formal bear
#

mby setLastDamageCause?

thick gust
rare flicker
#

doesnt work; when you damage them it fires an event with damageCause.CUSTOM, and the setLastDamage cause just edits the last stored event after the listeners did their thing

river oracle
#

indepth guide on how to create a maven archetype

rare flicker
#

and if i call the event before or after setting it, it simply fires two, the one with the correct damage cause being different from the actual damage event fired

#

welp, onto the things to add to the list of "need to use NMS for"

somber hull
rare flicker
#

lmaoo

#

i dont think so but i havent actually searched

flint coyote
rare flicker
#

for now i have

Custom PathFinding
NPC
Specific damage causes
formal bear
rare flicker
somber hull
#

You need nms for that

rare flicker
#

which is what i wanted to set the damage cause for

somber hull
#

?

rare flicker
flint coyote
#

ye in that case you won't be able to

#

only to use it inside your own plugin

#

but then there would be less hacky solutions anyway

rare flicker
#

eh, it's not that important anyways, just a bit awkward but not dire

#

guess i'll wait for the day it gets added

flint coyote
#

You could handle death messages urself. In that case you can deal with your own damage causes

#

but other plugins -> no chance

rare flicker
#

better than nothing i suppose

flint coyote
#

Technically you could take the default message unless it's custom damage and in that case set the correct one based on the damage type you set somewhere for that player

#

The mapping of all the messages might need some work tho. Probably easier to make your own

umbral bear
#

Hi, i'm working on a bungeecord plugin and i'm wondering how to execute a command as the bungeecord console

#

by googling it i found proxy#getPluginManager#dispatchCommand

#

but it doesnt work

lethal coral
#

What would the best way be to refresh a player's view of themselves? (Refreshing their skin)

#

I did some research and I heard the respawn packet, but that didn't give me any luck

somber hull
#

Rate this comment

#

//Fix this later

umbral bear
hardy crystal
carmine hatch
#

How do I change the types of trades a villager can spawn with? I'm not referring to modifying a specific villager's trades by targeting them and overwriting their trades one by one, rather I want to go to the very core of trading, and overwrite the vanilla list of trades that any given villager picks from when they spawn

opal juniper
carmine hatch
#

to put it more simply, I want to change the default currency for villagers from emeralds to gold nuggets 😄

dawn plover
#

when i am changing custom model data, i am doing that with setItem

#

but then the item will quickly be replaced, so you will see that animation of the arm going down and up again

#

is there an way to, well, not have that

somber hull
tranquil viper
#

Is there a way to mimic netherite attributes onto leather armor?

waxen plinth
#

Edit its attribute modifiers

tranquil viper
#

Yea but like what would I set them to & what are they called, where can I find that info?

waxen plinth
#

?jd-s