#help-archived

1 messages · Page 171 of 1

strange forge
#

it's optional iirc

nimble stump
#

Sets aren’t guaranteed to iterate in any particular order

strange forge
#

^^ which is why you convert it to a list first

nimble stump
#

Then what’s the point in having a set to begin with

#

Now you’re making an extra copy in memory for no reason

strange forge
#

sets are no-duplicates

nimble stump
#

Well yes

frigid ember
#

Ok so guys what is a good rtp plugin for 1.16.1?

strange forge
#

that gives them a lot of uses

nimble stump
#

But you could just as easily implement that with a sorted list

#

If you know it’s going to be sorted

#

And then you’re not using 2x the memory

strange forge
#

that's one idea too. i don't think they considered it much, but creating a small copy is no big deal since it gets deleted

#

don't forget that multithreading and immutability follow the very same core principle

#

@frigid ember pretty sure any rtp plugin should work just fine in 1.16 just like other versions

nimble stump
#

Depends on how small it actually is

#

There’s no guarantee it’s small

strange forge
#

my bad, meant lightweight not small

frigid ember
#

so confused

frigid ember
#

doesnt a list require two inputs?

#

nvm

strange forge
#

Alex don't forget that you'd sacrifice the O(1) performance of a hashset if you were to use sortedsets

nimble stump
#

That’s a Map @frigid ember

frigid ember
#

hmmm...

nimble stump
#

I never suggested using a sorted set lol

nimble stump
#

I said sorted list

strange forge
#

oh my bad, you said list

nimble stump
#

Lmao

strange forge
#

sorry just woke up haha

nimble stump
#

No problem lmao

frigid ember
nimble stump
#

Do you need to return it as a Set

strange forge
#

redundant toString() calls too, UUID#equals is just fine

tropic shadow
#

hey, I'm trying to implement a 2v2 manhunt plugin - kinda similar to Dream's thing but with 2 teams of 2 (all players with compasses). I'm using player.setCompassTarget(enemy.getLocation()) to set the compass target. but for some reason, the compass just... doesn't work! I can't decipher what it's pointing at. one thing I've noticed is that if the person it's tracking turns in place, and I'm not moving, my compass that's supposedly tracking them moves as they're turning in place. does anyone know what might be causing this?

frigid ember
#

not entirely @nimble stump

nimble stump
#

@frigid ember then use a List

#

It’ll maintain encounter-order

strange forge
#

@tropic shadow setCompassTarget just sends a packet to set the bed location

#

might have something that conflicts with your bed locations?

frigid ember
#

so i wouldnt even need to sort it?

tropic shadow
#

@strange forge nobody's tried placing a bed while testing - we're just loading a fresh world and setting teams

strange forge
#

@frigid ember judging by your previous question he assumed you return a Set then you want to sort it

frigid ember
#

i think i can do a list shouldnt be so hard

#

just make me change the whole way of my menu

strange forge
#

just toList() instead of toSet()

frigid ember
#

yes

nimble stump
#

As long as your data storage returns it in the order you want it in

#

That will be fine

strange forge
#

@tropic shadow similarly, /spawnpoints etc?

tropic shadow
#

@strange forge haven't touched that either

strange forge
#

hmm no idea really

nimble stump
#

@tropic shadow how often are you updating the compass location

strange forge
#

teleport to player#getCompassTarget() to see where it actually sets though

tropic shadow
#

@nimble stump well I've tried both just right clicking and then having everyone stand still while the tracked player turns, and constantly right clicking (right clicking sets the compass target). the thing that's confusing me is that when the tracked player turns, my compass updates. like my compass is tracking the way they're facing?? it's bizarre.

#

@strange forge: I've been logging the locations it's setting to the spigot console and they're correct

strange forge
#

strange, might be some bug server side. what version?

tropic shadow
#

1.15.2

strange forge
#

i don't know where you're setting it but

#

try to delay it by 1 tick

#

Bukkit.getScheduler().runTaskLater(plugin, () -> setCompassTarget(...), 1);

tropic shadow
#

@strange forge trying that now. what's your hunch as to why that might work?

lament sonnet
#

for people.showPlayer() if its not in my main class what would i put for plugin?

people.showPlayer(this, player);

im doing this but not in my main class and its not working

lone fog
#

An instance of your main class

strange forge
#

@tropic shadow generally many "bugs" happen when you run lots of tasks that involve packets on the same tick, for example joining then instantly updating game mode

#

so by delaying with 1 tick it's like running when all higher priority stuff have finished, most of the time it patches these weird things

tropic shadow
#

@strange forge interesting. will get back to you in a sec

#

@strange forge that didn't do it. want me to upload the source to GH? I feel like it's something else that's the culprit

strange forge
#

just upload the class where you set the compass target to pastebin or smth

tropic shadow
#

@strange forge line 140 is where I set the location

strange forge
#

hunt hunt

#

hunt noise

tropic shadow
#

it's a play on manhunt, bc we have two teams 😉

strange forge
#

you aren't delaying by 1 tick

nimble stump
#

Hunt hunt hunt hunt hunt hunt hunt hunt CARIBOUUUUU

tropic shadow
#

@strange forge oh yeah I took that out after trying it, it didn't change the behavior

strange forge
#

well add it back 😉

tropic shadow
#

🤷‍♂️ ok

#

@strange forge updated; just refresh

strange forge
#

hmm not quite sure, i used setcompasstarget before and didn't have issues

frigid ember
#

So i am trying to delete plugins from the rtp and when i restart the server they show up again (FireZilla)

buoyant path
#

@tropic shadow why are you not using primitives for size lol

#

you know that int can be put in a hashmap to replace integer

tropic shadow
#

@buoyant path 🤷‍♂️ it literally doesn't matter

strange forge
#

he does nullability checks for Integer

buoyant path
#

It doesn't but for good practice

tropic shadow
#

also that

buoyant path
#

how is the size of a hashmap gonna be null lol

#

only way would be if the actual hashmap is null

tropic shadow
#

it's not the size of the hashmap, it's whether there's something stored in that slot or not

#

lines 129-132

buoyant path
#

could just use containsKey but alright man lol

nimble stump
#

Integers are autoboxed to ints

buoyant path
#

also I recommend the early returns to you

nimble stump
#

And vice versa

#

It really doesn’t matter

buoyant path
#

using else if just looks bad in my eyes

#

sorry lol

tropic shadow
#

guys I do not care about this, I didn't come here for a code review, I just want to see if someone knows what's up with the compasses not pointing anywhere logical

buoyant path
#

I have faced problems with compasses as well

#

maybe its worth sending a packet instead?

frigid ember
#

So i am trying to delete plugins from the rtp and when i restart the server they show up again (FireZilla)

#

Please help me not go insane

buoyant path
#

the spigot API seems to have problems with compasses

tropic shadow
#

@buoyant path wym send a packet?

buoyant path
#

send a packet to show the compass dir

tropic shadow
#

send a packet... from what to what?

nimble stump
#

Try setting the compass target more often

tropic shadow
#

the confusing thing is I'm basing this off Dream's manhunt plugin, where he does the exact same thing, and it works just fine in the videos

#

@nimble stump I've tried that manually just by constantly right clicking

buoyant path
#

how do you know that Dream does that? He only has one video of him coding lol

#

and its some shitty mob equipment thing lol

tropic shadow
#

he has code published on patreon

buoyant path
#

oh

nimble stump
#

Try running his code

#

See if you get the same result

#

If you do, it’s a client/server issue

buoyant path
#

have you tried printing it out in chat

#

the compass target

nimble stump
#

Yeah he did

buoyant path
#

was it correct

tropic shadow
#

yep, it's correct

nimble stump
#

I genuinely think it’s the client not accepting it

buoyant path
#

in that case its 99% a clientside thing

nimble stump
#

In which case you’re kinda fucked

buoyant path
#

well you can send a packet

#

Im sure

nimble stump
#

Spigot should already be sending the packet

tropic shadow
#

the really confusing thing is that it appears to be affected by the direction the tracked player is facing. if everyone stands still, and the tracked player just spins in place, the compass moves

buoyant path
#

Ive faced that issue before

nimble stump
#

Well that doesn’t seem right

buoyant path
#

I wanted to make the compass point straight up

#

but it would move

#

when nothing was happening

tropic shadow
#

hmm

shadow venture
nimble stump
#

That could be an issue with their website

#

Can you join with a 1.16.1 client

shadow venture
#

No i can't

nimble stump
#

And you downloaded build #1524?

shadow venture
#

Yep

nimble stump
#

What does it say on your client

shadow venture
#

Ok i found a problem

#

screen session has not restarted

nimble stump
#

Well that would do it

shadow venture
#

I have did it now

#

and all works

nimble stump
#

👍

rotund orbit
#

How would I prevent mobs from spawning in a specific chunk with spigot?

#

I'm guessing through the EntitySpawnEvent

#

should've googled first, my bad

nimble stump
#

🙂

toxic pine
#

where do you find the latest spigot file

rotund orbit
#

Is there an easy way of checking if an entity is hostile?

#

Or do I have to check if it is each of the hostile mobs individually?

#

checking if it is an animal would also work

toxic pine
#

nvm

frigid ember
#

dan maybe try checking if its an instanceof Monster?

rotund orbit
#

agh so much easier

#

thank you

frigid ember
#

although i think neutral mobs like pigmen are still counted as hostile even when theyre not angry

#

might wanna check that

toxic pine
#

how do you update spigot

frigid ember
#

?bt

worldly heathBOT
frigid ember
#

that ^

toxic pine
#

okay ty

#

thats linux right?

frigid ember
#

u can use on windows

#

i have windows

toxic pine
#

but same command for linux

nimble stump
#

Be aware that ghasts are not Monsters @rotund orbit

frigid ember
#

i think so

nimble stump
#

So you’ll need to check them separately

frigid ember
#

im not sure, i dont use linux

toxic pine
#

im only using linux cuz i have a spare trash pc so i am using linux

frigid ember
#

it should be the same

toxic pine
#

ill just see if that commnad works

frigid ember
#

unless theres special instructions on there

#

for linux

toxic pine
#

ty for help

nimble stump
#

That will work on Linux

strange forge
#

ghost ping

tropic shadow
#

that was me - automod removed it for tagging you, alex, and iron man

#

lots of investigation

strange forge
#

oh mee6 smh

#

it did tht for me too

buoyant path
#

ghost ping?

strange forge
#

its pretty annoying

tropic shadow
#
  • the compasses are def tied to the direction the tracked player is facing I have no idea why or how still.
#
  • I tried Dream's JAR and it was busted too, same exact issue.
strange forge
#

aren't these compasses tho

tropic shadow
#
  • so, I thought it might be the client version. I tried both JARs on spigot 1.14.4, since Dream's plugin.yml specifies 1.14 as the API version. still busted
strange forge
#

they tell you where you should be going

#

give you direction

tropic shadow
#

no no

#

the direction the tracked player is facing

nimble stump
#

Seems like a client thing then

strange forge
#

ah

tropic shadow
#

like if I'm holding the compass and the player it's tracking turns in place, the compass turns

nimble stump
#

Like it’s using the pitch of the location for the compass

tropic shadow
#

but it shouldn't move because they're not moving, only turning

nimble stump
#

Instead of the actual location

tropic shadow
#

@nimble stump I also tried manually setting the pitch and yaw to 0 before setting the target, that didn't do anything

nimble stump
#

Did they still turn?

tropic shadow
#

yep

nimble stump
#

That’s fuckin bonkers

tropic shadow
#

right?!

#

so wym by client thing

nimble stump
#

Well it seems like the client is doing something fucky

#

Do you have any other plugins?

tropic shadow
#

wait, do you mean the server? there are no other plugins on the server

#

everyone's clients are completely vanilla

nimble stump
#

That’s very odd

#

I’m tempted to boot up my debug client and see if we can’t figure it out honestly

tropic shadow
#

want to hop in a voice channel?

nimble stump
#

I can’t VC right now, it’s quite late, but I can hop on in a few minutes

#

What version is the server

#

So I can launch the right build

tropic shadow
#

1.14.4 currently

nimble stump
#

Ok

tropic shadow
#

what's your username so I can whitelist

nimble stump
#

Same as here

tropic shadow
#

👍 I'll DM you the hostname

toxic pine
#

random question but how much ram is recommended to run a server with about 10 kids

finite belfry
#

so hi

#

is there any plugin that can control my player number on bungeecord

#

like if i want only 1000 players on my network can i dont let player join the server if the network already got 1000 players

frigid ember
#

Hey! I am trying to launch my server with 6g of ram allocated. I have a batch file set up like this: (cd /d F:\SMP\MC
java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts -jar spigot.jar) I found this script of a forum post. but I get an error like this unable to access jarfile spigot.jar. I've already changed directories and I am lost

sturdy oar
#

well simply the script doesn't have access to the file names 'spigot.jar'

#

You CD is probably wrong?

frigid ember
#

im 100% its not looking at the folder rn

#

F:\SMP\MC

#

I tried running it elevated too

#

Hey,
Does anyone know how I can use the rgb support in my plugin?
I know how it is done via tellraw, but I really don't want to use that for obvious reasons ^^

rotund orbit
#

Does anyone know how people do food spoilage plugins? How do they keep track of information for every single item?

#

especially when they're in a stack

pastel arrow
#

NBTTags most likely

frigid ember
#

hello anyone know
a simple-info plugin
like you can type /discord
a info plugin that allows you change commands and is not harded to the command slisted on config file
pls tell tnx

#

Does anyone know how people do food spoilage plugins? How do they keep track of information for every single item?
@rotund orbit yeah there's a nbt api that can just store stuff in there. Tho items with different nbt info won't stack.

rotund orbit
#

ah so people couldn't have stacks of bread anymore?

#

if they were different ages

#

makes sense

#

thanks guys

#

I'll look into it

left plover
#

Is anyone familiar with the ghost items bug and do you know how to fix it? I'm thinking I need to completely reset a players data but I'm not sure how you do it

#

Nvm found it

toxic pine
#

uhh im really confused. whenever i do java -Xms512M -Xmx1008M -jar /home/pi/minecraft/spigot-1.1.16.jar nogui it just comes with unable to access jarfile

nimble stump
#

Does that file exist?

devout creek
#

Hey, I have an issue where when I hit multiple entities at the same time, while the EntityDamageByEntityEvent is called for each entity, but I'm only able to retrieve the e.getDamager() of the first entity hit

toxic pine
#

i think it does im following a tutorial

#

and it worked for them

devout creek
#
@EventHandler
    public void onEntityDamage(EntityDamageByEntityEvent e)
    {
        boolean nullifyDamage = false;
        Bukkit.broadcastMessage("OnEntityDamage called");

        if (cooldownTimeMeleeAA.containsKey(e.getDamager().getUniqueId()))
        {
            
            nullifyDamage = true;
            return;
        }
      
        if (e.getEntity().isCustomNameVisible() && e.getEntity().hasMetadata("id"))
        {
            Bukkit.broadcastMessage("Damager: " + e.getDamager());
            if (e.getDamager() instanceof Player)
            {
                Bukkit.broadcastMessage("Damager detected as instance of Player");
                PlayerData playerData = null;
sturdy oar
#

of course it works in the tutorial, would you publish a tutorial which doesn't work? 🤣

toxic pine
#

but ive done everything right

sturdy oar
#

1.16.1 you mean

devout creek
#

Can't send an image, but the logs are something like
Damaging [entity]
OnEntityDamageCalled
Damager: Player
Damager detected as Instance of Player
Calculating damage of ...
....
...
Damaging [anotherEntity]
onEntityDamage called
Damaging [anotherEntity]
onEntityDamage called
Damaging [anotherEntity]
onEntityDamage called
Damaging [anotherEntity]
onEntityDamage called

#

There's no exception or anything either

toxic pine
#

i did 1.16.1

frigid ember
#

im using the PlayerBucketEmptyEvent

#

and how can I get the location of the where the bucket is placed

#

Location blocation = e.getBlockClicked().getLocation().add(0, 1, 0);

hexed lodge
frigid ember
#

did this but when they click on a block's side it spawns one above

#

not at the side

#

wait i'll if (e.getBlockFace() == ) do it like this

sturdy oar
#

why not using getBlockClicked??

frigid ember
#

thats the clicked block

#

bucket comes to the side/above/under the block

sturdy oar
#

oh ok, you can then use getBlockClicked().getRelative(event.getBlockFace())

frigid ember
#

and that'll be the location of where the water will be?

sturdy oar
#

oh you want the water

frigid ember
#

exactly :/

sturdy oar
#

I'm not sure, but it should be that but with opposite face

#

you can try tell me if it works

#

getBlockClicked().getRelative(event.getBlockFace().getOppositeFace())

frigid ember
#

sure

#

Location blockloc = e.getBlockClicked().getRelative(e.getBlockFace().getOppositeFace());

#

its a Block

#

not location :/

#

my hash is saving Location, Long

sturdy oar
#

dude

#

do you know Block has getLocation

frigid ember
#

ohh xd

#

ima try

#

nop doesnt work

toxic pine
#

if im port forwarding

#

what would the port ip be

sturdy oar
#

the one you're using for the server

toxic pine
#

my devices ip or the devices ipv4 adrdess or my public

sturdy oar
#

the public ipv4

toxic pine
#

so 192.168.blah.blah

#

okay got it

sturdy oar
#

no

#

that's definetively not a public IPv4

#

that's a private network address

#

are you on Windows?

odd knoll
#

What's the event for a smithing table being used?

subtle blade
#

Don't think there is one

odd knoll
#

😭

subtle blade
#

There's one for recipe prep in a smithing table iirc, but not one for actually crafting

odd knoll
#

Logical for me to suggest it on the Jira?

subtle blade
#

Looks like there's a ticket for prep, so maybe it doesn't exist

odd knoll
#

Just comment on there for a smith event as well?

subtle blade
#

Yeah I think so

#

Maybe if I get bored today I'll implement it

odd knoll
#

💜

torn robin
#

Is it not possible to add items to a chest itemstack?

nimble oar
#

Before its placed?

torn robin
#

yes

mental glen
#

Hi, I can't access the site - tried it from 2 different devices with 2 different WiFis and my phone, still nothing (I get error 524)
Anyone knows what I can do? 😕

torn robin
#

If you see Error 524 on your web browser, try refreshing the page. You can also close the browser and reload it to see if that does the trick. Sometimes, a simple restart can fix the issue, especially if it is just a minor glitch.

#

looks like I can use Container from BlockState, I'll try it out and get back

mental glen
#

Restarted all devices multiple times, cleared and flushed DNS - still nothing

torn robin
#

how long has this been occuring?

mental glen
#

Asked a friend and he said he got in, so I'm guessing it's a problem with me, but on 2 devices and 3 internet connections?

#

Started a few hours ago

#

Yesterday worked fine

torn robin
#

can you access other sites?

mental glen
#

Yup

#

Ok, so it's definitely a problem with me - can't access dev.bukkit.org either...

#

This is SO weird...

tiny dagger
#

maybe java script is disabled

#

🤔

grim halo
#

@torn robin There are two ways of adding items to a chest Itemstack.

  1. Add the proper NBT data like minecraft does in creative.
  2. Use the PersistentDataContainer of the item and check the BlockPlaceEvent yourself, then read from the container and add the Items.
#

Im not sure if the NBT data gets used in the first method if the player placing it is in survival mode.

subtle blade
#

Or use BlockStateMeta

#

because you know, we have API for that

torn robin
#

looks like I can use Container from BlockState, I'll try it out and get back

#

is that what I would use?

mental glen
#

Can access duckduckgo
It doesn't give any error, it just fails to load for a long time then the browser just stops trying
I also tried different browsers but nothing..
Thx anyway!

torn robin
#

yah so I'm on the right track, thanks 👌

#

just didn't see Chest under ItemMeta*

subtle blade
#

BlockState, but yeah

tiny dagger
#

try pinging anything in the cmd

#

see if you drop packets/ instable packets

torn robin
#

8.8.8.8 is my favorite

tiny dagger
#

you could also try 1.1.1.1

peak glade
#

hey

tiny dagger
#

?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.

peak glade
tiny dagger
#

just like any other

#

just replace %player has joined the server to

#

&a+ %player

peak glade
#

its rank so ?

tiny dagger
#

placeholder api

#

or something similar

mental glen
#

try pinging anything in the cmd
The weird thing is it works just fine
8.8.8.8 is my favorite
I tried a few different DNS options but still zip

tiny dagger
#

check the host file

#

ping bukkit for example

mental glen
#

Pings work just fine - no packets lost
Still won't load 🙃

#

I think my laptop and phone have ghosts in their blood

#

Time for an electrical exorcism and some hardware heroin

woven raft
#

one of my staff members grief'ed my server, but i knew i had a backup that i took off shockbyte, and when i put the world folder in, deleted the old one thats grief'ed and started the server then imported the world with multiverse, the world was a empty space void
is there something else than the world folder i need to replace
i really need help, someone pls

devout crest
#

I'm looking for a plugin that can give items "lives". e.x. After you die enough times it get removed and you can not get it back, similar to Hypixel The Pit weapons. There are no plugins like this however, can anyone make a plugin like this? Sorry if I shouldn't be posting this here btw

toxic pine
#

is there a way to use a domain to access your server instead of using an ip address while not on your wifi, just ping me

winged sparrow
#

@devout crest That would not be hard to make

#

I’ll consider making that plugin because it sounds pretty fun

river cradle
#

Hi, I googled for this but surprisingly couldn't find it, what is the default minecraft permission for breaking blocks, something like minecraft.blocks.break or so?

winged sparrow
#

No

#

There are no permissions for Vanilla

river cradle
#

Wait what

#

So how can I allow non-ops to break blocks then?

winged sparrow
#

I mean there are for the commands

#

Uh

#

You obviously fucked up with a plugin if non-ops can’t break blocks

#

Is it only around spawn?

river cradle
#

No it's just the default of the server

winged sparrow
#

No, that’s not a default. What plugins do you have.

river cradle
#

Is it only around spawn?
@winged sparrow Perhaps, haven't tried that

#

No, that’s not a default. What plugins do you have.
@winged sparrow Just spigot, luckperms, multiverse and my own, but it also happened without spigot, I think it's the default of the server

lone fog
#

Server protects an area around spawn for non-ops

winged sparrow
#

If it’s just around spawn, go to server.properties and set spawn protection to 0

devout crest
#

@winged sparrow thanks

winged sparrow
#

If it’s happening globally it’s an issue with a plugin set up

river cradle
#

If it’s just around spawn, go to server.properties and set spawn protection to 0
@winged sparrow Yikes, I just found that on google, thanks a lot, I must have been way to tunnel-visioned on permissions, I'll try it out!

winged sparrow
#

Also, be sure to shut down your server completely before modifying server.properties

#

It doesn’t work with reloads

#

Np, hope that fixes your issue

toxic pine
#

is there a way to use a domain to access your server instead of using an ip address while not on your wifi

undone narwhal
#

Is it a better Idea having a server generating a custom world to then copy paste it to the game server, or to generate the world before launching the game?

tough kraken
#

well you want a random or specific world

undone narwhal
#

Random generated world

#

With a customworldgenerator

#

And if possible a pregenerated world

tough kraken
#

then i would say generating a new world should be better

#

pregenerated? why

#

if i get it right, you want a random world... so you dont really need to pre-generate anything

undone narwhal
#

Cause this game should handle about 150 players. Imagine generating the world while they're all playing

#

When you first go on a never visited chunk, this chunk is generated

tough kraken
#

i actually dont prefer multi-worlds on one server, i actually have every world on a extra bungeecord server. because of exactly this

undone narwhal
#

Yeah but I'm not talking about multi world. My game has one world. This is a random generated world with a custom generator (ChunkGenerator) and the size of the game area is about 35 * 35 chunks (can be higher)

#

Each new game a new map should be generated

tough kraken
#

kick the players, and then create the world? should make it i think

undone narwhal
#

Yes, the problem isn't there, but where the world generates

#

It costs a lot of CPU usage

tough kraken
#

thats normal on spigot i think

#

even my 24gb 8-core vServer takes 90%

undone narwhal
#

taht's normal everywhere. You have to do some huge maths to generate a chunk

#

each block is calculated, each height, each biome, each decorations etc

tough kraken
#

then... idk

undone narwhal
#

Okay thanks anyway

tough kraken
#

whats so bad on the usage?

limber ginkgo
#

35sq chunks isn't very large

tough kraken
#

when no players are online

limber ginkgo
#

its only 3x3 regions - should only take 5-10 min to generate

#

at absolute most

lone fog
#

Generating it off the server and uploading it is fine

limber ginkgo
#

should be more like 3ish min

lone fog
#

If you have fast enough upload speed

undone narwhal
#

Generating it off the server and uploading it is fine
@lone fog Thanks

limber ginkgo
#

have a server on the side just generate it then move the files over

undone narwhal
#

Thanks yall that's what I wanted to know

limber ginkgo
#

one up shot to MC being so bad at using a multicore CPU is that you can do stuff like this on the same host and not even notice on your main "server" lol

tough kraken
#

actually i have a question as well... i am developing a plugin, and giving support etc in my dc. i am already using an update checker to tell the users on mc-server if theres a new update

is it possible to use this checker to send a message to a discord-Channel when an update is released?

lone fog
#

Probably

#

With discord’s API

limber ginkgo
#

I'm sure it's possible - but i'm sure they are asking more for an existing solution instead of a build your own 😛

tough kraken
#

well is there a plugin/bot out there? found only one, and that is closed because of waitings for any updates

robust falcon
#

Is there a /ping command plugin that works with 1.16.1? I checked some and none of them work.

sturdy oar
#

it says pong!

#

wdym it doesn't work

bleak osprey
sturdy oar
#

You're using Pterodactyl right

rare prairie
#

it says pong!
essentials "bunger" command that makes no sense, because other plugins can overwrite ping command

robust falcon
#

@sturdy oar Are you saying it's a built-in function? I don't understand.

rare prairie
#

yes

#

in essentials

sturdy oar
#

no?

rare prairie
#

bruh

sturdy oar
#

the default /ping command is not by essentials

rare prairie
sturdy oar
#

I know that it's there, but others have it as well

rare prairie
#

yes

robust falcon
#

I'm about to try it, thanks!

sturdy oar
#

if you want a numerical value for the ping you should use other plugins

robust falcon
#

Like what? You gotta suggest something because I have tried a bunch and none of them were compatible for some reason.

lone fog
#

Because getPing was never added to the API :p

rare prairie
#

thats why use reflection

robust falcon
#

I mean I would think it should be a server function.

bleak osprey
#

You're using Pterodactyl right
@sturdy oar yes

robust falcon
#

essentialsx just replies Pong! which is completely useless to me.

#

Anyway to possibly change it?

rare prairie
#

with plugin

#

Anyway to possibly change it?

robust falcon
#

I found one finally. Tablist ping and it actually works so I'm good now.

toxic pine
#

I need help
Can someone try access my MC server? ill dm ip

zinc ingot
#

smh fenditony dont u know about custom fonts

wheat summit
#

How would I set an entities velocity torwards a player?

sturdy oar
#

smh fenditony dont u know about custom fonts
@zinc ingot ???

zinc ingot
#

your response to putting images in the scoreboard with an rp

sturdy oar
#

Lol, yes i didn't know about that, because it's a shitty solution

zinc ingot
#

not really?

#

its a great solution

sturdy oar
#

I have never seen anyone doing it

frigid ember
#

I want to set all spawned zombies to be named "Test Dummy" and have no AI but I don't know the method for setting no AI

zinc ingot
#

just because you havent seen other people do it doesnt mean its bad...

sturdy oar
#

Show me an image of someone that had done it, I can't find any

#

the only images scoreboards i know of are obtained with client mods

rare prairie
#

you cant insert images to scoreboard

#

that needs rework for mojang

sturdy oar
#

that's what im saying

rare prairie
#

featherboard cant

zinc ingot
#

with a resource pack you can

rare prairie
#

or with mod

zinc ingot
#

ill find some image\

sturdy oar
#

you can't put an image as a character

zinc ingot
#

yes, you can...

#

vanilla adventure maps have been doing that for some time

rare prairie
#

can we see an example

zinc ingot
#

yes busy atm

#

very beginning is an image

sturdy oar
#

I'll watch the vid

zinc ingot
#

theres a lot of stuff that people don't actually utilize thats possible in minecraft

rare prairie
#

i dont see any scoreboard that is on the right side

zinc ingot
#

no, but you can put a char there

#

and that char can be an image

sturdy oar
#

That's a datapack

zinc ingot
#

no, the image is from a resource pack

#

besides, anything possible with a datapack is possible with plugins

#

this is a great idea, but ive yet to see anyone actually use this

sturdy oar
#

yeah that's a datapack + resourcepack?

zinc ingot
#

🤔

#

the video i just posted is with a plugin

#

and resource pack

#

datapacks are really just simplified plugins...

sturdy oar
#

yeah I'm aware you can have custom 3d models with new resource packs

#

i think this was added after 1.13

zinc ingot
#

you can also replace characters with custom images up to 256x256 since 1.8...

sturdy oar
#

Yeah but it's kinda a hack solution

#

and if you want interactive stuff a mod is just better

#

instead of creating a different image for each different option available

zinc ingot
#

thats not really a hack solution...

#

with negative spaces you can create a fully customizable gui since you can position elements arbitrarily on the screen

sturdy oar
#

stil...

zinc ingot
#

besides, it's really not that big of an issue

sturdy oar
zinc ingot
#

yeah

rare prairie
zinc ingot
#

he didn't execute it in the most elegant manner

#

but it proves that it's possible

#

and the main appeal is that the clients only need the server resource pack

rare prairie
#

it describes

#
Note: remodeled ITEM, not block. Blocks cannot have a CustomModelData tag 
zinc ingot
#

that's completely different from what we're talking about

crisp widget
stoic shell
#

Anyone know what the problem is with the event listener here? ^

sturdy oar
#

I donwloaded that map and i'm checking myself how they're doing it

crisp widget
#

@stoic shell An ArrayList cannot = -1

rare prairie
#

Anyone know what the problem is with the event listener here? ^

java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 2
at net.hypercubemc.TheBridge.bridge.spigot.listener.onDeath(listener.java:79) ~[?:?]

also include code

zinc ingot
#

they replace character images in the font file with a custom bitmap image, then display the character as a title

stoic shell
#

getting code...

zinc ingot
#

it's really common with vanilla adventure maps

stoic shell
#

Which one should I be getting?

#

onDeath, or onDamage?

rare prairie
#

onDeath, or onDamage?
can we see your code

#

bruh

#

onDeath is called when player/entity is dead

#

onDamage when an entity got damage from damager

stoic shell
#

yeah, sorry

#
   @EventHandler(
      priority = EventPriority.HIGHEST
   )
   void onDamageEntity(EntityDamageByEntityEvent event) {
      if (event.getEntity() instanceof Player) {
         Player player;
         if (event.getDamager() instanceof Player) {
            player = (Player)event.getEntity();
            Player damager = (Player)event.getDamager();
            if (this.main.playersInGames.containsKey(player.getName()) && this.main.playersInGames.containsKey(damager.getName())) {
               event.setCancelled(this.DetectDamage(player, damager));
            }
         } else if (event.getDamager() instanceof Arrow) {
            Arrow arrow = (Arrow)event.getDamager();
            if (arrow.getShooter() instanceof Player) {
               player = (Player)event.getEntity();
               Player damager = (Player)arrow.getShooter();
               if (this.main.playersInGames.containsKey(player.getName()) && this.main.playersInGames.containsKey(damager.getName())) {
                  event.setCancelled(this.DetectDamage(player, damager));
               }
            }
         }
      }
   }```
#
   @EventHandler(
      priority = EventPriority.HIGHEST
   )
   void onDamage(EntityDamageEvent event) {
      if (!this.main.saves.fallDamageEnabled && event.getEntity() instanceof Player) {
         final Player player = (Player)event.getEntity();
         if (this.main.playersInGames.containsKey(player.getName())) {
            if (event.getCause().equals(DamageCause.FALL)) {
               event.setCancelled(true);
               return;
            }

            if (player.getHealth() - event.getFinalDamage() <= 0.0D) {
               event.setCancelled(true);
               this.onDeath(player);
               player.setVelocity(new Vector(0, 0, 0));
               Bukkit.getScheduler().scheduleSyncDelayedTask(this.main, new Runnable() {
                  public void run() {
                     player.setHealth(20.0D);
                     player.setVelocity(new Vector(0, 0, 0));
                  }
               }, 2L);
            }
         }
      }
   }```
rare prairie
#

and what you want to reach with this?

stoic shell
#

Again, this is the plugin I am updating's code.

#

This plugin is The Bridge.

rare prairie
#

Yes, and whats the problem with it?

stoic shell
#

.-.

sturdy oar
#

this seems more like a hologram to me

rare prairie
#

if you not describe your problem, we not reads your mind

zinc ingot
#

title...

stoic shell
#

Errors in console when a player gets hit.

rare prairie
#

Yea, what I sent before error, you can see that error is come from onDeath method

#

at net.hypercubemc.TheBridge.bridge.spigot.listener.onDeath(listener.java:79) ~[?:?]

zinc ingot
#

if you disable the resource pack then you'd see

rare prairie
#

?paste

worldly heathBOT
stoic shell
rare prairie
#

can you say what is the line 79 from your IDE?

stoic shell
#
      String victimName = ((TeamColor) Saves.teamColors.get(((TeamBridge)game.teams.get(playerd.teamNumber)).color)).getChatColor() + player.getName();```
rare prairie
#
  • You have lots of redundant casts (except if you using Object)
  • Saves.teamColors.get and game.teams.get can be null, use contains or check for notnull
stoic shell
#

hmm, why would it be null...

rare prairie
#

Because that thing

#

String or something is can be null, so the list does not contain that

stoic shell
#

hmm

#

figures

rare prairie
#

if you do

if (Saves.teamColors.contains(game.teams.get(playerd.teamNumber)) != null)
stoic shell
#

that means something is wrong in the teams...

rare prairie
#

then it not throws

stoic shell
#

well yes, but that wouldn't solve the problem of it not being there in the first place

rare prairie
#

also use HashMap for using multi arrays

stoic shell
#

yes...

#

but the real problem is that the team number is not in the teams it looks like

rare prairie
#

then add them

stoic shell
#

easier said than done, this is a bit big

keen compass
#

@sturdy oar you can replace font characters with custom images

#

however downside of this method is you lose that character from being used

safe furnace
#

Hello I am wondering which antibot do you recommend for the bungeecord?

keen compass
#

I don't know of any, but maybe someone here might know the answer for that

rare prairie
#

there is a spigot search engine

safe furnace
#

I need a good antibot because 200+ players play on my server every day

zinc ingot
#

well, frostalf, you can use the private section unicode characters, and 1.16 fixed that issue by allowing text components to specify a custom font

rare prairie
#

I need a good antibot because 200+ players play on my server every day
thats why you should search for it, google is your friend

frigid ember
#

Is there a way to have the totem have a custom name when it comes into the players inventory

rare prairie
#

ItemStack#getItemMeta

stoic shell
#

Is anyone willing to just look into the plugin code and see if they could fix a few things? If so, dm me. I've already spent all yesterday updating it and getting this far.

frigid ember
#

okay thank you

sturdy oar
#

I need a good antibot because 200+ players play on my server every day
@safe furnace I can help

#

Are you online-mode right

#

1.16.1?

#

I didn't notice it tbh

#

Let me see on my server if it happens

#

Did you update from a previous version like 1.15?

#

But did other structures generate

#

like the new biomes

safe furnace
#

@sturdy oar My server does not need a premium

sturdy oar
#

What?

safe furnace
#

@safe furnace I can help
@sturdy oar

sturdy oar
#

your server is not premium?

safe furnace
#

no

sturdy oar
#

sorry I can't help then

#

I don't support piracy

safe furnace
#

okay

sturdy oar
#

I can recommend BotSentry, it's the best.

#

@cobalt yoke !!111! i advertised u now give me discount

frigid ember
#

Does anyone know how to display the totem of undying effect on a players screen?

tough kraken
#

how can i check if players are not moving? because playerMoveEvent isnt get triggered if not moving

sturdy oar
#

it's EZ!

#

make a hashmap

#

add them if they moved, removed them if they stopped moving

rare prairie
#

you can use scheduler when the player moved before

#

^^

karmic sable
#

I created a custom plugin and now for the first time I'm trying to add a configuration file, I followed a few tutorials but I'm messing up big time; someone willing to help me out? What I want to create: a config file with some general customizable messages in. I'm willing to screenshare and voicecall if needed

sturdy oar
#

why would a config reset itself

karmic sable
#

;)

tough kraken
#

if i get it right, you want to make a config, with strings in it to use... for what?

peak glade
karmic sable
#

if i get it right, you want to make a config, with strings in it to use... for what?
@tough kraken customizable messages and stuff; nothing too big

#

oh and also if some schedule has to happen daily, weekly or monthly

tough kraken
#

and you dont know how to create one?

karmic sable
#

correct

winged sparrow
#

Actually, I’d like to know how to make time accurate schedules work too

karmic sable
#

@winged sparrow in java you can work with LocalDateTime.now(); I only check if its the first day of the week (monday) or month; and if its 00:00h

winged sparrow
#

Like if the server is down, freezes, or misses a tick, how do you make it happen? I can think of ways to make schedules work but they’re probably overly complicated compared to a standard way of doing it

tough kraken
cobalt yoke
#

@cobalt yoke !!111! i advertised u now give me discount
@sturdy oar i give you discount of 1€ 🤣

sturdy oar
#

😠

#

don't use botsentry it will brick your playstation 3

marsh hawk
#

is there an option to only compile craftbukkit from buildtools?

cobalt yoke
#

don't use botsentry it will brick your playstation 3
@sturdy oar i hate ps so yeah i hope that happened

#

:D

#

#PCLover

stoic shell
#

craftbukkit is not a supported product here

#

use spigot

cobalt yoke
#

Gaming PC >>>> Play Station

pastel condor
#

In my maven project, my plugin depends on my api (to be shaded in) but my api depends on my plugin (because it uses a class inside my plugin) but I am not able to have them depend on each other, how can I fix this?

sturdy oar
#

you need to fix circular dependency

tough kraken
#

add them if they moved, removed them if they stopped moving
@sturdy oar yeah and how to get if they stopped moving?

marsh hawk
#

what

#

isnt CraftBukkit maintained by Spigot

pastel condor
#

you need to fix circular dependency
Yeah I’m getting some issue about that

sturdy oar
#

if they didn't send movemement packets in N ticks, they are not moving i guess

pastel condor
#

Not sure how to fix it

tough kraken
#

packets...whuuuu

#

is there no method to check players movement speed? to check if its 0?

sturdy oar
#

you don't need packets for that

pastel condor
#

Because my plugin needs to depend on my api, and my api needs to depend on my plugin

sturdy oar
#

just make a runnable or something

#

you can determine if a player isn't moving in like 100 different ways.

pastel condor
#

Just get players location, then check one tick later

#

And see if it’s different

karmic sable
#

@tough kraken And how would I add comment lines to the config to explain what something is? Thanks

tough kraken
#

we say, you want to add this to your config:

joinMessage: VNGC joined the game
(example)

then you use config.set("joinMessage", "VNGC joined the game");

#

if you mean that

#

and comment lines:

#thisisacommentline
joinMessage: VNGC joined the game

karmic sable
#

No, I mean, how do I add a line above thati n the config file that says something like "Edit underneath to customize the welcome message"

#

yes how do I add that comment line in the default config

tough kraken
#

put a # before the message, it wont get recognized by the plugin. like "//" in .java files

karmic sable
#

Alright what confuses me is that I'll manually have to input the comments, yet the default config is basically hard coded

tough kraken
#

what do you mean with manually

sturdy oar
#
private final HashMap <UUID, Boolean> movingPlayersMap = new HashMap<> ();
private final HashMap <UUID, Location> lastLocationMap = new HashMap<> ();

Bukkit.getScheduler().runTimerTask(plugin, () - > {
    Bukkit.getOnlinePlayers().forEach(p - > {
        final UUID playerUUID = p.getUniqueIdentifier();
        if (!lastLocationMap.contains(playerUUID)) {
            lastLocationMap.put(playerUUID, p.getLocation());
            movingPlayersMap.put(playerUUID, false);
            return;
        }
        movingPlayersMap.computeIfPresent(playerUUID,(k, v) - > {
            v = lastLocationMap.get(playerUUID).distance(p.getLocation()) > 0.d
        });
    });
}, 1L, 5L);
#

i don't know if this is the best solution, but you get the idea.

tough kraken
#

yeah thanks, i will try

karmic sable
#

Thanks for your time I'll have you know in a minute if it works what I did

tough kraken
#

well can i use player names instead of UUID's? because of bungeecord

sturdy oar
#

ehm don't you have UUIDs on bungee as well

tough kraken
#

well offline mode etc

#

it gives other uuids than that from the player

#

but as it gets resetted at restart/reload, i think i can use player names as well?

sturdy oar
#

remember that 2 player can have the same username in a server

karmic sable
#

Alright it's just, what confuses me is that I have to have lines like:

config.addDefault("dateformat", "dd/MM/yyyy HH:mm:ss");```
in my onEnable();
While I can just put
```yaml
dateformat: "dd/MM/yyyy HH:mm:ss"```in the config
sturdy oar
#

that would break the hashmap so bad

tough kraken
#

why that?

that would break the hashmap so bad
@sturdy oar

sturdy oar
#

there is nothing on vanilla preventing 2 players called "TheViperShow" from joining the server

#

and there are dozens of account with same name

tough kraken
#

its a private server, so...

sturdy oar
#

oh ok then do what u want

#

as long as it works

tough kraken
#

if someone knows a way to use UUID's on bungee, just tell me 🙂

sturdy oar
#

btw i have not tested that code snippet, i made it on noteblock

bitter tendon
#

How to show/hide an entity from a specific player?

sturdy oar
#

there is a method

#

this is between players

#

for entities... well I don't think there's any API for that

rare prairie
#

you cant hide entities

#

only with potion effects

bitter tendon
#

For a specific player

rare prairie
#

you cant

bitter tendon
#

I disagree

rare prairie
#

ok then make a suggestion to spigot/mojang

bitter tendon
#

I don't need to

hoary compass
#

Is there any email i can forward a support request to?

sturdy oar
#

y e s

#

b u t y o u n e e d t o r e a d t h e d i s c l a i m e r s b e f o r e

halcyon elm
#

Ccan anyone help me with an issue I'm having in my plugin?

stoic shell
#

hey, on the plugin I'm updated, there are still some problems

keen compass
#

well, frostalf, you can use the private section unicode characters, and 1.16 fixed that issue by allowing text components to specify a custom font
@zinc ingot Yes you are correct

#

However will note that replacing fonts with custom images isn't a new thing either 😛

stoic shell
#

I can't place or break blocks in-game, and I think I know why

#

can y'all see if there is an problem with this code that would cause it to always be false?

keen compass
#

it can be regarded as a hack in a way as well lol, but it is a nice one if it fulfills your needs

stoic shell
#

TerracottaColorSet.contains(event.getBlock().getType()

keen compass
#

it returns false if it doesn't contain it

stoic shell
#
    public static final Set<Material> TerracottaColorSet = EnumSet.noneOf(Material.class);

    static {
        for (final DyeColor color : DyeColor.values()) {
            try {
                final Material terraMaterial = Material.valueOf(color.name() + "_TERRACOTTA");
                TerracottaColorSet.add(terraMaterial);
            } catch (Exception error) {
                Bukkit.getLogger().info("Error forming TerracottaColorSet:");
                error.printStackTrace();
            }
        }
    }```
zinc ingot
#

yeah 😛

stoic shell
#

I think there is something wrong here that is making it be false always. Do y'all notice anything?

keen compass
#
                TerracottaColorSet.add(terraMaterial);```
this returns false if it can't match the valueOf
zinc ingot
#

i guess its a hack, but given that mojang recently released the font feature, it seems like they approve

keen compass
#

I know some older games used to do that

#

to get some custom images in the game 😛

rare prairie
#
                TerracottaColorSet.add(terraMaterial);```
this returns false if it can't match the valueOf

returns null

keen compass
#

but the downside was that whatever character was chosen, was now used up

#

so you couldn't use that specific character for other things

stoic shell
#

huh

#

well...

sturdy oar
#

i mean we have whole UNICODE

stoic shell
#

it should match the value of though, right?

keen compass
#

@rare prairie yeah sorry I meant null

#

thanks for the correction lol

stoic shell
#

or is there a problem with my matching?

keen compass
#

the matching is very basic

#

I believe it is also case sensitive

#

so you need to make sure when you match that you tell it to ignore the casing

stoic shell
#

Wait but it's matching a Material...

frigid ember
#

Wouldn't valueOf throw an exception if there is no match?

keen compass
#

valueOf gets the values via String

halcyon elm
#

hey, I'm having some issue with an inventory automatic item click slot detection system where you click an item and it goes into the right slot, does anyone want to help me? I have tryed debugging but I'm not sure what's happening

keen compass
#

so you are matching via strings, doesn't matter if its materials or not

stoic shell
#

Yeah but aren't materials always uppercase?

keen compass
#

should be, but that has no bearing if your value you are presenting is uppercase or not

#

it could be your value you are putting in there is lowercase

stoic shell
#

Huh?

keen compass
stoic shell
#

Oh...

keen compass
#

You are assuming it is uppercase

stoic shell
#

Maybe it returns Blue

#

Not BLUE

#

Possibly...

#

How can I make it uppercase?

keen compass
#

.toUpperCase() I think exists for the String Method

stoic shell
#

oh yeah lol

keen compass
#

also not sure if the material will have all available colors or not

#

so that is also something to consider

stoic shell
#

wait...

#

dyecolor enums are all capital

keen compass
#

then your issue could be using a color that the material doesn't have

stoic shell
#

My teams are only red, and blue.

keen compass
#

so instead of using the name of a color, why not just use a boolean then

#

to determine which you want

stoic shell
#

well I mean

keen compass
#

lot more optimal then using strings everywhere XD

stoic shell
#

that's my config

#

but it could be any color

keen compass
#

could even use an int if you want even more optimal too

stoic shell
#

but why wouldn't this actually work...

#

I mean, it's uppercase and all

keen compass
#

also might want to remove final

#

from a few places

stoic shell
#

?

keen compass
#

not sure why you use it everywhere XD

#

Final prevents something from being changed

stoic shell
#

but no errors are thrown...?

keen compass
#

not everything will throw an error

#

Final is one of those things that won't throw an error but can cause you to have unexpected results

stoic shell
#

lemme try logging...

keen compass
#

your set is final as being a null set

stoic shell
#

really?

#

oh

#

1 moment...

tough kraken
#

@sturdy oar tried this by myself, and seems to work

public static void checkSpeed() { Bukkit.getScheduler().runTaskTimer(Main.getPlugin(), new Runnable() { @Override public void run() { for (Player players : Bukkit.getOnlinePlayers()) { if (!lastLocation.containsKey(players.getName())) { lastLocation.put(players.getName(), players.getLocation()); } Location loc = lastLocation.get(players.getName()); if(players.getLocation().equals(loc)){ players.sendMessage("true"); } else { lastLocation.put(players.getName(), players.getLocation()); } } } }, 0L, 2L); }

stoic shell
#

alright, I removed the finals, and I added logging

#

now building and then adding to server...

sturdy oar
#

@sturdy oar tried this by myself, and seems to work
@tough kraken Cool to know, i honestly wouldn't have reduced the task to every 1/10 second

tough kraken
#

where "true" means, the doesnt move

#

well idk

so now i want it so, that if a player doesnt moves for 10 seconds, he dies. what would i do for that?

sturdy oar
#

I guess...

#

you can make another map xd

#

increase the value whenever the player doesn't move

#

and if he moves, reset it to 0

tough kraken
#

so if he doesnt move, set it every second 1 higher, and if it is at 10, kill them?

sturdy oar
#

I'd honestly use ticks tho

#

maybe it's just my preference, but i prefer storing minecraft times in long values as ticks

tough kraken
#

what is the difference there?

sturdy oar
#

None?

#

i just prefer it

tough kraken
#

and what i dont understand since... actually ever, what is the difference Between "20L" and "20" in a scheduler

sturdy oar
#

it's annoying to have code that works with ticks, and somewhere else code that works with seconds in double values

#

and what i dont understand since... actually ever, what is the difference Between "20L" and "20" in a scheduler
@tough kraken i just answered that on spigot to someone

tough kraken
#

ah i see

sturdy oar
tough kraken
#

ah yeah that was me, lol

sturdy oar
#

🤦 fail

tough kraken
#

yeah

crisp widget
#

I've got a problem with commands.yml 👀
My aliases can't tab complete when put into commands.yml

sturdy oar
#

*_*

tough kraken
#

what do you all actually prefer more? intelliJ or eclipse? for spigot

#

cant actually decide, as Eclipse lags for me sometimes at working, and IntelliJ needs years to build the jar

keen compass
#

I use Netbeans

tough kraken
#

doesnt works...have jdk jre all installed, but still shows me it isnt..lmao

crisp widget
#

years to build a jar? monkaHmm

#

Takes my IntelliJ like 5 seconds

tough kraken
#

for me it are nearly 2 minutes

keen compass
#

IntelliJ and NetBeans use ant by default if you don't use maven or gradle

tough kraken
#

and i have a nmvme

#

nvme

#

so i dont think thats the problem

crisp widget
#

Would depend on your CPU/RAM

keen compass
#

problem is not using a different build system

#

has nothing to do with hardware

tough kraken
#

16gb ddr4 and ryzen 5 2600

keen compass
#

Use maven or gradle, and set up their settings to take advantage of more resources

#

and you will be building decently 😉

#

but it also depends on your build setup too

#

not everything is just super fast because you said so XD

tough kraken
#

well eclipse needs like 2 seconds

#

for me

keen compass
#

what I mean build setup is what exactly the build system needs to do according to what you told it

tiny dagger
#

do people still compare loading times between java ides?

tough kraken
#

maybe :c

keen compass
#

have no idea, but netbeans allows you to change the JVM arguments for it 😉

#

not sure if IntelliJ allows the same

tiny dagger
#

eclipse too

keen compass
#

reason I like that, is because I don't want my IDE to automatically consume whatever ram it wants

tiny dagger
#

but in a file

keen compass
#

yes netbeans has a file too

#

and then in Maven, if you installed it, also has a settings file to set some resources it is allowed to use 🙂

tiny dagger
keen compass
#

can even build projects in parallel too if you enable it 😉

#

but most people here who compare IDE's just like the fact of comparing solely on out of the box stuff

#

which isn't really a fair comparison lol

sturdy oar
#

yo i just noticed minecraft font for character '|' changed between 1.8.9 and 1.16.1

#

don't know when though

tiny dagger
#

ide is a tool

#

so it should remain that

keen compass
#

yes

#

and as tools go

#

most of the time it is preference 😉

tough kraken
#

yo i just noticed minecraft font for character '|' changed between 1.8.9 and 1.16.1
@sturdy oar yeah changed from two lines to |

stoic shell
#

back

#

had to go do stuff...

#

so this is interesting

#

I noticed that the block I am holding is just "terracotta"

#

not my team color

#

this explains why the check didn't get it

#

also I logged the check in console and it's FALSE

#

and I logged the block in console and it's TERRACOTTA

#

not $COLOR_TERRACOTTA

#

so... lemme find the code that gives the user the terracotta

#

oh

#

I've already been there...

#

And (I thought) I had made it set the terracotta to the user's team color...

silver sky
#

Hi SpigotMC. I came here to get support with an issue I am having, not sure if its only on my side or its spigot sided with the 1.16.1 update. So when I use color codes on items to rename them (either on some GUI-s or just some /rename commands I have), somewhy on the second color code, if the item has one, it just goes into italic. Its like this:

Actual:

&6Vote &ekey

How it shows:

&6Vote &e&okey

However, the &o isn't there and other plugins seem to have the same issue.

stoic shell
#
        int teamNumber = game.teamPlayers.get(player.getName()).teamNumber;
        TeamBridge teamBridge = game.teams.get(teamNumber);
        TeamColor teamColor = Saves.teamColors.get(teamBridge.color);

        DyeColor dyeColor = teamColor.getDyeColor();
        Material terracottaMaterial = DYE_TO_TERRACOTTA.get(dyeColor);

        player.getInventory().setHelmet(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_HELMET, teamColor.getColor(), 1));
        player.getInventory().setChestplate(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_CHESTPLATE, teamColor.getColor(), 1));
        player.getInventory().setLeggings(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_LEGGINGS, teamColor.getColor(), 1));
        player.getInventory().setBoots(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_BOOTS, teamColor.getColor(), 1));

        for (int i = 0; i < 9; ++i) {
            ItemStack itemS = Saves.inventoryBar.get(i);
            if (itemS != null) {
                if (TerracottaColorSet.contains(itemS.getType())) {
                    itemS = GeneralMethods.CreateItem(terracottaMaterial, itemS.getAmount());
                }

                player.getInventory().setItem(i, itemS);
            }
        }```
#

I'm already setting it with the terracottaMaterial of the team's color 🤔

#

@silver sky Have you tried putting the &o before the &e?

#

what the heck...

#

My logging says the material variable is set to... BLUE_WOOL?

tough kraken
#

i have a taskTimer, in it i have this:

notMoved.put(players.getName(), //value);

how can i increase the integer (value) by 1 every second?

stoic shell
#

oh

#

bruh

#

I made a mistake, I had 2 util methods for later use, DYE_TO_CONCRETE, and DYE_TO_WOOL

#

they were both changing the DYE_TO_TERRACOTTA set

tiny dagger
#

why don't you make an enum instead

#

i dunno just saying

rare prairie
#

i have a taskTimer, in it i have this:

notMoved.put(players.getName(), //value);

how can i increase the integer (value) by 1 every second?

final int value = 0;
Bukkit.getScheduler().runTaskTimer(() -> {
  if (notMoved.containsKey(players.getName())) {
    int current = notMoved.get(player.getName());
    int v = value;
    v = current;
    v++;
  }
});
#

or something like that

keen compass
#

that won't work

#

that task is constrained to the tick loop of the server

#

therefore it won't guarantee that it updated within 1 second

tough kraken
#

would this work?

notMoved.put(players.getName(), notMoved.get(players.getName()).intValue() + 1);

keen compass
#

instead create a separate thread for your task making the thread manually, have it sleep for 1 second

#

every time it wakes up it updates the value

rare prairie
#

would this work?

notMoved.put(players.getName(), notMoved.get(players.getName()).intValue() + 1);
yep

tough kraken
#

then i just use this 🙂

rare prairie
#

instead create a separate thread for your task making the thread manually, have it sleep for 1 second
this just an example what I've sent

tough kraken
#

if my server would not crash almost everytime on join lmao

keen compass
#

@rare prairie yes but your method would mean it would lag in updating every second if the server is lagging

#

however it really depends on what OP actually wants

#

sometimes it is ok if methods lag with the server other times not always ideal 😛

rare prairie
#

bruh make another thread

keen compass
#

if you use bukkit scheduler for it

#

it will always be constrained with the tick loop of the server

rare prairie
#

exactly

keen compass
#

Ok, not ideal if you really want something to update every second

#

if the ticks of a server start lagging behind your loop now is inaccurate

stoic shell
#

what...

#

bruh

rare prairie
#

bruh, why you say this even I know, thats just a fast example

stoic shell
#

It's getting logged how it should be

keen compass
#

Clarification is always necessary especially if they really want it to update every second even if server is lagging

stoic shell
#

The terracottaMaterial variable is BLUE_TERRACOTTA

#

but in my inventory, I have TERRACOTTA :/

keen compass
#

then somewhere you are mixing up your variables

#

would probably recommend a custom object for this

#

so you can consolidate your data

stoic shell
#
        int teamNumber = game.teamPlayers.get(player.getName()).teamNumber;
        TeamBridge teamBridge = game.teams.get(teamNumber);
        TeamColor teamColor = Saves.teamColors.get(teamBridge.color);

        DyeColor dyeColor = teamColor.getDyeColor();
        Bukkit.getLogger().info(String.valueOf(dyeColor));
        Material terracottaMaterial = DYE_TO_TERRACOTTA.get(dyeColor);
        Bukkit.getLogger().info(String.valueOf(terracottaMaterial));

        player.getInventory().setHelmet(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_HELMET, teamColor.getColor(), 1));
        player.getInventory().setChestplate(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_CHESTPLATE, teamColor.getColor(), 1));
        player.getInventory().setLeggings(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_LEGGINGS, teamColor.getColor(), 1));
        player.getInventory().setBoots(GeneralMethods.CreateLeatherArmor(teamColor.getChatColor() + teamColor.getTeamName(), Material.LEATHER_BOOTS, teamColor.getColor(), 1));

        for (int i = 0; i < 9; ++i) {
            ItemStack itemS = Saves.inventoryBar.get(i);
            if (itemS != null) {
                if (TerracottaColorSet.contains(itemS.getType())) {
                    itemS = GeneralMethods.CreateItem(terracottaMaterial, itemS.getAmount());
                }

                player.getInventory().setItem(i, itemS);
            }
        }```
#

How could this be wrong...

#

In console, I got:

#
[12:57:30 INFO]: BLUE
[12:57:30 INFO]: BLUE_TERRACOTTA```
#

Exactly as it should be

#

the second shows that terracottaMaterial is correct, and is BLUE_TERRACOTTA

#

Anyone got an idea?

rare prairie
#

DYE_TO_TERRACOTTA hashmap it contains the BLUE value, let see that code, where you add materials to this map

stoic shell
#

...

#

we've already found that DYE_TO_TERRACOTTA is working properly

rare prairie
#

then Saves.teamColors.get#getDyColor have a blue dye color

stoic shell
#

yes it does

#

oh...

#

I found the problem

#

ItemStack itemS = Saves.inventoryBar.get(i);

#

this takes from a file called data.yml

#
    Item3:
      ==: org.bukkit.inventory.ItemStack
      v: 2567
      type: TERRACOTTA
      amount: 64
    Item4:
      ==: org.bukkit.inventory.ItemStack
      v: 2567
      type: TERRACOTTA
      amount: 64```
wheat mirage
#

Hey, teleporting a player during PlayerEvents from one dimension to another gives a TickingEntity removing entity while ticking! in 1.16

#

It did not do so in many previous versions

#

Does anyone have a fix?

stoic shell
#

type is terracotta here, so that if check should of never been changed to check if it is a color

keen compass
#

probably should first see if there is any updates @wheat mirage

#

if you are on the latest commit version, then it would depend which player event you are trying to use. Some of them need to be cancelled first

stoic shell
#

because it should be a generic name there, and the plugin should set the color if it is a generic block with different colors

#

there's the issue 😄

wheat mirage
#

I'm on latest @keen compass

#

I'm using EntityDamageByEntity

#

Teleporting during that event raises the ticking entity error

#

It's already been cancelled

#
Caused by: java.lang.IllegalStateException: Removing entity while ticking!
        at net.minecraft.server.v1_16_R1.WorldServer.removeEntity(WorldServer.java:1081) ~[spigot.jar:git-Spigot-ccb012a-4309566]
        at net.minecraft.server.v1_16_R1.WorldServer.removePlayer(WorldServer.java:1100) ~[spigot.jar:git-Spigot-ccb012a-4309566]
        at net.minecraft.server.v1_16_R1.PlayerList.moveToWorld(PlayerList.java:603) ~[spigot.jar:git-Spigot-ccb012a-4309566]
        at org.bukkit.craftbukkit.v1_16_R1.entity.CraftPlayer.teleport(CraftPlayer.java:676) ~[spigot.jar:git-Spigot-ccb012a-4309566]
        at org.bukkit.craftbukkit.v1_16_R1.entity.CraftEntity.teleport(CraftEntity.java:462) ~[spigot.jar:git-Spigot-ccb012a-4309566]
#

Excerpt from stacktrace

keen compass
#

doesn't seem like a player event

rare prairie
#

are you use spigot software

wheat mirage
#

I can see why it's happening

#

but I can't see a great way around it

#

@keen compass It's an entity event I guess

#

My bad

keen compass
#

Are you teleporting before the cancellation method

#

or after?

wheat mirage
#

That's not how setCancelled works

#

It's just a flag

keen compass
#

then use a task to teleport

#

and let the event complete

wheat mirage
#

Hard to do, as I kick the player in that same event in many cases

rare prairie
#

Entity#remove is used?

wheat mirage
#

They need to get teleported before being kicked

#

@rare prairie No, just teleport. See stacktrace.

keen compass
#

@rare prairie when teleporting between worlds, technically the entity is removed and then respawned

rare prairie
#

yes

keen compass
#

this is even true for players

wheat mirage
#

It's so weird

#

As I've never had this error before

#

1.16

#

Well

#

I was previously on 1.12

keen compass
#

The more updated versions have more things multi-threaded and there is significant changes especially when you want to compare years old software

#

to something more current

wheat mirage
#

Yeah I'm still surprised the infrastructure has changed so much

keen compass
#

anyways, just use a task

#

not like you are going to be kicking players while they are teleporting are you?

wheat mirage
#

Well, yeah

#

As I said

#

I kick them in the event

#

I might have to delay the kick a tad

keen compass
#

so you kick players while they teleport?

wheat mirage
#

No, I teleport then kick.

#

So they're in the correct position when they come back

keen compass
#

not necessary but ok

#

you can do the kicking in the task too 😛

wheat mirage
#

You're not working on my codebase so you've no idea what's necessary, but ok.

#

That's probably going to have to be the solution

keen compass
#

true, but you can always change a players spawn position whether online or offline

wheat mirage
#

Players logging out inbetween event and task could be problematic.

rare prairie
#

delaying the kick after teleport will fix it

wheat mirage
#

@rare prairie see msg above yours

#

If the player is involved in the event and logs out between event and teleport

#

could be problematic

keen compass
#

not really

wheat mirage
#

Depending on if packets are processed inbetween

keen compass
#

you can change the players spawn position whether online or not

wheat mirage
#

@keen compass I don't need to change their spawn position

keen compass
#

obviously you do

wheat mirage
#

Becuase I just told you that

keen compass
#

because you just said you want to make sure they are in the correct spot when you kick them

wheat mirage
#

If you can change their actual position while offline, that would be helpful

keen compass
#

You can

wheat mirage
#

Will Player methods work for that?

#

Or will I need to get a different object

#

Like OfflinePlayer etc

keen compass
#

OfflinePlayer should work for this

#

It is no different then getting an offlineplayers inventory

wheat mirage
#

Since when was that possible?

keen compass
#

the only difference here is you just want to change where they spawn

wheat mirage
#

It wasn't in 1.12 I don't think

keen compass
#

getting an offline players inventory has been a thing since 1.7

wheat mirage
#

@keen compass I think there's a misunderstanding here

#

Their spawn position is their location they will respawn

#

Like their bed

#

Their offline location is where they will be when they login

#

Important distinction

keen compass
#

It is considered spawning when a player logs in

wheat mirage
#

For clarity's sake, not really, no.

keen compass
#

anyways, you can change where they will end up being regardless. Either while they are offline, or when they log in