#help-development

1 messages · Page 2207 of 1

sacred mountain
#

prolly like

#

0.00000000000000000004

humble tulip
#

If only it was a float

prisma steeple
#

is this better?

glossy venture
#

yes

topaz hawk
#

Its Null (only funny for my German pals)

grim ice
#

Pico + K&R

#

nice

#

actually wrong reply

tardy delta
tender shard
tardy delta
#

early returns where

grim ice
#

i meant dis

subtle folio
subtle folio
#

is even moment

tender shard
subtle folio
#

ill make a PR right now

topaz hawk
#

I dont need fancy Math Libraries, i just send any equation to my webserver and any of my code waits for me to solve them in my head 🙃

grim ice
prisma steeple
grim ice
#

!isEven()

prisma steeple
#

why is it not sending me the name of wooden hoe?

topaz hawk
humble tulip
subtle folio
prisma steeple
harsh totem
#

I have this in RaidTriggerEvent plugin.getConfig().set(loc, amplifier);
and I have this in RaidFinishEvent PotionEffect effect = new PotionEffect(PotionEffectType.HERO_OF_THE_VILLAGE, 120000, plugin.getConfig().getInt(event.getRaid().getLocation().toString()));
for some reason when the raid is finished the amplifier is always 0. any ideas?

topaz hawk
sacred mountain
#

im going to use it in my plugins

subtle folio
#

do calculus with it

harsh totem
topaz hawk
harsh totem
#

in the trigger event

#

but in the finish event it's 0

#

and ideas?

sacred mountain
#

i quit county tennis over 5 years ago

#

first lesson in 14 mins

grim ice
sacred mountain
#

might have lost it i dunno

harsh totem
humble tulip
#

anyone know how to easily obfuscate my plugin?

#

im using maven

topaz hawk
tender shard
sacred mountain
topaz hawk
tender shard
sacred mountain
#

thats really efficient and stuff

prisma steeple
#

because the rest of it works

#

I go flying when i right click as i should

#

but it doesnt tell me the name

topaz hawk
#

Ahhhh the Display Name will only be set if you rename it i think

#

wait

grim ice
sacred mountain
#

md_17 should host a worst plugin competition

humble tulip
#

who is md_17

sacred mountain
#

md_5 on heroin

humble tulip
#

walmart md_5

grim ice
sacred mountain
#

proof?

subtle folio
#

md_5 * 3 + 2

sacred mountain
#

evidence?

grim ice
#

;)

#

dm

humble tulip
sacred mountain
#

factorisation

subtle folio
#

pr denied

sacred mountain
#

3md + 15 + 2

#

expand

humble tulip
#

3md + 17

subtle folio
#

md_20?

sacred mountain
#

yes

topaz hawk
sacred mountain
#

wodden

tender shard
#
public class ExtremelyFastAdder {

    private static final Map<Map.Entry<Integer,Integer>,Integer> CACHE = new HashMap<>();

    static {
        long start = System.nanoTime();
        for (int i = 0; i < 2000; i++) {
            for (int j = 0; j < 20000; j++) {
                int result = i + j;
                CACHE.put(new AbstractMap.SimpleEntry<>(i,j),result);
            }
        }
        System.out.println("Building the extremely fast number adding cache took only " + TimeUnit.HOURS.convert(System.nanoTime() - start,TimeUnit.NANOSECONDS) + " hours.");
    }

    public static int addExtremelyFast(int num1, int num2) {
        return CACHE.computeIfAbsent(new AbstractMap.SimpleEntry<>(num1, num2),__ -> num1 + num2);
    }

    public static void main(String[] args) {
        System.out.println("3 + 50 = " + addExtremelyFast(3,50));
        System.out.println("10382 + 1 = " + addExtremelyFast(10382, 1));
    }
    
}
topaz hawk
#

I always use Diamond Hoes

subtle folio
#

map in a map

humble tulip
harsh totem
humble tulip
subtle folio
tender shard
tardy delta
humble tulip
#

@tender shard hashcode of AbstractMap.SimpleEntry

#

LOL

brittle lily
#

I'm setting Game States. how can i remove properties of another state while in another state

humble tulip
#

setGameState has to be a method that does all of it

brittle lily
#

I did but Its same When I change GameState Properties keeps being

humble tulip
#

if u wanna set state to lobby, make sure you stop the game and clean up everything and then set state to lobby

brittle lily
#

Btw Is there a shortcode to Remove Multiple Blocks. I'm setting block's coordinate and removing. And Its being really long code

tender shard
humble tulip
#

ohh i thought it was power

#

it's a bit operator

#

my bad

tender shard
#

lol check the javadocs for HashMap#hash

#

a biiit complicated

brittle lily
#

?paste

tender shard
#

bot is dead

iron glade
#

crossing the 1000kb barrier for the first time

#

lol

prisma steeple
#

can someone explain to me what the void means when creating a method

tender shard
#

no return value

iron glade
#

returns nothing

prisma steeple
#

oh

#

thanks

brittle lily
prisma steeple
#

So I wouldn't want to get information from lets say a player and send it to the mainclass and have the method be a void?

iron glade
#

what

prisma steeple
#

i will rephrase

iron glade
#

yes please

prisma steeple
#

If i wanted to get information from a method, I would not write void

#

as it returns no information

tardy delta
#

yes

iron glade
#

correct

tender shard
#

it's possible to create a Void object in java 8

#

in java 17 it's not possible anymore :<

#
    static Void returnNothing() {
        try {
            Constructor<Void> constructor = Void.class.getDeclaredConstructor();
            constructor.setAccessible(true);
            return constructor.newInstance();
        } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
            e.printStackTrace();
        }
        return null;
    }

so useful

slate mortar
opal juniper
#

i just like the way python does it. So like you have a function that doesn’t return anything, so you can just
return func()

tender shard
slate mortar
#

ugh

grim ice
opal juniper
#

so in java terms i wish a void method could do:

return otherVoidFunc()

tardy delta
#

lets go

tender shard
#

how would that be useful

slate mortar
#

it wouldnt really change anything

humble tulip
#

for one liners

grim ice
#

wont that

opal juniper
# tender shard why?

so if you did a null check or something you could call a procedure and return in one line

grim ice
#

actually nvm

humble tulip
#

like instead of

if (a) {
    invokeSomeVoidMethod();
    return;
}

u do

if (a) {
    return invokeSomeVoidMethod();
}
opal juniper
tardy delta
tender shard
#

well it's not exactly any shorter than

someFunction();return;
opal juniper
#

but seen as python has literally no type enforcing that makes sense

tardy delta
#

return oneFunction() 😍

humble tulip
opal juniper
#

oh i remember this

tender shard
tender shard
humble tulip
tardy delta
midnight shore
#

how did you do that

slate mortar
#

if you ask me, it's too light lol

tardy delta
#

build override

#

lol

slate mortar
#

nothing can be too dark

#

dark is king

tardy delta
humble tulip
#

wtf my discord theme changed

tardy delta
slate mortar
tardy delta
#

owh noo

final monolith
slate mortar
#

i mean

#

i woke up today

#

like 15 minutes ago

#

and already feel dead again

tardy delta
#

NOOO

slate mortar
#

maybe that guy was right

#

am i actually still alive?

tender shard
slate mortar
#

my coffee machine broke

tardy delta
#

why do we exist

slate mortar
#

and i'm broke as well

humble tulip
tender shard
slate mortar
#

tf

#

that sounds cool, but useless ngl

tender shard
#

oh wait

#

not battery

slate mortar
#

lol

#

you won that or what

tender shard
#

they sent it to the top 10 forums persons last year or the year before that

#

don't remember

slate mortar
#

i want that too :(

tender shard
#

I have never used it lol

slate mortar
#

imagine... you stole it from me, and then you don't even use it

humble tulip
tender shard
#

I stole it?! I bet you're not even registered on the netcup forum lol

tender shard
# humble tulip

make it also read an icon.png from the resources and use that instead of the warning symbol

midnight shore
#

i'm liking this weird theme @tardy delta

tender shard
#

I think one can just turn a BufferedImage into an Icon

#

and get the BufferedImage from ImageIO

final monolith
midnight shore
#

oh you mean multiple

#

then i don't know

prisma steeple
river oracle
slate mortar
#

what the actual fuck

#

this gives me a headache

#

please just disallow german as a language worldwide

prisma steeple
#

am trapped

river oracle
iron glade
slate mortar
#

at least for me

prisma steeple
#

yep done

slate mortar
#

clear build override

prisma steeple
#

i just pressed on it again

slate mortar
#

that works as well lol

prisma steeple
iron glade
#

idk, but currently I'm at 82 classes

#

actually, is there a way in intellij to count your whole project's lines?

tardy delta
river oracle
#

hmmm I wanna figure this shit out

#

looks super cool can probably layer teh back without as much hastle as making new css files for the entirety of the platform

tardy delta
severe bay
#

hi guys

#

so I am not a Java developer

#

butI found myself in the code of a plugin trying to fix something

#

I dont have any idea how to compile

#

and there is no guide on the github

severe bay
#

can somone help me?

tender shard
slate mortar
severe bay
sacred mountain
#

oh no i found my vb.net code from 3 years ago

tender shard
#

open it in INtelliJ -> right side "maven" -> "lifecycle" -> double click on "package"

slate mortar
#

for both maven and gradle. thats what i personally use

tender shard
#

maven

eternal oxide
#

Far right side. The M tab

severe bay
#

oh ok thanks guys so much

#

what to do?

tender shard
#

click on configure

#

then choose a jdk

#

probably you need either java 8+ or java 17+

slate mortar
#

oh build just uess the clean package nvm

severe bay
#

yes 17

#

indexing JDK 17

tender shard
#

when it's done, run package again

severe bay
#

ok I did

#

ehhh

tender shard
#

ask @rough drift to fix his repositories in pom.xml

#

or download "smp-core" too, and do the same thing except that you double click "install" instead of "package"

humble tulip
#

@tender shard

tardy delta
#

smh

tender shard
#

wait why did you replace the "How to install spigot" link?

tardy delta
#

😂

tender shard
#

that was leading to a spigot wiki article

humble tulip
#

OHH

#

i thought it lead to the spigot page for the plugin

#

i'm dumb

#

it's easy to change

#

i'll leave that hardcoded then

severe bay
dusk flicker
#

smh

sacred mountain
#

i left my youtube running. for like 5 hours in the background on my laptop

#

wtf am i watchig

tender shard
sacred mountain
#

when u load intellij

#

idk

slate mortar
tender shard
sacred mountain
slate mortar
#

stuff that i'd never watch

sacred mountain
#

i think theres a button

#

to sync it to a new project

tender shard
sacred mountain
#

lmaooo

slate mortar
tender shard
#

it's more like 10 or so

sacred mountain
#

ram gone

#

lmao

tender shard
#

well my intelliJ doesn't waste tons of RAM because I have this stupid minecraft dev plugin disabled lol

slate mortar
sacred mountain
#

i love it when intellij uses half my pc's resources trying to index my files

#

very efficietnt

slate mortar
#

i remember using eclipse
which loaded like all of my projects

sacred mountain
#

or chair for that matter

tender shard
slate mortar
tardy delta
#

I just have a big screen

slate mortar
#

which is fucking broken

sacred mountain
#

even if its got no legs

tardy delta
#

macos background smh

eternal oxide
#

I love my Eclipse Workspace 😦

slate mortar
#

never

tender shard
slate mortar
#

my chair hurts af

sacred mountain
slate mortar
#

same as my headset, hurts after like 3hours in

sacred mountain
#

i have ear covering headsets

severe bay
iron glade
#

imagine using headsets

severe bay
#

which choice?

sacred mountain
#

theyre originally studio headphones

#

high quality

tardy delta
#

poor chair

#

-<

sacred mountain
iron glade
#

and not some razer headset xd

slate mortar
#

i'd never use studio headphones, because i use them for gaming as well, and those would probably be a bit weird

sacred mountain
#

my friend got me a pink headset with ears in 202

#

2020*

slate mortar
#

razer makes bad headsets ngl

severe bay
sacred mountain
slate mortar
iron glade
#

studio headphones are also fire for gaming

#

ngl

sacred mountain
#

if you want github

#

then click

#

use github respotiy

slate mortar
#

but apparnetly not all of them

sacred mountain
#

repository

#

if you want a local one

#

click local repository?

iron glade
sacred mountain
severe bay
slate mortar
#

and i personally dont want to pay more than 100€ on a headset, as i don't play that much competitive stuff except cod

sacred mountain
slate mortar
#

would be kinda useless to me

sacred mountain
severe bay
iron glade
sacred mountain
slate mortar
#

i got a keyboard for 160€ and a mouse for 140€ lol

severe bay
slate mortar
#

monitors for 100€ for my two side ones, and 200€ for my main one

#

and headset was like 80-90€

iron glade
#

I got me a pair of 1k€ studio monitors.. who needs headphones now xd

slate mortar
#

lmfao

#

but hey, my mouse is wireless at least

#

now i only roll with my chair over my headset cable lmfao

iron glade
slate mortar
#

god those reactions make me feel weird ngl

tardy delta
#

who is emoji spamming

slate mortar
#

idk

sacred mountain
#

im just like

iron glade
#

hover over it and U'll see it

slate mortar
#

everyone apparnetly

tardy delta
#

@humble tulip you will be banned

sacred mountain
#

reacting with whatever

tardy delta
#

@sacred mountain you too

sacred mountain
#

i have

humble tulip
#

wait that's against the rules?

sacred mountain
#

whats wrong bruh

slate mortar
#

lmfao

#

get rekt

iron glade
#

¯_(ツ)_/¯

humble tulip
#

sigh

sacred mountain
#

bro what

#

we reacted to a message

#

with random emojis

humble tulip
#

there we go it's gone

sacred mountain
#

and thats against the rules

#

skull emoji times seven

severe bay
sacred mountain
#

bruh

humble tulip
#

idt it's against the rules?

sacred mountain
#

no

tender shard
#

you all can't believe how much time I wasted digging through the DefaultREpositorySystem class to find out why the repository is always null. fuck the DefaultServiceLocator!

sacred mountain
#

way

dark arrow
#

wait you were that person on the server that helped me day before yesterday?

sacred mountain
#

i cant remember what i had for breakfast

tender shard
dark arrow
tender shard
#

idk what did I help you with?

dark arrow
#

on how to setup mojang mappings

#

jeff media

tender shard
#

yes that's my server but I can't remember

dark arrow
#

but i do

#

thanks 🙂

tender shard
#

np 🙂

sacred mountain
#

:)

#

bruh

#

🙂

severe bay
sacred mountain
#

one sec

tender shard
#

there are two fields

#

one is called URL

sacred mountain
#

lmao

tender shard
#

and the other is called Directory

severe bay
sacred mountain
#

what?

#

create a project

#

not a repository

sacred mountain
#

why r u creating a repo

severe bay
#

where? :/

tender shard
#

not there

#

no idea what you're doing there

severe bay
tender shard
#

try to do something else. for example what I said

sacred mountain
#

dude

severe bay
#

here is version control

sacred mountain
#

create a project

tender shard
#

which is File -> new Project from CVS

severe bay
#

oh I see it now heh sry

sacred mountain
#

jdnijkghdnghidfgfmtp

tender shard
#

your theme is wasting so much space

#

❤️

sacred mountain
#

o?

#

my screen is massive tho

#

dont really need the sidebar that compact

#

is there a plugin for it tho?

severe bay
tender shard
sacred mountain
#

i just think its hard to see where stuff is

#

if its that compact

tender shard
sacred mountain
#

ooo

#

okay

#

i think i've never touched the settings lmao

#

looking better ?

tender shard
#

yes I love it

severe bay
#

is that ok now?

tender shard
#

yes

sacred mountain
#

should be fine

#

i get that all the time

#

i cant be bothered to manually exclude

tender shard
#

well actually one should of course avoid that

#

but if those files are the same, it doesn' tmatter

sacred mountain
#

yeah but i cba

severe bay
#

ok thanks

sacred mountain
#

don't you love it when a developer provides you with an api thats obfuscated

tender shard
#

I can never remember how I can go to the location of the file

#

like when I have class X open

#

I want to click on X and click "go to package" or sth

fossil lily
#

What are the slot numbers for armor in 1.8?

tender shard
#

that is long forgotten knowledge i guess

severe bay
#

the first one right? 😅

tender shard
#

yes

severe bay
#

ok

sacred mountain
#

the original is for what?

#

proof of ownership

tender shard
#

unshaded

sacred mountain
#

oh right

tender shard
#

btw this is probably the BEST setting in intelliJ ever

humble tulip
#

😮

sacred mountain
#

it satisfies me to remove all the imports from a large class

#

and then just import them one by one

#

and watch all the highlights go nfghbdfgjhbsdjbsr

tender shard
sacred mountain
#

and if they just appear, then its no fun

tender shard
#

like how annoying is it to always click on "import map" and then "import hashmap"

#

of course with HashMap I mean java.util.HashMap

sacred mountain
#

isnt it just

#

alt enter

#

or alt shift enter

#

import whole line

tender shard
sacred mountain
#

true

humble tulip
tender shard
#

I only found out about this 5 minutes ago

tender shard
humble tulip
#

i didnt change that

tender shard
#

oh then you have those in the yaml

#

i just split the yaml by :

humble tulip
sacred mountain
#

THAT WOKRS

#

WTF

#

???

tender shard
#

only if you enable filtering

humble tulip
#

if you set resource filtering yes

sacred mountain
#

how

tender shard
sacred mountain
#

huh

tender shard
#
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
quaint mantle
#

my Bungeecord server is stuck at Starting

sacred mountain
#

so where is it defined

vocal pine
#

Did you ever figure this one out? I notice you did some stuff with CustomEntities after this so hopefully you did

humble tulip
#
<resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
sacred mountain
#

if not in the

#

plugin yml

tender shard
quaint mantle
#

come there

sacred mountain
quaint mantle
#

waiting for 1h

#

no reply

sacred mountain
#

if you have plugins, take them all out and see if it starts

#

and then add them back

sacred mountain
#

5 at a time or something

quaint mantle
#

i reinstalled

sacred mountain
#

do you have a server host

#

or are you self hostnig

quaint mantle
#

yes

quaint mantle
#

server host

sacred mountain
#

did you check their uptime and daemon?

quaint mantle
#

their other servers working

#

i hosted other servers

sacred mountain
#

and you've ocmpletely reset and it doesnt run?

vocal pine
# left swift yes, I have it

awesome r u able to show me how u resolved that? i'm trying to just test a quick thing with a custom "monster" but can't get past this with anything

sacred mountain
#

they arent on the same machine you know

quaint mantle
tender shard
quaint mantle
#

like

humble tulip
#

LOL

quaint mantle
#

its stuck on Starting

sacred mountain
tender shard
#

pls don't spam this channel with your "my bungee is stuck" questions

#

use the proper channel

humble tulip
#

he said it's the wrong channel

quaint mantle
sacred mountain
quaint mantle
#

so people can notice

humble tulip
sacred mountain
#

thats probably the fastest way you'll get direct support because we don't have access to your panel

rough drift
#

smp core is not on maven yet

#

so the plugin just uses the local repo

dark arrow
#

i right clicked a class and ran it now i am unable to run the main class

tender shard
dark arrow
#

nvm i relaunched it and it got fixed

#

but thanks

sacred mountain
#

nice one

dark arrow
#

?

tender shard
sacred mountain
#

thats usually me tbh i ask a question and fix it 15 seconds later

dark arrow
#

yah but that was a dumb qustion

onyx lynx
#

is there a easier way to put items in your offhand in bedrock while using geyser?

#

Maybe just a button? or something to not type a command everytime

dark arrow
#

wait we can put items in offhand ?

#

in bedrock

onyx lynx
#

yeah with the command /geyser offhand. But i feel there must be an easier way

glossy venture
#

last time i tried it errored with some pattern error or smth

#

maybe because i had $ symbols in the code for big text

#

but i feel like that shouldnt error

#

just check if theres a { after it

chrome beacon
#

Yes

tender shard
#

I wonder if this is an extremely good or an extremely bad idea

tardy delta
#

completablefutures 😍

tender shard
sacred mountain
ornate patio
#
commands:
  summonhorse:
    description: "Spawns a custom horse"
    usage: "§cUsage: /<command>" 
    permission: "superiorsteed.admin.summonhorse"
  horsestats:
    description: "Displays the stats of the horse you are currently riding or looking at."
    usage: "§cUsage: /<command>"
    permission: "superiorsteed.horsestats"
  # temporary debug commands
  horsecache:
    description: "DEBUG. Displays the cache of all horses in the server."
    usage: "§cUsage: /<command>"

permissions:
  superiorsteed.admin:
    description: "Allows the user to use the plugin's admin commands."
    default: op
  superiorsteed.admin.summonhorse:
    description: "Allows the user to summon in a custom horse."
    default: op
  superiorsteed.horsestats:
    description: "Allows the user to see the stats of the horse they are looking at."
    default: true

How do I make it so that if a player has superiorsteed.admin permissions enabled, they also have all sub-permissions such as superiorsteed.admin.summonhorse enabled?

tender shard
#

or was it the other way around?

ornate patio
#

lemme try that

sacred mountain
#

other way round

ornate patio
#

wdym

tender shard
#

and one had to use children: ?

sacred mountain
#

i think its children

#

yeah

tender shard
#

I think both works

#

lol

#

it's children

ornate patio
#
  superiorsteed.admin:
    description: "Allows the user to use the plugin's admin commands."
    default: op
    children:
      superiorsteed.admin.summonhorse: true
```?
tender shard
#

no

dapper harness
#

Is there a way of resetting the hasBeenPreviouslyKilled method of a world for the ender dragon ?

tender shard
#

erm

#

I meant yes

sacred mountain
#
permissions:
  superiorsteed.admini:
    description: "blah"
    default: op
     children:
       permission.here: true```
eternal oxide
#

If you are a beginner or a single dev use Maven to start

sacred mountain
#

thats correct lol

ornate patio
sacred mountain
#

literally just put your child permissions there

ornate patio
#
  superiorsteed.admin:
    description: "Allows the user to use the plugin's admin commands."
    default: op
    children:
      superiorsteed.summonhorse: true

so like this?

sacred mountain
#

it's not an actual permission

ornate patio
#

or

sacred mountain
#

yep

ornate patio
#

thats weird

tardy delta
#

has some useful methods like #thenRun, #whenComplete

sacred mountain
# ornate patio ```yml commands: summonhorse: description: "Spawns a custom horse" usa...
commands:
  summonhorse:
    description: "Spawns a custom horse"
    usage: "§cUsage: /<command>" 
    permission: "superiorsteed.admin.summonhorse"
  horsestats:
    description: "Displays the stats of the horse you are currently riding or looking at."
    usage: "§cUsage: /<command>"
    permission: "superiorsteed.horsestats"
  horsecache:
    description: "DEBUG. Displays the cache of all horses in the server."
    usage: "§cUsage: /<command>"

permissions:
  superiorsteed.admin:
    description: "Allows the user to use the plugin's admin commands."
    default: op
    children:
      superiorsteed.admin.summonhorse: true
  superiorsteed.admin.summonhorse:
    description: "Allows the user to summon in a custom horse."
    default: op
  superiorsteed.horsestats:
    description: "Allows the user to see the stats of the horse they are looking at."
    default: true
quaint mantle
#

i keep gettin a duplicate recipe error, when i call the method, its always re-registering the recipe, is that the issue?

glossy venture
#

yeah

sacred mountain
glossy venture
#

lol you cant register a recipe twice

sacred mountain
#

what are the use cases

ornate patio
#

but also

#

i just tried this, doesn't work

sacred mountain
#

interesting

ornate patio
#

my alt can only use the summonhorse command only if it has the superiorsteed.admin.summonhorse permission

tardy delta
#

yes that would be java CompletableFuture<User> loadUser(UUID id) { return CompletableFuture.supplyAsync(() -> database.loadUserSync(id)); }

ornate patio
#

if it has superiorsteed.admin only then it wont work

tardy delta
#

@sacred mountain

tender shard
#

does anyone know a better way to check if a class was properly relocated? Besides using char[] arrays?

sacred mountain
tardy delta
#

then you can for example do loadUser(id).thenRun(() -> logger.info("loading user succeeded"));

sacred mountain
#

thats pretty neat

tardy delta
#

i wish java handles exceptions the way rust handles them

sacred mountain
#

i thought rust was a video game

#

am i stupid or something

humble tulip
#

it is

sacred mountain
#

o

humble tulip
#

also a lang tho

tardy delta
#

by returning a Result<T, E> where T is the type you expect and E is a type that it returns when an exception occurred

sacred mountain
#

from the spigot website

ornate patio
#

yeah i saw that

sacred mountain
#

alright then im really not sure

#

something to do with your permission plugin maybe

#

because that yaml is valid

#

and correct

ornate patio
#

i mean im using luckperms

tardy delta
#

java: void something() throw IOException
rust: fn something() -> Result<(), io::Error>

sacred mountain
#

you sure you spelled it correctly?

tardy delta
#

😍

sacred mountain
ornate patio
#

uh wdym

sacred mountain
#

storage type

ornate patio
#

well no im not using mysql

#

its a testing server

sacred mountain
#

you can open the lp editor and see if the player has the other permission set to false,

#

im not sure but luckperms may ignore the plugin.yml children

#

and only give the player that specific permission

ornate patio
#

oh wait

#

i think i found the issue

sacred mountain
#

also at the end are you sure

``` is correct
#

i forgot how the default thing works

ornate patio
#

yeah

#

the problem was that superiorsteed.admin.summonhorse was disabled, not unset

#

even though superiorsteed.admin was enabled

sacred mountain
#

ah alright

#

so it was set to false in luckperms?

ornate patio
#

yeah

sacred mountain
#

aight 👍

ornate patio
#

also how would i define a permission that allows a user to have access to every permission

sacred mountain
#

giving them the '*'

#

permission in luckperms should automatically give the user every possible permission

#

basically a full operator

ornate patio
#

no like

sacred mountain
#

if you're talking about within your own plugin you can make a permission named superiorsteed.* and give it every permission in the children section

ornate patio
#

in my plugin.yml

solid sigil
#

OK so last night I wrote a plugin & got all the functionality down. I'm trying to clean up the code a little. I'd like to move a PlayerEventListener to a different class. The problems is within that listener, I use Bukkit.getScheduler.scheduleSyncRepeatingTask(). Which needs a plugin as a parameter, is there a way to access the instance of my plugin class being used?

ornate patio
#

alright got it

#

thanks

sacred mountain
#

im not sure how luckperms manages wildcards but you may be able to do superiorsteed.* without defining it in the plugin yml

ornate patio
#

nah it doesnt work

sacred mountain
#

because in regex .* is just everything after

#

alr ok

humble tulip
#

you know what aconstructor is?

sacred mountain
#

oh

#

i misread

#

the question

solid sigil
humble tulip
#

legit question

solid sigil
#

I'm actually gonna try a getter w pluginmanager

sacred mountain
#
public class MyListener implements Listener {
  private final YourPlugin plugin;
  
  public MyListener(YourPlugin plugin) {
    this.plugin = plugin;
  }

  @EventHandler
  public void onSomething(Event e) {
    plugin.whatever();
  }
}


humble tulip
#

nah

solid sigil
#

constructor creates a diff instance tho

humble tulip
#

just pass your plugin instance like that ^^

solid sigil
#

oh

humble tulip
#

when you're registering the listener, you pass your plugin instance in the constructor

solid sigil
#

ohhhh

#

big brain

sacred mountain
#

on a similar note, what's the problem with using a static plugin instance getter when there is only one instance of the plugin anyway:?

iron glade
#

wasn't this talked about like 10 times the last few days

river oracle
#

general practice

sacred mountain
#

ive been away for like 2 weeks

#

well

quaint mantle
#

how can i remove a recipe ive already registered? I have a recipe with the namespaced key holysword but when i update the recipe with that same namespaced key, the recipe doesnt get updated in game so i had to make a new namespaced key to register the updates. the issue is the old recipe is still registered

sacred mountain
delicate lynx
#

dependency injection is an industry standard

tardy delta
sacred mountain
#

well

quaint mantle
#

but since your plugin is a singleton no matter what

sacred mountain
quaint mantle
#

well

eternal oxide
#

@quaint mantle Can you let someone know @undone axle is mute

humble tulip
#

learn the check the javadocs or google ur question first pls

quaint mantle
#

we have to wait for md5 to fix it

eternal oxide
#

k

sacred mountain
humble tulip
#

who doesnt

tardy delta
#

just realized that discord helpers are basically mods

sacred mountain
#

lol i come here for help when the stackoverflow code doesnt work

sacred mountain
#

and theyre the highest discord related role

sacred mountain
#

sometimes i realise that i'm just stupid, and other times i realise that i need to learn more java

#

its one of the two

sterile token
#

Light happens the same to me

sacred mountain
#

or i've made a typo in my config.yml

#

and spent the past 3 hours trying to figure it out

sterile token
#

Lmao i writed me too one time but it get writted 3 times

sacred mountain
#

writted

sterile token
#

Sabes que soy español... LMAO you know

#

Im not native english speaker

winged anvil
#

hablando espanol

quaint mantle
#

^ es un gringo jaja

#

when i make a custom recipe, should i use NamespacedKey.minecraft or NamespacedKey()?

humble tulip
quaint mantle
#

ive been using .mc for some but im not sure which is ideal

humble tulip
#

that's how it translates in my head after 5 years of spanish in school

ivory sleet
sacred mountain
#

heheheha

quaint mantle
#

so NamespacedKey() i guess

#

new NamespacedKey(myPlugin, "some-recipe");

winged anvil
#

damn you took 5 years

tardy delta
#

NamespacedKey.minecraft("stone") would be minecraft:stone

winged anvil
#

i took 4 and wanted to die

shy forge
#

Can someone help me with the BuyCraft API? The issue is that when I use it with Gradle, I get a version of the plugin that doesn’t have all the files needed. I got the gradle repository from (https://jitpack.io/p/BuycraftPlugin/BuycraftX) but following it doesn’t include the BuyCraftAPI object as well as others

#

Also, took spanish for 7 years xD

quaint mantle
#

and is there a way to check if a recipe has already been registered by that namespaced key?

ornate patio
#

whats the character limit

#

for messages

tardy delta
#

only one way to test

shy forge
#

255 I think?

winged anvil
#

200 something

solid sigil
sacred mountain
#

you ported?

#

wdym

solid sigil
#

copy/pasted i mean

tardy delta
#
try {
  int i = 0;
  while (true) {
  player.sendMessage("s".repeat(i++));
  }
} catch (Exception e) {
  // max is i
}```lmao
solid sigil
#

i moved listeners from one class to another

sacred mountain
tardy delta
#

google time lol

solid sigil
#

I copied a listener method called onCommand() from my main plugin class to a custom enchantment class

sacred mountain
#

you have to set the executor in the main class

#

erm

#

can you provide some code

#

in a paste

solid sigil
#

sure gimme a sec

winged anvil
#

does anyone have good experience with dedicated hosts?

#

im tryna figure out where to buy mine from

sacred mountain
#

best bet is something like

quaint mantle
#

is there a way to check if a recipe has already been registered by that namespaced key?

sacred mountain
#

365hosts or humble host

#

those are quite good from experience

quaint mantle
#

yeah i wanna avoid doing that in specific lmfao

sacred mountain
#

its more worth it buying a non-rip-off plan from a company like amazon or google

winged anvil
#

ive looked at hosts like pebblehost and reliablesite

sacred mountain
#

they will have processors capable of running minecraft

winged anvil
#

see that so

sacred mountain
#

azure vps

#

i think theres like a free plan or something

quaint mantle
#

gcp has a free 3 months, you could host on them and switch every 3 months if you dont have a good budget

solid sigil
quaint mantle
#

and the same card can be used multiple times

sacred mountain
#

you can setup minecraft on a linux machine, just simply install java and download what you need

winged anvil
#

i saw this reddit post about processors and saying that I should get a processor with 4 cores

sacred mountain
#

minecraft isnt multithreaded

#

??

#

at least i thought it wasnt

#

you put

solid sigil
#

i think it's possible to do async things, but as i'm learning, it doesnt work very well

sacred mountain
#

an eventhanlder

#

on your command

#

and why is there a command in the same class as your listener

winged anvil
sacred mountain
#

onCommand needs the annotation @Override not @fresh templetHandler

#

sorry to the person i pinged

winged anvil
#

lmfao

solid sigil
#

ok mb i've been copy/pasting

winged anvil
#

thats happened so much

solid sigil
#

but when its had the wrong @ label it still worked in my other class

sacred mountain
#

you have an enchantment, listener, and command hanlder all in the same class

solid sigil
#

b/c theyre all related

sacred mountain
#

i dont think thats good practise

solid sigil
#

@override gives an error

sacred mountain
#

because you havent implemented commandexecturo

#

as well

solid sigil
#

ok I can break it into classes

sacred mountain
#

please dont put all of that in one class

#

yes

brave sparrow
#

Separation of concerns

#

Lol

sacred mountain
#

public class CreepersBane extends Enchantment implements Listener, CommandExecutor

#

if you really want to keep it together

#

but i wouldnt advise it

brave sparrow
#

Presumably because you haven’t included the resource containing it

sacred mountain
#

i dont even know if that works

brave sparrow
#

The api doesn’t contain implementation

#

CraftPlayer and NMS are implementation

#

You’ll have to use buildtools to get it into your local maven repo

sacred mountain
#

search

#

spigot buildtools

#

theres a thread on the spigot site on how to do it

brave sparrow
#

?bt

chrome beacon
sacred mountain
#

i thought olivo was the bot for a sec

sterile token
#

?status

dusk flicker
sterile token
#

Hmnn i think the bot is down

dusk flicker
#

Rip the bot

#

Bots been down for a while

dark arrow
#

How to get a list of goals of a mob in nms the method i used is terrible

tardy delta
#

bot is dead

#

i killed it

sacred mountain
#

what

#

what does pressing ctrl twice do

tardy delta
#

follow the guide

#

dont use ij

sacred mountain
#

its not through intellij

dusk flicker
#

Tf

ornate patio
#

when displaying command parameters what is the convention for a parameter with two words

#

/updatehorse stat <stat name> <value> or
/updatehorse stat <statName> <value>?

lament swallow
#

Hello, i'm trying to use

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>v5.0.0-alpha.12</version>
</dependency>

JDA as a dependency in my plugin but maven can't find it because it looks on the wrong repository (it looks for it in the spigot repo)

ornate patio
#

alright thanks

humble tulip
brave sparrow
#

That shouldn’t matter

lament swallow
#

ok i'll try

humble tulip
#

it happened once to me

brave sparrow
#

Is it in your repos right now?

humble tulip
#

but i see ur issue

dusk flicker
#

Remove the v

#

In version

humble tulip
#

your'e using the wrong groupID

#

the v is supp to be there

#

one sec

dusk flicker
#

It isn't

#

It's not there in JDAs provided maven thing

humble tulip
#
    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>com.github.DV8FromTheWorld</groupId>
            <artifactId>JDA</artifactId>
            <version>v4.4.0</version>
            <exclusions>
                <exclusion>
                    <groupId>club.minnced</groupId>
                    <artifactId>opus-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
  </dependencies>
#

this works for me

dusk flicker
#

You're also running an older ver

brave sparrow
#

It’s not supposed to include the v by standard so they may have fixed their versioning scheme

dusk flicker
#

From their git ^

sterile token
#

Where i can find a free redis host?

dusk flicker
#

It's also on maven central so you don't need jitpack

humble tulip
#

i tried to use that and it didnt work

#

ohh cuz the one on maven doesnt use v

#

that makes sense

humble tulip
lament swallow
#

yep

brave sparrow
dusk flicker
#

^

humble tulip
sterile token
brave sparrow
#

Host it locally

#

If it’s just for testing

humble tulip
sterile token
#

I dont wanna host it just for testing

dusk flicker
#

Why

humble tulip
#

get a vps and host it there ig

dusk flicker
#

Who cares it's like running a local spigot server

brave sparrow
#

Takes 10 seconds to spin a Redis instance up on a docker container

#

You’d be done by now

dark arrow
humble tulip
dark arrow
humble tulip
#

just create a custom entity in that case

#

extend the entity that u wanna modify

#

and you have free control over eveerything

dark arrow
#

public class NewMob extends Zombie like this?

tender shard
#

am I stupid or should this work fine?

    @Override
    public int compareTo(final @NotNull McVersion other) {
        if(this.major > other.major) return 3;
        if(other.major > this.major) return -3;
        if(this.minor > other.minor) return 2;
        if(other.minor > this.minor) return -2;
        return Integer.compare(this.patch, other.patch);
    }
sterile token
humble tulip
#

yes like that

upper vale
#

might come with GitHub student pack

dusk flicker
#

Bot is down VERANO

sterile token
sterile token
dark arrow
#

yah but still has the old ai of hitting players and i want to rebbot it and for that i need to get the list of his goals and clear it which i am unable to do it

dusk flicker
#

You said it was down like 5m ago lol

sterile token
dark arrow
#

i created a small method for it but it ruined my plugin lol

humble tulip
#

like that

#

dont call the super method

sterile token
#

Im not verano

#

Im his friend

dark arrow
sterile token
#

He went to toilet and im sending random messages with his pc

humble tulip
#

you're asking basic questions but digging into nms

dark arrow
#

the file is read only

humble tulip
#

you dont have to access zombie.class

#

just extend the class

#

override method from zombie.class that u wanna change and u can write your own method

solid sigil
chrome beacon
#

You want to be using maven

#

Then never add anything as jars directly

humble tulip
#

Are you trying to use nms?

chrome beacon
#

Did you build 1.12.2 with BuildTools?

#

Guess the install jar failed

#

You run the install command while being in the folder

chrome beacon
#

Normally BuildTools should do that for you but I guess it didn't for some reason

#

First one

#

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

#

org.spigotmc

#

artifact is spigot and version is 1.12.2-R0.1-SNAPSHOT

#

jar

#

Should work

#

spigot jar

eternal oxide
#

"string here "

dark arrow
#

whenever i override a method from nms in subclass it gives error and in the error it says no documentation found

wary harness
#

Anyone has clue how Kelp age works

#

what I noticed it just throws random age number from 0 to 21

compact cape
#

Can I get an entity before it gets unloaded in a chunk (Walking into it)

dark arrow
#

thats why you may find kelp of different ages

wary harness
dark arrow
wary harness
#

like I am looking for a way to detect

#

if kelp is placed by player

#

or naturally grown

dark arrow
#

there is a blockplace event you can get the block placer and what block he placed

hexed rover
#

is there a way for me to see when a specific thing got removed/added from/to the api? i.e. can i see in what version the TabCompleteEvent was added?

chrome beacon
#

Why are you installing 1.8.8 jar in to version 1.12.2

tender shard
#

string aren't you the person who also tried to install CrackShot as your GTA plugin?

#

hm

chrome beacon
#

Try surrounding the path with ""

#

Or move the jar somewhere else

tender shard
#

someone did mvn install:install-File ... input=CrackShot.jar output=TheirOwnPluginName

#

must have been someone else then

coral helm
#

External libraries

iron glade
#

How is player.displayName() used? (replaces .getDisplayName())

#

returns component, i actually only want to get the display name

chrome beacon
#

What are you going to use the display name for

iron glade
#

put it in the name of a bossbar

chrome beacon
#

also that's Paper API so keep that in mind

chrome beacon
#

You should be using Components for the Bossbar too

#

So simply append the display name component on to the bossbar one

#

Did you get the install file to work?

#

Did it say success

#

Are you using Intellij?

#

In the maven tab on the right hit the reload icon

tender shard
#

did you run buildtools for 1.12.2?

#

did you click the maven reload button?

chrome beacon
#

Have you configured Intellij to use another .m2 location

#

It's the maven local repository

tender shard
#

try File -> Invalidate Caches -> Invalidate and Restart

#

sometimes that helps when intellij is stupid

#

is it bad practice to have a class like this which all my Test classes then extend?

public class UnitTest {

    ServerMock server;
    MockPlugin plugin;

    @BeforeEach
    void setup() throws IllegalAccessException {
        server = MockBukkit.mock();
        plugin = MockBukkit.load(MockPlugin.class);
        JeffLib.setPluginMock(plugin);
    }

    @AfterEach
    void destroy() {
        MockBukkit.unmock();
    }

}
#

run mvn clean package -X and send the full maven log