#help-archived

1 messages · Page 154 of 1

lone fog
#

It returns the slot the player is switching to

tiny pebble
#

have something happen when the player has a specific item in their hand

naive goblet
#

PlayerItemHeldEvent#getPlayer()#getItemInMainHand()

lapis plinth
#

Material inHand = event.getPlayer().getInventory().getItemInMainHand().getType();

why is this line giving an eventException

#

lmao

tiny pebble
#

Did that as well @naive goblet , the problem there is that it only activates once I switch away from that item. So If I put a diamond sword in my hand, the event doesn't trigger, but when I take the diamond sword out of the hand, the event triggers

naive goblet
#

getItemInMainHand is Nullable iirc

lapis plinth
#

what method should i use to get what item a player is holding at the time of when they interact with a block?

lone fog
#

player.getInventory.getItem(event.getNewSlot)

lapis plinth
#

kk

lone fog
#

That was to tanku

tiny pebble
#

i'll try that out

lone fog
#

What’s wrong with the player interact event

lapis plinth
#

oh

#

K let me send error

#

one sec

naive goblet
#

Atom wait if you have the interact event check hasItem and then getItem?

lapis plinth
#

huh?

lone fog
#

Get item in main hand doesn’t exist in 1.8

naive goblet
#

API version 1.9+ and Server Version 1.8

lone fog
#

Because there was only 1 hand

lapis plinth
#

oh

#

so I should use the deprecated method

naive goblet
#

Hmm possibly yes

lone fog
#

It’s not deprecated in 1.8

#

Pretty sure it defaults to main hand in newer versions

naive goblet
#

It is

subtle blade
#

getItemInHand() delegates to getInventory().getItemInMainHand(), yes

#

Though if you're doing this to support 1.8 servers, don't

#

Bukkit does what it does for forwards compatibility, not so you can use those deprecated methods for backwards compat

naive goblet
#

Obviously

lone fog
#

Also because 1.8 is 6 years old ya dang PvP community

lapis plinth
#

Nah, my server is 1.8 xD

subtle blade
#

Then yes, use getItemInHand()

lapis plinth
#

kk

naive goblet
#

Not the PvP community just the 1.8 fan base

subtle blade
#

Wait are you in a PlayerInteractEvent?

naive goblet
#

He is, so he should use getItem if hasItem I’m pretty sure isn’t deprecated

subtle blade
#

Yep. Use PIE#getItem()

#

Even better, if you're looking for a specific item, if (event.getMaterial() == Material.WHATEVER)

#

(it's air if there is no item)

naive goblet
#

True

lone fog
#

Huh I didn’t know about get material

tiny pebble
#

is there any event to check for attacking with a weapon?

#

also thank you @lone fog that worked 🙂

naive goblet
#

Yes

#

Use the interact event I guess

mystic forum
#

is there a way to close only upper inventory? or is it best to close both, then open player inventory?

lone fog
#

If you want using a weapon use interact

#

If you want actually hitting something use entityDamageByEntity

tame drum
#

@subtle blade may i request your help on fixing my account so I can login and re-enable 2fa so my Google authentication can save it cuz when I transfer data from old phone for some reason it didn't save spigotmc code

naive goblet
#

@mystic forum i don’t know but maybe just reopen the player inv

tiny pebble
#

is there a way for using the weapon but only left-click?

#

it worked other than that, just don't want right-click to do it

quartz trench
#

just check the type of click

tiny pebble
#

how do i do that 😛

lone fog
#

Stepping onto or into a block (Ass-pressure)

#

Nice

tame drum
#

Okay 😥

tiny pebble
#

thank ya

urban stone
#

Hey, just a quick question, ArrayList is cleared when plugin disables, right?

naive goblet
#

Yep

#

Or I mean when the server shutdowns atleast

lone fog
#

Yeah because the JVM is stopped

#

I don’t know if they are cleared on reload, but reload bad anyway

naive goblet
#

But if you initialize it in onEnable it should

frigid ember
#

is there a reason i was forced to use jre 1.7 to reference a static method in another class

naive goblet
#

Idk but setting it to null in onDisable can be smart if you use plugman and you want the list to be cleared when your plugin is disabling

#

robby what lib?

urban stone
#

Alright thanks

#

And another question is, does TicksLived​ at Entity count even after server shutdown, or it's resetted?

naive goblet
#

Hmm pretty sure it’s persistent

frigid ember
#

it was a class i made

naive goblet
#

How did it “force you” to use 7?

frigid ember
#

it gave me an error when i tried to export it and said i had to use it

#

i have no idea why

naive goblet
#

Wth

#

You shouldn’t be forced to use 1.7

frigid ember
#

i mean nothing changed in the long run

#

it works the same in the end

#

it was just weird

naive goblet
#

Well you want to take advantage of jdk 8 though

frigid ember
#

that’s true

naive goblet
#

What IDE?

frigid ember
#

eclipse

naive goblet
#

You should try IntelliJ btw

#

Idk if that will fix it but I have a feeling it perhaps will (:

frigid ember
#

yeah i’ll probably switch over

#

eclipse is starting to give me problems lmao

#

problems?

naive goblet
#

There is no problems with Eclipse but I just prefer IntelliJ and you should give it a try

mystic forum
#

Following back onto my previous question, how do I open the player's regular inventory view? p.openInventory(p.getInventory()); is definitely not right (opens inv as a chest)

frigid ember
#

it’s running slow for some reason on my laptop

#

all my other programs work fine

mystic forum
#

my experience, intellij isn't much faster than eclipse

#

but more user friendly

#

plus native dark mode, so that's a big plus

frigid ember
#

i’ll try it and see

naive goblet
#

Matt hmm that didn’t work?

mystic forum
#

it opens inventory as a chest

#

so you're staring at double your inventory

frigid ember
#

eclipse also has a dark mode

mystic forum
#

Eclipse you can change some colors. On windows, title bar is always light

#

there are some plugins that can help, but it's not perfect

naive goblet
#

Maybe Player#openInventory(Player#getOpenInventory())

#

So first close

#

Then do that

mystic forum
#

naw, now it's just closed

cursive mulch
#

Is it possible to link the spigot javadocs to my eclipse? I always have to search the web for stuff

quartz trench
#

idk but intellij does it automatically

cursive mulch
#

Mine says no attached javadoc

naive goblet
#

Hmm if you run buildtools it should come with docs

#

@mystic forum do it with a task scheduled 1 tick after

sturdy oar
#

I get the docs with maven and Gradle

#

They're included

naive goblet
#

Are they?

#

I never got em 😠

cursive mulch
#

I'm not familiar with maven or gradle

frigid ember
#

Hi, i just checked Spigot firewall guide, and i tested
ufw allow from localhost to any port 25565 proto tcp for ufw config as the text says, but first problem was that it gave me error which says Bad source address . so i just replace localhost with 0.0.0.0 which does the same thing, and now, a new error apreard: ERROR: problem running . Any idea how to fix this?

cursive mulch
#

I use buildtools and add the jar to the build path, that's all.

sturdy oar
#

😩

cursive mulch
#

:"(

naive goblet
#

Wow dude

sturdy oar
#

Nowadays knowing how to use maven / Gradle is basically a required skill for Java development

naive goblet
#

A must defo

cursive mulch
#

I have tried to look into it some time ago, but I didn't find my way in.

sturdy oar
#

There are some good plugins on IntelliJ that create maven build files for you

naive goblet
#

Well we can help you now with it

cursive mulch
#

@sturdy oar I use eclipse

sturdy oar
#

well ...

#

glhf

naive goblet
#

I’d suggest trying IntelliJ

sturdy oar
#

I mean you can do it still

#

But you need to create a maven archetype for Minecraft projects

#

Which isn't really simple if you have no idea of how it works

cursive mulch
#

Let's save that for tomorrow then, thanks anyways 🙂

naive goblet
#

Use gradle

#

Simple and easy

sturdy oar
#

Maven is simpler

#

I wouldn't recommend Gradle to a beginner

lusty vortex
#

Gradle just looks hard because some people have crazy ass scripts

naive goblet
#

Maven rly isn’t

sturdy oar
#

Since it requires Groovy/Kotlin knowledge

cursive mulch
#

I see..

naive goblet
#

A little

#

But it’s far more useful once you understand how it kind of works

sturdy oar
#

Yeah it's faster

#

I think it uses docker containers to build

cursive mulch
#

But correct me if I'm wrong, maven and gradle are dependency handlers?

naive goblet
#

And learning gradle instead of maven isn’t that much harder in my opinion

#

Yes

#

I mean my gradle scripts aren’t funny but surely useful

marsh hawk
#

Anyone know a serializer for datetimes that is easily readable? I need to have a section in my config that the player can edit

tiny pebble
#
    @EventHandler
    public void onTwinBladeStrike(PlayerInteractEvent event) {
        CraftPlayer player = (CraftPlayer) event.getPlayer();
        PacketPlayOutAnimation packet = new PacketPlayOutAnimation(((CraftPlayer)event.getPlayer()).getHandle(), 3);

        if (player.getInventory().getItemInMainHand().equals(Items.jasonSword)) {
            if (event.getAction() == Action.LEFT_CLICK_AIR) {
                ItemStack sword = player.getInventory().getItemInOffHand();
                ((CraftPlayer) event.getPlayer()).getHandle().playerConnection.sendPacket(packet);
            }
        }
    }

This triggers the animation of the off-hand to swing once the main-hand swings using packets.
Is there a way for the packet to only run once? Once I left-click it plays the animation over and over and over

sturdy oar
#

LocalDateTime?

#

idk

marsh hawk
#

yeah it comes out like 2018-07-14T17:45:55.948353600

cursive mulch
#

If any of you have time to help me out tomorrow, or got a recommendation for a source to start reading through, please let me know!

marsh hawk
#

first bit is readable the second is eh

sturdy oar
#

You can have custom time formats

marsh hawk
#

It's not immediately apparent

#

oh fr

#

ill look into that

lapis plinth
#

File file = new File( path + User.getUser(event.getPlayer()).getIsland().getOwner() + ".json"); this is returning null

sturdy oar
#

I don't remember it now because I basically never use dates

marsh hawk
#

DateTimeFormatter i think

#

ill check it out

naive goblet
#

@lapis plinth what exactly is null

#

The file instance ?

lapis plinth
#

uh let me fetch error

cursive mulch
#

@lapis plinth maybe the user has no Island 😄

sturdy oar
#

The hell is Player#getIsland ??

lapis plinth
#

@sturdy oar other plugin api

#

sd master ohhh you're right

#

shit

sturdy oar
#

Wut

naive goblet
#

It’s User#getIsland

sturdy oar
#

Oh ok weird I'm out

naive goblet
#

User.getUser is just a wrapper

warm summit
#

hi guys, im trying to install this (https://www.spigotmc.org/resources/compasshunting.73061/) plugin to my spigot server, ive followed all instructions everywhere and tried 4 different versions of minecraft, even on the plugin's listed native version, i keep getting "Could not load... Invalid plugin.yml" can anyone help me out?

lapis plinth
#

@cursive mulch damn thanks bro xD

sturdy oar
#

Maybe contact author?

naive goblet
#

Though Island#getOwner isn’t a string ?

cursive mulch
#

xoxo

lapis plinth
#

its a UUID treated the wrong way

naive goblet
#

potatis .

warm summit
#

its just an issue with how the plugin.yml file was written?

naive goblet
#

Send the full error

#

And the plugin.yml

lone fog
#

Imagine having a plugin on SpigotMC that doesn’t load

warm summit
cursive mulch
#

@warm summit the plugin is broken, it has no plugin.yml in its source

lone fog
#

You could probably make one

warm summit
#

oh jeez

naive goblet
#

Lmao

lone fog
#

But I question if the rest of the code is worth it

naive goblet
#

True lolol

cursive mulch
#

@lone fog it looks really bad...

warm summit
#

lol it seems to be the only plugin that adds hunger games compasses for player tracking

shy shard
#

question about mysql before I write/read anything from it

#

I am checking if conenction is still open

#

with this code

#

by grabing UserName

#

from connection

#

so now should I do it on every request

lone fog
#

Isn’t there

#

A connection.isClosed

shy shard
#

that wont work

#

it returns always

#

false

#

it needs to be really closed

#

by my side

#

so now should I just make runnable

#

and check every few min

naive goblet
#

You should return false in that catch clause btw?

shy shard
#

if connection is still open

lone fog
#

I just use a connection pool to handle it for me tbh

shy shard
#

because if there was no any communication between server and mysql

#

conenction get closed

#

by mysql side

#

after 8h

#

is default

lone fog
#

Doesn’t seem great to rely on an exception for checking if the connection is working

subtle blade
#

You shouldn't keep a connection open like that anyways

#

Use a connection pooling library like Hikari

lapis plinth
#

@naive goblet how do I add lines to the json file?

#
  • how to read
subtle blade
#

You should return false in that catch clause btw?
Code flow, it reaches false anyways

lone fog
#

There is also an AutoReconnect option I think

shy shard
#

AutoReconenct got depricated or something

#

not working

naive goblet
#

@lapis plinth are you using json simple?

lapis plinth
#

uh

#

no, but I can set that as a dependency if its easier

lone fog
#

Then yeah I recommend hikari

naive goblet
#

Doesn’t spigot have a json dep?

shy shard
#

@subtle blade any good tutorial on spigot about it

#

my plugin is based on economy system for tokens

frigid ember
#

plz help, any idea why i use ufw allow from 0.0.0.0 to any port 25565 proto tcp for firewall cfg, i can not connect to server anymore (bungee)

shy shard
#

so I am loading tokens on player join event

lone fog
#

LogBlock has an example of it

lapis plinth
#

Conclure should I set json simple as a dependency thingy in pom.xml?

lone fog
#

But the general documentation on it should work fine

naive goblet
#

Atom I don’t think it’s necessary

lapis plinth
#

kk, so how do I add lines / read lines

naive goblet
#

Well you don’t need to add if spigot has a json lib

#

But else add json simple

lapis plinth
#

kk

naive goblet
#

And there is a lot of documentation of how to use it

tame drum
#

@subtle blade can you help with my issue?

lapis plinth
#

kk

cursive mulch
#

@warm summit ya still there?

warm summit
#

yes

lapis plinth
#

heh, I'm not familiar with this json simple shit in general - you got an example?

warm summit
#

whats up

cursive mulch
#

I can help you out if you like with the compass tracking, I've been looking for something to do for a while haha

warm summit
#

that sounds great

cursive mulch
#

pm

warm summit
#

got ya

shy shard
#

I assume I should use latest hikari

lone fog
#

Haven’t tried that one

#

I assume it works though

tame drum
#

😕

#

Sent email to support so I guess I'll wait for respond and I know it'll get banned for week i can live with that as long as i get my access back :)

lapis plinth
#

I dont understand JSON Simple at all, can someone help?

{
"value": 100,
"queued value": 100,
"mission": 100,
"mission time": 100,
"lost value": 100
}

Im basically trying to make this with all the values readable

orchid musk
#

Hello, I'm getting a really strange lag on my servers that I can easily recreate related to whenever the new DiscordSRV plugin is enabled on my 1.16.1 server... I noticed the timings report has 385.92% World Save is that a high value? https://timings.spigotmc.org/?url=yagecisiqu

lone fog
#

Not really

#

That number loves to go into the thousands

naive goblet
#

@lapis plinth That'd be similar to a map

#

iirc it's called JSONObject

#

orsmtng

lapis plinth
#

kk

subtle blade
#

I advise you opt for Gson instead of JSONSimple

#

JSONSimple is very, very old and not type friendly

naive goblet
#

Yeah fr

subtle blade
#

The aforementioned object can be done with the following in GSON:

JsonObject object = new JsonObject();
object.addProperty("value", 100);
object.addProperty("queued_value", 100);
object.addProperty("mission", 100);
object.addProperty("mission_time", 100);
object.addProperty("lost_value", 100);
System.out.println(object);```
#

Use an instance of Gson to read/write to/from file

#

It's constructable but I typically opt for GsonBuilder so you can set pretty printing (especially if you want users to edit these files)

public static final Gson GSON = new GsonBuilder().setPrettyPrinting().build();```
#

(or something to that degree, I forget the exact methods)

lament sonnet
#

what code would i use to cancel the vanilla spectator teleport feature and would it be triggered by the PlayerTeleportEvent?

naive goblet
#

I think so

subtle blade
#

Im not confident an event is fired. If one is, yes it would be teleport event and you’d just check the player’s game mode

frigid ember
#

how to set hand to airrrrrrrrrr

torn robin
#

setItemInMainHand(new ItemStack(Material.AIR))

#

))))

#

PlayerSpectateEvent

winged sparrow
#

@reef folio I got started with that video. It got me in to it but I had to unlearn some bad practices.

torn robin
#

Does not exist

winged sparrow
#

like for the longest time, because of how he sets up the project

sullen harness
#

Hey

winged sparrow
#

I was shading my project

sullen harness
#

I need some help

winged sparrow
#

for no reason

sullen harness
#

Sooo I have uploaded my plugin to the spigot mc page

#

but I tried to make an update checker

#

for some reason

#

spigot api got stuck to version 1.0.0 of my plugin

#

this makes it imposible to hook my updater

#

:C

dark shuttle
#

what did you use for your update checker?

torn pilot
sullen harness
#

what did you use for your update checker?
@dark shuttle spigot api?

dark shuttle
sullen harness
#

Just a scanner

#

yep

dark shuttle
#

whats your resource id?

sullen harness
#

80886

dark shuttle
#

well, it shows 1.0.2

sullen harness
#

mmmmm

#

wat?

torn pilot
#

I'm seeing 1.0.2 too

sullen harness
#

k

shy shard
#

same

torn pilot
sullen harness
#

have this ever happened to you??

dark shuttle
#

Ctrl+F5?

sullen harness
torn pilot
#

Try a different browser

burnt idol
#

So I am trying to update my spigot minecraft server from 1.15.2 to 1.16.1. I am having difficulties. When I run the command java -jar BuildTools.jar --rev 1.16.1, an error message comes up saying "unable to access jarfile buildtools.jar". Help!

lone fog
#

Is it in the same folder

burnt idol
#

i do not know

#

i am very bad at this

sullen harness
#

same

#

thats edge canary

burnt idol
#

I am using linux btw

#

how do i give access to the jar file?

#

?

subtle blade
#

setItemInMainHand(new ItemStack(Material.AIR))
@torn robin that parameter is nullable

sullen harness
#

hey @subtle blade

#

any idea why others see 1.0.2 and I see 1.0.0?

#

:v

subtle blade
#

Browser caching is the likely culprit

shy shard
#

@subtle blade sorry for tagging you
But is it hikari faster then regular mysql

sullen harness
#

Browser caching is the likely culprit
@subtle blade wat?

burnt idol
#

help!

subtle blade
#

Hikari and MySQL serve two different purposes. MySQL is the database, Hikari is a manager to handle connection pooling to said database

#

Your browser caches the result of webpages, Resently

#

All browsers do unless otherwise stated

tiny pebble
#

How can I stop an animation with the Animation Packet? Using PacketPlayOutAnimation and when triggered it continues forever lmao

sullen harness
#

yeyep but I have tried it on 2 different browsers

#

with the same results

subtle blade
sullen harness
#

:c

burnt idol
#

how do i give access to the jar file? I am trying to update to 1.16.1

sullen harness
#

I guess i'll have to wait

subtle blade
#

?1.16

worldly heathBOT
#

Spigot and BungeeCord 1.16.1 are now available. Please see https://www.spigotmc.org/threads/447405/ for more information.
Reminder that BuildTools is the only supported means of obtaining the Spigot server jar.

sullen harness
#

how do i give access to the jar file? I am trying to update to 1.16.1
@burnt idol what do you mean by giving acces?

burnt idol
#

whenever i run the command java -jar BuildTools.jar --rev 1.16.1, it says it does not have access

#

"unable to access jarfile buildtools.jar"

subtle blade
#

So you're running the command where BuildTools is not located

main abyss
#

server crashes when going to end city

burnt idol
#

how do i run it where it is located

subtle blade
#

Hold shift when right clicking in the folder

burnt idol
#

im on linux

subtle blade
#

ehm

#

cd to the correct directory from terminal

burnt idol
#

ok

subtle blade
#

(is it cd in Linux? I don't remember lol)

burnt idol
#

it is

subtle blade
#

Then yeah, just be sure you're located in the correct directory when running the command

#

If you setup a shell script to run that command for you that's also much easier as you can just double click the script instead of having to rewrite the command every time

#

(like I have with my run.bat - Linux would use sh)

tiny pebble
burnt idol
#

how do i locate the directory buildtools is in?

subtle blade
#

It's wherever you put it

burnt idol
#

ok

#

thank you

subtle blade
#

afaik the animation should only play once

#

(RE: tanku)

tiny pebble
#

yeah im looking there, not sure why it just keeps playing lmao

subtle blade
#

Are you sending it more than once?

lone fog
#

Does it somehow trigger the interactEvent?

subtle blade
#

Actually, yes, it would

lone fog
#

That's why

subtle blade
#

Ehhh... maybe? PES_Think

#

That's all right click air listens for

winged sparrow
#

Choco papa

subtle blade
#

a hand swing

lone fog
#

Add UUID to list before send packet, remove after, and only send if UUID is not in list

winged sparrow
#

Am I allowed to post an error here?

subtle blade
#

I would hope so

#

As long as you're on CB or Spigot

winged sparrow
#
30.06 19:59:57 [Server] INFO java.lang.IllegalStateException: Removing entity while ticking!
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.WorldServer.removeEntity(WorldServer.java:1081) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.WorldServer.removePlayer(WorldServer.java:1100) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerList.disconnect(PlayerList.java:444) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:1416) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerConnection.disconnect(PlayerConnection.java:268) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.PlayerList.shutdown(PlayerList.java:1054) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.MinecraftServer.stop(MinecraftServer.java:725) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.DedicatedServer.stop(DedicatedServer.java:644) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:887) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.1.jar:git-Spigot-758abbe-2b00831]
30.06 19:59:57 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]```
subtle blade
#

Are you writing a stupid plugin? lol

winged sparrow
#

wait, that's not the right one

#

It seems it's at nms level?

main abyss
#

uhh.. my server crashes when we try to throw a pearl into the end city

winged sparrow
#

I think that's exactly what caused it

#

I had a player that just went to the end

main abyss
#

i think im having the same error message

#

as you

winged sparrow
#

that's exactly what happened.

tiny pebble
#

boy oh boy this'll be complicated lol. i'm not entirely advanced in java but i should figure it out

lone fog
#

Add UUID to list before send packet, remove after, and only send if UUID is not in list

main abyss
#

@winged sparrow

tiny pebble
#

i know i saw that haha

main abyss
#

i have the exact same issue

nimble stump
#

Why don’t you just put it in a Set

#

Do you want to allow them in there multiple times?

buoyant path
#

Any good open source projects to look at for good use of conventions and structuring?

lone fog
#

Yeah a hashset would be better

subtle blade
#

Wow this sounds self-glorifying, but I like to think mine are decently structured

hushed viper
#

hi everyone

buoyant path
#

Lol

nimble stump
#

Look at the ego on choco

buoyant path
#

could you link your github?

hushed viper
#

i need hel with my server

subtle blade
#

@2008Choco

#

My pinned ones are probably the best to look at

nimble stump
#

@hushed viper allow-nether = true

subtle blade
#

Good advice

nimble stump
#

👍

cursive mulch
#

Is anyone available to test the compass tracking I just made with me?

#

I need to be with 2

#

Sorry wrong chat

shadow drift
#

Guys, I have no clue why the second line in the Motd doesn;t work. I use the server proprieties for the MOTD

#

Any answers?

torn pilot
#

With Spigot API using JavaScript, what would be the best way to get a players join date without it being the weird "milliseconds after Jan 1 970 (1592469208699)?

sullen harness
#

Just format it

#

I think

subtle blade
nimble stump
#

Wait wait wait

#

JavaScript?

torn pilot
#

yes

#

JavaScript

#

Not Java

nimble stump
#

There’s a spigot api for java script?

sullen harness
#

There’s a spigot api for java script?
@nimble stump I guess...

torn pilot
#

You can convert between them with trial and error

#

Mainly using contexts

zealous lynx
#

@torn pilot you could use calandar

#

(oops, javascript, nvm)

nimble stump
#

Why would you use JavaScript for spigot

subtle blade
#

mfw willingly using JavaScript > Java

nimble stump
#

Why would you do that to yourself

torn pilot
#

It's for Papi

subtle blade
#

Ah, could have mentioned that lol

sullen harness
#

It's for Papi
@torn pilot k?

#

:v

torn pilot
#

k what?

subtle blade
#

PAPI has JS addons iirc

torn pilot
#

Idk how to use Java

#

So I'm doing this

#

🤷‍♀️

sullen harness
#

k what?
@torn pilot KO

zealous lynx
#

what version of ecma is supported?

#

i found this but no clue how useful it is, i never used javascript spigot api

torn pilot
#

Using that cx

main abyss
#

my server crashes when ender pearling into end city teleport

torn pilot
#
var player = BukkitPlayer;
function getFirstPlayed () {
    var join = player.getFirstPlayed();
    return join;
}
getFirstPlayed();

Used this but it returns milliseconds after 1970 Jan 1st

nimble stump
#

Right

zealous lynx
#

it's an epoch timestamp

nimble stump
#

^

#

That’s how computers store time

sullen harness
#

You could do maths

zealous lynx
#

searching for something like "format epoch timestamp" should help you search, but im not familiar enough to help with actually doing it in js

sullen harness
#

And print the real resukt

#

:v

nimble stump
#

Leap years @sullen harness

#

Gonna be painful math

zealous lynx
#

you don't wanna do time stuff on your own

#

it's a nightmare

nimble stump
#

^

sullen harness
#

Leap years @sullen harness
@nimble stump good for big brain

twilit orchid
#

when i kick someone, the rest of the server thats not opped cant see

#

is there a specific perm node or config in essentials or something

dawn trout
#

Do you have some kind of ban plugin?

#

oh

#

essentials.ban.notify

torn pilot
#

Welp will try

zealous lynx
torn pilot
#

Thanks

night tiger
#

@dawn trout Imagine not being verified i joke ok pce since this is help

main abyss
#

anyone know why my server is crashing when i pearl into end city gate?

zealous lynx
#

idk but several people are having issues like that it sounds like

shadow drift
#

prevent-proxy-connections=true

#

Is this a new thing?

torn pilot
sullen harness
#

@zealous lynx Is this easier with Java?
@torn pilot well

#

You can just format

#

And thats it

#

:v

#

In Java obviously

torn pilot
#

It's just cause I need to use it as a view_requirement in DeluxeMenus

#

Sooo I assumed it only supports JavaScript

sullen harness
#

Sooo I assumed it only supports JavaScript
@torn pilot what are you trying to do?

#

Just get the join date of a player?

torn pilot
#

I want people who join before a certain date to be able to see the menu item, else see something else. So I'm trying to compare the player's join date with a defined date.

#

Something along the lines of if player joins before say 5th October, return true, else false

sullen harness
#

Mmmm

torn pilot
#

In which case I likely don't necessarily have to format the date

#

But 🤷‍♀️

zealous lynx
#

@sullen harness kinda easier, it lets you pass in a format string

#

lol

sullen harness
#

@honest tusksently kinda easier, it lets you pass in a format string
@zealous lynx well he ia getting 12394872727172 ms

#

Since he joined the server

torn pilot
#

Stop tagging RE xD

sullen harness
#

Xd

zealous lynx
#

reeeeeee

torn pilot
#

That's the return atm

zealous lynx
sullen harness
#

That's the return atm
@torn pilot 69 nice

zealous lynx
#

june 18th according to this

#

weird

#

maybe?

torn pilot
#

June 18th sounds about right

#

Started the server about then I'd say

zealous lynx
#

ok

#

for a sec i thought it was supposed to be current time.

torn pilot
#

No Cx

#

var join = player.getFirstPlayed(); ≠ current date

zealous lynx
#

try to put it into a Date object then call toLocaleDateString() on it

torn pilot
#

Java is weird if that's what that is in Java

zealous lynx
#

most things use timestamps

sullen harness
#

Java is weird if that's what that is in Java
@torn pilot I think its the same XD

lime elbow
#

when a player enter to a server

#

kicks them

torn pilot
#
var myDate = new Date( join*1000);
document.write(myDate.toGMTString()+"<br>"+myDate.toLocaleString());
#

hmm

zealous lynx
#

ya thats close to what i was typing

torn pilot
#

can't use "<br>" potentially

#

But we'll see

zealous lynx
#

maybe "\n"

peak onyx
#

for some reason console isnt being broadcasted to ops even tho its set to true in server.properties
anyone know why that could be

torn pilot
#
var player = BukkitPlayer;
function getFirstPlayed () {
    var join = player.getFirstPlayed();
    return join;
}
var myDate = new Date( join*1000);
function dateFormat () {
document.write(myDate.toGMTString()+"<br>"+myDate.toLocaleString());
    return dateFormat;
}
dateFormat();
#

oops did that wrong

lime elbow
#

when a player enter a server
got kicked

zealous lynx
#

woo makes me not feel so nervous, this javascript papi expansion uses nashorn too. i was nervous that since nashorn is deprecated that it wouldn't be an acceptable script engine to use...
but i can not worry now

lime elbow
#

how i repair that

torn pilot
#

That didn't work

#

I've done something wrong

zealous lynx
#

what it do?

torn pilot
#

join is not defined

zealous lynx
#

it's out of scope

torn pilot
#

Pretty sure i can't reference variables in other variables

zealous lynx
#
function dateFormat (epoch) {
  var myDate = new Date( epoch*1000);
  document.write(myDate.toGMTString()+"<br>"+myDate.toLocaleString());
  return dateFormat;
}
dateFormat(BukkitPlayer.getFirstPlayed());
tall crystal
#

Ok so how do I actually use hex colors in a scoreboard it just keeps returning like its base color

torn pilot
#

ReferenceError: "document" is not defined in <eval> at line number 1

#

@tall crystal Does scoreboard support json?

tall crystal
#

Well it supports regular chatcolors

torn pilot
#

still ReferenceError: "document" is not defined in <eval> at line number 1 wondering if I can't use document

zealous lynx
#

k

#
function dateFormat (epoch) {
  var myDate = new Date( epoch*1000);
  return myDate.toGMTString()+"<br>"+myDate.toLocaleString();
}
dateFormat(BukkitPlayer.getFirstPlayed());
#

(fix last line to do whatever it is that papi wants for logging)

torn pilot
#

Ahh that worked

zealous lynx
#

i thought document.write was a papi thing

#

im not familiar with it

torn pilot
#

It's an html thing usually

zealous lynx
#

oh lol, never used it but i've done lots of javascript

torn pilot
#

Oh my lord

#

Just realised

zealous lynx
#

?

torn pilot
zealous lynx
#

remove the *1000?

#

(no clue why so said to do that)

torn pilot
#

Whoops

zealous lynx
#

so many upvotes, thought i could trust it

torn pilot
#

I meant *1 with I did that

#

You can't have it on it's own I don't think

#

It has to be *integer

#

I wonder if other platforms return it as epoch/1000 on default 🤷‍♀️

zealous lynx
#

does getFirstPlayed return a string in that expansion?

#
function dateFormat (epoch) {
  var myDate = new Date(parseInt(epoch));
  return myDate.toGMTString()+"<br>"+myDate.toLocaleString();
}
dateFormat(BukkitPlayer.getFirstPlayed());
#

oops dont do that

#

epochs are longs

torn pilot
#

I did

function dateFormat (epoch) {
  var myDate = new Date( epoch*1);
  return myDate.toGMTString();
}
dateFormat(BukkitPlayer.getFirstPlayed());
#

Which seeeems to work

#

Minus it saying GMT which isn't actually my time zone

rustic prism
#

One message removed from a suspended account.

#

One message removed from a suspended account.

zealous lynx
#

if you want to get rid of it just substring it

rustic prism
#

One message removed from a suspended account.

zealous lynx
#

srry was @ Absentt, idk how to obfuscate

rustic prism
#

One message removed from a suspended account.

zealous lynx
#

do you mean magic chatcolor?

rustic prism
#

One message removed from a suspended account.

zealous lynx
#

do reset code

#

i think it's &r

rustic prism
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

zealous lynx
#

&f[&k~&r&fDonator&k~&r&f]
or something

wheat mirage
#

Is there anyway to get the associated NMS EntityTypes for an Entity class?

#

Trying to automatically use a declared constructor

zealous lynx
#

via craftbukkit's entity class, then getHandle()

rustic prism
#

One message removed from a suspended account.

wheat mirage
#

@zealous lynx Get the handle of an entity class, does that work on non-objects??

#

Basically I'm trying to get a map of EntitySkeleton.class -> EntityTypes.SKELETON

#

etc

torn pilot
#

Thanks for you help @zealous lynx c:

zealous lynx
#

np

#

oh, you want nms entity class to bukkit/spigot enum?

wheat mirage
#

No, the NMS EntityTypes enum @zealous lynx

#

It's now required in all insentient constructors

#

Which can be a bit bothersome

tall crystal
#

...So uh... adding an Entry to a scoreboard with a hex color doesn't work but adding a team and setting its prefix works :/

sullen harness
#

...So uh... adding an Entry to a scoreboard with a hex color doesn't work but adding a team and setting its prefix works :/
@tall crystal are you using spigot api?

wheat mirage
#

@tall crystal That's because the hex color changes the entry you're adding

tall crystal
#

I set it to use the bungee api chat color

wheat mirage
#

The entity you're now targetting is COLOR + entityName/Id

#

Instead of just the entity

tall crystal
#

Well they are just fake entities

wheat mirage
#

Not to the client

zealous lynx
#

@wheat mirage Entity.f stores the EntityTypes

tall crystal
#

Kinda wierd because I can add normal ChatColors

wheat mirage
#

I need it before instantiation @zealous lynx

#
        try {
            monster = (EntityInsentient) entityClass.getDeclaredConstructor(
                    net.minecraft.server.v1_16_R1.World.class
            ).newInstance(world);
        } catch (InstantiationException e) {
            e.printStackTrace();
            return null;
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            return null;
        } catch (InvocationTargetException e) {
            e.printStackTrace();
            return null;
        } catch (NoSuchMethodException e) {
            //Find new constructor and relevant EntityTypes
            return null;
        }```
#

@zealous lynx

frigid ember
#

can I see if a snowball hit a either block or a mob using ProjectileHitEvent

zealous lynx
#

ok, so you need the enum from the nms and you don't know how to access the enum.
if i understand.

#

1 sec, i wrote a helper function to do that

wheat mirage
#

@zealous lynx Basically I need to map the EntityTypes enum to it's relevant classes

zealous lynx
#

lets take a step back, what are you trying to do? construct an nms entity?

wheat mirage
#

Yeah, I register some Entity classes against certain mob types I want to spawn

#

Some of them are my own NMS classes

#

Tbh I use a low enough number of vanilla mc ones I'm just going to hardcode it in

zealous lynx
#

mind if i dm you?

#

i dont wanna clutter

wheat mirage
#

Sure thing

#

Tbh this help channel gets a ridiculous amount of messages per day though 😛

subtle blade
#

I'll take "What the fuck is this?" for 300, Alex

catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
    e.printStackTrace();
    return null;
}```
golden valley
#

anyone on custom messages for bungeecord ?

#

maybe decompile bungeecord.jar?

lapis plinth
#

The aforementioned object can be done with the following in GSON:

JsonObject object = new JsonObject();
object.addProperty("value", 100);
object.addProperty("queued_value", 100);
object.addProperty("mission", 100);
object.addProperty("mission_time", 100);
object.addProperty("lost_value", 100);
System.out.println(object);```

@subtle blade I dont really understand what this does - How would I be able to utilize this in adding lines to my file?

subtle blade
#

Read and write. Read from file, get a JsonObject, edit it, write to file

#

That Gson class I mentioned earlier has methods to read and write files

lapis plinth
#

Yeah but it adds the stuff to the JsonObject, but how will the JsonObject add stuff to my json file?

subtle blade
#

You write it to the file. Lol

lapis plinth
#

how tho

#

xD

tiny pebble
#

so far after most everything my brother and i have tried it still loops the animation
we tried it with another animation and it didnt loop that one
lmao my head is gonna explode

subtle blade
#

That Gson class I mentioned earlier has methods to read and write files

lapis plinth
#

public static final Gson GSON = new GsonBuilder().setPrettyPrinting().build(); this?

#

xD

#

im so braindead

wheat mirage
#

@subtle blade What's your issue with that code?

subtle blade
#

You're repeating yourself in 3 identical catch statements. Merge them

frigid ember
#

the lack of ors

wheat mirage
#

Yeah it was an IDE quickfix thing and it just wasn't important enough to merge

#

I thought you'd posted the actual code

subtle blade
#

It was important to my eyes :((

wheat mirage
#

Is bukkit.yml world-container not working in 1.16?

subtle blade
#

No

lapis plinth
#

my brain is slowly dying

subtle blade
#

Don't know whether or not md plans on reimplementing it

wheat mirage
#

Damn, that's a right pain

frigid ember
#

Is there a way to see if an entity or a block was hit with a ProjectileHitEvent or should I use a different way

subtle blade
#

If you want to take a stab at reimplementing it, source is open, we encourage PRs 🙂

lone fog
#

event.getHitEntity

subtle blade
#

or getHitBlock() respectively

#

Both are nullable

lone fog
#

^

wheat mirage
#

@subtle blade What broke it?

subtle blade
#

The entire concept of how worlds and dimensions are handled internally was rewritten. md just didn't bother reimplementing it because he'd figured nobody used that option

frigid ember
#

oh and check if getHitEntity is null

#

thanks

subtle blade
#

You got it oki

wheat mirage
#

@fleet crane How difficult would re-implenting bukkit.yml's world container be? I'd be happy to PR if it's not too difficult.

lapis plinth
#

yeah I dont think im understanding this gson shit

#

😫

frigid ember
#

Anyone know a plugin which stops someone from going into like spawn when combat tagged?

fierce briar
#

I’m looking for a Plugin that Let’s you use Plugin Commands Inside /Function and Command Blocks ;3

#

PvP Manager? @frigid ember

frigid ember
#

something else

fierce briar
#

Move spawn 10 Blocks Higher. Done.

frigid ember
#

lmfao

#

i mean that is pretty simple tbh

#

but i rather have something like a HCF border around it

#

i would make it if i knew how to

wind dock
#

Does anyone know ehy when I first created my server, everyone except me(because I was running on the host machine) had really high ping and had 1 bar. After a bit, it just stopped.

golden valley
#

your internet is ass

frigid ember
#

^, plus never host on your machine

fierce briar
#

End.

golden valley
#

facts

wind dock
#

Uh

#

@frigid ember why not

#

@golden valley also it stopped now

#

So my internet being ass cant realy be the problem

frigid ember
#

ran out of memory prob too

fierce briar
#

“My Internet being ass can’t realy be the problem.” Think about that.

frigid ember
#

and just never host on your machine its facts

wind dock
#

I have 32gb of ram

#

So

golden valley
#

i was just aboutto say that

#

check tps maybe

#

you just admitted your internet was ass, mine used to be ass, so i changed server locations

fierce briar
#

Recent plugin?

wind dock
#

@frigid ember why though

frigid ember
#

just dont?

wind dock
#

@golden valley well, its 200 down and 11 up

#

Idk if thats ass or not

golden valley
#

thats okay internet

wind dock
#

Just don't isnt an answer

#

Why

golden valley
#

its poor practice, its not the only thing running and security issues too.

#

easier to have a dedicated machine

fierce briar
#

You use your own ram/Wifi. It’s Out of balance.

golden valley
#

or vm

#

also that too

wind dock
#

Uhm does it cause any sort of damage to the hardware itself? Such as wearing out the cpu, ram etc

fierce briar
#

It’s Like asking for gold. When you only got Copper.

#

Yea, that too Geom

golden valley
#

yes it causes it to explode

fierce briar
#

Samsung

wind dock
#

No it doesnt?

#

Explode?

golden valley
#

oh, you got lucky

wind dock
#

Dedicated machines are literally just pcs

golden valley
#

but dedicated, yea

wind dock
#

Yes, how come they don't explode then?

golden valley
#

luck

wind dock
#

...

#

I cant tell if your joking or you think thats true

golden valley
#

im telling you man, you run your server on a computer, not a dedicated machine, it will explode

fierce briar
#

Ok, Geometry. It’s your internet if you don’t pay the good stuff to your Internet provider. End.

golden valley
#

like kabolozo

#

fr tho, its your internet

#

check wifi, or LAN is in half

wind dock
#

@fierce briar yeah internet, but apart from that can the hardware be damaged?

golden valley
#

i told you

#

explode

fierce briar
#

Yes, After many many years.

wind dock
#

I know it can't explode.

fierce briar
#

You will lose stuff.

wind dock
#

Wdym by lose stuff, files?

fierce briar
#

Let’s say it’s not beneficial to host on your own Pc.

golden valley
#

yea, notch will come into your house and drill your hdd

fierce briar
#

Hero brian

#

Forgot the name. I was a Skid once.

wind dock
#

I'm gonna be stopping hosting on my pc soon, but I want to know about the hardwarw aspect

fierce briar
#

Geom seriously, Not worth to host on Your Own pc, Unless for tests.

wind dock
#

Just in case I ever just want to chill with my friend and have some fun

golden valley
#

hero brian will come over and pirate happy feet in HD24K

#

without a vpn

#

nah man, you are fine

fierce briar
#

Well, Friend is cool, But Like 24/7 hosting is more for Dedicated Servers.

golden valley
#

^

wind dock
#

@fierce briar yeah, but im pretty sure my internet can handle 1 or 2 other friends. I just want to know about the hardware damage, since that's really what worries me atm

fierce briar
#

Google

wind dock
#

And i def don't do it 24/7

golden valley
#

internet is not always consistent, its more of a river.

wind dock
#

Like 3 hours a day at most

fierce briar
#

Nothing much.

wind dock
#

@fierce briar tried googling

#

not a lot of straight answers

golden valley
#

pay a buck a month for a host, i got nothing for you

#

you asked a super vauge question

fierce briar
#

Well, Software has no strait damages.

#

Hardware*

golden valley
#

both 😄

fierce briar
#

True

wind dock
#

I'm just saying like, seeing as my cpu temps to soar to the mid 70s, can this be a problem

#

Well, I do have a 3800x with onlh the stock cooler

golden valley
#

im a Dr. the prognoses is exploding syndrome

fierce briar
#

If we could know when my HDD will fail. extact sec. I would probs have a better answer.

wind dock
#

Oh yeah another thing

#

My hdd is showing signs of failing and I'm hosting a minecraft server on it, could the server had lead to this?

golden valley
#

no, use from everything

#

backup now

wind dock
#

Well the hdd is a seagate barracuda which fail quite a lot... but

golden valley
#

not tommrow

fierce briar
#

So, Vague, Is “Depends”
“Depends”= Hours/Time/Quality,etc...

wind dock
#

@golden valley uh what

#

@golden valley could u repeat that again I dont understand

#

Back it up?

golden valley
#

if its falling you should backup

#

ayyy, where the thicc chicks at

fierce briar
#

“Showing signs of failing”
Also GeometryPro: Forgets to backup

golden valley
#

no fr if you dont, you will loose everything

wind dock
#

Wdym by no use from everything

#

Yeah ik

golden valley
#

oh my lord

wind dock
#

I backed it up?

golden valley
#

you sure did pal

wind dock
#

Ok, I did back it up. What I'm wondering is

#

Could the minecraft server have lead to this

#

Or been a factor in thos

#

This

golden valley
#

you are going to hate the answer

wind dock
#

Just please make sense

#

And i won't hate it

golden valley
#

maybe, maybe not

wind dock
#

When would it be yes when would it be no?

golden valley
#

idk man, im not a wizard

wind dock
#

Uhhh why do u say maybe or maybe not @golden valley

fierce briar
#

Pray, and Hope the Hardware/Software Lasts a long time.
~ The Way to host.

golden valley
#

idk, try the stairs hard reset method

#

just take your pc, and toss it down your local flight of stairs, see if it fixes the issues

wind dock
#

Bruh

fierce briar
#

^ Spoiler: ||Joke||

wind dock
#

Please dont

frigid ember
#

quick question, anyone know if the glow effect supports rgb?

fierce briar
#

Sarcasm: Deleting Windows system 32 Should solve the problem...

golden valley
#

honestly though, i say maybe because its not possible for me to diagnose your PC from discord IRC

fierce briar
#

Glow Effects: 🤔 They work with Teams

wind dock
#

Ok anyways, last 2 things

Just give me a yes or no answer: hardware damaged by the server or no

Anyways to reduce the strain on my cpu and make my server more efficient in a way?

fierce briar
#

Teams Idk if they support all colors.

wind dock
#

@golden valley what info would u need?

golden valley
#

not more than normal wear and tear, yes

frigid ember
#

i know the scoreboard works with rgb, that's why i was wondering

wind dock
#

Ok ty for that straight answer

golden valley
#

i need your ss# and your moms last name

#

and your first pet

fierce briar
#

Lmao, Chill

#

Let met check Skeagle

#

Aww man turned Off Minecwaft

burnt idol
#

I have done everything to update my server to 1.16.1. I have everything ready, and I have the .jar file in the server folder, and I am ready to start the server. I run the server and it says "unable to access jarfile spigot-1.15.2.jar". I thought I did everything, but my server won't even start. Help!

fierce briar
#

The .bat should have the same name

golden valley
#

its not really doable my man. it could have effects if the damaged part of the HDD contains the server. Damaged HDDs can also lead to OS slowdown, regardless i would change HDDs ASAP

lone fog
#

Update your bat file

burnt idol
#

im on linux

lone fog
#

Or sh file or whatever

burnt idol
#

ok

#

how?

golden valley
#

anyone here a god at linux or is it stack overflow time

fierce briar
#

I wish I was, Someday thoe

lone fog
#

Open it with a text editor and find the jar file name

burnt idol
#

ok

golden valley
#

I'm not bad, but some legacy things bonk me on the head

burnt idol
#

thanks!

fierce briar
#

The hardest thing(s) in life is Launching a Minecraft server and hoping for the best.

golden valley
#

idk man, have you tried driving with your feet?

wind dock
#

@golden valley ty for the help

fierce briar
#

Damn. True

wind dock
#

I have been having this black screen issue, could my failing hdd been behind it?

golden valley
#

its a stretch to call it help, but i am here

wind dock
#

Thats what a guy said

golden valley
#

it sounds like you really need a new HDD my guy

wind dock
#

The screen starts lagging, then goes black with the cursor still there, then it comes back(sometimes) with the game crashed

#

@golden valley yeah, its a seagate barracuda

golden valley
#

get a SSD for os and games, and a large HDD for files

fierce briar
#

Hopefully Everything Supports Hex colors in the future. Glow Rip, for now.

wind dock
#

@golden valley I have a nvme ssd and hdd

#

1tb ssd 2tb hdd

golden valley
#

what is the failing drive?

wind dock
#

Hsd

#

Bdd

#

Hdd

golden valley
#

yea, try deploying the server on the nvme

wind dock
#

The server doesn't cause the crash btw

golden valley
#

that will eliminate the hdd issue

wind dock
#

Its usually not on when it crashes

#

Oki

golden valley
#

if there is one

wind dock
#

I had 4.3 billion timesouts on the hdd lmao, pretty sure its a problem

#

Anyways I gtg to sleep, thanks for the help everyome

#

Everyone

hardy cedar
#

i made it for my lobby

#

i dont need config

#

or anyother thing

twilit orchid
#

can someone help me with an error i got? I cant post the logs so i need someone to dm me

lone fog
#

?paste

worldly heathBOT
twilit orchid
#

oh

#

also whats the difference between killing and stopping a server

lone fog
#

Are you doing large world edit operations

frigid ember
#

How would i use world guard and disable pvp protection if someone has been combat tagged?

lone fog
#

Probably need a custom add on

weary birch
#

Ayo, looking for some serious BungeeCord help. Made a post on the forums but I'm having no luck.

#

I'm running on a Windows Server 2019 Dedicated Server. Got a bind error on BungeeCord startup, checked all connections via cmd prompt and the port assigned to BungeeCord is not in use by any other programs/services.

#

Can post link to forums post if needed

sage summit
velvet halo
#

Has anyone used tebex before? They say there is a transaction limit of $250 dollars. Is that per transaction or the total amount per month for transactions your server can gain?

pastel arrow
#

No clue they use to say on the site.

sage summit
#

how do you check how many players are in the same world as the player is in with placeholderapi?

nimble stump
#

@velvet halo per transaction

#

i believe

#

in my experience they're able to process at least 10s of thousands total per month

velvet halo
#

Alright cool!

trail geyser
#

aam i verfyied

keen compass
#

nope

lime elbow
#

Why whet a user try to join to my server kick them

#

I have a network

#

(bungeecord)

opal bay
#

any errors?

lime elbow
#

No

#

Nothing

opal bay
#

show me proxy console

#

like a screenshot

lime elbow
#

Ok

#

Im in phone right now

opal bay
#

oh okay, maybe when you're back on the computer?

lime elbow
#

No

#

I cant

#

I cant put images here

buoyant path
#

How can I create a comparator that sorts by minimum, and a comparator that sorts by minimum

public class MinimumComparator implements Comparator<IReward> {

    @Override
    public int compare(IReward o1, IReward o2) {
        return Float.compare(o1.getChance(), o2.getChance());
    }
}

public class MaximumComparator implements Comparator<IReward> {

    @Override
    public int compare(IReward o2, IReward o1) {
        return Float.compare(o1.getChance(), o2.getChance());
    }
}```
I found this somewhere but I dont see how you can guarantee that this works
cold wharf
#

hey

#

When I try to install spigot 1.16.1 maven repo using gradle, it gives me this error v

chilly eagle
#

Hello! Is anyone here? AuthMe Crashes my server

opal bay
#

am blind

cold wharf
#

Anyone?

opal bay
#

whats your full pom?

plucky egret
#

is there a way to run both a modded and spigot server

cold wharf
#

whats your full pom?
@opal bay
It is a build.gradle

honest flint
#

Hello

#

Please link to open source code Spigot

knotty surge
#

@plucky egret not in a way that won't result in bugs

cold wharf
#

Everything results in bugs

knotty surge
#

spigot is built for vanilla not mods

honest flint
#

Please link to open source code Spigot
@honest flint

#

Please

knotty surge
#

what do you mean

#

you want spigot's source code?

honest flint
#

Yes

knotty surge
#

it's on the forums under "Hub" on the navbar

cold wharf
#

When I try to install spigot 1.16.1 maven repo using gradle, it gives me this error v
@cold wharf

weary birch
#

Any chance anyone can help with the issue I posted above?

#

I'm running on a Windows Server 2019 Dedicated Server. Got a bind error on BungeeCord startup, checked all connections via cmd prompt and the port assigned to BungeeCord is not in use by any other programs/services. Can post link to forums post if needed. Also a little desperate here.

hollow thorn
#

can someone pls explain why this isnt working

sage summit
#

code

@EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {

        Player player = event.getPlayer();
        ItemStack item = player.getItemInHand();

        if (item==null)return;
        for(String key : main.getConfig().getConfigurationSection("items").getKeys(false)) {

            String id = main.getConfig().getString("items." + key + ".id");
            String name = main.getConfig().getString("items." + key + ".name");
            List<String> list = main.getConfig().getStringList("items." + key + ".commands");

            System.out.println(name);
            System.out.println(id);
            System.out.println(item.getType());
            System.out.println(item.getItemMeta().getDisplayName());
            System.out.println(Material.getMaterial(id));
            if (item.getItemMeta().getDisplayName() == name && item.getType() == Material.getMaterial(id)) {

                if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {

                    for(String commands : main.getConfig().getStringList("items." + key + ".commands")){
                        player.performCommand(commands);
                    }
                }
            }
        }
hollow thorn
#

its a null pointer exception

snow dove
#

My server won't function when I use 1.16.1

sage summit
#

@hollow thorn

#

how do i stop it?

hollow thorn
#

no clue

#

have you defined

#

main

sage summit
#

yes

hollow thorn
#

system.out.println wont print in the log screen

#

but that shouldnt cause an error

sage summit
#

It says this line has the error i think

if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
hollow thorn
#

ive used that type of code before

#

and ive never had an error on that scale

#

you have imported everything right

sage summit
#

yes

sage summit
#

got it working

@EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {

        Player player = event.getPlayer();
        ItemStack item = player.getItemInHand();

        if (item==null)return;
        if (item.getType() != Material.AIR) {
            for (String key : main.getConfig().getConfigurationSection("items").getKeys(false)) {

                String id = main.getConfig().getString("items." + key + ".id");
                String name = main.getConfig().getString("items." + key + ".name");
                List<String> list = main.getConfig().getStringList("items." + key + ".commands");
                
                if (item.getItemMeta().getDisplayName() == name && item.getType() == Material.getMaterial(id)) {

                    if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {

                        for (String commands : main.getConfig().getStringList("items." + key + ".commands")) {
                            player.performCommand(commands);
                        }
                    }
                }
            }
        }
    }

made it so it checked if it was an empty hand and if it was not it ran the code

frigid ember
#

w/o placing blocks in shadows cuz i tried that

undone narwhal
#

1.16.1 ?

frigid ember
#

yep

undone narwhal
#

Spigot or spigot fork ?

cold wharf
#

When I try to install spigot 1.16.1 maven repo using gradle, it gives me this error v
@cold wharf

river cradle
#

Hi there, I'm trying to call Player#teleport() asynchronously because I've got a timer ticking down every second (using Timer#scheduleAtFixedRate()) which would need to execute the teleport command when at zero seconds.

I tried to create a Runnable and add the code to the run() method, but that threw the same exception. Does anyone have any other ideas?

undone narwhal
#

teleport method should be called sync. I know a create api to manipulate switch between async and sync, then I think you'll be able to sync your teleport method. It's called TaskChain

frigid ember
#

@undone narwhal spigot

undone narwhal
#

Then I don't know. It might be an issue.

frigid ember
#

can we pls then have a fixlighting command?

river cradle
#

teleport method should be called sync. I know a create api to manipulate switch between async and sync, then I think you'll be able to sync your teleport method. It's called TaskChain
@undone narwhal Hm, and there is no "dependencyless" way? I guess I'll go with that if I have to, but is there no basic-java solution?

undone narwhal
#

I've to check how this api synchronize on the main thread

#

However I've got an idea but dunno if this is a way efficient method

#

Create a kind of Queue, every x ticks on the main thread the queue is pulled and teleport the pulled request (Create a sort of Pair with a Player and its destination).
And async you can add someone to this queue

#

You can use like a ConcurrentLinkedQueue

river cradle
#

Haha that contains a lot of more advanced Java which I'm unfamiliar with, but I'll try! Thanks!

undone narwhal
#

This is something not that hard, just have to go deeper on it and then you'll master all of that stuff !

#

Good luck

river cradle
#

Yeah, I've been picking up a fair bit of programming languages recently and I've "learned how to do stuff", but never really understood them in-depth like I did with my first programming language. When I get my current plugin done, I'll take a more elaborate Java course 🙂

undone narwhal
#

You don't really need to take course. Actually I learned 95% of my skills just by trying, and searching online

tiny dagger
#

^

#

you don't need to look for someone to teach you, they don't even hold the skills themselfs

#

making mistakes and learning from them will get you much further

undone narwhal
#

Agree

#

I really like searching on many sources, and talking with other devs

sturdy oar
#

I mean there's nothing wrong with courses

#

if they're made well

fossil shoal
#

A 1 month course will not teach you in depth no matter how well it is made

sturdy oar
#

no, but you will learn the basics

undone narwhal
#

I think that the better courses, are the most specific one

sturdy oar
#

I don't know about you, but most of my experience comes from having read hundreds of tutorials, watched hundred hours of courses, and sometimes even read books

undone narwhal
#

Something really precise

fossil shoal
#

I don't know about you, but most of my experience comes from having read hundreds of tutorials, watched hundred hours of courses, and sometimes even read books
For me it's reading and experimenting

sturdy oar
#

I think I've spent 50€ on Udemy so far -.-

fossil shoal
#

Sometimes videos, but not the ones that try to teach you all about the language.

frigid ember
#

hi

sturdy oar
#

hi?

frigid ember
#

how can i download 1.16 with buildtools i use java -jar BuildTools.jar --rev 1.16.1

sturdy oar
#

yes that's how you build 1.16.1

frigid ember
#

Hi, does anybody have any idea how to use Async World Edit for schematic placement? Their documentation is pretty much non-existent.

sturdy oar
#

it's WorldEdit documentation

undone narwhal
#

But nothing works as they write

#

I had a very painful time using WorldEdit / FAWE / AsyncWE api

frigid ember
#

I tried just using WE in the hopes that async WE takes care of the rest, but it won't work asynchronously

sturdy oar
#

Async World Edit is just a WorldEdit addon

#

it has same commands if i remember correctly

frigid ember
#

Oh, I'm talking about the API for the placement. Not the commands. I'Ve tested it and it did not work asynchronously

#

Let me try again, thanks for the help

sturdy oar
#

oh i thought you needed commands

frigid ember
#

i have this error when i try to download 1.16

#

u.u can not send a picture

sturdy oar
#

?paste

worldly heathBOT