#help-development

1 messages · Page 1463 of 1

wraith rapids
#

yeah i don't have syntax highlighting in notepad

granite stirrup
#

typing same thing twice isnt spam tho lmao

wraith rapids
#

there may be typos

granite stirrup
#

@queen dragon go die

eternal oxide
#

Bot makes the rules, not us

wraith rapids
#

bot is sadly trash

#

who wrote it anyway

granite stirrup
#

YAGPDB.xyz i think

eternal oxide
#

xxxEliteBotCoderxxx42069

wraith rapids
#

yes the bot wrote itself

granite stirrup
odd sentinel
#

is there any API for finding the spawn egg for a given entity

granite stirrup
sharp bough
#

weird question, is it possible to run a line of command with an argument of a command? like
/testCommand player.sendMessage("hello");

granite stirrup
#

thats who made it

granite stirrup
#

i think

sharp bough
#

wdym parse it

wraith rapids
#

i don't think there is anything to find

#

all the spawn eggs are the same item with different meta iirc

#

could be wrong ig but iirc that's the case

granite stirrup
#

there might be a thing to translate a string to java and execute it but i dont think u really should do that

tardy delta
#

what does this do?

if (plugin.getPlayersWantingLock().remove(event.getPlayer().getUniqueId())) {

            event.setCancelled(true);
            container.set(key, PersistentDataType.STRING, p.getUniqueId().toString());
            blockState.update(); //apply the lock!
            p.sendMessage(ChatColor.DARK_GREEN + "Locked!");

        } else {
            String lock = container.get(key,PersistentDataType.STRING);

            if (lock != null && !lock.equals(p.getUniqueId().toString())) {
                event.setCancelled(true);
                event.getPlayer().sendMessage(ChatColor.RED + "You cannot open this!");
            }
#

yea i made a method for the static field

wraith rapids
#

it checks whether the player set has the player's UUID in it

#

and if it is there, it removes it, and returns true

granite stirrup
wraith rapids
#

if it is not there, it doesn't remove anything, and returns false

granite stirrup
#

any one with the permission to that command would be able to execute any java code

sharp bough
tardy delta
#

but if you keep the uuid inside the set the command will be executed again? (in my case it was)

wraith rapids
#

i don't keep the uuid inside the set

#

if it is in the set, it is removed

tardy delta
#

ow

wraith rapids
#

if it is not in the set, it cannot be removed because there is nothing to remove

#

remove returns true if something was actually removed

#

false if there was nothing to remove

tardy delta
#

yea i understand

wraith rapids
#

if there is a case in which locking a container would fail despite clicking on it

#

f.e if it's locked by someone else already

#

then we would have to check with contains and then optionally remove if we do indeed lock something

#

but since this code doesn't do any such checks, we can check-and-remove in a single operation

tardy delta
#

how do i access a plugins instance again? i putted it as arguments in the constructor but it doesnt work

granite stirrup
wraith rapids
#

show me what you have

eternal night
#

Isn't the java compiler only available in the oracle java version

#

Which is now behind that juicy juicy paywall

opal juniper
#

i think so

wraith rapids
#

i should look into asm at some point

tardy delta
#

do i need to make a method that returns the plugins instance in the main class?

wraith rapids
#

this.plugin refers to a field named plugin on this object

#

do you have a field named plugin on this object?

granite stirrup
#

;-;

tardy delta
#

ow wew i have it in the main class so do i need to set a getter for it?

wraith rapids
#

no

#

forget the main class

tardy delta
#

forgot it

wraith rapids
#

this is a different class

#

this is a different object

#

whatever is happening in the main class, we don't care about it

granite stirrup
#

just add a private YourMainClass plugin;

#

at the top

tardy delta
#

i had it static
private static MagmaBuildNetwork plugin;

granite stirrup
#

@tardy delta learn java

wraith rapids
#

yes, that is not a class on this object

#

it is static

tardy delta
#

learn bukkit*

wraith rapids
#

meaning it is not associated with any object

#

no this is java

granite stirrup
#

this is basic java

#

come on

wraith rapids
#

this is java and oop 101

tardy delta
#

uhu and now?

wraith rapids
#

again we run into the issue that you're not thinking with an object oriented mindset

granite stirrup
#

java is easy

wraith rapids
#

i don't really know what to do about it

granite stirrup
#

its just hard if u never used it before

wraith rapids
#

it is very simple and very natural once you get it

granite stirrup
#

its more easy than python i think tho

sharp bough
wraith rapids
#

just getting it seems to be difficult for some people

sharp bough
#

java not so much

granite stirrup
wraith rapids
#

sometimes not even explaining everything 10 times over makes someone get it

#

you need one of those lightbulb moments to happen in your head

#

and then it all just clicks together

tardy delta
#

well i'll do it tomorrow

sharp bough
tardy delta
#

:/

granite stirrup
#

for java

#

;-;

tardy delta
#

i hate it that python doesnt use {}

granite stirrup
#

the rest is just to know which class is the main class

#

and i dont think u need to do a public class Main() {

#

but idk

#

classes is basically namespaces

#

well package; is more like it

#

kinda

#

idk

#

and u have to specify the package so java knows where its at idk why i guess its just how it works

ivory sleet
#

public class Main() {
}

#

That would be legendary

granite stirrup
#

python cant do half the things java can do ( i think )

sharp bough
#

nah python can do a shit ton of things, just not this kind of things

#

you cant code a plugin with python

#

but you can automate stuff

granite stirrup
#

java is more powerful than python

#

also isnt slow as crap

#

java is also crossplatform tho idk if python is probs is

tranquil viper
#

i feel like they’re both situational

#

the best general language is probably c++ or something like that

granite stirrup
#

ye cpp is much faster than every other language

#

but i mean it isnt really that crossplatform

tranquil viper
#

true

eternal oxide
tranquil viper
#

i think every language is better or worse in each situation it just kinda depends what you’re doing

eternal night
#

"much faster" kekw

granite stirrup
glossy barn
#

pyhon is one of these languages that are "jack of all trades, master of none". It does everything it possibly can but it isn't necessarily the best

granite stirrup
#

also cpp is hard to learn

#

XD

eternal night
#

ngl the cpp usecase is probably either OS or intense graphics

glossy barn
#

cpp is easier to learn 🙂

eternal night
#

other than that, kinda useless for what it wants to do

granite stirrup
glossy barn
#

how so?

sage swift
#

cp+

granite stirrup
#

theres no official thing for cpp

quaint mantle
glossy barn
#

c++ also has documentation

granite stirrup
sage swift
#

i think you missed the joke imaginedev

glossy barn
granite stirrup
#

oh

quaint mantle
granite stirrup
glossy barn
#

because that's what you're used to

#

that is microsoft

granite stirrup
glossy barn
#

If you know 1 c-like language, you basically know the ins and outs of all other c-like languages. Java, C, C++, C# even JS & TS all share similar syntax, making it easier for developers to use the basics of each of the languages. If you were to do Python however, there's not too many languages out there like Python (except R & Haskell)

eternal night
#

what

#

what programming language is "made in" c/cpp lmao

#

you write a compiler for the language in it

granite stirrup
eternal night
#

that is it

#

the JVM can be implemented in c

#

but like

#

you don't have to

granite stirrup
#

no isnt jvm made with c

eternal night
#

hotspot jvm is c/assembly

wraith rapids
#

what was that jvm called that was written in java and compiled by java for java

granite stirrup
#

the python compiler is made with c i think

eternal night
#

but that is mostly because java is partially interpreted trash

#

graalvm

wraith rapids
#

oh right

glossy barn
#

Python has 2 main implementations. C implementation and .NET

wraith rapids
#

GRRAAAAL

eternal night
#

pretty garbage

wraith rapids
#

try set? dunno

eternal night
#

because surprisingly the c/cpp code base of hotspot jvm is, like half the cpp codebases, udder spaghetti

wraith rapids
#

or perhaps setProperty

eternal night
#

they can't even expand on the C2 JIT anymore because of how legacy it is xD

granite stirrup
#

i just call jvm jvm XD

eternal night
#

what

#

there are different jvm implementations tho

wraith rapids
#

your mom is a jvm

granite stirrup
wraith rapids
#

jelly vore mountain

eternal night
#

😦

granite stirrup
eternal night
#

ah, yeah hotspot jvm is your "jvm" then

granite stirrup
#

is all purpose flour for all purposes

wraith rapids
#

hotpot

somber hull
#

wtf

wraith rapids
#

caching is hard

somber hull
#

how fix

#

im so confused

wraith rapids
#

clear caches and restart

somber hull
#

how do i do that

#

like

wraith rapids
#

i don't know, ask some eclipse guy

somber hull
#

ok

wraith rapids
#

or use google

quaint mantle
#

I use IntelliJ as it’s got a better layout preferably

eternal oxide
#

Project menu -> clean

lyric grove
#

Anyone know how i can add a fake glow to a itemstack?

eternal oxide
#

else right click pom -> maven -> update project

quaint mantle
lyric grove
#

like glow without the lore

sullen dome
#

intellij best EyeShakeNew

quaint mantle
#

Add a enchantment and the. Hide it using item flags

sullen dome
#

you mean enchantment glint?

lyric grove
#

yeah

young knoll
#

Pretty sure they only way is to add an enchant and then hide enchants

quaint mantle
#

^

wraith rapids
#

ask someone 7 years ago

sullen dome
#

enchant it with some random enchantment, and hide it from the lore

quaint mantle
#

There is another way but it’s not recommended

young knoll
#

You used to be able to just set the enchantment array to an empty array

#

But I think the client checks for that now

sullen dome
#

creating a custom enchantmentment with a empty name lol

#

(joke)

lyric grove
quaint mantle
#

Oh wow

young knoll
#

Did the hide enchants flag even exist in 2014

sullen dome
#

TF

lyric grove
#

im sure it did

quaint mantle
#

I may not be able to help you 😂

sullen dome
#

same tho. probably almost no one here knows how it worked in that old ass versions lol

quaint mantle
#

Is development being done for spigot 1.17 yet?

young knoll
#

Yes

quaint mantle
#

Is there a way you can see the progress?

#

I’ve never made a api myself so I would love to see the back ends of it etc

young knoll
#

Don't think it's on the public repo

#

But I could be wrong

quaint mantle
#

Ah ok

sullen dome
#

MySQL is so damn dumb

lyric grove
#

mongodb is better

sullen dome
#

i sadly cannot switch, because the database is provided by my server-host

#

that are general auto db's i think

lyric grove
sullen dome
#

cancel the damage event, if the damage source is fall damage

young knoll
#

Something something don't store relational data non relational

lyric grove
#

but yeah hosting it yourself would definitely be better

sullen dome
#

i wouldn't store my client's data on a free db tho

lyric grove
#

yeah

sullen dome
#

my problem is just... it produces lag spikes everytime i save/load something into/from the db. maybe i'm just using it wrongly

#

but i dont think so

wraith rapids
#

mongo db is WEB SCALE

sullen dome
#

means? lol

wraith rapids
#

any DB will produce lag spikes if you do it wrong

sullen dome
wraith rapids
#

a db may not be located on your system, and even if it is, it may not be in-memory

sullen dome
#
    public void setCosmeticEnabled(UUID uuid, String cosmetic, boolean enabled) {
        try {
            PreparedStatement ps = connection.prepareStatement("UPDATE " + cosmetic + " SET ENABLED=? WHERE UUID=?");
            ps.setBoolean(1, enabled);
            ps.setString(2, uuid + "");
            ps.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
wraith rapids
#

any DB requests you make should be asynchronous

#

because they may take a very long time to complete

sullen dome
#

thats not spigot btw

young knoll
#

Cache things

wraith rapids
#

from several milliseconds to like several seconds if the connection times out

#

and on the main thread, even half of a millisecond is a very, very long time

sullen dome
#

so... probably dumb, but i tried to do that on another thread. but 1: everytime doing like new Thread(() -> { //save data })
is probably very dumb.
and loading doesn't work, because i cannot use return statements in those.
and my small-brain doesnt know how to do that i think

wraith rapids
#

use a bounded thread pool and/or completable futures

#

the thing with using a database is that you need to design your shit in a way that it doesn't explode if the GET ME THIS THING doesn't happen this instant

sullen dome
wraith rapids
#

because i cannot use return statements in those.
a return statement that directly returns the data is conceptually the opposite of what you want to do when working with a db

#

a return statement rougly translates to "hold on while I get you this data"

#

when the method returns, you must return the data

#

and the thread calling the method will wait until your method returns

sullen dome
#

the thing is... i need to get a value from the database like every 10 seconds maximum time, maybe even more

young knoll
#

Cache

wraith rapids
#

what you want is a "come back later, i'll get your data in the meanwhile"

ivory sleet
#

Why so often

sullen dome
#

rendering

wraith rapids
#

which is basically a completable future

#

you return a completable future of your data rather than your data

#

that is, a wrapper that will sometime down the road hold your data, but maybe not just yet

sullen dome
#

basically i want to get from the database if other players have something enabled or not. and i obv wanna update it, if people disable it in their client

wraith rapids
#

a future promise, one could say

#

yeah you don't want to get that from the db every 0.23 milliseconds or whatever you're doing

#

you want to get it, cache it, and then use the cached value

sullen dome
#

i'm not doing that

#

god

#

that would probably give me 15fps or smt

wraith rapids
#

point is, cache shit

sullen dome
#

i am loading it every 10 seconds rn, saving that into a map, and then every tick just getting it from that map

#

idk if thats good

#

probably not

young knoll
#

No

#

Only load it once

wraith rapids
#

is discord dying

sullen dome
#

dont think so

young knoll
#

No

wraith rapids
#

well that is some bastardized and rudimentary way of caching

#

you'd only want to re-load it from the db if the value in the db is changed by a third party

#

reloading it from there otherwise is redundant

sullen dome
#

is there an event or smt for that?

wraith rapids
#

in the server? no

sullen dome
#

from the sql api

wraith rapids
#

depends on your db of choice

sullen dome
#

i dont work with spigot, if you meant that with server

#

mysql i think

paper viper
#
CompletableFuture.runAsync(() -> { 
// code here
});
#

not that hard

#

for above

#

and for caching, just use the built in java schedualer

#

ScheduledExecutorService for every 10 seconds or smthing

#

(assuming this aint plugin related)

sullen dome
#

i usually use Java's Timer for that

paper viper
#

ScheduledExecutorService probably better

#

allows you to use Executors

#

ScheduledExecutorService is able to catch runtime exceptions too

#

while for Timer, it will just kill the thread... not ideal

#

Also, caching is very very easy. The most simplest idea is this:

var someValue = ...;

ScheduledExecutorService... (assign time)
   When called:
    someValue = doSqlShit(...); // update the value
#

make sure to it on a separate thread too

sullen dome
#

idk if it works this way with player-related stuff

opaque grove
#

how do i get the content of an textcomponent to compare it to a string

wraith rapids
#

we don't even know what player is

sullen dome
#

in this current case, my database contains this row for every player who uses the Client (in this case it's me).

to render my stuff on all players (that are in that db) i need to update it consistantly (i guess?) to make sure it doesnt render anymore if a player disables it in his own client

#

think of it like probably bac or labymod does it with its cosmetics

wraith rapids
#

use a publisher subscriber model if you need to synchronize data across several writers/readers

#

a plain database is not ideal for that

sullen dome
#

i have literally never heard of that

wraith rapids
#

yes, well, the two ways of maintaining synchronization is to either bomb the db with a billion "has this changed" requests constantly

#

or you can do it the smart way around, and have your parties notify other parties about data being changed

sullen dome
#

well, i would be good if it updates every 10-20 seconds.

#

dunno how long that db-accesses take

wraith rapids
#

that still doesn't scale well

#

for example, the minecraft client doesn't send a get position request about entity every frame

#

the server sends an update

sullen dome
#

obv, if i could i would do it like if a entry in the database changes, load it in, but i don't think there's a simple way for that. idk if there is smt like an event for that

wraith rapids
#

why are you pulling data from a database with the client, anyway

#

that seems more like a server job

#

or is this supposed to be distributed cloud shit

sharp bough
#

NNY how are you online answering questions all day long?

#

are you a bot?

sullen dome
#

i want to show something for players, that are using the client. basically it's the same as badlion client-cosmetics.

sharp bough
#

lmao

sullen dome
#

lol

sharp bough
#

hes solo carring this entire chat

sullen dome
#

so if you and me are using the client.

you got a cape, i got wings.

it should show them to each other

wraith rapids
#

you may want to look into messaging channels and writing a plugin that acts as the database

#

or is this one of those "must work on all servers" clients that needs to do everything itself

sullen dome
#

kinda, yeah

wraith rapids
#

glhf basically

sullen dome
#

lol

wraith rapids
#

your db/server/whatever is going to be dead

sullen dome
#

the client will obv not be public

wraith rapids
#

someone is going to pull the credentials and address info from the client and leak it and then everything is rip

sullen dome
#

yeah, then everyone has to reset their cosmetics

#

how sad, true

wraith rapids
#

anyway, write a server for it

sullen dome
#

obv i don't store important data in it lol

wraith rapids
#

you are trying to replace the function of a server with a database

sullen dome
#

writing a server would be hell much of work

#

really much

#

i could probably kill myself

ivory sleet
#

Ever heard of remote method invocation

#

It’s quite cool actually

sullen dome
#

not really lol

quaint mantle
#

@sullen dome I'm not sure how you would do the database but if I was you I would try to ask the owner of optifine as he has a pretty good solution for the capes, from what I have heard

livid tundra
#

how do I make a zombie faster without potion effects

sullen dome
#

they to it from their own website

#

gimme a sec, i show you

livid tundra
#

also, do float potion amplifiers work?

wraith rapids
#

probably not

#

modify their speed attribute

#

potion effects are gay and shit

livid tundra
#

which method is the speed attribute

chrome beacon
#

?jd

sullen dome
wraith rapids
#

the same as all the other attributes

sullen dome
#

thats the way they save it

#

they use their own webserver i guess

livid tundra
wraith rapids
#

read the dox

quaint mantle
sullen dome
#

hope i don't go illegal with that, but no risk no fun

quaint mantle
#

Well all you are doing is pulling the cape from the website so maybe lol

sullen dome
#

no i mean showing the OF-Code here

#

thats not mine

#

xd

#

that's how optifine handles it

quaint mantle
#

oh shit

sullen dome
#

xd

quaint mantle
#

didn't even realise

wraith rapids
#

well, you did say you won't release it

#

so nobody cares

sullen dome
#

yeah

#

if i would, i would need to remove optifine completely, and even create an installer

#

and thanks, but no thanks

livid tundra
indigo iron
#
                    hurt.removePotionEffect(PotionEffectType.BLINDNESS);
                    hurt.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 100, 2, false, true));
                if (hurt.getInventory().getHelmet().getItemMeta().getLore().contains(ChatColor.GREEN + "- True Sight")) {
                    hurt.removePotionEffect(PotionEffectType.BLINDNESS);
                    
                }``` Anyone know how I can stop getting and error for when the player is not wearing a helmet or when they player is wearing a helmet but doesn't have the specified lore **"True Sight"**
sullen dome
#

Entity#getAttribute(Attribute a)

#

i guess

livid tundra
#

the attributeinstance you get from that isn't a copy, right?

wraith rapids
#

i wouldn't expect it to be, but i don't remember the last time I diddled with attributes

livid tundra
sullen dome
#

or just check if it's null :/

livid tundra
#

what's the unit of the attribute GENERIC_MOVEMENT_SPEED?

sullen dome
#

1.0D for example

wraith rapids
#

i'm assuming he means "how fast is 1.0"

#

which, hell if anyone knows

#

probably some arcane magic value

sullen dome
#

gimme 1 sec

#

there's a list with all default, min and max values

livid tundra
#

yes, but the list there is kind of confusing, as it seems like a zombie is faster than a player

sullen dome
#

well, all entities have their own speed

#

this are the values for each entities

vestal dome
#

so how can I send a plugin message ONCE,

wraith rapids
#

the same way as you do when you send it MANY times, but you just do it once

vestal dome
#

since in my code I use Bukkit.getMessenger().sendPluginMessage(<pl>, <data>, idk?);

#

no like

#

imagine, every player sends that message....

#

like to the bungeecord..

#

I don't know how to explain

upper vale
#

How do I make a mob sleep without a bed

#

i did it with players but idk about mobs lol

wraith rapids
#

select one player and only use that player to send the message with?

upper vale
#

since there is no Entity#entitySleeping(blockpos) method

upper vale
#

nvm im an idiot i just need a livingentity

vestal dome
#

Ugh

#

(doesn't know why he(me) said ugh)

wraith rapids
#

my pronouns are gas/them

vestal dome
#

breh

river goblet
#

Not sure if this is a good place for this, but does anyone have experience working with Netty?

wraith rapids
#

1.8 async super hyper multithreaded anticheat plugin developers surely do

vestal dome
#

is there even a way to make the entire minecraft server async?

#

Like many server implementations say they are multi thread.

sharp bough
#

so it returns a number between 1 and the max value or from 0 inclusive and the specified value?

vestal dome
#

but for me it seems like they are not multi threads, I never tested one, but I don't think you could possibly make minecraft multi thread.

#

change my mind, prove me wrong

wraith rapids
#

asynchronous and synchronous are matters of perspective

#

performing literally every operation on its own thread would be counterproductive

vestal dome
#

I know

wraith rapids
#

most of the multithreading forks don't really thread anything or if they do, they do it unsafely

vestal dome
#

oh so it's fake

#

huh

wraith rapids
#

either fake or unsafe, pick your poison

vestal dome
#

I pick "fake"

wraith rapids
#

the way how bukkit api is designed doesn't really permit for things in the world to happen truly asynchronously

#

for example, take an entity moving onto a pressure plate and activating it

vestal dome
#

yes I get you.

wraith rapids
#

first, you would have to fire events for its pathfinding, f.e entity target entity event

#

these events, if they are fired on a thread that is not the "main thread", aka are colloqually async, would have to synchronize with the rest of the server in order to access their state

vestal dome
#

yes...

wraith rapids
#

the entity then has to move, check for collisions, bounding boxes and shit which all require their own synchronization

#

then say it steps on the pressure plate

#

again, events need to be fired, and the plugins handling those events have to synchronize on whatever they need to access

#

in the end you have a synchro soup that is slower than you started with

#

i'm sure it can be done relatively sanely without an api that's supposed to let third party code do all manners of shit

#

and even with the api in place, some things can be thrown on their own, dedicated threads

#

for example paper has chunk loading and generation on its own thread

vestal dome
#

too much time for a advantage... that seems unrelevant as fuck.,

wraith rapids
#

mojang shifted light updates to its own thread

#

chat has been on its own threads for ages

#

there is talk about moving entity pathfinding off the main thread but with all of the world state it'd have to access idk how feasible that is

vestal dome
#

yes.. that's why AsyncChatEvent Exists 🙂

rare hazel
#

I'm making a bungee queue plugin and i'm having a problem. I have set force_default_server: true in the config, so they are forced to join the queue server. I then have a plugin use PostLoginEvent ProxyServer.getInstance().getServerInfo("Main").getPlayers().size() to compare it to the max player amount, if ther are less players on the main server then the maximum do player.connect(serverInfoMain). Still some times it sends you to the queue server even tho the statement is true and it runs all the other shit in the if statement..

wraith rapids
#

there has also been talk about splitting parts of the physical world off to separate threads, like thread-per-world or thread-per-region

#

but that is basically impossible with the event system

#

with the current api, a plugin that catches an event about a block changing at place a has strong guarantees of state about any other block in anywhere in any of the worlds

#

splitting each world or each region to separate threads would break that guarantee

#

plugin code that handles stuff happening in between two locations would have to be almost as robust as bungee/bukkit network plugins that synchronize data across servers

#

and the % of developers who can actually manage to do even that properly is pretty appalling

eternal night
#

tbf to properly support this you would need to rewrite major/all parts of the API to follow a way more reactive approach

#

so that people don't just await the other region/world thread anyway if they wanna work on it xD

wraith rapids
#

yeah and that'd involve plugin developers actually being able to deal with writing code for a threaded environment

#

which is never going to happen

#

most people can't handle dealing with code for a single threaded environment to begin with

livid tundra
wraith rapids
#

basically, nobody knows

#

mojang magic values

#

throw some numbers at it and see what is good

sullen dome
#

obviously it is

#

or have you ever seen a zombie beeing as fast as a player lol

wraith rapids
#

one would expect a bigger number to mean a faster speed

young knoll
#

Actually I'm cruious now

#

I never just sprint away from zombies

wraith rapids
#

pretty sure a player walks like twice as fast as a zombie without sprinting

#

about comparable to player speed while sneaking

young knoll
#

Hmm yeha

#

It's possible players have a bunch of additional modifiers applied

torn shuttle
#

with each passing day intellij takes longer to open

paper viper
#

invalid caches = take away 10 days of your life

#

lol

torn shuttle
#

you would think it wouldn't take that long to index 706 class files

paper viper
#

706 is nothing boi

torn shuttle
#

or at least that they would've figured out a faster way to do it than reindexing every time

#

I know it'snothing

#

like this project has

#

47360 lines

paper viper
#

i cant use shade in my project cause if i do

torn shuttle
#

this is a solo project

paper viper
#

my jar turns into 500 mb

#

lol

wraith rapids
#

i'd like to introduce you to minimize

torn shuttle
#

surely actual games and businesses have million + line counts

#

do they take 1h to index every time they open the repo?

paper viper
#

lol

wraith rapids
#

they probably don't have the whole shitshow in a single module

torn shuttle
#

if you're making a full on game I'm sure you can go well over 1 million lines per module

wraith rapids
#

i usually start splitting my projects into multiple modules after around 100 class files

#

because ij is slow as shit and my shit tier machine doesn't make it any faster

paper viper
#

well, separate modules aint gonna make it faster

#

unless you talking about projects

wraith rapids
#

you don't need to recompile unchanged modules

paper viper
#

Oh, ig in my case I use refactor and that makes a ton of shit

torn shuttle
#

with the way I have things structured that would basically translate into me opening 5 to 7 different intellij projects and waiting for those to index vs doing what I'm currently doing lol

wraith rapids
#

don't refactor shit across 30 modules ig

paper viper
#

Well, i am developing a library. And have separate modules for the api and concrete impl

#

so if i rename an interface in the api

#

it has to rename also into the concret impl

young knoll
#

Doesn’t gradle only compile changed files

torn shuttle
#

it does

#

I use it

paper viper
#

Yeah

torn shuttle
#

doesn't do shit for intellij indexing files though

wraith rapids
#

sadly gradle gives me pimples

paper viper
#

why

young knoll
#

Ah

wraith rapids
#

an allergic reaction

paper viper
#

pimples are not an allergic reaction

#

Lmao

torn shuttle
#

they can be

upper vale
#

how do i stop mobs from attempting to float towards the surface if theyre in water

wraith rapids
#

your mom is an allergic reaction

young knoll
#

You could remove that AI goal

upper vale
young knoll
#

Try obsidian

torn shuttle
#

ironically it would probably work

upper vale
young knoll
#

Is floating not part of the AI

#

Wat

#

Last I checked noAi mobs don’t even fall

torn shuttle
#

can confirm noai creatures still float

wraith rapids
#

i vaguely remember that being an ai goal

torn shuttle
#

wait

#

no

#

I'm thinking of

wraith rapids
#

and yeah mobs with ai set to false don't have any physics

torn shuttle
#

setting the speed

wicked shale
#

i need help

young knoll
#

Yeah I think there is a PathfinderGoalSwim or PathfinderGoalFloat

paper viper
#

?ask

queen dragonBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

torn shuttle
#

forget that, I was thinking of the fun time I had when I tried to freeze blazes by setting their velocity but it turns out their vertical velocity does not count as velocity

wraith rapids
#

he wants to get reinstated in office

#

and unbanned from twitter

wicked shale
#

where appeal ban

wraith rapids
#

you should get better at ban evasion

young knoll
#

Has he tried Facebook

wicked shale
#

legbook?

wraith rapids
#

we need you to build a wall

#

between spigot and paper

torn shuttle
#

who's going to pay for it?

wraith rapids
#

spigot obviously

#

you're the mexico of this ecosystem

wicked shale
#

whos border patrol

wraith rapids
#

i'll shoot anyone on sight

torn shuttle
#

you're already doing that though

#

I've spent the last 2 days adding and removing green screens and D&D miniatures from my amazon basket

wraith rapids
#

you should make your own miniatures

torn shuttle
#

why is everything I want unreasonably expensive

torn shuttle
wraith rapids
#

use your imagination

warm galleon
#

Is GetServer sending ALL servers/ is there a way to make it only return online ones??

torn shuttle
#

can't you iterate and see if they're online?

wraith rapids
#

throw some streams and filters at it

warm galleon
torn shuttle
#

oh boy

wraith rapids
#

throw new Streams & Filters

#

@ GetServer

torn shuttle
#

I feel like my streams game is lacking

wraith rapids
#

i literally never use streams

torn shuttle
#

I think I have 3? instances of streams on the entire project

#

more if Arrays.asList counts as one

#

asList is bae

young knoll
#

I use them for startup stuff mostly

warm galleon
wraith rapids
#

go over the returned servers and ignore them if they're offline

young knoll
#

I mean you could keep it simple with a method that just uses a for loop to remove all the offline ones

#

Or make something fancy with streams

wraith rapids
#

i should look into reimplementing streams myself at some point

torn shuttle
#

streams often feel like a bit of a trap

wraith rapids
#

i should also look into spliterators at some point

#

many things i should do

torn shuttle
#

I should probably stop adding and removing things from my amazon basket

warm galleon
wraith rapids
#

i also should look into velocity at some point

torn shuttle
#

are you becoming sonic?

wraith rapids
#

i'll eventually need to look into proxies for my distributed skyblock server network on free aternos servers

#

and I don't want to do it with bungee because bungee is gay

#

and also shit

torn shuttle
#

I think I managed to get my plugin banned from aternos by giving people an easy way to bypass file upload restrictions

#

not that I'm complaining, I wasn't the one putting it up there in the first place

#

it's just mildly entertaining

torn shuttle
#

I somewhat doubt the spigot api has in it a method to get all servers

#

since it's an api for a single server

#

and also code can't run if the server is off

wraith rapids
#

inb4 he's talking about Bukkit.getServer()

torn shuttle
#

yeah I was about to say that lol

#

I was actually looking the api up to make sure, it's the only thing called getServer

#

Bukkit.getServer

#

the fact it's a singleton might be a good hint that there is only one

warm galleon
#

nope

#

using plugn messaging

#

GetServers

#

@torn shuttle @wraith rapids

wraith rapids
#

what is the class you're invoking that on

#

"GetServers" says nothing

torn shuttle
#

there is no getservers on the spigot api, or if there is it's not getting picked up by the javadoc

wraith rapids
#

@warm galleon @warm galleon @warm galleon @warm galleon @warm galleon

warm galleon
# wraith rapids "GetServers" says nothing

ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("GetServers");
System.out.println("Try to get server list");
p.sendPluginMessage(Main.getPlugin(), "BungeeCord", out.toByteArray());

torn shuttle
#

yeah that's bungeecord not spigot

warm galleon
#

sendPluginmessage is part of spigot i thought?

wraith rapids
#

yes but your question is about bungeecord

warm galleon
#

ok

wraith rapids
#

you saying you're using spigot api was pretty confusing

#

anyways, dunno, i don't really use bungee

#

look up the docs for it if you haven't already

quaint mantle
#

ive been trying to change the generator in bukkit.yml but the default generation is still used

#

my method in my main class isnt even being called

#

i found this in my output

#

Could not set generator for default world 'world': Plugin is not enabled yet (is it load:STARTUP?)

#

wtf how am i supposed to wait for plugin to load?

wraith rapids
#

is it load:startup?

quaint mantle
#

oh

#

am i supposed to put that in my spigot.yml or something

#

or in my plugin.yml

wraith rapids
#

the plugin.yml has a setting that controls when your plugin is loaded and enabled

#

by default it is post-world

quaint mantle
#

oh nice

#

thanks i will try this

#

working now

#

thank you very much!

#

:)

#

i'm trying to load in a custom map that will be created but i don't want default terrain generated

#

so i have to do this :p

young knoll
#

Could have just used a super flat void world

rare hazel
#

Does anyone know why postLoginEvent.getPlayer().connect(serverInfo) not always work in a PostLoginEvent and why it's sometimes just ignored and sends the player to the default server? (BungeeCord)

#

@stone sinew tryed TimeUnit.SECONDS.sleep(5), same problem...

odd sentinel
#

is it possible to change item meta based on who's viewing it (their permissions)

rare hazel
#

how would i do it then, some what new to java :/

rigid otter
#

I create NPC using that EntityPlayer, but how to invisible EntityPlayer's name to players?

#

Because I want to use hologram as its name instead

west pecan
#

can someone point me in the right direction for what events I can hook into in order to prevent AFK players from accumulating playtime on the server?

paper viper
#

afk detection is one of the hardest things to accomplish (for a good one)

sage swift
#
public void onPlaytime(StatisticIncrementEvent event) {
  if (event.getStatistic() != Statistic.PLAYTIME) return;
  if (player.isAFK()) event.setCancelled(true);
}```
west pecan
#

👍 Will look into it ty

young knoll
#

Yes because that’s a method

sage swift
#

we talk theory here

paper viper
#

lol

west pecan
paper viper
#

You know, 80% of what you asked for is pretty much afk detection and what gecko did was do it in just 1 method

#

Lmao

lunar folio
stone light
#

I keep getting this error when I run my plugin on a server does anyone know why?
[21:11:50] [Server thread/ERROR]: Fatal error trying to convert TerrorGames v1.0:me/TerrorGames/SurvivalGames/Main.class

#

I can send the whole log if someone wants it

covert bluff
#

i already know of that, what i meant was how it would know the name

#

because that is in a completely different class

vestal wharf
#

hey umm i had a question what is the api-version for spigot 1.12.2 ?

past glen
#

how can I find the location of a player?

vestal wharf
#
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:152) ~[server.jar:git-Spigot-79a30d7-acbc348]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [server.jar:git-Spigot-79a30d7-acbc348]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:305) [server.jar:git-Spigot-79a30d7-acbc348]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:205) [server.jar:git-Spigot-79a30d7-acbc348]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [server.jar:git-Spigot-79a30d7-acbc348]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 6 more
e```
#

Why do i get this error also heres my plugin.yml

#
name: AntiCrash
main: com.raffel.antilag.AntiCrash
version: 1.0.0
description: A spigot plugin to stop FitFags from crashing the Server
depend: [ProtocolLib]
api-version: 1.12
author: Raffel```
#

Oh ok can the 1.13 api-version work on 1.12.2 servers because i think it should. Also would i have to update my spigot api from 1.12 to 1.13? Thank you

trim river
dusty herald
vestal wharf
#

i extracted the jar and could see the plugin.yml file

dusty herald
#

according to the bit that says ya know "jar does not contain plugin.yml" it doesn't

vestal wharf
#

umm

#

ok ima try again

vestal wharf
vestal wharf
dusty herald
#

idk

vestal wharf
#

src/com/raffel/antilag/plugin.yml

dusty herald
#

uh are u sure it's in the compiled jar

vestal wharf
#

idk ima check

trim river
#

oh

dusty herald
#

It has to be three

trim river
#

i see

#

tty

quaint mantle
#

Does It not need to be in resource folder instead of main folder ?

dusty herald
#

I mean it depends on the way they're compiling the jar, fuck if I know

vestal wharf
dusty herald
#

I use maven to handle my shading

quaint mantle
#

Won't hurt to relocate plugin.yml into the resource folder tho.

vestal wharf
#

ok i will do it

#

well still doesnt wrk

#

fvk it ima look for templates on the web

wheat dagger
#

Hello, Can someone help me to setup environment for a (personnal) fork of spigot ? Because I try what it is said on every page I found but couldn't find a way to generate work/decompile-XXXX files. Moreover they are many errors (such as accessing variables on object that didn't have it) everywhere in the code, but I may have done something wrong

wet breach
#

@wheat dagger use buildtools it will pull in the repo's for you. which you can then use to fork and do whatever

#

the whole decompiling part is a different process separate from that of the working repo's

wheat dagger
#

I try that but no, it didn't create the folder, I want to modify the NMS code, and for doing that it is said that i need to create this folder

wet breach
#

buildtools creates all those directories for you

#

once you run buildtools you will have everything you need, even the NMS stuff you want to modify

#

if you want to know how the decompiling process works, look at buildtools source code

wheat dagger
#

in 1.12 yes but in 1.16 apparently not

wet breach
#

the process hasn't changed

wheat dagger
#

What I'm trying to tell to you (in 1.12.2

#

in 1.16.5

wet breach
#

you are looking at two different directories

#

the bottom pic is what build tools creates

#

the spigot directory is going to contain all the repo stuff and the work directory contains all the decompiled classes etc

#

I will test it with 1.12 right now, pretty sure I am going to get the exact same layout

wheat dagger
#

So folders at root are just if I want to modify raw bukkit or raw spigot ?

#

Because in 1.12.2 there isn't the "applyPatches.sh" and it's my current problem in the guideline

wet breach
#

well, not entirely sure what kind of fork you are doing. If it isn't going to be a public fork, you don't need to worry about that

wheat dagger
#

I have some difficulties to say in english what I'm thinking sorry if it seem strange --'

wet breach
#

the applyPatches is just for if you create your own patches

wheat dagger
#

okay

wet breach
#

but if you are not creating patches, then its a non-issue

wheat dagger
#

so when I'm here I just run the apply to create files ?

wet breach
#

well all the repo's are maven projects. Just use maven to build those projects, and the patches will be applied through maven

wheat dagger
#

[ERROR] Child module\Spigot\Spigot\Spigot-Server of Z:\Server_Projects\LaboCraft\Spigot\Spigot\pom.xml does not exist @
[ERROR] Child module \Spigot\Spigot\Spigot-API of Z:\Server_Projects\LaboCraft\Spigot\Spigot\pom.xml does not exist @

wet breach
#

did you use maven to build the project?

#

probably would help if you used a paste service to show build errors

#

?paste

queen dragonBOT
wheat dagger
#

Sorry :p, it found a problem there in brigadier

#

I will look like a child but I often use gradle instead of maven so I might do wrong

wet breach
#

this is why I recommended running buildtools first before creating your workspace. Buildtools will pull everything in, build the project which includes downloading dependencies

wheat dagger
#

"java -jar BuildTools.jar --rev 1.16.5" that ?

wet breach
#

yes

wheat dagger
#

I have done that

wet breach
#

ok from there you just need everything from the spigot directory, which should have bukkit, craftbukkit, spigot, spigot-api

#

can just make a copy and copy it somewhere else, this way when you run buildtools again, doesn't mess with the stuff you are trying to work with 😛

wheat dagger
#

I rerun the script ?

#

I don't understand what you are saying

wet breach
#

I am saying copy the spigot directory buildtools created

#

and put it in a safe place

#

this way, whenever there is a time you run buildtools again it doesn't mess with your workspace

wheat dagger
#

Okay I've done that

wet breach
#

ok your spigot directory should look like this

.git
Bukkit
Bukkit-Patches
CraftBukkit
CraftBukkit-Patches
Spigot-API
Spigot-Server
.gitignore
.travis.yml
applyPatches.sh
pom.xml
README.md
rebuildPatches.sh
upstreamMerge.sh
#

since you are wanting to mess with NMS, you can just open Spigot-Server as a project in your IDE

wheat dagger
#

In 1.12.2 yes but in 1.16.5 no

#

Because the build failed, with the brigadier exception

wet breach
#

then you need to figure out why it is failing, most likely reason is that it isn't downloading brigadier dependency

wheat dagger
#

hmmm the problem is that the object exist just there isn't any currentCommand field

wet breach
#

going to run buildtools for 1.16.5 if it works for me, then its something on your end. Either you messed with something and thus recommend deleting all the files except for buildtools.jar and run it again or it is simply not able to download something it needs

wheat dagger
#

Okay sorry for bothering you

wet breach
#

you are not bothering me lol

#

going to take a few minutes for the build to complete for me

wheat dagger
#

It is possible that I mess yesterday with my local maven folder

wet breach
#

easiest way to fix if that is the possible reason, is to start fresh

wheat dagger
#

I have to delete .m2 ?

wet breach
#

shouldn't need to

#

also what java version are you using?

wheat dagger
#

1.8

#

Wrong version ?

blazing scarab
#

What jdbc wrappers would you recommend?

hidden torrent
#

How can I prevent players from stealing items from item frames? I've tried to cancel the 'PlayerInteractAtEntity' event, but it doesn't seem to prevent theft.

wet breach
wheat dagger
#

I try several time to delete all files and recreate them using Buildtools but same problems

wet breach
blazing scarab
#

Simply i wanna reduce boilerplate and maybe, data converters..?

wet breach
#

some JDBC wrappers have conflicts with other ones. Example being mysql jdbc and maria db

#

if you try to use Maria DB one, which would need to be shaded into your project, it will conflict with the mysql driver one that is shaded in spigot and thus you will have to resort to some tricks to get it working

wheat dagger
#

I used both once and I don't really have any preferences, depends on what you needs if I remember correctly one has "complex" functions and the other one don't

wet breach
#

can't use both at the same time, and you also can't have both drivers loaded either, not without some hacky solutions to get it working

wheat dagger
#

Yes I know but I try both on the same project if you prefer

wet breach
#

ah, yeah Maria DB one tends to be better in my opinion

#

but MySQL one is best for compatibility though

wheat dagger
#

It's the solution we choose at final, because mysql is heavier I think it was because of that

wet breach
#

yeah mysql isn't super optimal

#

where as maria db one is

#

however, those wrappers are not going to necessarily reduce boilerplate

#

what that person is actually going to need to search for is a SQL library that does such a thing, not necessarily a JDBC wrapper lol

wheat dagger
#

I don't know what boilerplate is, I haven't gone really deep in database mangement

wet breach
#

boilerplate is a programming term

#

means code redundancy

wheat dagger
#

I just have some trouble with the end of file exception grrrrrrrr

#

ah okay

#

I know the expression in french but I didn't translate it x)

wet breach
#

ok well my project completed just fine, initially had issues with Java 14. But worked just fine when I used 1.8 java

#

so, it would seem it is most likely something on your end causing problems. Also it appears they cleaned up the working directory for the repo's

#

it is essentially still the same, just without a couple extra repo's that are not necessary

wheat dagger
#

hmmm you didn't have any problem at : com.mojang.brigadier.tree ?

wet breach
#

nope

wheat dagger
#

wtf

wet breach
#

not even when I used java 14

#

my problem in Java 14 was that I was hitting a file not found exception for some odd reason which I will investigate at some other time, since I have used Java 14 in the past before without issues. otherwise I didn't encounter any issues with brigadier

oak badge
#

do I need to paste that on the configs of the vault??

wet breach
#

vault doesn't have any configs

oak badge
#

for it does it have config.yml

wet breach
#

not sure if vault produces config.yml, but if it does it would be for controlling its auto-update feature

wheat dagger
#

The config only contains an update checker

#

x)

#

Exactly

oak badge
#

for example I'm selling an item people can still access the chest that has the item in it

wet breach
#

not sure what shop plugin you are using, but you are going to possibly need worldguard for it work properly as well as possibly needing a permissions plugin too

wheat dagger
#

Vault is just an api all selling or buying are managing elsewhere

wet breach
#

alright, so with updated buildtools and for 1.16.5 the directory should look like this

.git
Bukkit-Patches
CraftBukkit-Patches
Spigot-API
Spigot-Server
.gitignore
applyPatches.sh
pom.xml
README.md
rebuildPatches.sh
#

that is what is inside the spigot directory

#

at the root, is where you will find Bukkit and CraftBukkit repo's if you need those

#

most of the time you don't

wheat dagger
#

Okay how do you build using maven, going back to the very beginning ?

#

maven build ?

wet breach
#

once you get buildtools to successfully run for the version you want, you need to have installed maven

#

and then its just navigating to the repo using git bash preferably where the pom.xml resides

#

and then doing maven build in that directory

hidden torrent
wheat dagger
#

right click instead of left click

wet breach
#

cancel the action, and then check the item's rotation in the item frame and just reset it

#

this way, even if the action wasn't cancelled successfully the item's rotation goes back to what you want it 😉

wheat dagger
#

@wet breach can I do it in call with you step by step to see where I'm failling ?

oak badge
#

how do you make people able to sell things using Essentials or do I need a different Plugin for that??

wet breach
#

I am just going to compress my working directory and you can just download that

wheat dagger
#

okay sorry, but I reallly don't understand

#

I do what you did

wet breach
wheat dagger
#

So I guess

oak badge
wet breach
#

you need a permission plugin

#

so you can set permissions for default group to give ability for others to create shops

wheat dagger
#

lp ❤️

wet breach
#

luckperms = lp

oak badge
#

uhhh..... rather than doing that I can just dl a signshop right?

wet breach
#

you could yes, assuming it has config options to just allow everyone to create a shop

#

without needing a permission plugin

oak badge
#

can you guys recommend one?

wheat dagger
#

The problem is that every plugin use permission and if you haven't one the only choice is /op which is a reallly bad way to give permission or power to people
Moreover the plugin might not check if the player is an operator, as in my past I've some trouble with that

oak badge
#

Yeah that's why as much as possible I want to resort with just people able to access almost everything without the /op system

wet breach
#

permissions plugin is best way to go for that

#

not like you really need to setup any groups

#

you just need to give default group abilities to do things is all

oak badge
#

yeah and also I found a good plugin that is called quickshop but everytime someone tries to buy an item on my shop it says locked

wet breach
#

because permissions

#

basically all plugins rely on permissions, very few plugins are created to work without a permission plugin

wheat dagger
#

@wet breach
So what I have to do :

  • download buildtools
  • run in the buildtools folder java -jar BuildTools.jar --rev 1.16.5
  • then cd Spigot
  • them mvn build
    Do I miss something ? (I delete all the files, and clear .m2)
wet breach
#

give me a bit

#

doing multiple things at the moment lol

wheat dagger
#

lol

#

no problem

opal juniper
#

To get the latest version you can just run java -jar BuildTools.jar

#

And that will produce a spigot jar in the same directory as the build tools. Bear in mind that it can take a while the first time

tawdry scroll
#

How can i get actual block player is standing on
Using location#subtract returns block directly below player
This can be incorrect when player is on very edge of block

eternal oxide
#

If you are shift leaning over the edge, you ARE over the edge and the block below you is empty

tawdry scroll
#

Its returning the empty block

eternal oxide
#

yes

#

because the block thats actually below you is AIR.

tawdry scroll
#

But technically we are standing on real block right?

eternal oxide
#

no, you are hanging off the edge over air

#

and your location reflects that

maiden briar
#

I have 4 maven modules with each an "module-info.java", if I try to depend a module-info towards another module info, Maven can't find the module, but in IntelliJ I can import all classes from that module

module spigot {
     requires main; //Custom module from me (another name), not found by Maven, but found in IntelliJ
}

module main {
  //exports some classes, only this module compiles
}

module bungee {
  requires main; //Same as spigot, could not be found
}

module release {
  requires main;
  requires spigot;
  requires bungee;
  //All 3 not found
}
signal atlas
#

guys how can i register this command to Main class ?

maiden briar
#

Bukkit.getServer().getPluginCommand(name).setExecutor

eternal oxide
#

if your onCommand is in your main class and the command is in your plugin.yml you don't need to register anything

near night
#

how can i run code on a block every 2ticks?

maiden briar
#

With a runnable

near night
#

ok thx

signal atlas
maiden briar
#

What for interface is ICommand?

eternal oxide
#

thats not in your main class

signal atlas
#

for BaseCommands

#

boolean onCommand(Commandsender....)

maiden briar
#

And how does that register the command then?

eternal oxide
#

thast your own command. nothing to do with Spigot

#

implement CommandExecutor not ICommand

signal atlas
signal atlas
quaint mantle
#

I've made a lobby plugin, now there are a ton of event listeners, is it a bad thing to divide them ? Meaning I've got a few inventory listeners which are kinda practically the same but on different classes just to keep everything organized, or is it better to put everything in 1 listener class ?

maiden briar
#

You can put Inventory listeners in a class named InventoryListener, player listeners in a class named PlayerListener and server listeners in a class named ServerLister for example

eternal night
#

Depends on how much logic you have to double between the two listeners. If you run complex logic multiple times on for example inv click, that might have performance issues

eternal oxide
#

each class should serve a purpose, If you have the same events in multiple classes its no problem

eternal night
#

If that is the case tho, maybe evaluate your doubled logic once and then split off into different methods from inside the listener

signal atlas
maiden briar
#

Now you have registered in plugin.yml and with Bukkit.getServer ?

signal atlas
eternal oxide
#

you are registering the executor to this not the command class

maiden briar
#

Not setExecutor this, setExecutor new Info()

quaint mantle
signal atlas
#

like this ?

maiden briar
#

Yes, and then Info must implement the CommandExecutor

signal atlas
#

yes it is

maiden briar
#

Ok then it is good

signal atlas
#

but gives error ?

candid galleon
#

make sure the right Info is being used

#

check your imports

eternal oxide
#

that error says you are not implementing Bukkits CommandExecutor

#

Bukkits CommandExecutor, not your own

signal atlas
#

oh okay now im trying

#

thank you guys it worked 🙂

opal juniper
#

Ok, so i am looking at weather in the docs, how does it work? Like what does the server do to realise "Oh! Now it is time to rain!" and stuff like that

#

And also, why are there only two weather enums - Clear + Downfall. Is thunder just an added extra?

eternal night
#

Basically there is "clear" and "storm" which are the two states of weather. Thunder is added additionally and may exist with or without a storm tho I believe it would reset the next tick if there is no storm present.

opal juniper
#

Right

eternal night
#

If you wanna look at the servers "weather lifecycle" checkout WorldServer#doTick(BooleanSupplier)

opal juniper
#

ok

#

If i was trying to make fog, would the bossbar route be the best?

opal juniper
#

can i add a player to a bossbar without them getting the bar at the top of their screen?

torn shuttle
#

if you don't want players to have a boss bar why add them to the boss bar

opal juniper
#

for the flags

torn shuttle
#

I'm sure it's feasible using nms

opal juniper
#

wait

#

can't you just do

wraith rapids
#

i doubt it

opal juniper
#

bar.setVisible(false);

wraith rapids
#

no, that also hides the flags' effects

opal juniper
#

oh

#

thats a pain

minor garnet
torn shuttle
#

I keep coming up with these elaborate visual effect concepts

#

and then I have to spend hours making them

wraith rapids
#

ClassCastException: java.lang.Integer cannot be cast to java.lang.Byte

torn shuttle
#

why do I keep doing this to myself

wraith rapids
#

don't cast Integer to Byte

opal juniper
#

Thats a pain

torn shuttle
#

well just now I finished planning for a fun power whose warning phase is literally a rave light show

wraith rapids
#

you can't cast the wrapper types

#

you need to cast to a primitive first

#

which is omega gay

torn shuttle
#

it's going to summon 12 fireballs around a boss and rotate them around for about three seconds

wraith rapids
#

write me a not-shit crates plugin

#

and also a custom enchants plugin

torn shuttle
#

all the while it's going to raycast particles that will tilt up and down previewing where the fireballs will land

#

after three seconds they are sent

opal juniper
#

Spooky

#

How can i set the weather

#

ok

torn shuttle
wraith rapids
#

if I were to open that link I'd be sitting here at this time tomorrow waiting for it to load

#

twitch's site is absurdly fucking slow

torn shuttle
#

also I think the twitch player is completely dead, I have no clue of what's wrong with it

#

whatever

wraith rapids
#

anybody know any crates and or enchants plugins that are not shit

torn shuttle
#

boss fight

wraith rapids
#

that is casting an int to a byte, that'll work fine

#

what you can't do is cast an Integer to a Byte

torn shuttle
#

cool innit

#

boss will have 20 powers in total

eternal oxide
#

well you can Integer.valueOf(number).byteValue()

torn shuttle
#

then there's going to be arena mechanics

wraith rapids
#

but that's not a cast

torn shuttle
#

the lightning around the tower is actually an arena mechanic

eternal oxide
#

yep

torn shuttle
#

the end crystal is the one summoning the lightning

wraith rapids
#

you can also do (byte) (int) i

torn shuttle
#

I think I'll call this power

#

EnderDragonDiscoFireball

#

has a catchy tune to it

wraith rapids
#

still haven't switched into using packages i see

torn shuttle
#

it is in the enderdragon package

wraith rapids
#

kind of renders the enderdragon prefix redundant

eternal oxide
torn shuttle
#

well seemingly you can browse a 5 directory deep package faster than I can type 5 characters so it works for you but not for me

wraith rapids
#

i can yes

minor garnet
torn shuttle
#

very impresive

minor garnet
#

but I didn’t understand him saying it will work but I’m cost an int for byte

torn shuttle
#

I can't even visually find the right package from the list in the time it takes me to type enough characters to access the class

quaint mantle
#

how can I apply color to logger? server.getLogger().log("§cmsg") doesnt work 😦

wraith rapids
#

let me introduce you to the magic of keyboard shortcuts

#

and navigating directory trees with the keyboard

minor garnet
eternal oxide
wraith rapids
#

it's kind of like a search function

torn shuttle
minor garnet
wraith rapids
#

except faster

eternal oxide
#

which you can safely cast to a byte

minor garnet
#

did he mean that converting a float, double or anything without being an int will give an error?

torn shuttle
#

how on earth could it possibly be faster than typing EnderDis

wraith rapids
#

no i mean casting an Integer into a Byte will explode

#

because you can't cast an Integer into a Byte

minor garnet
#

but 1 is a int

wraith rapids
#

yes

#

what you have there shouldn't explode

minor garnet
eternal oxide
#

no

minor garnet
#

tf

wraith rapids
#

if it would explode, your compiler would notify you of the error

minor garnet
#

i havent even tested it yet

wraith rapids
#

then why are you asking about it

minor garnet
#

knowledge

wraith rapids
#

the knowledge is that you can't cast Integer to Byte

young knoll
#

int and Integer are not the same thing

wraith rapids
#

but you can cast int to byte

young knoll
#

Neither are byte and Byte

wraith rapids
#

this is the extent of the knowledge