#help-archived

1 messages · Page 169 of 1

paper compass
#

I'm just confused how to do it optimised

#

Like I want to find the most optimised way to do it

torn robin
#

huh

#

well how do you know the boundaries of the mine?

paper compass
#

Well I guess I could check if its inside the mine or like if the block has flag: block-break deny

torn robin
#

ah so you're using worldguard/worldedit?

paper compass
#

Yes

#

I'm also using that

torn robin
#

I think the easiest way would just to get all the blocks in the region and filter them via y level

#

not sure about optimization

paper compass
#

Wow that is a really good idea

halcyon snow
#

Are you making like an addon to that plugin?

paper compass
#

Nope

#

Thats not my plugin

#

Thats just the mines plugin I'm using for my server

torn robin
#

can't tell if that's sarcasm @paper compass

paper compass
#

Not sarcasm

torn robin
#

lmao ok

halcyon snow
#

you could get all of the blocks of a specific Y in the min/max for the region the player is breaking the block in, and then break those specific blocks.

#

not sure if there's really any other way to do that

paper compass
#

Thats what I'm making rn

halcyon snow
#

are you having trouble making that or are you just curious if there's a more optimized way?

paper compass
#

Just curious

halcyon snow
#

yeah I'm not sure if there is one.

paper compass
#
                for(int z = r.getMinimumPoint().getBlockZ(); z <= r.getMaximumPoint().getBlockZ(); x++) {
                    
                }
            }```
#

That seems the best way right?

halcyon snow
#

that's exactly what I was thinking. I'm not sure if it's the best way though

paper compass
#

It is the easiest for sure

halcyon snow
#

how are you getting the blocks to break them?

paper compass
#

I was thinking of using nms

#

This to be exact

halcyon snow
#

if you're using that then what I was going to say doesn't really help.

I was going to say if you're creating a new Location object for each block you want to break, you could save the unneeded object creation by using a different method to fetch blocks.

torn robin
#

regions aren't necessarily rectangular

bleak cipher
#

Have effective jail: true

#

however I don't get connected to the jail server

#

nor i get disconnected about jail server being null

torn robin
#

@paper compass it looks like Region implements Iterable

#

so you should be able to just use for(BlockVector3 block : region)

paper compass
#

uhhh

#

hmm

#

Well I do only want to destroy one layer

#

not the whole mine/region

torn robin
#

yes i'm aware

#

you'd have to filter out the blocks within the for loop

#

or stream it

sturdy oar
#

@sturdy oar do you still need help with sleep animation?
@frigid ember no it's done and Ive even created a resource post

#

Ty

torn robin
#

BV3 has getBlockY

graceful shard
#

Im trying to implement giving permissions based on a discord role and everything works fine except that it looks like you cant use a command, while you actually can. (It just shows red and says there is an error). This is my function for setting permissions: https://pastebin.com/AjtcMHSY Is there anything else I have to do

frigid ember
#

@torn robin java.lang.NoSuchMethodError: org.bukkit.Bukkit.getOnlinePlayers()[Lorg/bukkit/entity/Player;

#

i get this error now

#

I used Bukkit.getOnlinePlayers()

#

Bukkit.getServer().getOnlinePlayers() both throw such an error

tiny dagger
#

hope you're having fun supporting even deadlier versions

torn robin
#

are you basing off the 1.12 library or still the 1.8?

frigid ember
#

1.8

torn robin
#

can you try building off 1.12

frigid ember
#

but he has 1.12 ser be t

#

server

torn robin
#

assuming that's the server version you're exporting for

#

yeah, can you try swapping 1o 1.12?

frigid ember
#

im exporting for all

torn robin
#

well

#

¯_(ツ)_/¯

frigid ember
#

ima ask him to test on 1.8

torn robin
#

iirc even bstats has to account for outdated version checks

#
        try {
            // Around MC 1.8 the return type was changed to a collection from an array,
            // This fixes java.lang.NoSuchMethodError:
            // org.bukkit.Bukkit.getOnlinePlayers()Ljava/util/Collection;
            Method onlinePlayersMethod = Class.forName("org.bukkit.Server").getMethod("getOnlinePlayers");
            playerAmount = onlinePlayersMethod.getReturnType().equals(Collection.class)
                    ? ((Collection<?>) onlinePlayersMethod.invoke(Bukkit.getServer())).size()
                    : ((Player[]) onlinePlayersMethod.invoke(Bukkit.getServer())).length;
        } catch (Exception e) {
            playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed
        }
undone narwhal
#

How can we regenerate a chunk? I saw that the method is deprecated

frigid ember
#
        public void checkBoats() {    
            new BukkitRunnable() {
                @Override
                public void run() {
                    final List<Location> toRemove = new ArrayList<>();
                    for (Location b : boatLocation.keySet()){
                          long placeTime = boatLocation.get(b);
                          if ((placeTime + 750L) <= System.currentTimeMillis()){
                              //b.getBlock().setType(Material.AIR);
                            toRemove.add(b);
                          }
                      }
                toRemove.forEach(boatLocation::remove);
                }
            }.runTaskTimer(this.plugin, 0L, 150L);//20=1s
        }```
#

I need to remove boats instead of blocks

#

so entities

#

b will get the location of the boat

torn robin
#

@undone narwhal what method did you use originally?

frigid ember
#

but it seems like I can only remove them by gettingg the chunk and all the entities in it

torn robin
#

@frigid ember what exactly are you trying to do? remove all placed boats?

frigid ember
#

no

torn robin
#

like kill boats after a delay?

frigid ember
#

just the ones in the hashmap

#

yes

torn robin
#

how are they added to the hashmap in the first place?

frigid ember
#
        @EventHandler
        public void onBoatExit(VehicleExitEvent e) {
            Location bloc = e.getVehicle().getLocation();
            Long seconds = System.currentTimeMillis();
            
            boatLocation.put(bloc, seconds);
        }```
torn robin
#

I would just create a runnable for each boat when someone exits it

#

instead of having a master runnable

frigid ember
#
        public static final HashMap<Location, Long> boatLocation = new HashMap<>();```
torn robin
#

nah

south shoal
#

is there a plugin when you put a diamond in a beacon and you sellect haste you get it for 15min?

frigid ember
#

but that will create a lot of runnables

torn robin
#

@south shoal that seems very specific, you could probably look for a custom beacon plugin

#

yeah but they will self-terminate after they've done their job

#

it shouldn't create any substantial amount of lag

frigid ember
#

but is it not possible like with the above way ;p

torn robin
#

it is

#

it just seems a lot more complicated than necessary

frigid ember
#

yes but im also using that for buckets

#

so it'll just look to all the buckets/boats placed

torn robin
#

you should reverse the <= to >

frigid ember
#

and in that gamemode that'll be a lot

torn robin
#

if(placeTime + 750 > currentTime) remove();

night silo
frigid ember
#

The method remove() is undefined for the type new BukkitRunnable(){} :/

torn robin
#

well

#

i meant use the entity's method

frigid ember
#

ahh toRemove()

torn robin
#

sure

#

that won't actually remove anything

#

world wise

#

it'll just remove it from the hashmap

#

you're not keeping track of the entity/boat anywhere

#

just the location of it, from what i see

frigid ember
#

VehicleExitEvent

#

VehicleCreateEvent

#

VehicleEnterEvent

torn robin
#

uhuh

#

those are indeed events

frigid ember
#

yes

#

thats how I keep track of that

cerulean musk
torn robin
#

those timings are not good @cerulean musk

#

actually they are

#

19.88 TPS on average is good

cerulean musk
#

What is the problem ?

torn robin
#

@frigid ember yes but where are you keeping a reference to the entity

#

toRemove just removes the location of the entity from the hashmap

#

it isn't actually removing the entity

cerulean musk
#

MSWS its Good rgiht ?

torn robin
#

@cerulean musk yes it looks good

cerulean musk
#

Oh thanks :)

frigid ember
#

no thats the problem

#

how I still have to do it

#

cuz I can only remove all entities from the chunk

torn robin
#

ahh

frigid ember
#

not THE entitity itself

paper compass
torn robin
#

i see i see

paper compass
#

Now just cleared this in like 0.1 second

torn robin
#

nice

frigid ember
torn robin
#

Lazinq you'd have to change it to either a Map<Entity, Long>, Map<UUID, Long>

#

but that wouldn't allow it to work with buckets

frigid ember
#

I can work with them separate

#

if its really not possible to use those 2 in one

torn robin
#

in that case i strongly recommend just making a delayed task when the player leaves

#

instead of checking and looping constantly

undone narwhal
#

@torn robin World#regenerateChunk

torn robin
#

hm yeah I can see why that would be deprecated

#

it should still work, why exactly do you want to regenerate it?

frigid ember
#

Hello

#

oh wrong server

undone narwhal
#

I have a custom biome edit

#

But 4 chunks aren't affected and i think it's cause i edit too late

bleak cipher
#

bungee ServerConnectEvent I have this https://sourceb.in/8347992ef6
Have effective jail: true
however I don't get connected to the jail server
nor i get disconnected about jail server being null

versed kiln
#

I'm working with the new strider - StriderTemperatureChangeEvent & setShivering, I want shulkers to be "warm" regardless if there in water, is this possible? or is it a client thing that changes whether or not the shulker is shivering or not, if so what is setShivering achieving? Thanks in advance.

torn robin
#

taking a very quick look at the entitydata for it, it looks like it's client sided

#

might be somewhere in packets

faint basin
#

Hey guys is this only dev help or i can ask about plugin recommendations and some off topic recommendations for spigot ?

torn robin
#

anything spigot/bungee related is fine

#

so yeah that'd be fine

faint basin
#

I would like to ask if the plugin exists in spigot community or if someone could give me pointers on setting the system with combining multiple plugins.

The idea is to make a vote system something similar to Hypixel Hype.
The player could earn some kind of points or currency by completing tasks, ontime play, wining in mini games etc etc.
And with that points they could spend them on any server (in npc, gui or any way) to show support to that server, by that i mean if players really like factions they can spend those points to support factions to give our head team info which server is most popular (not just player amount) and which server needs more attention with updates, fixes etc.

I thought about implementing token manager plugin with shop which could send money to fake player called FactionsServer and with placeholderapi show percentage to amount of points earned for that.

#

I have posted this already on the forums but no answer so hope for any feedback

versed kiln
#

ah shame, i've never really dealt with packets so wont be able to achieve my goal on this then

#

thanks anyways

sturdy oar
#

I have posted this already on the forums but no answer so hope for any feedback
@faint basin I think this is a very specific plugin, in my opinion it's probably better if you get it done on commission by someone

faint basin
#

Yeah i know i just wanted to check if there is maybe some combination of the plugins

versed kiln
#

Note that the shivering state is updated frequently on the server, therefore this method may not affect the entity for long enough to have a noticeable difference.

#

Is there no way I can keep my setShivering going on a strider?

#

I'm not really worried about performance on this

torn robin
#

StriderTemperatureChangeEvent​(Strider what, boolean shivering)

#

looks like you could listen to this

versed kiln
#

I had that, it changes but I think the server just changes it back fast

edgy socket
#

hello

crimson sandal
#

Huh, I'm getting some strange behaviour when trying to read an inventories viewers. There appears to be two of every humanEntity in the list. Any ideas what causes that?

edgy socket
#

Hello people, A server i play on (Multiplayer, 20 player, Java edition) has recently installed spigot 1.16 when player head's broke, We tried fixing it with failure when we suddenly broke tnt duping aswell. A few minutes ago we tried deleting Spigot to see if tnt duping is back and it was infact back but our nether (and end potentially) reset for some reason. Can anyone help me out?

grim halo
#

I would not recommend using 1.16 on a production server yet.
What do you mean by "player head's broke".

#

Also how did you break tnt duping?

edgy socket
#

By player head's i meant that we had a plugin that made player's drop heads and some blocks dropped mini heads. I thought that the player head/mini block plugin was related to spigot, Correct me if im wrong

#

Also, we have no idea how we broke tnt duping

grim halo
#

Did the plugins update to 1.16?

edgy socket
#

brb

crimson sandal
#

What's the name of the plugin too

edgy socket
#

May take a few more minutes, asking the admin

#

Sorry people but the admin is not going to be available to answer questions, i hope it will be fine if i return later with more detail's (and maybe even ask him to come here).

vernal lance
#

playerheads are broken on 1.16 paper on early builds (has been fixed by now)

#

might be the cause

inland oxide
#

nbt libraries will probably break on 1.16.x.

#

@fleet crane, the se.llbit.se parsing in BungeeCord might fail since they added NBTTagLongArray, not sure if its used in that login packet

#

anything with JNBT might also fail, throw exceptions if it gets that NBTTagLongArray tag

#

(like all of my economy plugins that shade JNBT)

#

might already be a commit, my bad.

#

just my outdated library

cerulean musk
#

Any plugin ?

keen compass
#

@inland oxide LongArrayTag isn't new

inland oxide
#

yeh, i've noticed

#

since 1.13

keen compass
#

I have a JNBT library that has it too 😛

inland oxide
#

but strange.

#

maybe they haven't been using longarray until now

keen compass
#

that could be it

#

because I haven't really seen it used

inland oxide
#

There are several, but the original JNBT doesn't look updated

keen compass
#

Nope, you will have to do that yourself or use someone elses

#

I have an updated version

#

Original Author of JNBT isn't active anymore

inland oxide
#

is that based on JNBT?

keen compass
#

It is JNBT yes, I just add updates whenever they come out 🙂

chrome lark
inland oxide
#

yes, not sure how to port to jo-nbt tho

#

I'm using NBTInputStream

#

stuff like this

#
                        NBTInputStream nbt = new NBTInputStream(fis, NBTCompression.GZIP);
                        CompoundTag tag = (CompoundTag) nbt.readTag();
                        int xpLevel = tag.getTag("XpLevel") instanceof IntTag ? ((IntTag) tag.getTag("XpLevel")).getValue() : 0;
                        nbt.close();
                        return xpLevel;
                    } catch (Exception e) {
                        e.printStackTrace();
                    }```
#

might just diff my JNBT 1.8 with frostalfs to see what's different

#

also another fork "sarhataboaot" has the LongArrayTag

spark bone
#

is there a problem with villager breeding

bleak cipher
marsh hawk
#

does mongodb need to be run on another thread? seems i cant get the MongoClient to connect

forest plaza
#

i have a block or a location, but i need a net minecraft server BlockPosition. how do i convert them?

bleak cipher
#

does mongodb need to be run on another thread? seems i cant get the MongoClient to connect
if you're doing database queries async is a must or else your clients will cry on you

inland oxide
#

is there any good documentation on jo-nbt?

marsh hawk
#

ah right. dont know why i though mongodb is exempt lmao

kind crow
#

Hi, does someone know a way to prevent elytra players from loading chunks around them? Like on 2b2t where players only leave one chunk wide trail

fossil shoal
#

Is there a method that should be used instead of the deprecated Player#isOnGround?

chrome lark
#

check yourself, basically

#

isOnGround relies on the client, iirc; if you don't mind that, isOnGround should be okay

inland oxide
#

ugh, well guess I'll have to update my own JNBT since it needs other methods

keen compass
#

the version I have doesn't work for you @inland oxide ? o.O

inland oxide
#

does it support GZIP compression?

keen compass
#

it should

#

if not I can always add that in lol

inland oxide
#

I mean, I'd like to use it

#

the other one was completely rewritten without the NBTInputStream and NBTOutputStream which I need

keen compass
#

could probably have added it back lol

#

most of JNBT is actually pretty modular in that you don't necessarily need all the classes lol

inland oxide
#

well you would have to add back the NBTCompression code, and change the NBTInputStream and NBTOutputStream accordingly

#

it's a lot of changes in there

#

the code I use isn't using all the StringBuilder stuff as well

keen compass
#

Well the classes in my version doesn't use StringBuilder in the Input or Output streams

inland oxide
#

might be easier for me to add LongArray

keen compass
#

looks like I will have to update it to handle compression though

#

looks like it won't take much to add that it seems

inland oxide
#

yeh, i'm almost done adding long

keen compass
#

oh I meant the compression

#

just need to create 1-2 additional classes to handle it lol

tulip orchid
#

the shop plugin i am using makes you pay for premium if u want to update it for 1.16

#

this is unfair in so many levels

fossil shoal
#

why is it unfair?

tulip orchid
#

because when i download it for 1.14.4 it didnt say anything about paying for premium if i want to update it in the future

#

u have no idea how many hours i spent adding each item and changing the prices

#

now i have to find another plugin and do all this again

fossil shoal
#

or pay something like 10 bucks...

tulip orchid
#

i dont have 10 bucks

#

lol

#

and no even if i did

tiny pebble
#

Is it bad to have a command class file be over 300 lines of code? Lmao I can definitely reorganize it I just want to know if it will run like shit

fossil shoal
#

u have no idea how many hours i spent adding each item and changing the prices
the developer spent more time coding the plugin

tulip orchid
#

bruh just quit this you are probably the dev

fossil shoal
#

lol I don't even know what plugin you're talking about

tiny pebble
#

This is a help channel to ask for help relating to spigot, so try to keep it on topic! Don't want any arguments in here o.o

tulip orchid
#

i didnt pay attention to the channel name

#

sry

#

m just gonna repaste what i said then xD

unreal jackal
#

Evening, im trying to find a plugin that allows to set particles on entities like armor stand

#

or be run through cmd block

#

its mostly so that i can have a style like whirl on a entity

mellow wave
#

@tiny pebble It highly depends on what those 300 lines of code do

tiny pebble
#

they're mostly all if else statements, determing what arguments are what

#

though many of them are also just objects

undone pine
#

when i port forward, what internal and external ports do i use? right now i have only 25565 external tcp/udp 25565 internal

#

is that rule enough?

mellow wave
#

That's fine

undone pine
#

ok ty

mellow wave
#

You should be fine but I can't be sure since I don't know what the code does @tiny pebble

tiny pebble
#

though it isn't like if after else-if after else-if after else-if. it shouldn't check through every single statement

#

it runs fine as of now, i'm just worrying it may run badly seeing as i am going to end up adding more exceptions and checks and such for more arguments

#

its one base command with many other commands within it technically, such as:
/base a /base b, and so on

keen compass
#

@inland oxide there added compression 😉

mellow wave
#

I'd say go for it, if you find preformance problems you can fix that later

tiny pebble
#

👍 thanks for the input

undone pine
#

in the server.properties do i need to put sometihng in the server ip?

#

blank, internal ip or external ip?

keen compass
#

internal ip

#

in the router, should be the internal ip of the host

#

make sure your host system uses a static ip as well

inland oxide
#

@keen compass thanks, but, I've already added the LongArray stuff to my JNBT and updated the 6 plugins.

keen compass
#

Yeah there isn't much to change to add that

mellow wave
#

I've never put anything about my ip in the server.properties and I've never had any issues but I guess that depends...

keen compass
#

think there is just like 1-2 classes where you add that for the cases

inland oxide
#

well, you would be surprised

#

add the class, then like 6 other places

keen compass
#

interesting, Well I know my JNBT version will differ from most others

#

I got mine from the original author off of SF and then I updated it as necessary

inland oxide
#

ok maybe 5 files, but multiple places in each

keen compass
#

so mine isn't a fork of someone elses except the authors XD

inland oxide
#

mine is updated from 1.8 version.

keen compass
#

there is no 1.8 version

inland oxide
#

as close to the original, not rewritten, but complemented

keen compass
#

author left it at 1.1

#

XD

inland oxide
#

yes, fork of a fork of a fork....

#

whole dinnerware set.

keen compass
#

lol

inland oxide
#

maybe I should fork it officially from the 1.8 and add my changes

#

Anyway compression is important since all the NBT files like player data files are compressed

paper compass
#

Anyone here know how to make custom enchantments with TokenEnchant?

inland oxide
#

isn't there like a wiki or plugin page for that?

#

It's a premium plugin right?

paper compass
#

Yea

inland oxide
#

Well, go ask for support!

paper compass
#

Well its for my friend

#

so he passed me the plugin

#

So I don't really own it

undone pine
#

can't connect to the server, already forwarded ports 25565 to my pc, server is running

inland oxide
#

how are you trying to connect?

undone pine
#

i checked those sites to see if ports were open

#

and then inside minecraft tried with localhost

inland oxide
#

from inside the lan?

undone pine
#

and also my externalip:25565

inland oxide
#

does localhost:25565 work?

undone pine
#

no it doesnt

inland oxide
#

check your firewall on your server

#

what os?

undone pine
#

win10

sullen glacier
#

Has anyone else experienced an issue with random crashes, with console spam regarding 'AdvancementDataPlayer'?

inland oxide
#

so you are on your server, running both the server and the client as separate java jvms and using localhost?

undone pine
#

yes @inland oxide

#

wait

#

separate java jvms?

#

im just on my desktop running both the server and minecraft

inland oxide
#

well you run the server jar in a jvm, and the client jar in a jvm.

undone pine
#

i ran the run.bat in the server folder and launched minecraft on the def launcher

keen compass
#

did you make sure your system has a static ip?

inland oxide
#

although the client itself can run an internal server, this is not for multi-player server

#

right so you are running two jvms, one the server ,one from the launcher

undone pine
#

it is using the same internal ip @keen compass i just checked

keen compass
#

if you set the server to the systems ip, use that ip in your launcher

undone pine
#

yes its two jvm

#

wait hold up

inland oxide
#

and your server.properties has the server-ip as 0.0.0.0?

undone pine
#

using my internal ip instead of localhost worked

keen compass
#

😉

#

everyone else uses your external ip fyi

undone pine
#

but idk if this is working for my friends yet, maybe my port isnt forwarded yet

#

so in my server.propeerties in server ip what do i put?

keen compass
#

nothing, its fine

#

you successfully connected

inland oxide
#

should be 0.0.0.0 to listen on all interfaces, the static ip of your network interfaces and/or localhost

keen compass
#

Generally shouldn't allow it to listen on all interfaces, but setting a specific ip is also ok too

inland oxide
#

well he probably only has one interface

#

and localhost

keen compass
#

while that might be the case, might not be something you want if say you have 2 ip's assigned. Although generally most people don't do this though lmao

#

Anyways, you can either modify the file and put 0.0.0.0

#

or leave it how it is

undone pine
#

im testing with a friend rn to see it everything's fine

keen compass
#

the thing that is important however is that your system is set to use a static ip though

#

you don't want it to change otherwise you will have to update your router stuff again

normal flume
#

hey, i'm getting this error when trying to run luckyperms on my bungeecord server, and it said to ask spigot for help, so here i am, here's the error i got: https://pastebin.com/i4hxjV1w

inland oxide
#

your config.yml is wrong

bleak cipher
#

how do you do line breaks in hover event component?

normal flume
#

what do you think is wrong with it?

inland oxide
#

you need to look at the line around 24

normal flume
#

k

inland oxide
#

probably missing a newline or improperly formatted

#

you can also paste into the pastebin site, save and copy the url here

#

?paste

worldly heathBOT
inland oxide
#

there are also online yaml parser that can tell you if your config.yml file is malformed

undone pine
#

https://imgur.com/l1H92no this is the router port forwarding page, my friend can't connect and i can't connect too when using the external ip

inland oxide
#

its very particular to proper format and spacing

undone pine
#

i tried with 0.0.0.0 in server properties and also with the internal ip

normal flume
#

line 24 seems fine to me

inland oxide
#

maybe just remove the blank line with the spaces in it

normal flume
#

works now

#

thanks!

keen compass
#

@undone pine because the server is on the same system as your client, you do not use your external ip to connect. Everyone else outside of your home connects using your external ip

inland oxide
#

also, might need to use 127.0.0.1 not localhost, not sure.

keen compass
#

depends if they left the server.properties to 0.0.0.0 or not

undone pine
#

but my friend is trying and he cant

keen compass
#

are you certain you are using the correct external ip?

undone pine
#

yes

#

im checking online and all sites say the same external ip

keen compass
#

check to make sure you allowed it through windows firewall

#

also might want to check that the systems IP didn't change either

undone pine
#

it didnt

keen compass
#

and occasionally AV's tend to get in the way too

undone pine
#

no av on

keen compass
#

so check to make sure you don't have AV's running or add it to its exception list, and check to make sure windows firewall isn't blocking it

undone pine
#

what should i look into on the windows firewall? is it java?

keen compass
#

Should be able to just add custom programs in there

#

so you would point it to your servers jar

#

and like in the router add the port

undone pine
#

it only lets me add .exe .com and .icd

keen compass
#

could try adding java.exe to it. Not sure if that would work

#

other thing you could try is temporarily disabling the firewall

#

could be that your firewall is detecting your connection as public instead of private as well

#

which is annoying sometimes

frigid ember
#

how would you remove getNearbyEntities

#
    public void checkBoats() {
        new BukkitRunnable() {
            @Override
            public void run() {
                final List<Location> toRemove = new ArrayList<>();
                for (Location b : boatLocation.keySet()) {
                    double x = b.getX();
                    double y = b.getY();
                    double z = b.getZ();
                    long placeTime = boatLocation.get(b);
                    if ((placeTime + 200L) <= System.currentTimeMillis()) {
                        // b.getBlock().setType(Material.AIR);
                        b.getWorld().getNearbyEntities(b, x, y, z);
                        toRemove.add(b);
                    }
                }
                toRemove.forEach(boatLocation::remove);
            }
        }.runTaskTimer(this.plugin, 0L, 100L);// 20=1s
    }```
keen compass
#

grab a copy of the chunk, iterate for your list in a separate thread, then on main thread, remove entities that meet your criteria @frigid ember

crude coral
#

Hello i have a problem,
when i try to connect to my server it say

[17:51:30] [main/INFO]: [CHAT] Teleporting your to the server sbv
[17:51:30] [main/INFO]: [CHAT] Exception Connecting:QuietException : Unexpected packet received during server login process!\n038002
undone pine
#

so i found out it is the windows firewall which is not letting the connection go through

inland oxide
#

Is there a way to force playerdata to be flushed and written?

undone pine
#

if i turn it off completly the connection works with the external ip

keen compass
#

usually happens if the firewall detects your internet connection as public instead of private

#

you can change that if that is the case, simple google search will give you the necessary steps to do for that 😛

#

or just leave windows firewall disabled

#

not like it adds a whole lot of protections then what your router already does lol

tiny pebble
#

Is there an opposite to ConfigurationSection#createSection? I'm trying to get something to delete the section 😛

undone pine
#

yeah, i think windows thinks its a public connection

#

im gonna change it

inland oxide
#

nvm, found it

keen compass
#

@tiny pebble set the section as null

#

doing so causes it to be removed instead

tiny pebble
#

ah okay, thanks

fossil mural
#

Is there something in spigot that makes mobs specifically Zombie pigmen(piglin) act differently towards turtle eggs?

#

They seem to not care about the eggs when i am a certain distance from the are or they will edge towards it extremley slowly

grim halo
#

@fossil mural If you are far away the mobs AI is in a sort of "saving mode" so they are not using as much CPU. I thought this was a Paper thing tho

fossil mural
#

Is there a way to check exactly what the server is running in that regard

quartz trench
#

/version

grim halo
#

You can always extend the NMS entity, override the function you want to check, sysout info and call super.function afterwards

#

Here, for example, you can check when the AI gets ticked.
But you might have to dig deeper.

fossil mural
#

ah sadly i am not the server owner but the server owner we have is not exactly adept at these things

#

/version shows craftbukkit

subtle blade
#

It should show a commit hash too

#

Something along the lines of git-Spigot-abcdef-abcdef

#

As well as how many versions out of date you are

wet bronze
#

Guys

#

Is there a plugin that I can manually disable plugin in-game to figure out what plugins are breaking each other? Because doing it by restart takes way too long due to the fact my server takes a good 10 minutes to start up (because of how big my towny file is)

grim halo
#

Yes there is... didnt use it for quite some time but ill see if i can find it.

unborn jewel
#

plugman

grim halo
#

Plugman

#

Yes

#

What he said

subtle blade
#

Don’t expect any support from developers if you’re using plugman

wet bronze
#

I don't expect support from any developers of any kind.

subtle blade
#

Then you’re good to go

rare prairie
#

biletools

wet bronze
#

Not because I want to, because they either take days to answer or throw a pissy fit when they hear a discord notification from an @

fringe cairn
#

How do I get the item slot that's being moved of the source inventory during a hopper InventoryMoveItemEvent

subtle blade
#

I mean generally we are doing other things. A lot of our free time goes into development and support without anything in return

#

Can’t be on call 24/7

wet bronze
#

No but it sure as hell can't hurt to hear a notification when you're on do not disturb, especially when I'm on a deadline to finish this server.

tiny dagger
#

aren't plugins nowdays having a reload command?

#

my plugin for example can be fully reloaded by doing javaplugin.ondisable / onenable

#

with no consequences

subtle blade
#

Generally yes and are safer, but Janny wants to shutdown the plugins individually

wet bronze
#

^

#

I have a plugin that's breaking even though I completely resetted it with a fresh new copy, so it's obviously being fucked with by another plugin.

#

And I can't keep restarting my server to unload plugins because it takes a good 10 minutes to start my server.

tiny dagger
#

just do the 1/4th removal at a time excluding the f ed plugin

#

takes a few minutes

subtle blade
#

Half & half is quicker. Binary searching

tiny dagger
#

instead of 1 by one

#

or that

wet bronze
#

Could I use this in place of Plugman?

#

I'm on 1.16

#

And PlugMann isn't updated.

tiny dagger
#

not sure if any plugin managers actually work

#

🤔

#

i k for a fact perworldplugins won't work at all anymore

pastel arrow
#

plugman works for me on 1.16 though I don't recommend using any type plugin that claims to "reload" plugins on a live server

grim halo
#

But what is your problem. You should not need to disable every plugin by hand in order to find a problem.

tiny dagger
#

just do the half at a time

wet bronze
#

Movecraft, it's doing a glitch it wasn't doing up until 2 days ago after working perfectly fine for weeks.

#

I've tried resetting it with a fresh copy 3 times and still getting the same bug.

#

If it was movecraft's fault, the bug would've gone away with resetting it because it's not a movecraft bug, it's a bug with my server.

#

just do the half at a time
@tiny dagger If I do half at a time, whatever half fixes the issue, I'm going to have to put them back 1 by 1 either way to figure out which one is the problem.

tiny dagger
#

move them

#

in a sub folder

#

lol

wet bronze
#

Yes but keep in mind every time I restart it takes 10 minutes, I have people that want to play.

fringe cairn
#

then you put back a half of the half, and a half of that half until it's reasonable to do one at a time

tiny dagger
#

copy the server and do it offline?

#

you shouldn't be doing debugging on a live servers anyway

wet bronze
#

My server is 17 GB big .-.

fervent bone
#

server map huh

tiny dagger
#

you don't need the map

#

you need the plugin configs

wet bronze
#

Ye my map alone is 14 of the 17 lol

tiny dagger
#

well

wet bronze
#

Hmm

tiny dagger
#

3 gb is reasonable

fervent bone
#

how can plugins be 3gbs wtf

tiny dagger
#

exclude essentials

#

and you will be gold

wet bronze
#

Because of Towny and Dynmap

#

Imagine using dynmap on a 14 GB map 🙂

fervent bone
#

14gb isnt that big

wet bronze
#

It's definitely not normal lol, it's a 1:1000 rendition of earth

fervent bone
#

i mean 15k x 15k is about 16gb

#

30k*

#

so from -15k to 15k

wet bronze
#

Mines is 40k x 20k

#

Like 40k from left to right and 20k from up to down.

fervent bone
#

so thats about the same as 30k x 30k

wet bronze
#

Yeah

#

m a t h

tiny dagger
#

purge unaccesed chunks in a long period of time then 👀

#

not sure if linux has meta of that tho

wet bronze
#

?

fervent bone
#

i mean if you limit size of world then size isnt a problem.

#

oh and btw whats that glitch/bug you're talking about?

wet bronze
#

Basically, when you pilot a craft, you're able to move it one 1 before it breaks and doesn't move again until you re-pilot it, afterwhich it can only move 1 block again. Apart from this, when you DO move it that 1 block, you don't move with the ship how you're supposed to.

fervent bone
#

which version of mc?

wet bronze
#

1.16.1, and it's not an issue with the version because we've been using movecraft on 1.16.1 for almost 2 weeks now with no issues.

fervent bone
#

i mean it doesnt say its compatible. so maybe something got wrong

keen compass
#

considering chunks are stuffed in region files @tiny dagger the only meta the OS will have is when the last time the region file was changed

wet bronze
#

It is, it's just not a fork of the original creator

#

One of the creators of movecraft got tired of it only being kept in 1.13 so they made a separate fork of the plugin.

tiny pebble
#
groups:
  founder: 100
    permissions:
      - smm.founder

In a YamlConfiguration can I set values of ConfigurationSections such as how founder is equal to 100, while also having permissions be a section under it? If so, how?

wet bronze
#

Socrates type shit right there, I can't stand servers that stick to lower versions.

tiny pebble
#

if not I can just create another section named number or something, this would just be easier

fervent bone
#

idk if thats possible tanku

#

you could make something like

#
  groups:
    founder:
      value: 100
      permissions:
        -...
tiny pebble
#

aight, i'll just add a section under it and set that value

#

yeah, like that

unborn jewel
#

@mellow wave Do you have an account on Oracle i can use because i don't wanna have to sign up to download jdk 8

keen compass
#

yes you can @tiny pebble

#

a configurationsection can have a value while also having child paths under it

tiny pebble
#

how would i get that to work then?

keen compass
#

You would just specify the path that you want

#

so your example. Path would be groups.founder and then you could get the children like so groups.founder.permissions

frigid ember
#

public void onBoatCreation(VehicleCreateEvent e) {
System.out.println("yes");

}
#

doesnt print yes in console?

#

when I place a boat

#

also with the VehicleEnterEvent, VehicleExitEvent

keen compass
#

need to make sure you implement Listener, register your event, and add @EventHandler above the method

frigid ember
#

ohh yea i made another class for it

#

thats why

#

still have to register it

#

srry

#

thanks

mellow wave
#

@unborn jewel I already told you what to do. You don't need jdk 8

#

Besides I don't have or need an oracle account

unborn jewel
#

then what do I need

grim halo
frigid ember
#

OpenJDK

vale slate
unborn jewel
#

other people are telling me to use adopt open jdk

vale slate
#

I only use the official releases

unborn jewel
#

what should I use to to create plugins

#

14 or 8

vale slate
#

8

unborn jewel
#

ok

#

adopt or open?

vale slate
#

I used to use open

unborn jewel
#

ok so adopt then?

vale slate
#

nah I am currently using the premium SDK from Oracle
Open should do the job

unborn jewel
#

How do i uninstall jdk 14

vale slate
#

Linux or Windows

unborn jewel
#

windows

vale slate
#

go to the control panel

unborn jewel
#

yea

vale slate
#

Uninstall software

unborn jewel
#

yea

vale slate
#

then you need to search

#

should be named Oracle JDK xxx or something similar

unborn jewel
#

ok

vale slate
#

you uninstalled it?

unborn jewel
#

yea

mellow wave
#

You don't need another jdk..

#

You already have one

unborn jewel
#

i got jdk 14

#

I need 8

mellow wave
#

All you need to do is set the compile version

unborn jewel
#

oh

mellow wave
#

That's what I told you last time

unborn jewel
#

woops

mellow wave
#

I also guided you to how

vale slate
#

You can use JDK 14 but it is discouraged

normal flume
#

hey, for some reason, even though i do /setworldspawn and /gamerule spawnradious false, players will still spawn at their last locations and sometimes random location in the lobby, is there a way to permanently set the spawn point for players? also, i get this error every time i hop servers in my bungeecord network if that has anything to do with it: https://pastebin.com/AZH2RXTB

mellow wave
#

@vale slate Why would it be discouraged?

unborn jewel
#

so should I still use the openjdk

vale slate
#

Because you always should stick to the version your API is using

mellow wave
#

When you set the compile version it disables the newer features

#

Which means that there shouldn't be any difference between the versions

unborn jewel
#

Why is it discouraged to use jdk 14?

mellow wave
#

It isn't as far as I know

vale slate
#

It could happen in rare cases that some parts of code will not be compiled correctly

unborn jewel
#

BRO

#

omg oracle annoyinh

frigid ember
#

Null: Caused by: java.lang.IllegalArgumentException: bound must be positive at java.util.Random.nextInt(Random.java:388) ~[?:?] at com.benyji.core.mobs.SpawnerController.randomMob(SpawnerController.java:66) ~[?:?] Line 66: ``` String entity = entityList.get(r.nextInt(entityList.size()));

unborn jewel
#

why do i need to login

#

before i didn't need too

mellow wave
#

Because they want you to use the latest version? That's the only reason I can think of

vale slate
#

^

unborn jewel
#

isn't jdk 14 though the latest

vernal lance
#

add a check if it's empty @frigid ember

frigid ember
#

The list?

vernal lance
#

yes

frigid ember
#

Okay bet ty

vale slate
unborn jewel
#

i was in the archive one

frigid ember
#
[13:53:51 INFO]: true``` Ohh yee ik whats going on, thanks for getting me to check tho that helped @vernal lance , Appriciate it ❤️
balmy sentinel
#

Is there no way to get the inventory name in InventoryClickEvent?

frigid ember
#

@balmy sentinel Nah you gotta make your own sorta UUID to get the inventory and store it somewhere

#

took me days to realize that xd

balmy sentinel
#

there used to be a way..

frigid ember
#

Make like a public static key or something

#

Maybe there is? I tried reasearching and couldnt find poop

balmy sentinel
#

I can't find it I'll just do your UUID idea

frigid ember
#

How does the TabExecutor work in BungeeCord? Do i need to implement it in the Command extending class?

unborn jewel
#

@mellow wave I would use 1.8 right?

frigid ember
#

@balmy sentinel Ye goodluck with it, if you need help or explanation DM me ill try my best

unborn jewel
#

for compiler lvl

pastel sierra
#

I have a class implementing LivingEntity and I want to make a function to pass all the properties from EntityType to that class. Is there a quick way to do it rather than setting every single property manually

mellow wave
#

Yes

#

When you've set that option for your project everything should be fine

unborn jewel
#

ok thx

mellow wave
#

Unless you've used a method that's newer than java 8

frigid ember
#

Ah ok i found this: Registering the command is enough. Bungee will handle the rest. This is not bukkit

#
``` Makes it so that it can't be broken by a sword or get hit right? because for some reason I can kill it with a sword
#

oof. Hm how can i use Bukkits copy partial matches into bungeecord?

mellow wave
#

@frigid ember You in creative?

frigid ember
#

good question

mellow wave
#

If you are that's the reason

frigid ember
#

let me check xd

#

Oh haha I am

#

thanks @mellow wave <33

mellow wave
#

You could add the marker tag to fix that :)

frigid ember
#

Marker tag?

#

@mellow wave is it also possible to allow mobs to spawn through a mob spawner bypassing the rules like zombies can spawn at day and mooshrooms can spawn on any enviroment too through these tags?

mellow wave
#

hm not sure

frigid ember
#

hm okay np

#

But what is a marker tag?

#

For the creative thing

mellow wave
#

It tells the client to ignore that the armor stand exists when interacting with it causing you to be able to place blocks and interact through it

frigid ember
#

How would I go about doing that? Never heard of it

mellow wave
#

It's setMarker(true)

#

It doesn't exist in older versions so be careful about that

frigid ember
#

Older versions like 1.7.10 under?

#

and ty it worked

mellow wave
#

It was added in 1.9 1.8.1

frigid ember
#

Oh gotcha, do you know if there is another way to do it for 1.8?

mellow wave
#

Turns out it was added in 1.8.1

frigid ember
#

Ohh perfect

mellow wave
#

So just tell your users to use a newer version than 1.8.0

frigid ember
#

Yeah for sure, thanks for your help <33

mellow wave
#

No problem :)

frigid ember
#

Hi anybody have his mobs freezing ?

#

It tells the client to ignore that the armor stand exists when interacting with it causing you to be able to place blocks and interact through it
@mellow wave I believe it makes the stand's hitbox of size 0

mellow wave
#

Yeah I didn't know the exact effect just told him what I knew from personal experience :P

frigid ember
#

either way, it works xd

#

Who can help me ?

#

Are all the mobs freezing?

#

Yes and villagers too

#

🤔

mellow wave
#

Do you have any plugins installed that would affect mob behaiviour

frigid ember
#

And have time when they are normal and next time they are freezed

mellow wave
#

I know there are plugins that freeze mobs when the server is under heavy load

frigid ember
#

Mmm i delete that pluguin witch cousse that and still happens

#

But when the surver is reloaded its not heavy loaded and they are freeze

mellow wave
#

Don't reload the server, always restart

#

Reloading can cause issues with some plugins and is generally a bad idea unless you know what you're doing

frigid ember
#

Ok thank you will chek then my pluguins

#

But this is not happens in other servers ?

rare prairie
#

you can't

#

it just throws exception

unborn jewel
#

@mellow wave im still getting it org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/jtx/hubscoreboard/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.UnsupportedClassVersionError: me/jtx/hubscoreboard/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

pastel sierra
#

You want same result

#

from score help

#

and score info

rare prairie
#

you don't need to register aliases for commands, just using getCommand("cmd")
and in the onCommand method you can use args to specify multiple arguments

pastel sierra
#

You wouldn't need an alias because the command is the same

#

You know how to register commands right

rare prairie
#

bruh

pastel sierra
#

Just register /score

frigid ember
#

I believe s/he wants tab suggestions

pastel sierra
#

Can you show the code snippet?

#

Or pastebin it

rare prairie
#
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    if (args.length == 1 && args[0].equalsIgnoreCase("score")) {
      //code
    }
pastel sierra
#

Remove args.length == 1

#

and it will work

rare prairie
#

bruh

#

it throws Argument exception

#

go learn java first

#

also there are lot of forums for using command arguments

#

use google

#

reading docs = knowns what that means

pastel sierra
#

You probably don't understand a line because you didn't learn java first

rare prairie
#

bruh

#

my projects

pastel sierra
#

OK so can I ask my question now O-o

frigid ember
#

Just ask

pastel sierra
#

I made a class form the interface LivingEntity and I have a LivingEntity stored in a variable which I want to convert into my class I created, what's the best way to approach this?

rare prairie
#

use extends

pastel sierra
#

LivingEntity isn't a class according to spigot docs

frigid ember
#

lmao

pastel sierra
#

ok just realised I'm dumb

#

I can make it into an interface

keen compass
#

Pass in the reference entity to your class and implement whatever interface you are wanting

unborn jewel
#

org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/jtx/hubscoreboard/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.UnsupportedClassVersionError: me/jtx/hubscoreboard/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

rare prairie
#
java.lang.UnsupportedClassVersionError: me/jtx/hubscoreboard/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

it describes

unborn jewel
#

yea ik

mellow wave
#

Are you sure that you set and saved the compile version right

unborn jewel
#

but i changed it already

#

yea

rare prairie
#

now you should compile your project to be runnable "exported" jar file

mellow wave
#

Yeah I don't use Eclipse so not sure what the issue is

tiny dagger
#

update java

unborn jewel
#

oh

#

hehe

#

i had it at jar file

#

wait no shouldn't it be at a jar file

#

@rare prairie why runnable jar file?

rare prairie
#

sorry, i mean "Jar file"

wet bronze
#

[14:44:14 WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

#

What is this

unborn jewel
#

that's what i had before

rare prairie
#

its night here going to dig myself

#

[14:44:14 WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
you have plugins that uses materials and needs to be loaded, ignore it, its not a bug

keen compass
#

Most likely you have a plugin that is using legacy methods

rare prairie
#

not legacy method

#

material

keen compass
#

which has a method for it

frigid ember
#

It's not defining the api-version

#

That's all

rare prairie
#

its defined

frigid ember
#

It only shows that for plugins with no api-version

rare prairie
#

np

#

like for jobs, we have setup api-version and it the same

#

api-version: 1.13, maybe because the old version

frigid ember
#

???

stoic shell
#

Can someone show me any useless fragments I should remove in this build.gradle and what I can do to make it correctly have the full spigot api?

balmy sentinel
#

@frigid ember figured it out, there is a classes called InventoryView you can use if(event.getView().getTitle().equals("inventoryName"))

frigid ember
#

@balmy sentinel if only I knew that earlier I couldve saved myself 100 lines xd

#

but thanks i'll use that from now on

balmy sentinel
#

dead lol I knew there had to be something

keen compass
#

?jd

keen compass
#

javadocs are handy you know 😉

balmy sentinel
#

that's where I went lmao, but it used to be inv.getName() last time I coded plugins. Getting back into it for a friend

keen compass
#

there is a nice search bar in the upper right corner

#

🙂

#

if you start typing there it will start giving you suggestions of what is similar to what you are typing in

stoic shell
#

:/

frigid ember
#

there is a nice search bar in the upper right corner
He just said it used to be getName, how is he supposed to know that it's getTitle now?

long burrow
#

Anyone able to dummy down this java error for me? It worked not even a minute ago, went for a reboot

#

and now it wont start

#

Its bungee

tiny dagger
#

somewhere you cast string

#

when the type is linkedhashmap

long burrow
#

but I have not changed anything o,o

tiny dagger
#

wait

#

config errors

#

probabily

long burrow
#

Its been the same config since start and it worked fine then

#

should I just clear config and generate new one?

tiny dagger
#

can you send your proxy jar?

pastel sierra
#

Btw is the best way to store some extra data within an entity to make a new class for the entity

#

or is there a better way

tiny dagger
#

you can edit the pathfinders but that's about all you can do without extending the class

median swift
#

Okay so

#

It says done then closes

stoic shell
#
processResources {
    project.properties.put("version", this.version)
    expand project.properties
}```
What does this do and what is the point of it?
rare prairie
#

gradle?

median swift
#

It says done then closes
@median swift

stoic shell
#

it's gradle, yes...

languid anvil
#

02:18:37 [INFO] [TheVanshGamer] <-> ServerConnector [AuthLobby] has connected
02:18:37 [INFO] [TheVanshGamer] disconnected with: Kicked whilst connecting to AuthLobby: For registered players only! Please visit http://www.example.com/ to register

What part of the configuration is this from?

#

I am using AuthMe reloaded

#

Could you help me with my problem?

#

please

grim halo
median swift
#

i thought my error was common but

#

i guess not

grim halo
#

@median swift Maybe some of your plugins shuts the server down after start?

median swift
#

hOW

unborn jewel
#

t PluginClassLoader as parallel capable

[19:15:18 ERROR]: Could not load 'plugins/HubScoreBoard.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/jtx/hubscoreboard/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:331) ~[patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:254) [patched.jar:git-PaperSpigot-"4c7641d"]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:293) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:202) [patched.jar:git-PaperSpigot-"4c7641d"]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched.jar:git-PaperSpigot-"4c7641d"]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]

#

bro this is tupid

#

i don't think this is fixable

subtle blade
#

has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

#

You're running Java 8, plugin was compiled using Java 11

unborn jewel
#

wtf

#

I have java 11 on my machine though

#

on my vps

#

well dedi

subtle blade
#

If you have 8 installed as well it's possible that's what you're running it with

#

Depends on your system. On Windows anyways you'd have to change your environment variables. Not sure how Linux handles Java

median swift
#

It goes server permissions.yml is empty, ignoring it.
then its the Done!

and then saving chunks

#

and closes

pastel sierra
#

If I basically want a living entity that stores an integer value with it do I have to make an enum of every single living entity

#

How do I register it?

unborn jewel
#
        Score score3 = obj.getScore("Rank: ");
        score.setScore(3);
``` it's saying this variable isn't being used but it is
rare prairie
#

its not used

#

score3 not used

unborn jewel
#

Im setting Rank in it

rare prairie
#

k

pastel sierra
#

Can I cast a bukkit entity to nms?

unborn jewel
#

what is weird my other variable works fine

#

nvm i fixed it

#

Im just stupid

calm frost
#

Hello, how to block enchant knockback on minecart? 😄

rare prairie
pastel sierra
#

Can I cast a bukkit entity to nms?
anyone knows?

#

I need to add nbt tag to an entity but I can't do it in the bukkit entity

grim halo
#

You can cast it to CraftEntity and use the getHandle() method to get the NMS entity

#

Why do you need to add an nbt tag?

frigid ember
#
    at com.benyji.core.events.SpawnerBreakEvent.spawnerBreak(SpawnerBreakEvent.java:39) ~[?:?]
``` Line 39: ```                        if (Main.getFileManager().getUUID(spawner).equals(player.getUniqueId().toString())) {
``` why is that null? it hasn't been deleted yet
pastel sierra
#

I need an nbt tag to store a value with the entity

grim halo
#

Use PersistentDataContainer.
If you are on 1.8 you can use the ScoreboardTags

rare prairie
#
    at com.benyji.core.events.SpawnerBreakEvent.spawnerBreak(SpawnerBreakEvent.java:39) ~[?:?]
``` Line 39: ```                        if (Main.getFileManager().getUUID(spawner).equals(player.getUniqueId().toString())) {
``` why is that null? it hasn't been deleted yet

Main.getFileManager().getUUID(spawner) this can be null, invert the equals

frigid ember
#

invert the equals?

unborn jewel
#

how can i get what server they are on?

rare prairie
#

invert the equals?

if (player.getUniqueId().toString().equals(Main.getFileManager().getUUID(spawner))) {
frigid ember
#

ohhh gotcha thanks!

rare prairie
#

and make sure Main.getFileManager() is not null

grim halo
#

bc equals is null save and player.getUniqueId is NotNull

rare prairie
#

yes

#

thats why we inverted

frigid ember
#

Is it possible to allow Spawners to spawn Zombies during day and mooshrooms/slimes in any enviorment?

grim halo
#

Unless... getFileManager() returns null. then you could still get an NPE

rare prairie
#

y

frigid ember
#
``` ```Caused by: java.lang.NullPointerException
    at com.benyji.core.gui.interact.InteractionListener.uiInteract(InteractionListener.java:34) ~[?:?]``` The other null was fixed, this is the other one
rare prairie
#

e.getCurrentItem() can be null

#

make another null or not null check

frigid ember
#

fixed, thanks 🙂

#

Is it possible to allow Spawners to spawn Zombies during day and mooshrooms/slimes in any enviorment?
@frigid ember Anyone know about this?

pastel sierra
#

Use PersistentDataContainer.
If you are on 1.8 you can use the ScoreboardTags
how do I use persistentdatacontainer with entities?

#

I've never used them

noble aurora
#

what is a good plugin for shops? 1.15 *

#

and is free

rare prairie
#

shopgui

frigid ember
#

BlockExplodeEvent, runs when tnt breaks a block right?

noble aurora
#

ty

rare prairie
#

BlockExplodeEvent is called, when a block exploded by any of explosion thing

frigid ember
#

Hmm mine isnt running, I have the annotation and registered in main

#

1 is never printed

unborn jewel
#

How can i get the server name of the player is in?

tiny pebble
#
List<String> list = usersConfig.getStringList(uuid + ".permissions");
list.add(name);
usersConfig.set(uuid + ".permissions", list);

This seems to set the list, not add to it. What am I doing wrong?

keen compass
#

need to save it

tiny pebble
#

i did

keen compass
#

for it to apply to the file

tiny pebble
#

It does, it just doesn't add to the list. It replaces it with the value

stoic shell
#

Anyone know what Material.SMOOTH_BRICK is in modern spigot versions?

keen compass
#

need to get the list

#

as a List

#

add to it, then re-save it

lyric cypress
#

I set the max health attribute of an entity to 200, but it is wearing equipment with a max health attribute. How do I get it to full health

tiny pebble
#
List<String> list = usersConfig.getStringList(uuid + ".permissions");
list.add(name);
usersConfig.set(uuid + ".permissions", list);                  usersConfig.save(Main.getInstance().getUsersConfigFile());

@keen compass Is that not what I did?

lyric cypress
#

Why don't you save it in 1 file

#

and use the names in a hashmap

tiny pebble
#

huh

lyric cypress
#

Map<String, Perm> = new HashMap<>();

#

and perm is like your perms class

#

you have to make a serializer and deserializer for your Perm class

#

and it can all be in 1 file

#

also you should probably use uuid instead of name in the case of name changes

tiny pebble
#

All I am trying to do is add to a list within my YamlConfiguration.

lyric cypress
#

and the list is of Strings?

tiny pebble
#

yes indeed

stoic shell
#

anyone...?

#

I still don't know what Material.SMOOTH_BRICK is now... .-.

lyric cypress
#

Map<String, List<String>> map = new HashMap<>()

keen compass
#

Oh, think you need to use an array instead

tiny pebble
#

i'll try using an array

keen compass
#

so String[] list = usersConfig.getStringList(uuid + ".permissions");

#

you can grab the array and stuff it into a list object

#

but when you go to save it you need to turn it back into an array

tiny pebble
#

well not exactly that seeing as getStringList returns a List

#

just gotta convert it

keen compass
#

I usually just make my own lists

stoic shell
#

oh

keen compass
#

smooth brick is the one made out of stone

#

and looks like bricks

stoic shell
#

stone bricks...

#

just realized xD

tiny pebble
#
List<String> list = usersConfig.getStringList(uuid + ".permissions");
list.add(name);
Object[] objectArray = list.toArray();
String[] array = Arrays.copyOf(objectArray, objectArray.length, String[].class);
usersConfig.set(uuid + ".permissions", array);
usersConfig.save(Main.getInstance().getUsersConfigFile());

So just conversion to an array then?

#

hmm

stoic shell
#

oh cmon...

tiny pebble
#

still does the exact same thing

stoic shell
#

there's more materials to fix...

keen compass
#

yeah not sure

#

always found that using stringList to not work properly

#

so I generally just implement yaml stuff myself

tiny pebble
#

i get that

#

i just want it to be accessible via command as well

keen compass
#

well implementing yaml yourself would still allow that

#

the only difference you are doing here is you are using the API to interact with yaml

#

you don't actually have to use the API for that

#

spigot uses SnakeYaml implementation

#

which is shaded into the server

stoic shell
#

huh

#

It used Material.SKULL_ITEM

#

Looking up skull items, there are 6 different skulls that could be...

#

how do I know which it referred to?

subtle blade
#

Version?

#

At least pre-1.13 I presume?

stoic shell
#

I think

#

most likely

subtle blade
#

You don't know what version you're writing code for? o.O

stoic shell
#

no I mean

tiny pebble
#

Ah Choco do you know why yaml's are wonky?

List<String> list = usersConfig.getStringList(uuid + ".permissions");
list.add(name);
usersConfig.set(uuid + ".permissions", list);                  usersConfig.save(Main.getInstance().getUsersConfigFile());

Or just what I'm doing wrong? It doesn't add the permission, it just sets it, still making it one permission :c

stoic shell
#

I'm updating a plugin to 1.16.1

#

and it uses old materials

subtle blade
#

Post-1.13, there are separate materials for each

#

Material.PLAYER_SKULL, SKELETON_SKULL, etc.

stoic shell
#

yeah

subtle blade
#

Before then, they all used data values. I think player was a byte value of 3, skeletons were 0, etc.

unborn jewel
#

How can i get the server name of the player is in?

stoic shell
#

well it didn't set any of that

#

oh wait

#

nvm

#

Short 3

subtle blade
#

That's a player skull then, yeah

tiny pebble
#

@unborn jewel player.getServer().getName();?

stoic shell
#

ah thx

subtle blade
#

Not super well defined that value, Tanku. There's not really a "name" for servers

tiny pebble
#

huh

subtle blade
#

There might be on the proxy though

tiny pebble
#

welp it was worth a try

#

im still trying to fix my damn list tho

subtle blade
unborn jewel
#

thank you

subtle blade
#

Though I don't think that's quite the same as what's returned by Server#getName() from Bukkit. I don't quite remember what that returns

stoic shell
#

oh darn

subtle blade
#

Yeah, byte data doesn't exist anymore

stoic shell
#
         TeamBridge teamBridge = (TeamBridge)game.teams.get(i);
         byte data = ((TeamColor) Saves.teamColors.get(teamBridge.getTeamColor())).getByteColor();```
#

yeah I realized

unborn jewel
#

Tanku im trying to make it so it shows like the #1 since its the first lobby is that possible?

stoic shell
#

so then what would I be setting now?

subtle blade
#

That's for wool colours?

stoic shell
#

Terracotta

subtle blade
#

Same idea, yeah

#

Those too have their own separate materials

inland oxide
#

Same idea?

stoic shell
#
            for (int y = 0; y < game.bridgeYSize; ++y) {
               Location location = game.gameCenterLocation.clone().add(new Vector(v.getX(), (double)(-y), v.getZ()));
               Block block = location.getBlock();
               block.setType(Material.TERRACOTTA);
               block.setData(data);
            }```
inland oxide
#

You seem to have a lot of same idea

stoic shell
#

Actually it was STAINED_CLAY, but that it now-a-days terracotta, so I changed that

inland oxide
#

like LockSecurity is same idea as PadLock

subtle blade
#

So you'd have RED_TERRACOTTA, etc.

#

idk what PadLock is

stoic shell
#

wait a moment...

#

teamBridge.getTeamColor()
Would this be what I need?

subtle blade
#

Ah, one of your resources. Well, klugemonkey. I regret to inform you that LockSecurity has existed before yours did so... lol

#

snoopy you have two options.
(1) Return a DyeColor enum constant and have a Map<DyeColor, Material> (where the material are the terracotta variants)
(2) Return a terracotta material directly

#

I think the DyeColor would be a bit more flexible but it's up to you

tiny pebble
#

How can I successfully add to a list in a YamlConfiguration?

key:
- item
- item.2
- item.3

Such as ^

List<String> list = usersConfig.getStringList(uuid + ".permissions");
list.add(name);
usersConfig.set(uuid + ".permissions", list);
usersConfig.save(Main.getInstance().getUsersConfigFile());

Tried this, just replaces the list as name, while still being a list. So it doesn't add to the list.

stoic shell
#

hmm

#

I was gonna try doing something like 'Material.' + color + '_terracotta', but idk how to do that in java

#

so... maybe #1 would be better...

#

How would I do #1?

subtle blade
#

Well replace any instance of the byte data with instances of DyeColor for one

#

Beyond that, you'd have to create some constant EnumMap<DyeColor, Material> and for all DyeColor constants, map them to the appropriate terracotta material constants

stoic shell
#

👀

#

I'm confused already

subtle blade
#

The method's return type for instance. Change it from a byte to a DyeColor

unborn jewel
#

im trying to make it so it says Lobby: #1 and the server name is called Hub is there a way I can make it so it somehow renames it but actually rename it just in the text to #1?

subtle blade
#

And anywhere a byte is passed for a colour, use a DyeColor instead. You can at least start with that.

stoic shell
#

maybe I am not understanding something, or maybe it's because I didn't show the whole area...

#
      int i;
      for (i = 0; i < game.GetTeamsCount(); ++i) {
         TeamBridge teamBridge = (TeamBridge)game.teams.get(i);
         byte data = ((TeamColor) Saves.teamColors.get(teamBridge.getTeamColor())).getByteColor();

         int y2;
         for (y2 = 0; y2 < game.edge; ++y2) {
            Vector v = GetVectorFromGameDirection(game.edge - y2, direction);

            for (int y = 0; y < game.bridgeYSize; ++y) {
               Location location = game.gameCenterLocation.clone().add(new Vector(v.getX(), (double)(-y), v.getZ()));
               Block block = location.getBlock();
               block.setType(Material.TERRACOTTA);
               block.setData(data);
            }
subtle blade
#

Yeah,
byte data = ((TeamColor) Saves.teamColors.get(teamBridge.getTeamColor())).getByteColor();

#

That bit there

stoic shell
#

well yeah, I would remove (or replace) that

subtle blade
#

You can remove that getByteColor() method and add a getColor() method that returns a DyeColor instead

#
      int i;
      for (i = 0; i < game.GetTeamsCount(); ++i) {
         TeamBridge teamBridge = (TeamBridge)game.teams.get(i);
         DyeColor color = ((TeamColor) Saves.teamColors.get(teamBridge.getTeamColor())).getColor();

         int y2;
         for (y2 = 0; y2 < game.edge; ++y2) {
            Vector v = GetVectorFromGameDirection(game.edge - y2, direction);

            for (int y = 0; y < game.bridgeYSize; ++y) {
               Location location = game.gameCenterLocation.clone().add(new Vector(v.getX(), (double)(-y), v.getZ()));
               Block block = location.getBlock();
               block.setType(Material.TERRACOTTA);
               block.setData(data);
            }```
#

So you have something like that now

#

Right under your color var, you can make a call to a Map<DyeColor, Material> you've created which will basically convert those DyeColor constants to a Material

bright wraith
#

How can I create a 3x3 Inv

tiny pebble
#

Aight so I figured out my main issue.
List<String> list = usersConfig.getStringList(uuid + ".permissions"); This returns an empty list.
So how do I read a list such as:

key:
- list.object.1
- list.object.2
stoic shell
#

hmm

subtle blade
#

Then just call block.setType(theConvertedMaterial) and remove the call to Block#setData() (because data doesn't exist in 1.13+)

#

If it returns an empty list, Tanku, then the path doesn't exist

#

That, or YAML may treat . as a special character. Would at least wrap those in 'single quotes' or "double quotes"

stoic shell
#

oh no - one moment

tiny pebble
#

I can set something with the same path though, and it successfully sets. Then I can just never read it.

#

ah okay, i'll try with quotes possibly

stoic shell
#

crap...

subtle blade
#

because as far as I'm concerned, rest looks fine

frigid ember
#

yaml is a sensitive bitch regarding indentation, blank lines, quotes and all that

#

json ftw

stoic shell
#

oh good nvm, I was concerned my IDE was about to crash

subtle blade
#

JSON isn't a configuration file format

#

It's a data file format

stoic shell
#

oh wait...

#

getColor gives a Color

#

not a DyeColor

frigid ember
#

both are text files at the end of the day, all you need is a parser and you're done

stoic shell
#

So I need to change that...

subtle blade
#

Well if a getColor() already exists it's probably used somewhere

#

Color objects are fine

stoic shell
#

oh

subtle blade
#

Would just make another method, getDyeColor() or something

#

If you really want to, you could probably use that Color object for chat colour lol. 1.16 has RGB chat

stoic shell
#

wait, can I just convert that color to the terracotta material?

frigid ember
#

Also, why does bungeecord api have YamlProvider and JsonProvider (or however they are called) but bukkit api only "allows" (encourages is the word actually) yaml instead? 🤔

stoic shell
#

Or does it have to be a DyeColor?

subtle blade
#

Don't think there's a direct mapping from Color to Material

#

I mean either way you're going to have to Map something to a Material

tiny pebble
#

Alright so