#help-archived

1 messages · Page 25 of 1

dusky herald
#

Make it dependent on the first plugin?

lofty otter
#

i did

#

its called Anvil

#

and it loads fine

#

just ontime doesnt

radiant pollen
#

That still doesn't make sense.

#

Anvil loads and in it's onenable it registers the commands of another plugin that depends on it.

upper hearth
#

Shouldn't Anvil be dependent of OnTime?

frigid ember
#

@upper hearth so u think i will can connect to my server with viarewind

upper hearth
#

@frigid ember Just install ViaVersion and ViaRewind on your Spigot servers and you should be able to join

lofty otter
#

no, anvil is a cross platform plugin framework. OnTime "registers" itself with anvil and then anvil runs the enabling methods for ontime

high root
#

For everyone that is posting code you can use

//Code here
//Example:
@Override
public void onEnable(){
    Bukkit.getConsoleSender().sendMessage("Hi");
}

You can do it by using ```java
at the beginign of the code and ``` at the end

lofty otter
#

and this plugin already works on sponge, im just implementing it on spigot now

radiant pollen
#

I'm pretty sure you can't work with commands until a plugin is enabled.

high root
#

You can't work with commands until the server is started

lofty otter
#

i call setEnabled(true) in the ontime main constructor

frigid ember
#

@upper hearth i have it, but its saying kicked from the server out of dated version.Please use 1.9 version

high root
#

Tehy don't get process

radiant pollen
#

@frigid ember you didn't do it right, then.

cosmic lily
#

@radiant pollen I am now determined the problem is with the server not downloading resource packs. I just uploaded a test pack I downloaded from online and its still not downloading

frigid ember
#

@radiant pollen i have via version and via rewind + via backward

cosmic lily
#

It cant be a plugin conflict as I tried removing every plugin and I had the same issue

lofty otter
#

so i see the issue now

#

because anvil loads before ontime

#

reeee

upper hearth
#

We said that didn't we? lmAO

lofty otter
#

well this hasnt been an issue on other platforms so i kinda just assumed it work would here too xD

#

ah i know why

#

in sponge i can make the anvil enabled listener run later

radiant pollen
#

@cosmic lily Show me the line in your server.properties that sets the server resource pack, please.

cosmic lily
#

resource-pack=http://victorynet.works/downloads/testpack.zip?dl=1

lofty otter
#

is there an onEnable that runs after ALL plugins have finished their onEnable?

mental falcon
#

Is there anyway that I could monitor all the console output with my plugin?
I've tried adding a new Handler via Bukkit.getLogger.addHandler but it doesn't work
I want to be able to monitor everything that gets printed on the console

high root
#

Maybe you can schedule a task?

cosmic lily
#

it has a backspace

radiant pollen
#

@lofty otter Bukkit.getScheduler().runTaskLater()

cosmic lily
#

backslash*

#

it just doesnt appear on discord

radiant pollen
#

@lofty otter Runs on the first tick of the server, after everything has loaded. IIRC

lofty otter
#

hm. not ideal though

radiant pollen
#

Why not?

lofty otter
#

because this is the phase where everything for any anvil plugin gets loaded

#

it has to be delayed like this because i create a guice injector for each plugin

#

i need to wait until every plugin has registered before i can complete the initialization

radiant pollen
#

Or just do Bukkit.getScheduler().runTask(). It won't run until everything has loaded and the first server tick happens.

lofty otter
#

is there some kind of event i can listen to

high root
lofty otter
#

that happens right before done

radiant pollen
#

No. You can just start a synchronous task. Because it's synchronous it won't start until all plugins and worlds are loaded.

#

@cosmic lily Maybe try https? I don't know anymore.

cosmic lily
#

tried it before

lofty otter
#

im just putting all of that loading into the first real tick

cosmic lily
#

it gets stuck on the end

radiant pollen
#

My pack uses https.

rapid yacht
#

would u guys say that the crash course to java on the wiki page is accurate?

radiant pollen
#

@rapid yacht Yes.

#

The basics of Java have not changed in ever

mental falcon
frigid ember
#

Can someone who know how to use Via version and ViaRewind help me?

radiant pollen
#

@frigid ember No. We've told you what to do already.

#

You're not providing anything to help us help you further. You need to give us server logs and error messages. You can't just say it doesn't work and expect us to fix it.

radiant pollen
#

Do the plugins load correctly?

lofty otter
#

this 20 second timer on each server start is killing me man

cosmic lily
#

@radiant pollen

Found this in my client log

[19:46:54] [Downloader 0/WARN]: File C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\9ff27345c35152b711ad5f90d6ef2cccad39d925 had wrong hash (expected 3cf9a4334467e89fff45586b0a25c856c5887aad, found e2583dd9e13cba6b2d5036e5f98376e8d36b67ca).

[19:46:54] [Downloader 0/WARN]: Pack application failed: java.lang.RuntimeException: Hash check failure for file C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\9ff27345c35152b711ad5f90d6ef2cccad39d925, see log, deleting file C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\9ff27345c35152b711ad5f90d6ef2cccad39d925

high root
radiant pollen
#

@cosmic lily Ahhh yup. That's the issue. You need to upload the .zip of the resource pack into a sha1 hash and use that as the resource-pack-sha1 field in the server.properties. I've completely forgotten about that, I'm sorry.

cosmic lily
#

no worries

#

ill see if it works

radiant pollen
#

@cosmic lily http://onlinemd5.com/ Use this. Select "SHA1" and upload your .zip. The string of characters it gives you goes in that field.

#

@cosmic lily It basically uses the hash to make sure the server gets the pack correctly. If the hash from the pack it gets does not match the hash in the server.properties it gives you that error.

cosmic lily
#

but I thought the hash wasnt even required?

radiant pollen
#

No it is.

#

If you look in the server.properties, the hash is 3cf9a4334467e89fff45586b0a25c856c5887aad.

lofty otter
#

sooo zax i did that thing with the task and still

[00:52:54] [Server thread/INFO]: [Anvil] Enabling Anvil v1.0.0-SNAPSHOT
[00:52:54] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
[00:52:54] [Server thread/INFO]: Done (6.762s)! For help, type "help"
[00:52:54] [Server thread/INFO]: [Anvil] 1.0.0-SNAPSHOT by Cableguy20 - Loaded!
[00:52:54] [Server thread/INFO]: Plugin: OnTime v1.0.0-SNAPSHOT
[00:52:54] [Server thread/WARN]: [Anvil] Task #7 for Anvil v1.0.0-SNAPSHOT generated an exception
java.lang.NullPointerException: OnTime command not registered
        at java.util.Objects.requireNonNull(Unknown Source) ~[?:1.8.0_241]
radiant pollen
#

Hmmm. Does OnTime get enabled at all?

rapid yacht
#

@radiant pollen u got any good tutorials on yt about plugin development? or is it just the spigot wiki

cosmic lily
#

[19:53:35] [Downloader 1/WARN]: File C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\5f13098ce090fd83ac680f2913052abde63626d0 had wrong hash (expected 852E2B9918BEDE1F24D54A013E54630344013F87, found 14ce2132d3eefa09d1d0ab8a88647080e9ddf23b).

[19:53:35] [Downloader 1/WARN]: Pack application failed: java.lang.RuntimeException: Hash check failure for file C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\5f13098ce090fd83ac680f2913052abde63626d0, see log, deleting file C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\5f13098ce090fd83ac680f2913052abde63626d0

#

same issue

#

i put the new hash in server.properties

#

does the hash have to be in the pack in some way?

radiant pollen
#

Did you use a different resource pack this time?

cosmic lily
#

I uploaded my VN Resource Pack and I used the hash for the VN Resource pack

coarse sentinel
#

Where I get that 1.15.2 mcmmo

frigid ember
#

Anyone know why this is im using FAWE and trying to paste a schematic it says it pasted but its been like 15 minutes and nothing is here?

radiant pollen
#

@rapid yacht There's millions of tutorials on Youtube. There isn't a secret one that'll teach it to you in 20 minutes. You just gotta pick one and stick with it.

lofty otter
#
[00:55:32] [Server thread/INFO]: Default game type: SURVIVAL
[00:55:32] [Server thread/INFO]: Generating keypair
[00:55:32] [Server thread/INFO]: Starting Minecraft server on *:25565
[00:55:32] [Server thread/INFO]: Using default channel type
[00:55:34] [Server thread/INFO]: [OnTime] OnTime says hello!
[00:55:34] [Server thread/INFO]: [LuckPerms] Loading LuckPerms v5.0.136
[00:55:34] [Server thread/INFO]: [Anvil] Loading Anvil v1.0.0-SNAPSHOT
[00:55:34] [Server thread/INFO]: [OnTime] Loading OnTime v1.0.0-SNAPSHOT
[00:55:34] [Server thread/INFO]: [LuckPerms] Enabling LuckPerms v5.0.136
#

so yeah it gets loaded

#

but command is no bueno

#

can I somehow print out the valid commands?

#

from the plugin yml

frigid ember
#

Guys.

cosmic lily
#

how can something so simple make me want to end my existence

dusky herald
#

That's usually how it goes.

radiant pollen
#

@cosmic lily Are you sure the pack you linked is the same pack you generated the hash with? Because the link you gave me for the new pack isn't the link you said was in the resource-pack field.

cosmic lily
#

here is the main pack i want to use

#

that was just a test pack

radiant pollen
#

Well then don't use the test pack in the hash generator.

cosmic lily
#

resource-pack-sha1=852E2B9918BEDE1F24D54A013E54630344013F87
resource-pack=http://victorynet.works/downloads/vnresource.zip

#

i didnt

#

i used the vnresource

lofty otter
#

is there any way to set the executor for a command for a plugin from another plugin

radiant pollen
#

@lofty otter doubt it.

#

The commands should be registered by that point.

frigid ember
cosmic lily
#

im gonna try putting the expected hash in the sha1 hash

lofty otter
#

😭

radiant pollen
#

@cosmic lily Yeah try that.

lofty otter
#

is there no way to dynamically register commands

#

im pretty sure thats a thing

radiant pollen
#

@frigid ember What is the server version and what version are you trying to connect with?

lean knot
#

anyone else had problems with griefprevention plugin?

radiant pollen
#

@lofty otter Yeah, you should be able to set the executor literally anywhere. You should also be able to getCommand from any plugin as long as the reference to the other plugin is valid. Maybe Anvil should depend on OnTime instead?

lofty otter
#

no anvil should definitely not depend on ontime

#

but heres what I dont get

#

why is the command still null in the task

radiant pollen
#

Well then the runTask() thing should work.

lofty otter
#

well it didnt

#

its still null

lean knot
#

btw is vanilla less heavy to run then spigot?

radiant pollen
#

That's weird.

lofty otter
#

im gonna try using getCommand from inside ontime to see what happens

lean knot
#

zaxarner are you familiar with datapacks? if so would you say datapacks are less heavy then plugins?

cosmic lily
#

@radiant pollen [20:04:58] [Downloader 1/INFO]: Found file C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\1b78af34d1afcdaf588978ab65ccd77ae5aa66e7 matching requested hash 5d0e79d2973437a326ff628e0a968e1cdd888ce3
[20:04:58] [Downloader 1/WARN]: Pack application failed: java.lang.RuntimeException: Invalid resourcepack at C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\1b78af34d1afcdaf588978ab65ccd77ae5aa66e7: error in opening zip file, deleting file C:\Users\raych\AppData\Roaming.minecraft\server-resource-packs\1b78af34d1afcdaf588978ab65ccd77ae5aa66e7

#

the thing is

#

my server-resource-packs is empty

radiant pollen
#

@lean knot I've never used a datapack before. I would guess it depends on what it's doing.

lean knot
#

i have one for grief prevention

pulsar cairn
#

Hey, I have a question... does anyone here know how to power a dragon's head programmatically?

lean knot
#

not sure but maybe the head has a powered nbt tag?

#

that you could just trigger of somehow?

lofty otter
#
[01:07:33] [Server thread/INFO]: [OnTime] OnTime says hello!
[01:07:33] [Server thread/INFO]: [OnTime] Root: null
#

so

#

its null even in onEnable

pulsar cairn
#

i didn't find anything about it, so i'm not sure

cosmic lily
#

its legit not opening the pack

#

wtf

lean knot
#

probally bcs there is an error in it's formation

radiant pollen
#

@pulsar cairn It depends on the version you're using.

lean knot
#

only thing i personally see is the location of the sounds file

cosmic lily
#

no errors when loading it in my client logs

wanton delta
#

Does anyone know where i can find more info on GeneratorSettingS?

pulsar cairn
#

@pulsar cairn It depends on the version you're using.
@radiant pollen i'm using 1.15.2

wanton delta
#

I want to know how to create my own configuration with json

radiant pollen
#

@pulsar cairn You would get a block instance and get the meta, check if it's a dragon skull, cast the meta to Powerable I think and then set power.

#

Or something along those lines.

pulsar cairn
#

DRAGON_WALL_HEAD doesn't have that subinterface sadly..

#

it only has Directional...

lean knot
#

how does extract jar?

cosmic lily
#

Does anyone have a test server to test the pack on?

lofty otter
#
[01:16:47] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
[01:16:47] [Server thread/INFO]: Done (6.307s)! For help, type "help"
[01:16:47] [Server thread/INFO]: [Anvil] 1.0.0-SNAPSHOT by Cableguy20 - Loaded!
[01:16:47] [Server thread/INFO]: [OnTime] A1.0-1.0.0-SNAPSHOT by Cableguy20, STG_Allen - Loaded!
>ontime
[01:16:57] [Server thread/INFO]: [OnTime] Running version A1.0-1.0.0-SNAPSHOT by Cableguy20, STG_Allen
Use /ontime help for help
>
#

zax

#

it was because i was calling setEnabled(true) in the constructor

#

one attempted solution actually broke it more

radiant pollen
#

So you got it working??

#

The command isn't null?

cosmic lily
#

@radiant pollen does the server resource pack have to be a zip? or can it be a folder

radiant pollen
#

Pretty sure it needs to be a zip

lean knot
#

must be zip yes

#

a proper zip though

#

you got that mostly right, however i am not sure all files are in the right locations

#

like i sad i think sounds.json should be either in models or sounds

lofty otter
#

yeah its all working now

#

although this really just makes me wish bukkit didnt have such a JANK ass method to registering commands

storm willow
#

Does anyone know how can I know if iptables is working correctly?

cosmic lily
#

legit all i need in my resource pack is sounds

distant sorrel
#

True dat @lofty otter

cosmic lily
#

@lean knot all the packs I downloaded the sounds.json was outside

silk gate
#

@storm willow try sending a request

#

if it's blocked, then your drop rule works

storm willow
#

how?

silk gate
#

netcat, curl

#

could nmap it

#

depends on the situation

storm willow
#

i used nmap

silk gate
#

so many tools

storm willow
#

nmap finds my ports.

silk gate
#

are they open or filtered

storm willow
#

Does that mean it is installed incorrectly?

lean knot
#

what sounds does it contain records?

silk gate
#

does nmap say open it filtered

storm willow
#

yes

#

discovered open port....

silk gate
#

@storm willow yeah broke then

#

show your rules

#

(iptables -L)

lean knot
#

@cosmic lily if the sounds are records you don't need sounds.json

storm willow
#
root@user:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
DROP       tcp  -- !2.171.(IP)         anywhere             tcp dpt:(port)
DROP       tcp  -- !2.171.(IP)         anywhere             tcp dpt:(port)
DROP       tcp  -- !2.171.(IP)         anywhere             tcp dpt:(port)
DROP       tcp  -- !2.171.(IP)         anywhere             tcp dpt:(port)
#

@silk gate

silk gate
#

mind chucking that in a code block

#

so it's better formatted

storm willow
#

done

silk gate
#

and you're not nmapping from that 2.171 IP right?

storm willow
#

no

#

im nmapping from my computer

#

and that is a vps

naive goblet
#

EntityAirChangeEvent can anyone specify this?

storm willow
#

do i need to restart something for it to work?

silk gate
#

no

#

should work

#

nmap says those ports specifically are open yeah?

storm willow
#

yes

#

Discovered open port 2(port)/tcp on 62.171.(IP)

silk gate
#

what if you allow certain ports and drop the rest

#

that's generally the preferred setup

storm willow
#

how?

silk gate
#

want me to write the rules for you

#

what ports do you want accessible

#

I assume 25565 and 22 at least

cosmic lily
#

Dude I will literally pay someone at this point to fix it

storm willow
#

yes

#

and i use ftp / apache

#

on same vps

#

and phpmyadmin

silk gate
#

ftp or sftp

#

is phpmyadmin behind apache

#

(also nginx > Apache)

dusky herald
#

Apache handles PHP

storm willow
#

phpmyadmin with apache

silk gate
#

first iptables -F to flush your current rules

dusky herald
#

So, phpmyadmin should work with Apache

#

but they aren't the same thing.

cosmic lily
#

@lean knot or @radiant pollen can I pay you to fix this for me?

silk gate
#

I am aware just wondering if he had some weird setup

dusky herald
#

Also, phpmyadmin isn't really that great of a setup to use; if you really want to use tools to develop a MySQL Database, you should use an application to modify your database if you're able to.

#

Like MySQL Workbench, or other choices

storm willow
#

port 80 and port 22 i think what need to be open

#

and 3306 for mysql

#

true?

dusky herald
#

80 for Apache

#

3306 for MySQL

silk gate
#

does your mysql need to be accessible from outside?

#

also 443 for ssl

dusky herald
#

you dont need to use 3306 at all if you're using it on the same server

storm willow
#

yes

silk gate
#

why so

dusky herald
#

or rather, the same PC

storm willow
#

Could I enter the phpmyadmin?

silk gate
#

yes

#

phpmyadmin is not external

#
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dports 22,25565,80,443
iptables -A INPUT -j DROP```
#

then obviously save those rules

dusky herald
#

But like I said, this is just a personal opinion; I would open the 3306 port to allow use of external database editors such as MySQL Workbench

#

PHPMyAdmin is trash.

storm willow
#

done

#

should it work now?

dusky herald
#

and if you use the 3306 port and use an external application then you dont need to open port 80 nor run Apache

storm willow
#

i used "dpkg-reconfigure iptables-persistent" to save as it says in spigot tutorial

silk gate
#

yeah

#

try now

naive stratus
#

Thanks for all the help today in here. Really appreciate the community. Managed to get a good amount done today, but I am still unsure about a lot of things too. If someone could take some time and give me some feedback on this: https://pastecode.xyz/view/a130b6e4

The PersistentData method is a part I need to refactor. It's a bit messy. The basic idea of the plugin is that when you pick up a red mushrooms, it saves a record in the database, with the amount that was picked up, who picked it up, and when it was picked up. When it's dropped, the record is updated, dropped_by, dropped_at is added, and lore is created like "NAME dropped item on DATE". That's what I got so far. I've attempted to use runTaskAsynchronously, but I am not 100% sure that the implementation is correct. Any tips on this would be great.

I have a decent server running, but if I have a 64 stack I press Q to drop them individually, creating 64 records in the database, I feel it's really hard on the server and I get a warning like [Server] Server thread/WARN Can't keep up! Is the server overloaded? Running 10700ms or 214 ticks behind - So something is up 😛 The Database does seem super slow though. SHOW FULL PROCESSLIST took 11+ secs to run, so that might also be a bottleneck.

storm willow
#
root@user:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
           tcp  --  anywhere             anywhere             multiport dports ssh,25565,http,https
DROP       all  --  anywhere             anywhere
#

now it says this

#

its good?

silk gate
#

uh can you give me your iptables -S

#

just to verify that top rule is for -i lo

storm willow
#
root@user:~# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m multiport --dports 22,25565,80,443
-A INPUT -j DROP
silk gate
#

yeah you're good

#

run your nmap now

storm willow
#

I'll try nmap now

#

yes

late tangle
#

Just want to have something cleared up, if a plugin I coded get enabled without any errors. Could anything occur later that would disable the plugin itself?

silk gate
#

plugin wouldn't disable itself

storm willow
#
Starting Nmap 7.80 ( https://nmap.org ) at 2020-04-18 20:48 Hora estándar de Argentina

NSE: Loaded 151 scripts for scanning.

NSE: Script Pre-scanning.

Initiating NSE at 20:48

Completed NSE at 20:48, 0.00s elapsed

Initiating NSE at 20:48

Completed NSE at 20:48, 0.00s elapsed

Initiating NSE at 20:48

Completed NSE at 20:48, 0.00s elapsed

Initiating Ping Scan at 20:48

Scanning (IP) [4 ports]

Completed Ping Scan at 20:48, 2.23s elapsed (1 total hosts)

Nmap scan report for (IP) [host down]

NSE: Script Post-scanning.

Initiating NSE at 20:48

Completed NSE at 20:48, 0.00s elapsed

Initiating NSE at 20:48

Completed NSE at 20:48, 0.00s elapsed

Initiating NSE at 20:48

Completed NSE at 20:48, 0.00s elapsed

Read data files from: C:\Program Files (x86)\Nmap

Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn

Nmap done: 1 IP address (0 hosts up) scanned in 4.43 seconds

           Raw packets sent: 8 (304B) | Rcvd: 0 (0B)

#

it says this

silk gate
#

unless another plugin disables it

storm willow
#

(nmap)

silk gate
#

you can do -p to specify specific ports

#

otherwise it only does 1024 most common iirc?

storm willow
#

"nmap -p 1-65535 -T4 -A -v 62.171.(ip)"

late tangle
#

Ah cool but it can't get disabled by like the server instance? Just need to make sure :))

storm willow
#

i used it

#

intense scan, all TCP ports

silk gate
#

yeah

storm willow
#

nice, thanks for help!

tender ibex
#

Hey. I want to pregenerate my server worlds. How would I do that?

radiant pollen
#

wdym?

naive stratus
#

@tender ibex Not sure if it's the way to go, but I just removed the world folders.

radiant pollen
#

@tender ibex What do you mean by "pregenerate"?

naive stratus
#

Oh.. Pre. Nvm.

tender ibex
#

@radiant pollen So i can reduce CPU spikes

cosmic lily
#

@radiant pollen I fixed it by using Minepack. I guess my hash was broken

#

thanks for all your help

#

24 hours of my life wasted on an issue

radiant pollen
#

@cosmic lily No problem! Glad you finally got it working!

cosmic lily
#

hoorsy

storm willow
#

wait... now i cant access to my page and cant enter my server :/

#

@silk gate

velvet halo
#

@tender ibex Use worldborder plugin

silk gate
#

@storm willow wdym your page

#

what port is it on

storm willow
#

this page

#

i use apache

tender ibex
#

@velvet halo thx. I thought there was another way..

silk gate
#

@storm willow port 80 and 443 are open

storm willow
#

so why can't i get in?

#

im using cloudflare for the site, it need other port?

#

the minecraft server neither works

silk gate
#

what port is that on

#

25565?

storm willow
#

my server is on 25565 yes

#

the bungeecord

silk gate
#

that's also open

storm willow
#

i cant connect

dusky herald
#

@fluid basin Are you closing your connections after you make queries?

silk gate
#

did you try to use ufw or another firewall before @storm willow

storm willow
#

no

#

for my web

dusky herald
#

@fluid basin Send your code and I'll help you out.

silk gate
#

@storm willow are you using an SRV record for minecraft

dusky herald
#

I use HikariCP

storm willow
#

what?

silk gate
#

I take that as a no

storm willow
#

How can I know that?

silk gate
#

well did you make one

#

you can't have the orange cloud on and use just an A record

#

as you'll be trying to connect to cloudflare

storm willow
#

before activating iptables everything worked with cloudflare

silk gate
#

if you have the orange cloud on

#

it won't work

#

like

#

it's literally impossible

storm willow
#

ah, yes i have the SRV

silk gate
#

if you're connecting with the domain

#

oh right

#

that would've been nice to know

storm willow
#

I had forgotten, sorry

silk gate
#

so if you

#

iptables -D INPUT -j DROP

#

does it start working

storm willow
#

what

#

i cant connect to my server

silk gate
#

did you run that command

dusky herald
#

@fluid basin Make sure you're closing the Connection after you use it. Also, do not close the HikariDataSource, that will kill all the connections in your connection pool. So, use for example:

/// perform queries
connection.close();

But do not do this for example:

dataSource.close(); for example. I dont see any code, but it's an important note if you're not aware of it.

storm willow
#

I was going to do it but he won't let me in ..

#

the sftp and ftp dont work

silk gate
#

did you disconnect

#

before testing the rules

storm willow
#

disconnected alone

#

i dont do nothing

silk gate
#

smh this is why I told you to use conntrack

#

can you connect via vnc

storm willow
#

how?

silk gate
#

can you

#

does your host offer that

storm willow
#

yes

#

im with contabo

#

but I didn't know anything about that vnc until now

silk gate
#

oh god

#

I'd suggest you switch hosts but anyway

#

connect with vnc

storm willow
#

how can connect the vnc?

silk gate
#

never used contabo

#

poke around on their panel

#

I assumed you'd know how to if you knew it exists?

dusky herald
#

Connect to VPS? Depends on the operating system.

storm willow
#

it says VNC: and a ip

silk gate
#

do they not offer a web client

dusky herald
#

If you have Windows, you already have a built-in remote desktop application that you can use.

#

But, I would imagine that it only uses Windows (not sure about that)

silk gate
#

no he's on linux

#

he's bricked his server

#

he can't ssh

storm willow
dusky herald
#

It doesn't say VNC:and an IP

#

it says IP:Port

storm willow
#

yes

silk gate
#

no it's probably like
VNC: xxx
username: xxx

dusky herald
#

So to connect, you would follow the instructions, and connect to the IP : Port provided

#

then the password, like they described in the guide.

storm willow
#

VNC: ip:port
Host system: (number)

#

how can i use vnc?

rotund fulcrum
#

Is there a way to sell Spawn Eggs or spawners w/ eggs inside them already via EssentialsX sign shop? I am running Spigot v1.8.8.

frigid ember
#

Is there a way to have a unique identifier for an ItemStack, that isn't visible to players? I know you can put a UUID in the lore of an ItemStack, but that's visible to players.

rotund fulcrum
#

Doesn't answer my question 😐

#

Unless it did and I am dumb.

dusky herald
#

Custom Tags?

rotund fulcrum
#

??!?!??!

#

Is there a way to sell Spawn Eggs or spawners w/ eggs inside them already via EssentialsX sign shop? I am running Spigot v1.8.8.
@rotund fulcrum my original question ^

dusky herald
#

nah thats deprecated

rotund fulcrum
#

Paper Spigot

#

:bruh:

rotund fulcrum
#

Bruh.

dusky herald
rotund fulcrum
#

I'll forward it to my Co-Founder, he hosts the server and puts in plugins and fixes perms.

frigid ember
#

Thanks @dusky herald I'll take a look

radiant pollen
#

@rotund fulcrum They weren't talking about your question

rotund fulcrum
#

Is there a way to sell Spawn Eggs or spawners w/ eggs inside them already via EssentialsX sign shop? I am running Paper Spigot 1.8.8 off of Google Cloud self-hosting with 8GBs of storage.

silk gate
#

@storm willow they recommend a client in their blog

storm willow
#

i dont understand the client

#

Launcher Repeater Viewer

rotund fulcrum
#

I am going to ask somewhere else now.

storm willow
#

they installed many clients

silk gate
#

alternatively you can boot to rescue

frigid ember
#

@dusky herald That seems to be for 1.14.4 onwards, is there a solution for 1.8.8?

storm willow
#

restart the vps?

#

or factory reset¡

#

i have my server here :/

silk gate
#

???

#

boot to rescue

storm willow
#

restart?

dusky herald
#

For 1.8.8? The only way I remember ever doing it in the past was using ItemMeta setLore

storm willow
silk gate
#

no

storm willow
#

in my panel

silk gate
#

rescue system

frigid ember
#

Hmm okay

dusky herald
#

You could always remove the lore after the player picks the item up.

storm willow
#

this dont delete my data?

silk gate
#

no

frigid ember
#

No, I need to be able to identify the item up until the player right clicks it

storm willow
#

what option?

#

i have ubuntu 16.04

frigid ember
#

I guess I'll just use lore

dusky herald
#

@fluid basin Ah, that seems weird. From my understanding was that HikariCP is supposed to keep connections alive the entire time it runs.

silk gate
#

@storm willow recommended

dusky herald
#

Ah so maybe it's a setting on the actual MySQL server software then?

storm willow
#

and now?

silk gate
#

connect

#

with the details emailed to you

dusky herald
#

Maybe you could try adding a periodic runnable that runs every few hours to refresh the connections perhaps

silk gate
#

can't you just

#

?auto_reconnect=true

dusky herald
#

or if it's just a plugin where you cannot make the change directly within the code; find a way allow MySQL connections to last longer?

storm willow
#

now

#

im in the system

#

what need i do?

silk gate
#

or set max lifetime property @dusky herald

#

@storm willow show me your fdisk -l

storm willow
#

im here

dusky herald
#

Yeah, I'm just not sure if he's having issues with a plugin he's developing or just another plugin he's using.

silk gate
#

@storm willow show me your fdisk -l
@silk gate @storm willow

storm willow
silk gate
#

is the 800g drive yours

storm willow
#

yes my disk has 800gb

silk gate
#
mkdir -p /mnt/data
mount /dev/sda2 /mnt/data
cd /mnt/data/etc/iptables
ls```
wanton delta
#

does anyone know where i can find all the valid json parameters for a generatorSettings string?

storm willow
#

done

silk gate
#

also just a reminder to move away from contabo when you can

storm willow
#

now?

silk gate
#

show me the output

storm willow
silk gate
#

rm rules.v4

#

reboot

storm willow
#

?

#

@silk gate

silk gate
#

y

storm willow
#

now?

silk gate
#

reboot
@silk gate

storm willow
#

yes, it disconnected

silk gate
#

yes that's what happens when you reboot

#

now connect back with your normal credentials

storm willow
#

now working, but so i can't use iptables?

silk gate
#

what

#

no you can use iptables

#

just don't lock yourself out this time

storm willow
#

this works?

iptables -I INPUT ! -s $BUNGEE_IP -p tcp --dport $START_PORT:$END_PORT -j DROP
#

Could I use that to close group ports but not all?

silk gate
#

no don't

storm willow
#

So close the minecraft but not all

silk gate
#
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dports 22,25565,80,443 -j ACCEPT
iptables -A INPUT -j DROP
#

I forgot a -j ACCEPT last time lol

#

but

#

do not disconnect

#

until you verify it works

storm willow
#

it disconnected automatically

#

now i try

silk gate
#

a

storm willow
#

done

silk gate
#

works?

storm willow
#

the webpage is working now

silk gate
#

ok good

storm willow
#

wait, i dont saved rules

silk gate
#

sudo dpkg-reconfigure iptables-persistent

storm willow
#

now i try to start minecraft server

shy birch
#

I need help please I wanna know how can I disable to place chest on the ground in a spefic world

#

I mean that the users can’t place chest on the ground

boreal tiger
#

what have you tried?

velvet marten
#

Hey guys. I am experiencing a kind of a problem and I start believing its a spigot problem.
It has to do with the PlayerMoveEvent. In the event handler, i set the event.seTo() to my custom location. The location works as expected, but instead of applying it the players it should, it applies it to all the players that move. It doesnt make sense at all logically... I have tried debugging but it still doesnt make sense.. If you need me to send code for reproduction please tell me!

shy birch
#

I need help please I wanna know how can I disable to place chest on the ground in a spefic world
Please 🥺

wanton delta
#

Hey guys. I am experiencing a kind of a problem and I start believing its a spigot problem.
It has to do with the PlayerMoveEvent. In the event handler, i set the event.seTo() to my custom location. The location works as expected, but instead of applying it the players it should, it applies it to all the players that move. It doesnt make sense at all logically... I have tried debugging but it still doesnt make sense.. If you need me to send code for reproduction please tell me!
code snippet plase

#

?paste

worldly heathBOT
boreal tiger
#

@velvet marten PlayerMoveEvent is triggered when any player moves

wanton delta
#

yea that too

velvet marten
#

@boreal tiger Yes. I do filter that.

#

let me edit the paste bin with comments

wanton delta
#

so are you aware of the ability to cancel events?

#

event.setCancelled(true) will not let the player move

#

you also have event.setTo(Location)

velvet marten
#

Yes I do. But if I cancel the event they cant jump or move the camera... I want to block only X,Z

#

Also the setTo location is for very specific players.

wanton delta
#

if(event.getTo().getX() == event.getFrom().getX() && event.getTo().getZ() == event.getFrom().getZ())` return;

#

also

storm willow
#

It seems to be working now

#

thanks

wanton delta
#

i'm not sure how to explain

silk gate
#

😎

wanton delta
#

But the event activates for every single player

#

and every single time the event activates

#

you are checking if the player is a WarPlayer

#

so that list might have more than one player

velvet marten
#

Here is the commented pastebin

frigid ember
#

My onCommand listener throws a command exception whenever I add this line to it:

List<String> papersList = config.getStringList("config.enabled_papers");

this is my config:

enabled_papers:
  - owner
  - moderator
  - default

owner:
  rank: owner
moderator:
  rank: moderator
default:
  rank: default

Any idea why it could be doing this?

wanton delta
#

are you sure that the playersJoinedList doesnt have every single player?

velvet marten
#

Yes. I can set plugin.canJoin to true, and I dont join the list, but I am still frozen.

wanton delta
#

you could simplify this too

velvet marten
#

I have tried several stuff. The debugging logs you see are intresting too...

#

I run a test with the debugging logs on, and the message I received was : You are not in wartime

#

As I would expect. Because I wasnt in the list. But I was still frozen (all but pitch yaw y)

wanton delta
#

well its because youre accessing event.getTo()

#

when you modify the variable newLocation you access the event.getTo() variable

subtle blade
#

playersJoinedList should really be a Set<UUID> of all the players against which you can #contains() check the player moving. Iterating over every player in that list every time the event is called is a very, very bad idea

wanton delta
#

yep

#

so while it may not look like it

#

you're setting the to location in PlayerMoveEvent

velvet marten
#

But the whole idea of having a getTo() method is to protect the to location from writting.. Yes ?

wanton delta
#

nope

velvet marten
#

That is why you have a setTo()

wanton delta
#

not how it works

#

you can even have a debug message tell you

velvet marten
#

@subtle blade My list is a WarPlayer which contais a player object/reference. I cannot simplify it to a UUID as it holds many more stuff.

wanton delta
#

what you could do is getTo().clone()

subtle blade
#

Then it should be a Map<UUID, WarPlayer>

wanton delta
#

however as stated previously

#

if(event.getTo().getX() == event.getFrom().getX() && event.getTo().getZ() == event.getFrom().getZ())` return;

#

will avoid all Y movement and head movement

frigid ember
#

Adding this line to my onCommand listener is making my plugin throw CommandException when the command is used:

String papersList = config.getString("test");

this is my config:

test: "test"

I'm very lost as to why this is. Could anyone help me?

velvet marten
#

Then it should be a Map<UUID, WarPlayer>
Intresting idea. Will look into that. Thanks

inland heron
#

Is there a way to search an inventory for a particular block type?

keen moth
#

config is probably null, @frigid ember

velvet marten
#

if(event.getTo().getX() == event.getFrom().getX() && event.getTo().getZ() == event.getFrom().getZ())` return;
@wanton delta And you reccomend that just to avoid creating a new Location object every time I guess.

Question: Does that even fire for every single UNIQUE movement ? For example change in X, change in Y, change in Z etc, or can it have a combination of movements ?

wanton delta
#

im not exactly sure

#

if im not mistaken it represents the movement change in one tick

velvet marten
#

Is there a way to search an inventory for a particular block type?
@inland heron Get the player inventory in a ItemStack array, filter for the nulls and search for the block time in the array

inland heron
#

Cool, thank you

keen moth
#

Movements in all axes and in pitch/yaw, without any specific checks.

wanton delta
#

@keen moth he was asking if you moved in X and Y simutaneously if it would fire two seperate events

#

i dont think it does

#

just 1 event per tick

#

(if they move)

frigid ember
#

@keen moth I've got this line above my onCommand listener:

public FileConfiguration config = PaperRank.plugin.getCustomConfig();

and these lines in my PaperRank class:

public FileConfiguration getCustomConfig() {
  return this.customConfig;
}

private FileConfiguration customConfig;

and in my onEnable I've got plugin = this

keen moth
#

Set the variable in the constructor

subtle blade
#

Fields initialize first, then constructor is called

wanton delta
#

@velvet marten Location newLocation = event.getTo(); see how this is not calling a new instance of a location but rather is accessing a current instance? the way you would make a NEW instance is by calling Location#new. just want to celar that up

subtle blade
#

plugin is null by the time it reaches your field because the constructor has not yet been called

#

Yes, even if it's declared after the constructor

velvet marten
#

Yes indeed. I just assument that getTo returns a copy of the locaiton and not the adress.

frigid ember
#

oh hm okay

wanton delta
#

nope! Location#clone would

keen moth
#

Not a copy, a reference

wanton delta
#

(clone only works when the class implements Cloneable just fyi, doesnt work for everything)

subtle blade
#

(which Location does)

wanton delta
#

(yes)

#

i wish embed would work for javadoc links :/

velvet marten
#

I did write it down, and it says it can throw a null exception because the getTo can be null... How can getTo be null inside the event? Doesnt the even triggering assume that getTo has a value ?

boreal tiger
#

if the player only moves its head

#

the event is triggered

#

so the getTo location is null

#

iirc

frigid ember
#

Okay now I've got this line in my onEnable in my PaperRank class, which extends JavaPlugin:

this.getCommand("givepaperrank").setExecutor(new Command_GivePaper(this));

and these lines in my Command_GivePaper class:

  public FileConfiguration config;

  public Command_GivePaper(PaperRank instance) {
    config = instance.getCustomConfig();
  }

but it's still returning a null pointer exception for this line:

String exampleString = config.getString("test");

when I try and run my command?

velvet marten
#

but getTo includes the Yaw and Pitch ... :/

wanton delta
#

i uh

#

i would ignore it

#

not sure why the @Nullable tag is there

velvet marten
#

Cool. Thanks 😛

wanton delta
#

when setTo requires NonNull 🤔

boreal tiger
#

dont just ignore the npe

wanton delta
#

usually docs specify when its null

#

it doesnt :(

boreal tiger
#

location the player is moved to

#

if the player only moves the head

#

its not moving anywhere

#

hence its null

wanton delta
#

PlayerMoveEvent fires when a player moves their head

boreal tiger
#

yeah

wanton delta
#

Location includes pitch/yaw values

boreal tiger
#

mhm

#

I guess what they mean by location is just x y z

#

thats my interpretation from the docs

#

anyways just check if getTo is null before doing anything

#

dont let it spam out npes

wanton delta
#

im gonna verify this

#

sounds sketch

subtle blade
#

@ Nullable getTo() is a bug

#

It's not nullable

wanton delta
#

yea...

#

thats kinda what i thought

boreal tiger
#

but it does return null :/

subtle blade
#

It doesn't. It's impossible

frigid ember
#

Okay now I've got this line in my onEnable in my PaperRank class, which extends JavaPlugin:

this.getCommand("givepaperrank").setExecutor(new Command_GivePaper(this));

and these lines in my Command_GivePaper class:

  public FileConfiguration config;

  public Command_GivePaper(PaperRank instance) {
    config = instance.getCustomConfig();
  }

but it's still returning a null pointer exception for this line:

String exampleString = config.getString("test");

when I try and run my command?

gaunt ermine
#

I currently have a big problem with disconnecting from Minecraft Networks.
My Problem:
When I disconnect from a Network (it appears on every network)
the network tells me that i am still online until the fake me loses
connection to the server.

#

maybe you guys know a solution for me

wanton delta
#

when you try to disconnect?

#

huh?

subtle blade
#
+                        Location oldTo = to.clone();
+                        PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);```
wanton delta
#

so when you try to rejoin it tells you that you no longer have connection?

radiant pollen
#

@frigid ember config is null

boreal tiger
#

is it an offline mode server?

gaunt ermine
#

When I already disconnected a server I didnt really disconnected the Server

frigid ember
#

Yes but I don't know why @radiant pollen

subtle blade
#

If it could ever be null, the server would throw an exception

#

The nullable annotation is a bug

boreal tiger
#

ah right my bad choco

radiant pollen
#

@frigid ember show us the getcustomConfig method

subtle blade
#

Let me make a quick PR to address it right now, actually

frigid ember
#
  public FileConfiguration getCustomConfig() {
    return this.customConfig;
  }
wanton delta
#

darn i was gonna do taht LOL!

subtle blade
#

It'll take me 2 seconds

wanton delta
#

you probably can do it better than i can tbh

radiant pollen
#

@frigid ember when is the customConfig initialized?

frigid ember
#

At the top of my main class

radiant pollen
#

Show it

velvet marten
#

I am happy I found a bug 😄

frigid ember
subtle blade
#

That wrongly annotated method has been known for a bit now. Just no one's bothered to fix it

vagrant walrus
#

Hello. Is there a way to prevent a player from setting there spawn in a certain world?

gaunt ermine
#

Hello?

radiant pollen
#

@frigid ember Something must be wrong in the createCustomConfig method.

frigid ember
#

@boreal tiger I do, look at the createCustomConfig method

boreal tiger
#

yeah just saw it my bad

radiant pollen
#

@vagrant walrus Some permissions plugins allow for per-world permissions.

wanton delta
#

instead of calling File#getParentFile#mkDirs

vagrant walrus
#

thanks

gaunt ermine
#

Is there someone that might have a solution for me?

wanton delta
#

just call File#createNewFile

radiant pollen
#

@gaunt ermine Update Java? Re-install MC?

#

No idea, honestly.

gaunt ermine
#

I already reinstalled mc but I can try to update Java

wanton delta
#

restart pc

gaunt ermine
#

I have this bug since weeks

subtle blade
#

It's a silly reason but it makes sense

fathom shard
#

when I check hasPermission it doesn't check which permission is highest right?

So whats the best way of doing that IE - I have 5 tiers of permissions, if im given tier 2 and tier 5 how do i make it choose which permission is by highest

frigid ember
#

@radiant pollen Any idea what's wrong in my createCustomConfig() method, I've got no idea anymore.

radiant pollen
#

just call File#createNewFile
@wanton delta @frigid ember

wanton delta
#

hi

rotund fulcrum
#

Is there a way to sell spawn eggs on a sign shop via EssentialsX? It won't let me. I am using Paper Spigot 1.8.8 on a self-hosted Google Cloud server.

wanton delta
#

Paper Spigot 1.8.8

subtle blade
#
  1. Wrong server
  2. Unsupported version
wanton delta
#

Paper* 1.8.8 as well

gaunt ermine
#

It still wont work 😦

frigid ember
#

When I do if (!customConfigFile.exists()) customConfigFile.createNewFile(); I get an IO exception?

silk gate
#

also 3. GCP

#

lol

boreal tiger
#

whats wrong with gcp lmao

subtle blade
#

createNewFile() throws an exception, you should try/catch it

frigid ember
#

Oh

subtle blade
#

Though the call to exists() is redundant because createNewFile() does this for you

silk gate
#
  1. expensive
  2. low clock speed
boreal tiger
#

he's probably using the free credits

silk gate
#

yeah fair

subtle blade
#
try {
    file.createNewFile();
} catch (IOException e) {
    e.printStackTrace();
}```
#

Will not override existing files

velvet marten
#

Last one before bed :P

In my PlayerRespawnEvent, I set the inventory of the player to a custom inventory, I change the respawn location correctly and I add the some effects (glow). But even though all of the above work, the glow doesnt get applied. Is that because when the player respawns he loses all effects ? I set it in the event, shouldnt that apply ?

frigid ember
#

Oh cool thanks @subtle blade

rotund fulcrum
#

Sorry, I was using Paper Spigot 1.8.8 to suffice my community with better combat.

#

RIP 🙏

silk gate
#

go ask in paper

wanton delta
#

no need for the sass

#

theyre two different servers

#

spigot is not paper

#

paper is not spigot

#

plugins can work on spigot and not paper

#

plugins can work on paper and not spigot

#

¯_(ツ)_/¯

frigid ember
#

I still get a null pointer exception

wanton delta
#

(and i personally would rather choose a combat plugin over hundreds of lost features)

#

what line is your NPE

subtle blade
#

What's you code look like. I missed out on a lot of the conversation

wanton delta
#

i did too tbh

gaunt ermine
#

I currently have a big problem with disconnecting from Minecraft Networks.
My Problem:
When I disconnect from a Network (it appears on every network)
the network tells me that i am still online until the fake me loses
connection to the server.
maybe you guys know a solution for me

wanton delta
#

@gaunt ermine i dont think we can help you

#

its not a spigot issue and i would suggest you put a thread on the forums

frigid ember
wanton delta
#

¯_(ツ)_/¯

#

wait

#

there it is

#

those class naming conventions 😭

#

please dont name your classes that

frigid ember
#

why lol

#

it helps me

velvet marten
#

I dont want to spam my question, could you please check a bit higher ? 😛 Its not a difficult one I assume :/

wanton delta
#

it helps no one else

boreal tiger
#

String exampleString = config.getString("test");
is this in your config? the "test" path

subtle blade
#

Calling createCustomConfig() AFTER instantiating your command class

#

Do this before

#

onEnable(), line 27, move it up

frigid ember
#

Oh, that would make sense.

subtle blade
#

Calling constructor -> getting the field (null at this point) -> creating and instantiating the field in the main class

#

(is what you're doing now)

frigid ember
#

Yep, I understand.

#

I'll give it a shot now

subtle blade
wanton delta
#

pepecry for underscores in class names

subtle blade
wanton delta
#

thank you

frigid ember
#

ssshhh

#

it's fineeee

radiant hollow
#

Uh, I have a problem. So EntityPortalEvent isn't called in custom worlds (although PlayerPortalEvent is, and allows you to set a new world as destination), so I am using EntityPortalEnterEvent to detect portal entry instead. This all works fine, and I've managed to replicate the portal finding code from vanilla.

But, as I can't set the destination here I need to teleport the entities. Whenever I teleport the entities to another world, they're just gone. Boom, poof, out of existence :/ Is this... normal?

frigid ember
subtle blade
#

I'm going to say yes because those chunks aren't loaded. Likely a bug on the vanilla end that was enabled by Spigot

radiant hollow
#

The chunks are loaded

subtle blade
radiant hollow
#

I stood there and watched

#

well, watched nothing really

#

just some bloody air

wanton delta
#

is the difficulty not peaceful

#

i mean that would only really help you if youre trying to teleport monsters

subtle blade
wanton delta
#

i dont have experience just offering ideas lol

radiant hollow
#

Uh, it seems to randomly work now. I'm still not happy about EntityPortalEvent just being called when it feels like it though, but I'm gonna complain instead of making a PR.

wanton delta
#

ticket

frigid ember
#

@subtle blade So my createCustomConfig() method becomes:

  private void createCustomConfig() {
    customConfigFile = new File(getDataFolder(), "papers.yml");

    try {
      customConfigFile.createNewFile();
    } catch (IOException e) {
      e.printStackTrace();
    }

    customConfig = new YamlConfiguration();
    YamlConfiguration.loadConfiguration(customConfigFile);
  }

?

subtle blade
#
private void createCustomConfig() {
    InputStreamReader reader = new InputStreamReader(this.getResource("papers.yml"), Charset.forName("UTF-8"));
    YamlConfiguration config = YamlConfiguration.loadConfiguration(reader);
}```
#

Simple as that ;P

frigid ember
#

yikes

#

okay

subtle blade
#

May need to try/catch some of that, don't remember

#

(and assign your field, obviously)

wanton delta
#

also if you notice

#

customConfig isnt being assigned to anything

subtle blade
#

That's his field

wanton delta
#

huh

#

customConfig = YamlConfiguration.loadConfiguration(customConfigFile);

#

that should be it right?

subtle blade
#

Yes

wanton delta
#

other wise its empty?

#

customConfig = new YamlConfiguration();

subtle blade
#

(and assign your field, obviously)

wanton delta
#

oh i was just point out his original code

#

customConfig was just a blank yamlconfiguration

keen moth
#

Yea, you should assign the variable using YamlConfiguration::loadConfiguration, it will return a new configuration from the specified file/reader.

frigid ember
subtle blade
#

I'm also not sure if loadConfiguration() closes the reader. Have to check that

wanton delta
#

test it out :D

#

today i learned how to use dropboxapi

#

i wish u could just download files with link :/

#

it used to work like that now it throws 400 ::(

fierce tinsel
#

can someone help me

keen moth
#

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

subtle blade
#

It does close it

#
        try {
            String line;

            while ((line = input.readLine()) != null) {
                builder.append(line);
                builder.append('\n');
            }
        } finally {
            input.close();
        }```
frigid ember
#

It works, thanks.

subtle blade
#

o/

frigid ember
#

Is it possible to get a list of the top level keys from my config yml?

#

What I mean is, if my config is

owner:
  rank: owner
moderator:
  rank: moderator
default:
  rank: default

is it possible to get a list containing owner, moderator, defualt

boreal tiger
#

use #getKeys

subtle blade
#

Yep. ConfigurationSection has a getKeys() method

frigid ember
#

oh thanks

subtle blade
#

false to not get all keys recursively (just top level)

distant steeple
#

Is there a way to disable a plugin on server crash?

#

to save data f.e.

frigid ember
#

@subtle blade my createCustomConfig() method isn't actually creating the file now, it's just reading from the default config.

wanton delta
#

@distant steeple only way to do this is with a constant open sql connection (not recommended)

subtle blade
#

Not sure why you deleted that, you're right. saveResource()

wanton delta
#

you cant detect server crashes otherwise

boreal tiger
#

ah my bad I thought it wasnt the right thing xD

subtle blade
#

Nope, you're 100% right 🙂

boreal tiger
#

I have the tendency to type stuff before thinking it through xD

distant steeple
#

you cant detect server crashes otherwise
@wanton delta tell me how

subtle blade
#

That's actually a better way to load it as well. Save resource, get the file, loadConfiguration() on that file

distant steeple
#

since i save my data to a flat file

subtle blade
#

Otherwise you're getting the config from the jar every time

distant steeple
#

could make an auto saver

subtle blade
#

Which... y'know... isn't ideal... lol

keen moth
#

@frigid ember Your config field should also be private, considering you've given it a proper getter 🙂

wanton delta
#

@distant steeple yes you could do that

#

autosaving is the only way to safely save data before a crash

distant steeple
#

what would be a good period like saving every 5 mins?

wanton delta
#

whatever you think

distant steeple
#

or maybe at low tps or packet income

subtle blade
#

just don't save any data Kappa

#

What kind of data are you saving?

wanton delta
#

plugin im working on leaves open 3 sql connections at a time 😳

distant steeple
#

player data

subtle blade
#

Yea that narrows it down to everything

distant steeple
#

im using flat file

keen moth
#

Are you using a connection pool?

wanton delta
#

uh i think so yes

#

im not the one who made it

keen moth
#

Such as HikariCP?

#

Oh ok

wanton delta
#

no its mysql

#

lol

distant steeple
#

i hate mysql

#

xd

wanton delta
#

¯_(ツ)_/¯

distant steeple
#

too lazy

keen moth
#

I know. HikariCP is a connection pool for sql

wanton delta
#

nope

distant steeple
#

and i dont want to setup a mysql server for a plugin

wanton delta
#

i mean

#

i know for sure its not hikari

#

other than that im not sure

velvet halo
#

You can use Hibernate to make your life a lot easier, however when you shade it, it will be a large file.

boreal tiger
#

you can just spin a docker container for sql to test stuff

keen moth
#

Ray, you can get a free one for limited storage, online.

silk gate
#

hikari is the most common pool

velvet halo
#

c3p0 is what I use 😮

storm willow
#

It is possible to give someone permission to access a certain file on my vps (a server on my network)?. is to give access to my developer so he can configure, but i dont want to do him access to all vps.

wanton delta
#

Literally just download MariaDB package for windows

distant steeple
#

ik but i want my plugin not to use external databases

wanton delta
#

comes with heidisql and everything

keen moth
#

hikari > c3p0 😤

silk gate
#

@storm willow chroot

boreal tiger
#

mhm I want to spawn some entities close to where most players are.
I've been doing it by finding the mean location and then generating random coordinates in a radius of X blocks. is there a better way of doing this?

velvet halo
#

depends @keen moth

storm willow
#

?

wanton delta
#

majority of servers have sql so it doesnt hurt 🤷

silk gate
#

@wanton delta no just install it in WSL

#

installing stuff in WSL is far superior

wanton delta
#

what

#

wsl?

boreal tiger
#

windows subsystem

wanton delta
#

idek what that is

distant steeple
#

but its hard to rewrite a server system with over 500 of classes

silk gate
#

you can run linux distros within windows

#

boom just spin up a debian vm like that

wanton delta
#

I like MariaDB because its what you get on unix

boreal tiger
#

you can get mysql on linux as well xD

distant steeple
#

@wanton delta should i run a scheduler for each player or one for all

wanton delta
#

because i normally use unix for test stuff but dont have a linux server rn :/

boreal tiger
#

wsl provides you a linux distro within windows

#

you can use docker too if you want

velvet halo
#

However @keen moth you are right, c3p0 is very buggy and when not configured properly it can have a huge impact on your application.

wanton delta
#

you should run a task timer with a delay of 0 and a period of 20 * 60 * minutes

#

im good with what i got lol

#

i like heidisql

silk gate
#

instead of downloading mariadb for Windows going through the installer all of that, you can apt install mariadb

frigid ember
#

why doesnt try(InputStream in = plugin.getResource(resource); OutputStream out = new FileOutputStream(resourceFile)) { ByteStreams.copy(in, out); } work on java 8? it wants me to change to java 7? pretty confusing but ok

wanton delta
#

im not gonna install a linux vm

boreal tiger
#

its not a linux vm

velvet halo
#

I recommend using a bufferedstream, much more efficient @frigid ember

boreal tiger
#

its slightly different

silk gate
#

its integrated into windows

wanton delta
#

idk why yall so against running an msi file lmao

frigid ember
#

wdym?

silk gate
#

it's just like a command prompt

#

but

#

full linux distro

silk gate
#

:crazy:

wanton delta
#

i will look into it but i like what i got

silk gate
#

you install it directly from Microsoft store

#

if you're comfortable with linux you'll prefer it by a mile

frigid ember
#

It's a bad idea

#

This linux integrated into windows thing

wanton delta
#

i probably would :/

boreal tiger
#

why is it a bad idea lmao

wanton delta
#

i tried to setup microsoft sql

#

and once i got it running after like 4 hours

#

i realized it doesnt accept the same syntax

#

.<

boreal tiger
#

lmao

silk gate
#

that's why you use wsl

wanton delta
#

i was mislead

silk gate
#

it doesn't take 4 hours to install anything in wsl

wanton delta
#

bro you can chill about this wsl thing

#

i will look into it but i like what i got
@wanton delta

silk gate
#

it's superior ok

frigid ember
#

why wouldn't you just use linux

#

i dont understand

silk gate
#

gaming

frigid ember
#

linux is as good as windows for gaming.

keen moth
#

it's all personal preference 😛

wanton delta
#

^^^

#

please

silk gate
#

no way

boreal tiger
#

you cant run origin games in linux iirc

silk gate
#

so many triple A games just don't work on linux

wanton delta
#

when u say something is superior that is an opinion

silk gate
#

proton and wine do a lot but it's just not the same

wanton delta
#

leave ppl to do what they like to do

#

and if theyre lookin for better options offer it

#

but for now i am using my maria db on my windows machine with heidisql lol

boreal tiger
#

he wasnt making you use it lol

silk gate
#

if you wanna spend 4 hours installing MS SQL, be my guest

wanton delta
#

im not using ms sql

silk gate
#

well yah spent 4 hours installing it

meager lantern
#

MSSQL takes like 10 minutes to setup?

dusky herald
#

4 hours? lmfao

wanton delta
#

it does NOT

dusky herald
#

It takes like fucking 2 seconds to install MySQL

silk gate
#

he said it took him 4 hours

wanton delta
#

IT took me ages

frigid ember
#

must've been a pebkac situation

meager lantern
#

I mean, I work at a firm that specializes in MSSQL solutions, it's especially easy on Windows

wanton delta
#

I had to download the thing and get all these seperate files from this windows developer site

meager lantern
#

Like you just click through everything and it's ready

wanton delta
#

bro it wasnt i swear

silk gate
#

this is why wsl is superior, you have package managers to do this for you

wanton delta
#

-_-

meager lantern
#

You might want to change the SA password and setup some service accounts, but that's it

keen moth
#

isn't there a sql community server you can just download and it does all the installation automagically?

vagrant walrus
#

Hello. Is the player bed enter event called when a player clicks on the bed and sets its spawn in 1.15?

wanton delta
#

are you talking about the Microsoft SQL Management Studio thing?

#

cus tahts what i setup with everything else

meager lantern
#

I mean, that's the Windows approach for it, you just click through everything

frigid ember
#

@silk gate You know what's even more superior. Linux on it's own.

meager lantern
#

Nah, SSMS is for interacting with the server

dusky herald
#

Either way, regardless of the duration that it takes to install MySQL; MySQL does have useful purposes, but if it does not fit what you need then don't use it.

wanton delta
#

well yea

#

i know

silk gate
#

@frigid ember GAMING

wanton delta
#

but i downloaded the server too

#

idk if i did something wrong but it took me ages

boreal tiger
#

inb4 someone starts recommending nosql databases 😂

wanton delta
#

thats all im sayin

keen moth
#

Mongo 😮

boreal tiger
#

ahahah lmao

silk gate
#

mongeddb

keen moth
#

they have their uses

boreal tiger
#

yeah

frigid ember
#

@silk gate Okay I'll admit that it might be easier to setup gaming for windows. but for everything else: linux.

meager lantern
#

I honestly don't know how you'd fuck up an MSSQL installation

boreal tiger
#

not hating on them

dusky herald
#

If you're running a single-server project, then you have no reason at all to even bother to use MySQL. If you're trying to setup a multi-server project, then you have a lot of reasons to bother to use MySQL.

frigid ember
#

Imagine using SQL lol

wanton delta
#

redis :)

silk gate
#

@frigid ember some games just straight up don't work under wine and proton

boreal tiger
#

mhm I want to spawn some entities close to where most players are.
I've been doing it by finding the mean location and then generating random coordinates in a radius of X blocks. is there a better way of doing this?

keen moth
#

Not necessarily. SQL is not just for cross server data.

wanton delta
#

SQL is a database

#

it stores data

boreal tiger
#

sql is the language

silk gate
#

sql is not a database

wanton delta
#

?!?!??!

#

well

#

yea

#

youre right

#

but

silk gate
#

Structured Query Language

frigid ember
#

anyway i have work to do, which i'll be completing efficiently using linux.

dusky herald
#

Yeah, not even just cross-SQL, but it's especially useful if you want to integrate MySQL Databases + Web Development, and more. It's pretty versatile, naturally you would choose your data storage solutions based on what fits your needs best.

meager lantern
#

I mean, I'd say that SQL is superior in most cases it's tried and tested, while NoSQL is widely used in smaller to larger projects, it's still new compared to SQL

boreal tiger
#

postgresql is cool too. you can store json objects as well

wanton delta
#

@meager lantern this is the thing i got btw

keen moth
#

It's very useful because of the json integration it can offer. Especially when reading/writing to web services in json

meager lantern
#

Yeah, I really wouldn't store JSON though

dusky herald
#

MySQL does have JSON support included, although I don't really know much about it nor its limitations, I'm sure there are probably better solutions out there.

meager lantern
#

Yeah, just run basic and it should work

wanton delta
#

yea i know i did

#

and it took me ages to install

boreal tiger
#

mongo has really good support to work with geolocalization stuff too

silk gate
#

jsonb postgres style

boreal tiger
#

like working with coordinates

#

with geojson

dusky herald
#

isnt Mongo just using files?

keen moth
#

Documents*

silk gate
#

for my discord bots cache I just chuck data into jsonb columns and it's really FASTE

keen moth
#

You can look up a "cheat sheet" for the terminology that you can somewhat associate with mysql

meager lantern
#

Oof

hot lodge
#

I cant figure out how to start a forums post so i will just ask here

Is there a plugin that does nothing but connect bungeecord servers tablists

wanton delta
#

i think global tab is deprecated

meager lantern
#

Storing things in JSON columns is just going to make it harder to query the data you want

wanton delta
#

i have experience storing json in sql

#

it was

#

a time

dusky herald
#

At least with MySQL, if you use it properly to it's capabilities you can actually divert a lot of the calculations to the MySQL server to figure out queries versus running them all just in your plugin itself.

keen moth
#

You shouldn't really be storing json imo

#

It's a relational database for a reason

wanton delta
#

yep

#

that was years ago

#

it was bad

dusky herald
#

But, like I said before, if you're using a MySQL Database for purposes that it's not really intended for, like only on a single-server you're just including delays that dont even really need to be necessary.

meager lantern
#

Yeah, in 9/10 situations you'd want to let your SQL server do the calculations

boreal tiger
#

you can query stuff even if its in a jsonb column in postgres

wanton delta
#

@hot lodge

dusky herald
#

So it's just best to use files, unless you're really needing the versatility.

#

and you need that data accessed in more than one place.

keen moth
#

Well the scalability is already there if you choose to implement mysql

hot lodge
#

yes @wanton delta

wanton delta
#

i sent link

hot lodge
#

i tried that it interfered with my essentials tab ranks

wanton delta
#

:ssss