#help-archived

1 messages ยท Page 203 of 1

worldly heathBOT
dusky sigil
#

thats all of it

#

just started

#

lol

grim halo
#

EventHandler annotation

dusky sigil
#

CMON

wise flame
#

you forgot the @EventHandler--

dusky sigil
#

how does this always happen

wise flame
#

YOU SON OF A

keen compass
#

add
@EventHandler above the method for the event
@dusky sigil

grim halo
#

@barren rune poor ev

dusky sigil
#

poor ev yeah

#

yeah i kmow

#

know

#

atleast my base code was correct, even if simple

grim halo
#

And pls try early escaping your code...
If ench lvl == 0 -> return

neat orbit
#

Does anybody know what I am doing wrong with this config and why there is no broadcast? I am using VotingPlugin btw

Cumulative:
'100':
Enabled: true
# Wether or not votes must be made in same day/week
# Useful if you want to require a certain number of voting sites to be voted on
# for a daily/weekly reward instead of all of them
Broadcast: '&a&l%player% &7has voted and received a &3&l[&c&l100th &cKey&3&l]&7!'
VotesInSameDay: false
VotesInSameWeek: false
Rewards:
Messages:
Commands:
- 'cc give p kerosene 1 %player%'

dusky sigil
#

@grim halo wont just doing else with nothing do it?

grim halo
#

Its basically the same but this way you prevent
if { if { if etc in your code

wise flame
#

cumulative.100.Broadcast is what you're trying to access, right?

dusky sigil
#

k

#

thanks

neat orbit
#

Exactly skyy

wise flame
#

nvm.

frigid ember
#

i need help

balmy sentinel
#

?ask

worldly heathBOT
#

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.

dusky sigil
#

also what kind of horrible library is NotNull because im always importing it accidently and it causes like 3000 errors

frigid ember
#

I have a plugin that just allowed to a default player construct out the spwan, but when i hqave puted the manager group i don't know what i need to do for that the players that join the server can construct out the spawn

dusky sigil
#

I have so many questions about that ^

keen compass
#

what plugins you have @frigid ember

frigid ember
#

AuthMe
AuthMe-5.4.0.jar
6.87 MB
bStats
Citizens
Citizens.jar
2.78 MB
CitizensText
CitizensText.jar
25.39 kB
ClearLag
Clearlag.jar
192.13 kB
Essentials
EssentialsGeoIP
EssentialsX-2.18.0.0.jar
1.58 MB
EssentialsXAntiBuild-2.18.0.0.jar
18.81 kB
EssentialsXChat-2.18.0.0.jar
12.51 kB
EssentialsXGeoIP-2.18.0.0.jar
1.66 MB
EssentialsXProtect-2.18.0.0.jar
25.92 kB
EssentialsXSpawn-2.18.0.0.jar
16.38 kB
FurnitureLib
FurnitureLib.jar
742.26 kB
Graves
Graves.jar
26.52 kB
GroupManager
GroupManager+ [v3.3].jar
124.85 kB
HolographicDisplays
HolographicDisplays.jar
501.01 kB
LockedItems
LockedItems.jar
55.17 kB
Multiverse-Core
Multiverse-Core-2.5.jar
1.65 MB
PluginMetrics
ProtectionLib.jar
51.66 kB
ProtocolLib
ProtocolLib.jar
1.43 MB
README.txt
1.11 kB
Readme.txt
1.04 kB
RedProtect
RedProtect-7.7.2-b357-Universal.jar
1.57 MB
SetSpawn
SetSpawn.jar
17.71 kB
Shopkeepers
Shopkeepers-2.2.4.jar
543.28 kB
SkinsRestorer
SkinsRestorer.jar
7.44 MB
Vault
Vault.jar
265.88 kB
WorldEdit
worldedit-bukkit-6.1.9.jar
1.66 MB
WorldGuard

wise flame
#

?paste

grim halo
#

dude

#

?paste

worldly heathBOT
wise flame
#

wtf

dusky sigil
#

that

#

is a whole lot

#

of plugins

wise flame
#

How do I get ?paste

dusky sigil
#

@wise flame it was just the cooldown

#

watch

grim halo
#

get good

dusky sigil
#

?paste

worldly heathBOT
keen compass
#

ok, @frigid ember there is 2 plugins that have permissions for building

#

Worldguard and EssentialsSpawn

wise flame
#

I literally hate 7smile7

dusky sigil
#

whats wrong with 6smile6?

wise flame
#

5smile5 is a bully

dusky sigil
#

4smile4 didnt do nothing wrong

wise flame
#

3smile3 said get good tho

dusky sigil
#

2smile2 can say that if he wants

frigid ember
#

ok men im here if you tell me what i can do you help me a lot

dusky sigil
#

men?

wise flame
#

1smile1 hasn't responded

dusky sigil
#

smile has no numbers now

neat orbit
#

laughs in 2 x cromosomes

dusky sigil
#

-1smile-1 is this gag getting old?

wise flame
#

yes

frigid ember
#

frostaff can you help me??

wise flame
#

lol

dusky sigil
#

ok

grim halo
#

gonzo

#

?paste

worldly heathBOT
keen compass
#

Generally Worldguard doeesn't cause issues with default settings

frigid ember
#

0k,

wise flame
#

that's a zero

#

why did you use a zero

frigid ember
#

thank you a lot

dusky sigil
#

l0l

neat orbit
#

does anyone know what is wrong with this config?

#

'42':
Enabled: true
# Wether or not votes must be made in same day/week
# Useful if you want to require a certain number of voting sites to be voted on
# for a daily/weekly reward instead of all of them
Broadcast: '&a&l%player% &7has voted and received a &3&l[&c&l100th &cKey&3&l]&7!'
VotesInSameDay: false
VotesInSameWeek: false
Rewards:
Messages:
Commands:
- 'cc give p kerosene 1 %player%'

#

the broadcast does not work

wise flame
#

?paste

neat orbit
#

It's just this part

wise flame
#

no but it floods chat

neat orbit
#

Ah

tacit trellis
#

is there a way to check if someone owns a copy of a premium resource on spigot? I need this for a discord bot

vernal spruce
#

And how are you gonna link the discord user to the buyer

#

As not alot of people use same name

tacit trellis
#

they do something like !spigot [username]

keen compass
#

can do the same what spigot does @vernal spruce

sturdy oar
#

use license codes

#

!spigot [license]

#

or something

dusky sigil
#

how can i get the type of a block only? I tried getting the block and doing toString() but i got a rather... Informative output

#

Too informative

keen compass
dusky sigil
#

BlockType just returnes the block

#

or also its

#

location and all of the other things

#

Ill try this, thanks

keen compass
#

That isn't BlockType. The method I linked returns the Material of the block which indicates its type of block

dusky sigil
#

worked

#

blockType worked

keen compass
#

well as long as it worked lol

hollow thorn
#
                  @Override
                  public void run() {
                     loc.add(loc.getDirection());
                
                if(loc.getBlock().getType() != Material.AIR) {
                    cancel();
                    LOG.info("le shoot");
                }
                  
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                
                }}.runTaskTimer(Bukkit.getServer().getPluginManager().getPlugin("StaffWeapon"), 0L, 1L);``` halp
#

it only runs once

tiny dagger
#

if(loc.getBlock().getType() != Material.AIR) {
cancel();
LOG.info("le shoot");
}

vernal spruce
#

boy thats a huge runnable

#

for 1 tick

dusky sigil
#

how can i add a block's drop to it?

#

oh yeah thats gonna cause lag btw

#

lots of lag

#

BlockPure.getDrops().add(new ItemStack(Material.getMaterial(BlockPure.getDrops())));

#

im trying this but it doesnt work

#

Block BlockPure = event.getBlock();

#

this is blockpure if it matters

vernal spruce
#

i think it just gives you a clone

#

of the list

dusky sigil
#

i just want to add to a blocks drop what it drops

keen compass
#

can use dropNaturually(ItemStack) method

dusky sigil
#

for example, add a diamond to a diamond block

keen compass
#

however, the proper way if you want to just generically add to the drops, you would modify the LootTables

hollow thorn
#

if(loc.getBlock().getType() != Material.AIR) {
cancel();
LOG.info("le shoot");
}
@tiny dagger but the block is air

dusky sigil
#

hmm

#

okay

tiny dagger
#

also pls bring your plugin instance

#

instead of doing that

dusky sigil
#

how can i use dropNaturually do do this?

vernal spruce
#

wait lol

#

does that even work

#

is that rly a way of getting main

tiny dagger
#

pls no

#

don't do it

vernal spruce
#

holy shit

#

im mind blowned

dusky sigil
#

youre mind blowened?

#

blowned?

vernal spruce
#

.runTaskTimer(Bukkit.getServer().getPluginManager().getPlugin("StaffWeapon"), 0L, 1L);

#

didnt know that was even possible

keen compass
#

you can get any plugins instance so as long as it is loaded

dusky sigil
#

Do i have to hard code every block into this?

#

every block that drops something anyway

#

that isnt itself

sturdy oar
#

getPlugin() is slower than dependency injection

keen compass
#

Depends on what you are trying to accomplish. If you really want to just add stuff to their drops and not have to worry about it later

#

then I recommend modifying the LootTables

dusky sigil
#

I really dont care how the item gets there

#

I want to add what a block drops to its drops

#

so.. it drops more

#

Can i multiply a block's drops?

vernal spruce
#

Then simply spawn the block type you broke on top?

#

However there are some wich need theyr own

dusky sigil
#

spawn another block??

keen compass
#

there is all the packages in regards to modifying loot tables and loot for various things

dusky sigil
#

I dont want to modify it forever

#

Its a random thing

#

kinda like fortune

#

...but different

#

man, im speaking nonsense today

vernal spruce
#

mhmm

#

so that would simply be

keen compass
#

up to you how you want to go about it. All I can do is provide you information to possibly use to your advantage to accomplish your goal

vernal spruce
#

like block.getloottable.populateloot?

dusky sigil
#

Yeah, you said

can use dropNaturually(ItemStack) method
and i dont really understand what you meant?

vernal spruce
#

As seem to return a collection of itemstacks

#

that method

#

spawns a item at the location

dusky sigil
#

having a Itemstack with a block's drops would solve this

keen compass
#

items can be dropped from blocks that are broken/mined by using that method to add the extra item to its drops

#

however it isn't permanent in adding that drop

dusky sigil
#

is this how i sound?

#

damn

#

no, i kinda get what youre saying

#

but once again

#

i want to add another drop which is what the block drops

vernal spruce
#

bits

dusky sigil
#

not just the same item

vernal spruce
#

buts

keen compass
#

Then you can use a case statement to determine which you want added

dusky sigil
#

so hardcoding everything?

keen compass
#

look, between the various methods given to you, and some Java it isn't all that hard to code what you are wanting

midnight marten
#

Hello ;)
I'm a plugins maker with Skript and a problem appear on 1.16.
With paper, everything work good. But with normal spigot, every NBT are very buggy (no error appear)

keen compass
#

Doesn't necessarily need to be hardcoded

#

but it does depend on your level of understanding of Java as well

dusky sigil
#

hm...

#

i think

#

ill hardcode it

#

how many blocks are there that do this?

vernal spruce
#

So to be more precise

#

you want to add 1 more block to what it was broke?

dusky sigil
#

1 more of its drops

#

for example

#

a diamond block drops a diamond

#

i want to add another diamond

#

to its drops

#

but make it so if it was a coal block

#

i would add coal, not a diamond

wise flame
#

if you're using Skript, I'd ask somewhere that specializes in Skript support

keen compass
#

you would use a case switch statement for this

#

or you could make use of Enums

#

Enums are pretty handy as you can add quite a lot of things to a single enum

#

to do things if it matches your enum

dusky sigil
#

lemme read up on thise

#

those

keen compass
#

I personally use Enums for dynamic permissions ๐Ÿ˜‰

wise flame
#

can I make a resource hidden on Spigot?

keen compass
#

You can even use Enums for dynamically using classes depending which MC version you are using as well ๐Ÿ˜›

#

so Enums are handy if you know how to use them ๐Ÿ™‚

vernal spruce
#
        Block b = event.getBlock();
        for(ItemStack i : b.getDrops()){
            b.getWorld().dropItemNaturally(b.getLocation(),i);
        }

    }```
#

noice

dusky sigil
#

love the name of that method

vernal spruce
#

multiplys the drops

midnight marten
#

if you're using Skript, I'd ask somewhere that specializes in Skript support
@wise flame It's not a bug with Skript. It's a NBT tag caused. Every thing in the Skript work fine. Just the NBT are not loaded fine on spigot I think

vernal spruce
#

ezy

dusky sigil
#

renaming my now

#

wait a secend

#

Stellrow origins

#

you already asked about this

#

๐Ÿค” coincidence?

vernal spruce
#

there was a bit more advanced

#

as i had to get the drops as well affected by fortune

#

fkng magicnumber

dusky sigil
#

oh

#

im using fortune too lol

limber summit
#

How to fix this please guys :

dusky sigil
#

?paste

worldly heathBOT
wise flame
#

I have a plugin I'm getting ready to upload but the update checker is gonna need my resource ID. Can I somehow upload and hide it or get a resource ID without uploading it?

hollow thorn
#
                  @Override
                  public void run() {
                     loc.add(loc.getDirection());
                
                if(loc.getBlock().getType() != Material.AIR) {
                    cancel();
                    LOG.info("le shoot");
                }
                  
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                
                }}.runTaskTimer(Bukkit.getServer().getPluginManager().getPlugin("StaffWeapon"), 0L, 1L);``` this only runs once but i have another piece of code which functions aas expected
wise flame
#

?paste

#

why

vernal spruce
#

also holy shit 2018

#

what a plebian code

#

i wrote

keen compass
#

always nice to learn new things? ๐Ÿ˜›

wise flame
#

why are you running that every tick?

vernal spruce
#

not sure why i even needed that

hollow thorn
#

why are you running that every tick?
@wise flame its agun

vernal spruce
#

m8 that runnable will kill ur server

wise flame
#

^

vernal spruce
#

to be more specific this part for(Entity ent : getEntitiesByLocation(loc, 0.545f)) { if(ent instanceof LivingEntity) {

#

also i dont think u know how fast will that proc

#

((LivingEntity) ent).damage(10, me); will happen 20 times in 1 second

wise flame
#

You're running that 20 times per second forever
That's faster than an IRL machine gun

dusky sigil
#

yeah, watch out

vernal spruce
#

anything who dares to touch that instantly dies

wise flame
#

They fire like 500-1000 rounds/min. That's 8-16 rounds/second

vernal spruce
#

as a player has like what? 20 health

dusky sigil
#

that is literally overkill

vernal spruce
#

holy shit dude its been 5 years and i still have to search on google for the color codes

hollow thorn
#

m8 that runnable will kill ur server
@vernal spruce ive used it and it doesnt

#

and also thats for the bullet

#

not the fire rate

#

its actually slower then a bullet

#

because you cant run something 3000 times per second

wise flame
#

. . .

#

you could just not use an actual bullet

hollow thorn
#

and also i originally had it at 20

vernal spruce
#

Have you also tested

#

with 15 or more of these

#

?

hollow thorn
#

i tested it

vernal spruce
#

and how lovely were the tps

hollow thorn
#

and spammed it

wise flame
#

did you run /tps

hollow thorn
#

tps were okay

#

although this code that im showing didnt work

#

because it only ran once

vernal spruce
#

cause once again ur calling cancel

hollow thorn
#

meaning that the "bullet" only moved 1 block

#

cancel only gets called when the block it is in isnt air

grim halo
#

Wait i was gone. Do you guys speak about firearms? Pls i want to see some code ๐Ÿ˜„ i made a pretty nice engine for a server that implemented actual physics for projectiles with hiutboxes, air resistance, gravitation etc

hollow thorn
#

and the other code worked with the cancel

#
                  @Override
                  public void run() {
                     loc.add(loc.getDirection());
                
                if(loc.getBlock().getType() != Material.AIR) {
                    cancel();
                    LOG.info("le shoot");
                }
                  
                    for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
                        if(ent instanceof LivingEntity) {
                            ((LivingEntity) ent).damage(10, me);
                            ((LivingEntity) ent).setFireTicks(10);
                            
                        }
                        
                    }
                
                }}.runTaskTimer(Bukkit.getServer().getPluginManager().getPlugin("StaffWeapon"), 0L, 1L);```
vernal spruce
#

not a gun though

wise flame
#

can you please use a paste service

hollow thorn
#

can be used for a gun

vernal spruce
#

?paste

worldly heathBOT
hollow thorn
#

and i only use paste service for stuff over 2000

wise flame
#

the point is that you don't flood chat

#

lol

#

if you want to not do anything when you encounter air, use return;

#

@hollow thorn

#

wait

hollow thorn
#

no i want it to stop continueing the event when not encountering air

wise flame
#

why do you even have the cancel() there

#

oh I see

#

yeah

hollow thorn
#

because its a repeating task

wise flame
#

no clue

#

I'd suggest you turn down the frequency or use a better solution though

grim halo
#

But what do you expect to happen with this code?

hollow thorn
#

the location moves forward every tick doing damage to nearby entities

wise flame
#

or you could send out a straight line from the gun and everything along that line gets damaged

hollow thorn
#

that removes the ability for entities to doge

#

and i used to do that

#

it caused alot of damage

wise flame
#

didn't you say you wanted it to be like a bullet?

hollow thorn
#

yes

#

but if i shoot into the sky with that code

#

it goes oof

vernal spruce
#

hmm when i created a bullet

#

it was a lightning fast snowball

#

wich eventually losed velocity

frigid ember
#

I want to keep an entity at the location of another entity*

grim halo
#

Yes you need a timer that ticks up and a hard limit.

wise flame
#

mate

frigid ember
#

also when the player moves

#

runnable for that?

vernal spruce
#

i also noticed that increasing the velocity of a snowball too extreme

#

starts to no longer go straight

hollow thorn
#

also when the player moves
@frigid ember PlayerMoveEvent

wise flame
#

in one second, a realistic bullet would travel at 23m/tick. That's 23 blocks every single tick.
math: (460 / 20) / 60

#

So in a single tick, it'd be traveling over a chunk's distance

vernal spruce
#

they also consider wind/rain/falloff,air resistance

#

and shit

wise flame
#

unless your map is f*cking huge, I don't think there's a point in having visible bullets if you want them to go hella quick

vernal spruce
#

so its not that easy to figure out a bullet trajectory

hollow thorn
#

well technicall the projectile shown here

#

is this

vernal spruce
#

i mean you dont have them in minecraft

#

i guess bullet falloff can be added

#

so it doesnt one shot you at 200blocks away

hollow thorn
#

from stargate

vernal spruce
#

is that a bootleg crossbow bolt

#

lol

hollow thorn
#

no thats a stargate staff weapon

#

if you look in the code the projectile is a blaze particle

grim halo
#

Ok but i would really not create a runnable per projectile...

#

And all this code needs to get encapsulated. If you want to do something like a projectile then you need to be cautious.
With this implementation if a player shoots in a random direction then the world will load every chunk in this direction until the server restarts.
10 shots like this and your tps are gone.

vernal spruce
#

fair point

hollow thorn
#

the thing is is that this runnable only runs once

#

even if it has a clear path

wise flame
#

no we get that

vernal spruce
#

and what happens

#

when you fire another bullet

#

isnt that 2 runnables now

hollow thorn
#

yes

wise flame
#

no one said not to use runnables.
We're saying you're going to brick your server if you make a new runnable for every single bullet that runs every single tick

#

huh?

hollow thorn
#

this runnable isnt working but the other one is

#

can you please explain why

wise flame
#

can you send pastes that show the working one and the broken one?

hollow thorn
#

?paste

worldly heathBOT
hollow thorn
wise flame
#

"Table 's16892_skyville.vite' doesn't exist"

#

The error is saying otherwise tho

#

@hollow thorn Have you checked if your cancel() line is getting called accidentally?

tiny dagger
#

don't forget to simultate bullet drop too ๐Ÿ‘Œ

#

if you're simulating speed

hollow thorn
#

@hollow thorn Have you checked if your cancel() line is getting called accidentally?
@wise flame doesnt seem to be

wise flame
#

Reading through your code, that's the only thing I can come up with

#

ยฏ_(ใƒ„)_/ยฏ

ashen stirrup
#

Is this a reliable way to check if a class implements another class?
currentEvent needs to implement the Event interface for it to set.

public void setCurrentEvent(Class currentEvent) {
  for (Class<?> classInterface : currentEvent.getInterfaces()){
    if (classInterface == Event.class) {
      this.currentEvent = currentEvent;
      return;
    }
  }
  return;
}
tiny dagger
#

instanceof

#

or

ashen stirrup
#

Oh, so I'd just need to check if currentEvent instanceof Event

tiny dagger
#

isAssignableFrom(class)

#

ye

#

instanceof Event

ashen stirrup
#

Inconvertible types, I'll try the assignable method

trail hare
#

I have a custom worldgen that creates a huge desert, but the debug menu and the weather shows that the biomes still exist underneath. One of the plugins I'm using uses them for temperature effects, so I'm looking for a way to globally change the biome to Desert.

ashen stirrup
#

I'll try like this this.currentEvent = currentEvent.isAssignableFrom(Event.class) ? currentEvent : this.getCurrentEvent();

trail hare
#

preferably as a one-shot thing, the world is already generated.

hollow thorn
#

check to see how world edit does it

strong lantern
#

btw what does online mode mean help

wise flame
#

whether or not you use mojang auth servers

strong lantern
#

wait wat

wise flame
#

if it's set to false, people who didn't buy the game can join your server

trail hare
#

I'm more looking for an existing solution, since I'm not up to writing plugins myself just yet. Is there maybe an offline editor that can change the flag across all chunks?

wise flame
#

if it's true, only players who have bought the game can join

strong lantern
#

why can I not join my own server then

#

when it's on

tiny dagger
#

btw you can't use instanceof on a Class because it can't be an instance of a class

wise flame
#

did you buy the game?

strong lantern
#

yes

wise flame
#

are you sure you're logged into the launcher?

strong lantern
#

yep I am

wise flame
#

have you tried logging out then logging back in?

strong lantern
#

the server is running locally

#

on my computer

hollow thorn
#

can you find the server

#

have you used the ip

#

localhost

strong lantern
#

I used localhost

wise flame
#

I assumed because they were talking about online mode, the server denied them

#

I'd say try logging out then back in. If that doesn't work, restart your computer.

strong lantern
#

could that be a problem....

wise flame
#

huh?

strong lantern
#

entering localhost

wise flame
#

if you're just testing your plugin or something and don't have port forwards or anything, I guess you could disable online mode

strong lantern
#

btw I'm using bukkit + bungeecord

wise flame
#

should still be the same

hollow thorn
wise flame
#

you managed to connect right?

strong lantern
#

heyy

#

errr

#

how does uuid work?

#

something off

#

something bugged

wise flame
#

what?

grim halo
frigid ember
#

Is it possible to find out if player is clicking forwards/backwards/left/right?

grim halo
#

@frigid ember A player is always clicking forwards...

#

Direction is always relative

frigid ember
#

So basically impossible

grim halo
#

Not impossible. Just depends on your definition of forwards/backwards/left/right

frigid ember
#

the actual buttons

#

whats this

grim halo
#

Ohh ok. So you mean key presses? No you cant get key presses in spigot.

wise flame
#

Your best possible bet would be having your players bind like 7, 8, 9, and 0 to another set of keys and checking for hotbar slot changes, but that'd probably be pretty jank for most applications

hollow thorn
#

i already made a working "engine"

#

its just that one projectile isnt working while the other one is

grim halo
#

@frigid ember What are your general TPS? How much ram do you have?

frigid ember
#

I mean I just want to check if player is moving forwards, backwards, left or right without checking velocities because they may be inaccurate when player is in water or piston pushes player

wise flame
#

are you allowed to compare materials with ==?

frigid ember
#

kinda yes

#

but do with .equals please

grim halo
#

Yes. All enums are constants. .equals() internally just uses == (in Enums!)

#

So using == is one method call less. You normally compare enums with it.

frigid ember
#
                new BukkitRunnable() {
                    @Override
                    public void run() {
                      vehicle.teleport(entloc);
                    }
                }.runTaskTimer(this.plugin, 0L, 1L);```
wise flame
#

what is it with you people and not using camel case

frigid ember
#

So Im teleporting the vehicle to the entlocation the time a player is on a horse

#

@frigid ember What are your general TPS? How much ram do you have?
@grim halo 30 GB Ram, 20 Tps

#

19,98

#

do I make a hashset with a long and a for-loop for the time a player is on an entity

#

or is there an easier way

wise flame
#

for the time a player is on an entity
Are you timing them?

frigid ember
#

not yet

#

think I have to or nah?

#
PlayerInteractEntityEvent```
wise flame
#

I'd go with a HashMap that stores a player and the horse and add/remove their entry whenever they get on/off their horse

frigid ember
#

hash UUID, Long

wise flame
#

wdym long?

frigid ember
#

long will be the time

#

right

wise flame
#

wait what are you timing exactly?

frigid ember
#

the time they're on the entity/mob

wise flame
#

oh so you want to see how long they've been going

frigid ember
#

well

#

for each second they're on the mob/ent

#

it has to be executed

wise flame
#

well, if the HashMap doesn't contain something, you don't need to execute it. You could forego a timer and just remove the player from your hashmap when they get off

#

unless you need to time it

frigid ember
#

nah not rlly (time)

#

and than get the value

#

and done

wise flame
#

hmm. a HashMap is faster than a List, so I'd say to make a HashMap with the player and what they're riding (don't forget to handle what happens when the player goes offline). Add them to the hashmap when they get on, remove them when they get off

#

Just make the timer check the hashmap

frigid ember
#

or HashSet

#

and store UUID only

#

idc what theyre riding xd

#

and check if the uuid is there

#

that'll do it I think

#

thank you

#

๐Ÿ™‚

strong lantern
#

btw

#

help err

wise flame
#

HashMap is faster

#

and if it's running every tick that might be moderately important @frigid ember

strong lantern
#

how do I

frigid ember
#

ok

#

than'll do hashmap w/ enttype

strong lantern
#

do I need onlinemode for the bungeecord server and the the minecraft servers or wat

silver basin
#

no

#

the Spigot instance can run in offline mode if its behind bungeecord

strong lantern
#

can I turn off onlinemode for the minecraft servers and keep the the onlinemode on for the bungeecord server

silver basin
#

BungeeCord should be online

strong lantern
#

I'm using bukkit servers and bungeecord

silver basin
#

Spigot you mean

#

bukkit is not a server unless you mean craftbukkit

strong lantern
#

I use bukkit

#

oh yeh

#

craftbukkit

silver basin
#

...well good luck running that

strong lantern
#

waddayamean?

silver basin
#

...its like driving a ferrari witha volkswagon engine...compared to using spigot

strong lantern
#

and?

balmy sentinel
#

you should probably run Spigot.

strong lantern
#

more like driving a volkswagon with a ferrari engine

#

or is it just me

silver basin
#

no

#

Craft bukkit is a volkswagon..

strong lantern
#

idfk

#

honestly

#

I'm pretty sure spigot and bukkit aren't that different

#

but again idfk

silver basin
#

...trust me they are

strong lantern
#

can I turn off onlinemode for the minecraft servers and keep the the onlinemode on for the bungeecord server

#

is it a yes?

#

.......

#

HELLO?

silver basin
#

....I went deaf when you yelled did you say you wanted tacos?

strong lantern
#

no

#

stop

silver basin
#

Burritos?

strong lantern
#

can I turn off onlinemode for the minecraft servers and keep the the onlinemode on for the bungeecord server

silver basin
#

seriously I already answered read chat

strong lantern
#

pls just yes or no???

frigid ember
#
    private final HashMap<UUID, Entity> storedNames = new HashMap<>();

            storedNames.put(uuid, ent);

                new BukkitRunnable() {
                    @Override
                    public void run() {
                        for (storedNames.containsKey(uuid)) {
                            vehicle.teleport(entloc);
                        }
                    }
                }.runTaskTimer(this.plugin, 0L, 1L);```
@wise flame
#

for (storedNames.containsKey(uuid)) expected ;

hollow thorn
wise flame
#
for(UUID currentUUID : storedNames.keySet()){

}
frigid ember
#

oof ty

strong lantern
#

heyy err

#

help

balmy sentinel
#

?ask

worldly heathBOT
#

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.

balmy sentinel
#

also @hollow thorn donโ€™t ask us whatโ€™s wrong tell us whatโ€™s wrong.

frigid ember
#

read the error๐Ÿ˜

hollow thorn
#

also @hollow thorn donโ€™t ask us whatโ€™s wrong tell us whatโ€™s wrong.
@balmy sentinel with that the first piece of code doesnt work while the other one works

silver basin
#

whats the error

balmy sentinel
#

Why doesnโ€™t it work tho whatโ€™s the error youโ€™re getting?

hollow thorn
#

the first one only runs once while the other one runs normaly

strong lantern
#

why can I not connect to the bungeecord server when it's in online mode, it just says ReadTimeoutException:null

lapis kestrel
#

Why does PersistentDataContainer#getKeys() show up with a red underline saying that the method does not exist?

strong lantern
#

?help why can I not connect to the bungeecord server when it's in online mode, it just says ReadTimeoutException:null

#

?help

#

?ask why can I not connect to the bungeecord server when it's in online mode, it just says ReadTimeoutException:null

#

?ask

wise flame
#

there's

#

there's no bot

frigid ember
#

Geekazo

#

proxy must be in offline mode

#

if im right

#

regular servers should be in online mode

wise flame
#

@lapis kestrel getKeys isn't a static method. You need to have an instance of the class to use it.

frigid ember
#

can be in offline mode but thats not smart

#

will ruin skins, can't access UUIDs, etc

lapis kestrel
#

i am using an intsance

silver basin
#

thats not true

#

@frigid ember

lapis kestrel
#

when was getKeys() added?

silver basin
#

Spigot runs perfectly fine in offline mode behind a properly configured bungeecord server

frigid ember
#

no

hollow thorn
#

@wise flame

silver basin
#

just no

#

?

frigid ember
#

just no

#

maybe in later versions

#

in 1.8.8 it didnt

silver basin
#

I am telling you if your running a network you dont want the connection between bungeecord and spigot encrypted

#

This is a copypasta from reddit that explains it ```Essentially, when a server is in online mode, the connection between the server and client is encrypted. Additionally, you get a session key/code when you press the join button on the home screen, which can be essentially "redeemed" for one online mode login.

Now let's say we have a proxy between the client and the server - firstly the connection between the client and the server is encrypted so the proxy can't listen in to, for example, process commands, and secondly the proxy can't switch you between servers because your session key is only valid for that one connection.

Bungeecord therefore requires offline mode to get around this restriction. However, this shouldn't cause issues with plugins if you have IP forwarding enabled. What IP forwarding does is, Bungeecord authenticates the user with mojang then adds a special packet to the login protocol that says "I'm Bungeecord, trust me, I've authenticated this user as UUID xxxx", where xxxx is an online mode, mojang issued UUID.

This means that the spigot server then trusts that this is the player's UUID, and as far as the plugins are concerned the server is in online mode and the players have valid UUIDs. All you need to do to make this work is enable ip-forward in Bungeecord's config and enable bungeecord: true in spigot.yml```

balmy sentinel
#

dude...

silver basin
#

sorry people need to lear

balmy sentinel
#

also donโ€™t have side conversations here if you donโ€™t have a question take it to #general

silver basin
#

n

#

The question was do I run spigot in online or offline mode behind bungeecord

balmy sentinel
#

@hollow thorn post your whole class please

#

@proud furnace all theyโ€™ve given us is the top part doesnโ€™t work and the bottom does. Also that the top only works when the bottom runs successfully

strong lantern
#

wait does bungeecord not work with bukkit?

silver basin
#

probably not

#

...run spigot

wise flame
#

the top part only runs once then stops

silver basin
#

and its NOT bukkit

wise flame
#

according to them

strong lantern
#

ok....

#

wait so bungeecord is for spigot only?

spring arch
#

yes

undone narwhal
#

Spigot and all of its forks

spring arch
#

spigot/paper/sponge/prob others

strong lantern
#

and just not bukkit

spring arch
#

no

#

bukkit is dead

silver basin
#

...you cant run bukkit

undone narwhal
#

Spigot is a bukkit fork, all of your bukkit features are on spigot

silver basin
#

he uses CB

#

but he calls it bukkit

spring arch
#

it does not matter lol

#

it's the same thing

silver basin
#

thats not exactly true

spring arch
#

ok craftbukkit includes craftbukit package

silver basin
#

you can run CB from the spigot buildtools

spring arch
#

who cares

silver basin
#

but its a bad idea

strong lantern
#

so wait

undone narwhal
#

CraftBukkit is the server side of Bukkit, bukkit is the API

#

And it's not dead at all

spring arch
#

craftbukkt is the implementation of api lul

#

yes it is dead

strong lantern
#

if I switch to spigot do I need to relearn anything?

silver basin
#

no Geek

#

just switch

spring arch
#

bukkit's API did not update in 5 years or when did it die

silver basin
#

honestly dark its updated

spring arch
#

by md_5?

#

lul

odd seal
#

Hey guys, just joined. Haven't ran a server for years. I have a quick question, is it better to rent an entire server, e.g. having access to install/host different things than solely minecraft or rent a server which runs an online panel?

silver basin
#

...but it wont be after 1.15

undone narwhal
#

Dark, without bukkit you can't get spigot

spring arch
#

i know?

strong lantern
#

is bukkit faster or is spigot faster or are they the same and I'm an idiot?

undone narwhal
#

md_5 maintains spigot not bukkit

silver basin
#

Spigot is faster

spring arch
#

paper is faster

#

๐Ÿ‘€

silver basin
#

We dont support paper her

#

...here

strong lantern
undone narwhal
#

We can't really talk about performances like that, performances come with abandons

spring arch
#

i'm just saying available options

strong lantern
#

wat

silver basin
#

well you forgot Tuinity

undone narwhal
#

Paper scarifies some Minecraft vanilla features

spring arch
#

Tuinity eventually gets merged into paper

#

iirc

strong lantern
#

also what does hypixel run on

spring arch
#

fork of spigot

strong lantern
#

or does hypixel use it's own

silver basin
#

@jeff doepends on what you want to do

spring arch
#

ยฏ_(ใƒ„)_/ยฏ

#

it's heavily rewritten so i don't think it's suitable to say that they run craftbukkit

odd seal
#

@silver basin As of now just a factions/pvp

undone narwhal
#

Hypixel doesn't communicate its infrastructure. Can be spigot can be something else

silver basin
#

You could just go with a cheap / free hoster to start with

spring arch
#

it's spigot

#

well at least it was like 1 year ago

#

don't think something changed

odd seal
#

I expect to have about 50 people playing at high times

silver basin
#

well you might need to upgrade froma free machine

odd seal
#

I used to run a server through my own VPS so I'm out of touch

strong lantern
#

waddafaq

silver basin
#

we use a dedicated machine

#

hosted

vernal spruce
#

@odd seal start with a vps

spring arch
#

are there any other options to start with?

#

๐Ÿค”

strong lantern
#

what do most servers use? spigot?

undone narwhal
#

Spigot and Paper are mostly used

spring arch
strong lantern
#

2b2t runs on paper

odd seal
#

@silver basin How much players do you run

strong lantern
#

wops no

#

poop

spring arch
#

it runs on paper yes

strong lantern
#

this is a mess

silver basin
#

anywhere from 5-90

strong lantern
#

oh

odd seal
#

@silver basin Where do you host

silver basin
#

OVH

spring arch
#

why.

vernal spruce
#

ovh or hetzner seem the best

spring arch
#

@odd seal if you are planning to use proxy plus a server, i recommend buying ovh + hetzner

#

hetzner is pretty cheap

odd seal
#

hetzner being proxy?

undone narwhal
#

All depending on your location, and budget

spring arch
#

no

#

hetzner being backend servers

#

hetzner does not provide anti-ddos, so it's not the best solution for things such as proxies

#

(honestly i don't think that OVH's antiddos help lmao)

silver basin
#

it does

odd seal
hazy wadi
#

mhm maybe.

silver basin
#

but then it does depend on you pay for

spring arch
#

yeah and i don't think that you pay 5000$ for each machine

odd seal
#

Can't you route traffic through Cloudflare?

spring arch
#

so anti-ddos sucks

#

@odd seal no

#

it's paid

#

and iirc it's for big boys such as hypixel

hazy wadi
#

yeah and i don't think that you pay 5000$ for each machine
@spring arch By this you mean a machine to run server on?

silver basin
#

we do have a couple of cloud but we have a couple dedis as well

strong lantern
#

oh

#

ok...

spring arch
#

@hazy wadi yes

#

OVH provides dedicated servers, so each server is on it's own machine

vernal spruce
#

imagine being so good u make ur own anti ddos

strong lantern
#

nahhhh

hazy wadi
#

@hazy wadi yes
@spring arch You can run it off any computer you donโ€™t use wonโ€™t affect performance. For others anyway..

spring arch
#

lmao

strong lantern
#

lol

spring arch
#

did you try?

#

the key is bandwidth and cpu, do you have both of it to run on your own machine?

silver basin
#

...and memory

spring arch
#

ofc

hazy wadi
#

Hmm but memory is cheap.

spring arch
#

memory is cheap yes

#

cpus and bandwidth are not

hazy wadi
#

^

silver basin
#

unfortunately minecraft likes fast cpus....

spring arch
#

everything likes fast cpus

strong lantern
#

wait how do I download........

#

spigot 1.8

silver basin
#

?bt

worldly heathBOT
hazy wadi
#

Yea, there are some clients and profiles that can lower it.

vernal spruce
#

more or less

spring arch
#

the problem is that minecraft uses only 1 thread for almost everything

silver basin
#

thats how @strong lantern

vernal spruce
#

new games switched to multi threading servers

#

as they should..

strong lantern
#

lol

spring arch
#

well

#

there was one fork that supported parallel world ticking

#

but it's dead too

#

lol

hazy wadi
#

If you are running a PC purely for the host of a server then maybe pay ยฃ20 for a client and that can make minecraft unplayable for that PC but runs amazingly for others.

#

I like playing on 5000 tickspeed.

spring arch
#

uhh

#

if you run client and server on both machines that's even worse?

vernal spruce
#

depends how good the machine is

#

dont forget they wont run on same core and shit

spring arch
#

well core threads an not infinite

hazy wadi
#

Well you see some clients can reduce the strain on the machine by making the game shit meaning itโ€™s better..

vernal spruce
#

pff tell that to threadripper

hazy wadi
#

๐Ÿ˜‚

vernal spruce
#

infinity and beyond

spring arch
#

well tbh there is actually one mod that can reduce cpu load on client, yeah

hazy wadi
#

Yea.

wise flame
#

Minecraft be like hmm today I will exist on one thread if I go outside that thread I'm breaking the rule so I won't go outside that thread and I'm going to stay on the thread

vernal spruce
#

i mean tehnically you can stop everything from loading

#

chunks/entitys/items/inventory/particles

hazy wadi
#

^

spring arch
#

optifine sucks these days

hazy wadi
#

Yea itโ€™s okay..

strong lantern
#

wait wat is buildtools

hazy wadi
#

Iโ€™m waiting for my new PC to come canโ€™t wait.

spring arch
#

it's a tool that build stuff

#

to be more specific it builds spigot

strong lantern
#

names get comfusing

wise flame
#

wait wdym optifine sucks

#

afaik it's still pretty good

hazy wadi
#

it's a tool that build stuff
@spring arch You donโ€™t say ๐Ÿ˜‚

spring arch
#

well optifine begins to lose against sodium

wise flame
#

benchmarks or source?

spring arch
#

if sodium will get shaders and all stuff like that

#

optfiine will be dead

#

yeah there was benchmarks already

hazy wadi
#

Hmm I have always liked optifine.

silver basin
#

@strong lantern read the wiki

worldly heathBOT
silver basin
#

?bt

strong lantern
#

is buildtools spigot

#

???

#

confused af

silver basin
#

no Buildtools will build Spigot on your machine

#

its possibly illegal to distribute it any other way

strong lantern
#

so how do I run a spigot server

vernal spruce
#

it is illegal

#

buildtools will compile a server.jar for you

#

wich is basically the server

silver basin
#

read the goddamn page Geek

strong lantern
#

ok... cool

#

oh now I get it

#

thx

odd seal
#

What was that one program that let you edit minecraft worlds?

#

not mcedit/worldedit

#

but a standalone program

#

ah

strong lantern
#

how do I downgrade to java 8 again...

#

am I being annoying

#

sorry

wheat mirage
#

Is there any way to create a dragon battle on the fly?

#

@strong lantern Download java 8 from the oracle site

spring arch
#

@wheat mirage see DragonFightManager

wheat mirage
#

@spring arch NMS class?

spring arch
#

yes

wheat mirage
#

@spring arch doesn't exist

spring arch
#

it's mcp naming

bold anchor
#

You're better off downloading java 11 now.

keen compass
#

or java 14

spring arch
#

EnderDragonBattle

#

@wheat mirage

#

Call EnderDragonBattle#e, it will start a dragon battle

#

plus it will respawn crystals if it's needed

#

the only thing you need to remember is that EnderDragonBattle is ticked only in the end dimension, so you have to do that yourself

wheat mirage
#

@spring arch Do I need to instantiate myself?

spring arch
#

yes

wheat mirage
#

Or is world#getDragonBattle always non-null?

spring arch
#

it's only nonnull in the end dimension

#

This will return null if the EnderDragon is not in the End dimension.

#

so you need to do everything on ur own

wheat mirage
#

@spring arch I only need it in the end dimension tbh

#

So that's good news for me

#

Thanks though

spring arch
#

then it's non null, yes.

wheat mirage
#

You've been a big help

#

Shame you can't set portal location

#

Such is life

spring arch
#

you can

wheat mirage
#

Not with Spigot API

spring arch
#

oh

#

yeah

#

well

wheat mirage
#

If it's easy enough to do I may PR it

spring arch
#

there might be a workaround but only if dragon did not die before

wheat mirage
#

Yeah very true

spring arch
#

like changing dragon's position before it dies

dusky sigil
#

whats wrong with this? java @EventHandler public void OnMine(BlockBreakEvent event) { Player p = event.getPlayer(); ItemStack item = p.getInventory().getItemInMainHand(); if (item.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS) != 0) { int FLevel = item.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS); File file = new File(getDataFolder(), "blocks.yml"); FileConfiguration cfg = YamlConfiguration.loadConfiguration(file); String block = event.getBlock().getType().toString(); Block BlockPure = event.getBlock(); int drop = ThreadLocalRandom.current().nextInt(1,3); if (cfg.getString("blocks").contains(block)) { if (drop == 1) { double add = FLevel / 2; add = Math.floor(add); add = (int)add; while (add > 0) { BlockPure.getDrops().add(new ItemStack(Material.getMaterial(block))); p.sendMessage(drop + ""); add = add -1; } } else if (drop == 2) { int add = 1 + FLevel; while (add > 0) { BlockPure.getDrops().add(new ItemStack(Material.getMaterial(block))); p.sendMessage(drop + ""); add = add -1; } } } } else { return; } the block config works, and the numbers still print, but it doesnt add to the drops

bold anchor
#

I mean @keen compass considering J11 is the next/current LTS i'd rather not recommend a dev build.

spring arch
#

getDrops is broken iirc

dusky sigil
#

it is?

spring arch
#

iirc

bold anchor
#

He s not even using it.

spring arch
#

oh he adds it do a black

#

yeah that will not work

dusky sigil
#

how do i make it work?

#

I mean

spring arch
#

drop manually

#

D:

dusky sigil
#

why wont it work though?

#

im adding to a block's drops?

spring arch
#

it returns new list each time

#

yes

dusky sigil
#

so i need to use dropnatrually?

spring arch
#

yep

dusky sigil
#

k, gotcha

bronze acorn
#

does anyone here have experience with the reflections api?

spring arch
#

don't use reflection

dusky sigil
#

savage today man

bronze acorn
#

i use it to register commands but it's being a pain lately

spring arch
#

use java.lang.invoke

bronze acorn
#

it doesn't work with two different plugins running reflections

#

one breaks the other stays fine

spring arch
#

what do you mean

bronze acorn
#

so i have two plugins

#

registering commands with reflections

#

to the commandmap

#

getting every command class in a package that extends an abstract class

#

two different plugins, two different abstract classes, etc.

#

so one plugin

#

registers their commands fine with reflections

#

if i disable that plugin and reload the other plugin, then that other plugin registers its commands fine

#

so both plugins are like "fighting" in a way to register their commands

#

and only one wins

spring arch
#

uhhh

#

there should be no problems with registering commands

ashen stirrup
#

Is there a way to check each class in a package?

bronze acorn
#

it's not registering commands, it's the reflections api

spring arch
#

@ashen stirrup yes

bronze acorn
#

that's what i looked for

#

to just use java normally

spring arch
#

it uses reflection to get command map

bronze acorn
#

and get every class

#

oh im not talking about

ashen stirrup
#

How would you do that ๐Ÿค”

bronze acorn
#

like that kind of reflections

#

im talking about the api

spring arch
#

iterate through entries of jarfile

#

yeah reflection sucks

bronze acorn
#
            Reflections reflections = new Reflections("gg.socks.hub.command.impl");```
#

like that

spring arch
#

bruh

#

use guava at least

bronze acorn
#

i-i-i-i-i

#

does guava have a method of

#

getting all the classes in a package

bronze acorn
#

oh ay

inland oxide
#
[11:36:16 WARN]: Unable to resolve BlockEntity for ItemStack: minecraft:spawner
[11:36:16 WARN]: Unable to resolve BlockEntity for ItemStack: minecraft:bee_nest```
bronze acorn
#

get outta here reflections ๐Ÿ˜

inland oxide
#

why do these occur?

sturdy oar
#

lol xd

bronze acorn
#

are you running a spigot server with a higher version than your api

inland oxide
#

who are you asking?

spring arch
#
      ClassPath.from(this.getClass().getClassLoader())
              .getAllClasses()
              .stream()
              .filter(info -> info.getPackageName().startsWith("my.package"))
              .map(ClassPath.ClassInfo::load)
dusky sigil
#

why is this? dropItemNaturally(new Location(BlockPure.getLocation()), new ItemStack(Material.getMaterial(block))); not working? error The constructor Location(Location) is undefined Main.java /Mining/src/net/FlashPlex/Mining line 71 Java Problem

spring arch
#

why would you wrap location into a location

dusky sigil
#

dont i need to set a location?

#

for the item?

spring arch
#

yes there is no such constructor

#

no

#

just block.getLocation()

ashen stirrup
#

ClassPath doesn't have the from() method ->

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>10.0</version>
</dependency>
spring arch
#

guava 10

keen compass
#

@bold anchor Java 14 isn't a dev build

spring arch
#

the fuck

dusky sigil
#

The method dropItemNaturally(Location, ItemStack) is undefined for the type Main Main.java /Mining/src/net/FlashPlex/Mining line 71 Java Problem

ashen stirrup
#

Jheez that's outdated

#

one sec

bold anchor
#

It's not a lts build either

bronze acorn
#

is it normal for guava to not find any classes n my package lol

#
       final ClassLoader loader = Thread.currentThread()
            .getContextClassLoader();
        try {

            ClassPath classpath = ClassPath.from(loader); // scans the class path used by classloader
            for (ClassPath.ClassInfo classInfo : classpath.getTopLevelClasses("com.taahyt.utilities.command.impl")) {
                System.out.println(classInfo.getName() + " : " + classInfo.getSimpleName());
            }
        } catch (IOException e) {
            e.printStackTrace();
        }```
spring arch
#

you are doing it wrong

spring arch
#

it returns a server's class loader

bronze acorn
#

o

spring arch
#

not class loader of your plugin

bronze acorn
#

ohh

keen compass
#

@bold anchor do you know what it means for something to be LTS?

spring arch
#

Oracle says that

keen compass
#

LTS doesn't matter unless you are an enterprise really

spring arch
#

it depends on how much time they support JDK

bronze acorn
#

wait so- it would be...

bold anchor
#

Long term support.

spring arch
#

@bronze acorn plugin.getClassLoader()

bronze acorn
#

o

dusky sigil
#

i have another error```
The method dropItemNaturally(Location, ItemStack) is undefined for the type Main Main.java /Mining/src/net/FlashPlex/Mining line 71 Java Problem

bold anchor
#

Considering J11 is the current LTS choosing that over J14 for their MC server would keep them fro mhaving to update to a newer version all the time. (except for patching current version)

#

Of course J14 has better dev methods like that fancy switch

bronze acorn
#

lmao i was typing final ClassLoader loader = Utilities.get().getServer().getClass().getClassLoader(); xd

keen compass
#

yeah just because it is long term support, doesn't mean magically later builds are not also supported. They are just not supported as long as LTS, which means support services in most cases other then updates.

spring arch
#

@dusky sigil the compiler says what's the error is

dusky sigil
#

@spring arch what do you mean by that?

bronze acorn
#

ahh there we go โค๏ธ

spring arch
#

it means that method you are trying to call does not exist

dusky sigil
#

DropitemNatrually is a method?

#

wait

dusky sigil
#

i needed to have a worl

#

world

#

my bad

bronze acorn
#

so it would look like:

       final ClassLoader loader = Utilities.get().getClass().getClassLoader();
        try {

            ClassPath classpath = ClassPath.from(loader); // scans the class path used by classloader
            for (ClassPath.ClassInfo classInfo : classpath.getTopLevelClasses("com.taahyt.utilities.command.impl")) {
                if (classInfo.getSimpleName().endsWith("CMD"))
                {
                    UtilityCommand command = (UtilityCommand) classInfo.load().newInstance();
                    getCommandMap().register(Utilities.get().getDescription().getName().toLowerCase(), new BlankCommand(cmd, Utilities.get()));
                    utilityCommandList.add(command);
                }
            }
        } catch (IOException | IllegalAccessException | InstantiationException e) {
            e.printStackTrace();
        }```
ashen stirrup
#

And then assuming this would work:

public void loadEvents(){
  try{
    ClassPath.from(this.getClass().getClassLoader())
      .getAllClasses()
      .stream()
      .filter(classInfo -> classInfo.getPackageName().startsWith("me.straggly.core.eventcore.events"))
      .filter(classInfo -> classInfo.getName().contains("Core"))
      forEach(classInfo -> events.add(classInfo.getClass()));
  } catch (Exception e){
      getLogger().log(Level.INFO, "An error has occured:");
      e.printStackTrace();
  }
}
spring arch
#

@bronze acorn yes

bronze acorn
#

ay

#

thank you ๐Ÿ™‚

spring arch
#

@ashen stirrup

      ClassPath.from(this.getClass().getClassLoader())
              .getAllClasses()
              .stream()
              .filter(classInfo -> classInfo.getPackageName().startsWith("me.straggly.core.eventcore.events"))
              .filter(classInfo -> classInfo.getName().contains("Core"))
              .collect(Collectors.toCollection(() -> events))
ashen stirrup
#

Would mine not work? or is that just more efficient?

spring arch
#

well i think that collect was made for such purposes

#

but ur's will prob work too.

bronze acorn
#

thanks a bunch dark it works great โค๏ธ

strong lantern
#

how do I even find the JDK 8 install file?

spring arch
#

yw

#

you download it

#

from oracle's webiste

#

good luck btw

#

lol

strong lantern
#

which website?

#

confused

spring arch
#

see Installation Instructions

inland oxide
#

Did the minecraft:spawner change as an item from 1.15.2 to 1.16.1?

spring arch
#

spawner is a block iirc

strong lantern
spring arch
#

yes

inland oxide
#

is it no longer minecraft:spawner for the block entity?

undone narwhal
#

What for do you want java? Development ?

keen compass
#

spawner is the material @spring arch

strong lantern
#

it's the official site?

keen compass
#

mob_spawner is the block

#

or block entity anyways

spring arch
#

@strong lantern yes

inland oxide
#

now, was it minecraft:spawner in 1.15.x?

keen compass
#

believe so

bold anchor
undone narwhal
#

No the official really one is the oracle.com one @strong lantern

strong lantern
spring arch
#

don't use reflection it's terrible

#

yes it is

inland oxide
#

so, in theory, if I store an itemstack serialized in a database and upgrade from 1.15.2 to 1.16.1, any BlockEntityTag itemstack such as in a ShulkerBox that were based on name from 1.15.2 for minecraft:spawner would throw that warning.

undone narwhal
#

Java dot com safe but you probably better upgrade to java 11 or 14

bold anchor
#

Reflection is not terrible lol

#

It is quite useful in the correct usecases

#

Makes "false" classes to run the methods.

spring arch
#

what the hell

silent veldt
#

Reflection can be useful, but a lot of people use it for the wrong things

strong lantern
#

thanks @undone narwhal

keen compass
#

Reflection isn't terrible if used for the appropriate purposes

keen compass
#

most people tend to use reflection when it isn't even needed

spring arch
#

use that

#

not reflection

bold anchor
#

M8 that is also reflection

#

just saying

spring arch
#

it's not

#

technically

bold anchor
#

Reflection uses that internally

spring arch
#

it's not

#

Nope

#

Internally it generates it's own classes

bold anchor
silent veldt
#

Yeah, that's the problem. Never use reflection if there's another way around it

spring arch
#

first N invocations are done through JNI, then it's optimized

#

even tho it's still slow due to security checks

#

and tons of runtime checks

#

which are avoided if you use method handles

#

plus JVM can inline method handles.

frigid ember
#

abstraction

keen compass
#

to an extent, depends on the methods used in there

bold anchor
#

abstraction requires effort

spring arch
#

abstraction is not free

#

sadly.

strong lantern
#

seriously? do I rlly need a fricking oracle account?
not cool

bold anchor
#

no.

spring arch
#

yes

frigid ember
#

wait what it was easy for me? unless i did it wrong lol

spring arch
#

to download jdk 8 - yes

bold anchor
#

AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. Supported platforms include Linux, macOS, Windows, ARM, Solaris, and AIX.

keen compass
#

JDK 8 is outdated

#

outdated builds require an oracle account which is free to create

spring arch
#

it's still used tho