#help-archived

1 messages ยท Page 47 of 1

dusty topaz
#

sounds like you should be saving to a config

crimson sandal
#

Why a chest?

sacred wave
#

I don't know, I suppose it just caught my eye...

#

it is in PersistentDataContainer, not in the chest directly...

#

though

crimson sandal
#

And what happens if the chest gets broke ๐Ÿ˜„

sacred wave
#

At 1,1,1? good luck with that ๐Ÿ˜„ I guess you could explode it with tnt, but meh... ๐Ÿ˜„

crimson sandal
#

Yeah I think you should be saving to disk lul ๐Ÿ˜„

sacred wave
#

not saying it is ideal ๐Ÿ˜„

#

I probably will, this just seemed like a simpler solution

dusty topaz
#

๐Ÿค”

crimson sandal
sacred wave
#

I know about them... I was just lazy, I don't know... I know it is not the correct approach...

#

but it is creative!

median hill
crimson sandal
#

Fair enough hahaha ๐Ÿ˜„

dusty topaz
#

It just shows the majority of the tick is tickEntities

#

likely because of insane amounts of hoppers, droppers etc

#

(or pesky armourstands)

sacred wave
#

@crimson sandal and... I can reset the config by tping there in creative and just destroying the chest ๐Ÿ™‚

#

and the data is stored in the world data, so with world reset, the config gets reset too...

#

which is wanted behaviour for me...

median hill
#

@dusty topaz there isnt even 20 hoppers or armor stands

dusty topaz
#

is there a lot of entities?

#

Your server is lagging because it is overloaded (99%+ Server Load). Try reducing View Distance if it is above 4. note this also

#

But that timings report isn't that descriptive so I can't help much

sacred wave
#

@dusty topaz , @median hill Then I guess Avro was right, if you use report, you will get a file in timings folder which you can share... Sorry, thought the online report contains all the info :/

uneven kraken
#

how do i get that report?

sacred wave
#

/timings report

#

then in same folder as your world data, there should be timings folder with text file...

uneven kraken
tranquil rampart
#

Do anyone know how can i see most downloaded plugins?

#

On forum

dark shuttle
crimson sandal
#

Btw, has anyone here used the Maven-release plugin with IntelliJ? I've been getting this github authentication error all day and I've uploaded my ssh keys and everything still haven't managed to get it to work

tranquil rampart
#

@dark shuttle thx

crimson sandal
#

Google has been no help ๐Ÿ˜ฆ

quaint flax
#

Can someone help me im facing issues with my bungeecord config

flint venture
#

Anyone have any issues purchasing premium resources?
PayPal says "payment successful" but no many leaves my account and I dont get the plugin lmao

dusty topaz
#

Been happening to a couple all day @flint venture

flint venture
#

ree

#

dam hope I dont get charged double

dusty topaz
#

md_5 will probably look into it when hes up, but it's probably a paypal issue

#

i dont think so :p

flint venture
#

i think paypal issue tbh

dusty topaz
#

no we don't know dangerous

#

that is why nobody answered when you spammed it 6 times

#

(either that, or they don't want to help you because you spammed it 6 times ...)

flint venture
#

hmm

#

last updated 2017

#

I dont think its glitched I think you're using a horrifically outdated plugin

dusty topaz
#

yes, because automod prevented you flooding the channel

#

with your message lol

flint venture
#

yes Dangerous

#

send me the plugin link

#

i may be looking at the wrong one

#

mine--

#

send me the plugin link

#

So you're using their automatic plugin installer

#

theres your problem

#

install plugins yourself

#

not through automated systems

#

Oh crap

#

all the payments are going through now

#

rip

grave verge
#

How do I make it so that when a player does /server <sername>, it spawns them to the spawn location instead of the last loaction

flint venture
#

You need a plugin which moves players to spawn on join

#

if you use Essentials, im pretty sure that's in there... nvm

uneven kraken
dusty topaz
#

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

median hill
#

okay great answer

flint venture
#

Doesn't look lik eit has the option

frigid ember
#

):

#

can i not change in config or something ?

zenith siren
#

I read somewhere that I need to do event.setJoinMessage("") on PlayerJoinEvent to remove the join message but I just get an empty line instead of nothing? How do I fix this?

flint venture
#

try null

#

it may error

#

it may not

#

This will be fun to sort out

dusty topaz
#

did you pay 3 times

#

๐Ÿ™ƒ

flint venture
#

1st time I thought I did something wrong and did it a second

#

3rd time for bants

sacred wave
#

@flint venture @zenith siren * @param joinMessage join message. If null, no message will be sent

dusty topaz
#

i hope the author is active and willing to refund

#

for your sake

flint venture
#

weyy they i was right

median hill
#

Please we really need help with our server, we have 6gb and its using 4, but the server TPS are going down and the server doesnt use the free RAM. We dont know what to do and we have lagg and random restart because of this

tranquil rampart
#

how can i search the plugin that i want?

flint venture
#

send a timings report @median hill

tranquil rampart
#

no

#

look in teh config

#

or google

flint venture
#

does anyone know with the plugin called MineResetLite , how can i make it so when the mines reset , there is no message in chat ?
@frigid ember Ask on the plugin discussion. Then you'll get an answer from the dev

uneven kraken
tranquil rampart
#

how can i search the plugin that i want?

flint venture
#

What the hell is that

tranquil rampart
#

how can i search for plugins?

flint venture
#

click "Search"

#

surprisingly

median hill
#

james, you have the timing up there

flint venture
#

There's not typical timings

tranquil rampart
#

@flint venture but it serach in all forum

flint venture
#

It should give you a link

tranquil rampart
#

i need only plugins

flint venture
#

Click Discussion, then post a question

uneven kraken
flint venture
#

@uneven kraken Your spawn world has to many entities

uneven kraken
#

@flint venture How do I rediscover them?

flint venture
#

Dangerous, if you can't figure out how to use a website it shocks me you know how to message in discord.
On the link I sent you click "Discussion", Scroll to the bottom and write your question in there

median hill
#

@flint venture so that has to do with the server dont beeing able to make the free ram work?

flint venture
#

It's hard to tell with Spigot timings.

#

You could try with (fork) and their timings may be a bit easier to see whats going on

#

I have no idea, i dont control him. Wait and see

#

Depends

#

on the dev

median hill
#

@flint venture the problem is not the lagg that entities generate, the problem is that we allocate 6gb to the server,and the server when is sweating stays at 1-3gb and doesnt use the rest

flint venture
#

That's java garbage collection for you

#

it will only use what it needs then dumps the ram and reuses it again

#

you'll see you ram go from 0% to 100% over and over

#

Dangerous, I dont know. Just wait and see

#

Whats your startup flags Bobby?

median hill
#

@flint venture thats the point of the problem, we dont know why it do that

flint venture
#

Thats what it does. That's what java does

median hill
#

im copying the flags

frigid ember
#

How do i add support for utf-8 characters in my plugin config

flint venture
#

I have 10GB of RAM on my survival server, it's only using 5GB no big deal

median hill
#

@flint venture is this?: #!/bin/sh
while true
do
java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=โ€https://mcflags.emc.gsโ€ -Daikars.new.flags=true -jar spigot-1.15.2.jar nogui
echo "If you want to completely stop the server process now, press Ctrl+C before the time is up!"
echo "Rebooting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Rebooting now!"
done

flint venture
#

ok well

#

dont do that

#

use pastbin next time

median hill
#

sorry im newbie in this

flint venture
#

Those flags are fine. Spigot will only use how ever much RAM it needs

#

it wont just use 6GB constantly. because that's a bunch of wasted ram. nothing to fill it

#

it will use some, then dump it, and use some more

median hill
#

yeah but when the server really needs it, it just dont use it

flint venture
#

Not true

#

If your server is lagging

#

it's probably not RAM

#

it's CPU

#

I can see your server is overwhelmed as it is

#

"spawn - entityTick" entities in the spawn world using 50% of your servers tick.

vernal spruce
#

does sethunger internally check if its higher than the maximum?

median hill
#

@flint venture our CPU is at 60%rn and we have lagg

flint venture
#

yeh because your server is overloaded

#

i've said this

median hill
#

so the problem is the cpu not the ram right?

vernal spruce
#

take a aikars timings

#

and post it in here

flint venture
#

The problem is you've got too many entities in the spawn world

median hill
#

oh i forgot, spawn is the only world we have, a survival one

flint venture
#

And Stellrow, setHunger isn't an option is it? Do you mean setFoodLevel?

frigid ember
#

is there a problem with the website?

vernal spruce
#

yeah... @flint venture

frigid ember
#

ive bought 2 plugins and can't download htem

flint venture
#

Yes

vernal spruce
#

but noticed its looks like it so it doesnt matter anymore

flint venture
#

Maybe try out fork as well

#

@frigid ember Don't re-purchase plugins you'll be charged twice

#

How do I know that your ask

#

I made an oopsy

#

@frigid ember the resource will eventually appear on your purchased resources it took like 30 mins for me

median hill
#

@flint venture we have all that rn

#

@flint venture and the cpu at 60 was only a peak, we usually have it around 30-40

flint venture
#

try Paper

#

use it for an hour

#

come back with timings

vale slate
#

try Paper
@flint venture this word is not very appreciated in here, I think

flint venture
#

Maybe not, but it's extremely useful for timings

dusty topaz
#

nope, it's not, but i'd say it's necessary in this use case lol

#

need advanced timings

wooden harness
#

Spigot Timings 2.0 when?

flint venture
#

Any reason Spigot doesn't use Aikar v2 timings?

dusty topaz
#

Because Aikar contributes to paper now

flint venture
#

ah

dusty topaz
#

so he puts his stuff in there lol

wooden harness
#

I mean other people can add timings to their project

dusty topaz
#

here's mini with the real reason though :^)

wooden harness
#

Doesn't have to just be aikar

#

(see Nukkit)

hoary parcel
#

aikar and md dont really like each other I think ๐Ÿ˜„

#

md "stole" timingsv1, it used to be hosted on aikars server but md rehosted it

#

sponge has timingsv2 too

#

everybody can use it, its MIT

dusty topaz
#

aikar didn't like that it wasn't going on his servers?

#

understandable for both sides i guess

wooden harness
#

I mean you can host timings v2 yourself

dusty topaz
#

stop pinging people lol

wooden harness
#

So if spigot was really against having it hosted on aikar's servers, they could host it themselves like they do with timings v1

dusty topaz
#

they did host it themselves

#

i think that is the issue

#

either way, the reason is irrelevant ยฏ_(ใƒ„)_/ยฏ

hoary parcel
#

you can do whatever, its MIT for a reason

vale slate
#

guys --> #general

dusty topaz
#

the fact is is that it is on paper

#

and isn't on spigot

#

so if you want it without forking it yourself, use paper

tiny dagger
#

should he really be upset on md for that? ๐Ÿค”

dusty topaz
#

there might be more to it

wooden harness
#

you don't need to fork anything to use timings v2 on your own servers

dusty topaz
#

not if you use paper

#

you would if you forked it into pure spigot lol

vale slate
#

--> #general

fleet crane
#

#nowhere

vale slate
#

or that

#

#dev_0

flint venture
#

ping me one more time i dare you

inland meteor
#

Dangerous stop pinging people

#

just go on spigot and look lmao

fleet crane
#

?kick @fading owl

worldly heathBOT
#

๐Ÿ‘ข Kicked JasonM#1629

subtle blade
#

She was a little slow on that one

inland meteor
#

you could see them typing

flint venture
#

md_5, btw, i dont know if its spigot or paypal. But plugin purchases seem to be really slow

inland meteor
#

just considering it

dusty topaz
#

It was to strike fear into their hearts

fleet crane
#

The suspense is good

dusty topaz
#

The inevitable banning

inland meteor
#

"Not CafeBabe is typing..."

vale slate
#

@flint venture do youknow a command or plugin so when you use items , they dont get damadged durability ???
@frigid ember you can use commands for that

dusty topaz
#

.-. this guy

flint venture
#

and i got pinged again

vale slate
#

oops not intended, sorry

dusty topaz
#

calling md an mf

#

tut

flint venture
#

He's still pinging people

inland meteor
#

stop pinging people oh my god

vale slate
#

calling md an mf
He meant me

flint venture
#

Dangerous, please learn some discord etiquette

dusty topaz
#

ahhhhh whoops

fleet crane
#

?kick @frigid ember

worldly heathBOT
#

๐Ÿ‘ข Kicked Dangerous#7539

dusty topaz
#

'no'

brittle spindle
#

uh

inland meteor
#

"no"

#

hahaha

flint venture
#

Alright so I have determined. PayPal is broken today. Purchases take like 20/30 mins to process. Meaning people are thinking things aren't going through and doing it twice

#

Prepare yourself for the flood of children complaining they've been "scammed you took my money twice reee"

inland meteor
fleet crane
#

Why is peoples first reaction to buy it again

inland meteor
#

they're doing live site maintenance

fleet crane
#

Stupid

tiny dagger
#

you don't even know

#

it happened once 1 year ago

flint venture
#

Alright look, dont judge me, i thought i messed up the first time so did it again

tiny dagger
#

had to refund it once

sacred wave
#

People don't often think, unfortunately ๐Ÿ˜ฆ

vale slate
#

German reaction: Sue them before buying again

flint venture
inland meteor
#

yup

#

has this channel always had slow mode... or was it literally just added ~ I'm not sure whether im being an idiot or not

flint venture
#

pretty sure the bot puts it on when it gets triggered

sacred wave
#

I think, 5 secs cooldown is not that bad if you don't want to spam... What bugged me more is 10minutes cooldown when posting first, but I get why it is there...

flint venture
#

it's to fight bot spam

sacred wave
#

yea I know...

flint venture
#

If you remember the great bot spam of a couple days ago
we lost many men

vernal spruce
#

is there a way to cancel the animation of food being eaten?

vale slate
#

client side, I think

vernal spruce
#

hmm

fading owl
#

Is it possibly done through PlayerAnimationEvent?

#

Darn, nevermind. That event seems irrelevant.

vernal spruce
#

yeah i guess there is just no way

vale slate
#

you could cancel the eating thing and add the food bars manually

sacred wave
#

Unfortunately same goes with eating non-edible items ๐Ÿ˜ฆ clientside too ๐Ÿ˜ฆ

digital sphinx
#

I have the following Problem
I have a BungeeCord System. If Start the lobby and the CB. Everyserver is good. I go to CB or i wait on Lobby. After some Minutes, The other Server (like iam on the CB the Lobby server is) going Offline. But i dont know why.

vernal spruce
#

@vale slate thats the problem i cancel the event but animation gets fired anyway

vale slate
#

here again

crimson sandal
#

How often does WorldSaveEvent get fired? (Or how often does spigot actually save the world?)

vale slate
#

@vale slate thats the problem i cancel the event but animation gets fired anyway
@vernal spruce then you'll need to build sth like a "packet catcher", which listens if AnimationPackets get fired and drop them

#

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

vernal spruce
#

sadly not an option to catch packets

vale slate
#

why?

dusty topaz
#

probably clientside if no packets

vale slate
#

^

vernal spruce
#

its a simple plugin request,wich i don't think its worth ruining comp

vale slate
#

oh ok

vernal spruce
#

just gonna do what i can with it..

fading owl
#

is it possible NMS does have a server to client packet for certain animations but there just isn't an event for it?

#

or is it entirely handled by the client

vale slate
#

reading itemFood class

fading owl
#

PlayerItemConsumeEvent?

#

What is this

vale slate
#

the problem is the animation gets fired anyway

fading owl
#

Does that jsut cancell the consumption of the item

#

and not the animation

#

gotcha

#
This event will fire when a player is finishing consuming an item (food,
 * potion, milk bucket).
#

sounds like u need a PlayerItemPreConsumeEvent

vernal spruce
#

its not a priority though..

fading owl
#

Yeah likely not

sacred wave
#

How about PlayerInteractEvent?

#

hope it was not mentioned before, if so, sorry...

fading owl
#

is that just for blocks?

vernal spruce
#

nope..

#

it triggers it,i cancell it

sacred wave
#

nope, you can for items too

vernal spruce
#

animation goes anyway

fading owl
#

hmm

vernal spruce
#

and also finishes eating the item and all that

#

it only gets triggered

sacred wave
#

oh... then I am out of ideas ๐Ÿ˜ฆ

vale slate
#

Because it is fired at the very beginning before the event, I just can't find this stupid class

vernal spruce
#

yeah its done either way

#

slowly trying to solve the hole bukkit plugin request page ๐Ÿ˜‚

fading owl
#

wait

#

yeah this is why

#

well ehh

#

maybe not

#

guess thats just for main hand

#

@vernal spruce is it possible to freeze a player?

vernal spruce
#

also seems is only calling left click?

fading owl
#

server-sided

vernal spruce
#

you can hack a way to do that..

fading owl
#

on player-interact event call freeze

#

should prevent animation

vernal spruce
#

but is that a viable way?

fading owl
#

you tell me, let me know if it is

vernal spruce
#

time to test i guess

#

jeez hdd life

fading owl
#

reload confirm

vernal spruce
#

wait where exactly

#

to call that?

#

or more specific how

fading owl
#

is it possible to freeze a player?

#

i asked if it was possible

#

it wasnt a declaration

hoary parcel
#

the answer is yes

vale slate
#

One question: How can you mess around with bounding boxes, that an Armorstand "sinks" in the ground?

vernal spruce
#

The answer might be yes but is it achieveable through api?

vale slate
#

this is not a problem since the ArmorStand I'm using is a nms entity already

#

but i just can't figure out how to change the BB that it is actually working

dusty topaz
#

Does shrink not work?

vernal spruce
#

well found a way to cancel the animation

#

not pretty though..

#

for a brief second i set the item to null

#

then set it back again..

vale slate
#

not worked with it myself but perhaps? ยฏ_(ใƒ„)_/ยฏ
@dusty topaz nope

dusty topaz
#

Is it definitely possible to do?

#

Maybe you have to call a method to update the box or have to set it before the entity loads properly

vale slate
#

that's what I asked

#

Maybe you have to call a method to update the box or have to set it before the entity loads properly
I already tried updateSize

dusty topaz
#

Ah

#

Well my knowledge doesnt go that far so I'll leave it for someone else

vale slate
#

anyways, thank you for your time

vernal spruce
#

well not pretty but setting the item to null then setting it back on stops the animation

digital sphinx
fading owl
#

the training .

#

127.0.0.1.

#

should be

#

127.0.0.1

vernal spruce
#

first one sounds better

#

extra dot

#

more posibilities

fading owl
#

how can text sound better

digital sphinx
inland meteor
#

then the guide is wrong

#

trust us

#

you can't have an extra .

digital sphinx
#

Okay

radiant pollen
#

@digital sphinx It's probably giving the IP at the end of a sentence.

inland meteor
#

for people that have never worked with IPs before ^

digital sphinx
#

Okay i need to remove the dot also in the Spigot servers?

inland meteor
#

IP formatting should always be: 127.0.0.1:25565 (obviously change to the IPs you need

#

IP addresses should never have a trailing .

#

๐Ÿ™‚

digital sphinx
#

Okay Thx

fading owl
#

worth noting the format is ipv4:port

digital sphinx
inland meteor
#

localhost is okay

fading owl
#

localhost usually resolves to 127.0.0.1

digital sphinx
#

My Server is crashed

minor spruce
#

is it possible to have buildtools recompile spigot-server and craftbukkit?

digital sphinx
#

But no error

vale slate
#

the log is not showing any crash

inland meteor
#

try looking in the crash reports folder?

#

if there is one?

fading owl
#

[00:50:03] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!

#

What is this?

inland meteor
#

that's when you set it to offline mode for bungee ^

fading owl
#

gotcha

#

yeah no stacktrace in this log

inland meteor
#

tbf in this log, it doesn't even show that the server has shut down

digital sphinx
#

try looking in the crash reports folder?
@inland meteor no one

inland meteor
#

what do you mean it crashes

#

like what does it exactly do

digital sphinx
#

The Screen is not anymore there.

#

That mean it crashed

fading owl
#

good ol systemd

inland meteor
#

bungee and lobby are there

#

so

digital sphinx
#

Yes

inland meteor
#

do you have a third or

digital sphinx
#

But

fading owl
#

what is (detached) state?

inland meteor
#

detached is when you leave a screen ^

digital sphinx
#

I dont can login also in Bungeecord

fading owl
#

gotcha

#

is it only attached when active on the screen?

inland meteor
#

Yeah

#

So is lobby not online Adrian?

digital sphinx
#

So is lobby not online Adrian?
@inland meteor Its not in Online mode

inland meteor
#

That doesn't mean that its not online

#

that doesn't mean its crashed***

digital sphinx
#

So i dont can Join on my Bungeecord.

#

So he dont get me to Lobby

inland meteor
#

why cant you join bungee? I dont get it

fading owl
#

if its in offline mode wouldnt u only be able to connect locally?

digital sphinx
#

But i also can join direcktly on the lobby Server

fading owl
#

not familiar just inrepreting log file

#

and making some broad assumptions

inland meteor
#

nah thats not what that means

fading owl
#

fair

inland meteor
#

can you show me your bungeecord config.yml

digital sphinx
#

yes wait

#

prevent_proxy_connections: false
listeners:

  • query_port: 25577
    motd: '&1Another Bungee server'
    tab_list: GLOBAL_PING
    query_enabled: false
    proxy_protocol: false
    forced_hosts:
    pvp.md-5.net: pvp
    ping_passthrough: false
    priorities:
    • lobby
      bind_local_address: true
      host: 127.0.0.1:25577
      max_players: 1
      tab_size: 60
      force_default_server: false
      remote_ping_cache: -1
      network_compression_threshold: 256
      permissions:
      default:
    • bungeecord.command.server
    • bungeecord.command.list
      admin:
    • bungeecord.command.alert
    • bungeecord.command.end
    • bungeecord.command.ip
    • bungeecord.command.reload
      log_pings: true
      connection_throttle_limit: 3
      server_connect_timeout: 5000
      timeout: 30000
      player_limit: -1
      ip_forward: true
      groups:
      md_5:
    • admin
      remote_ping_timeout: 5000
      connection_throttle: 4000
      log_commands: false
      stats: c49d99c2-20b3-403c-b8ff-6d29d3f7d8e2
      online_mode: true
      forge_support: false
      disabled_commands:
  • disabledcommandhere
    servers:
    lobby:
    motd: '&1Just another BungeeCord - Forced Host'
    address: localhost:25566
    restricted: false
    CB:
    motd: '&1Just another BungeeCord - Forced Host'
    address: localhost:25567
    restricted: false
fading owl
#

careful not to post anything sensative

inland meteor
#

so you cant join the ip with the port 25577

#

?

digital sphinx
#

Right.

inland meteor
#

what does it say

fading owl
#
groups:
  md_5:
  - admin

unrelated, does this give md_5 access or?

inland meteor
#

yeah, it's in the config as default

#

it's just for a template

fading owl
#

ok

digital sphinx
inland meteor
#

have you got a firewall that's blocking the port?

fading owl
#

is it possible ur not using the correct IP

digital sphinx
#

have you got a firewall that's blocking the port?
@inland meteor What are you mean?

#

Before 2 House i can join the game

fading owl
#

ports by default arent open

#

you have to open them yourself

digital sphinx
#

I change all Ips forn 0.0.0.0 to 127.0.0.1

fading owl
#

what linux distro

inland meteor
#

is the bungee server currently running...

digital sphinx
#

Debian 10

#

That is it saying

inland meteor
#

and you're going to the ip:25577 right

#

when you try to connect

languid pewter
#

Hi everyone, maybe the answer is 'there is no way to do that' but I want to hear the opinions. How do you think that I can check if a user is a buyer (programatically)

digital sphinx
hoary parcel
#

you dont

inland meteor
#

is this for a premium resource @languid pewter

hoary parcel
#

the api doesnt allow you to do that

languid pewter
#

@inland meteor yes

hoary parcel
#

and you arent allowed to access the main website with a bot

#

so you cant

inland meteor
#

have a look at how this works

languid pewter
#

anyway I want opinions

hoary parcel
#

there are no opinions

#

just rules

languid pewter
#

@inland meteor that doesnt work anymore, I think that break the rules

inland meteor
#

oh

#

i swear someone recommended it the other day

#

oops

languid pewter
#

dont worry, its ok

hoary parcel
#

upvote that

languid pewter
#

I'll check that

hoary parcel
#

(dont comment, just upvote)

languid pewter
#

oki

digital sphinx
#

and you're going to the ip:25577 right
@inland meteor I think so if you watch/look my screenshot

fading owl
#

are u sure that URI points to ur service IP

digital sphinx
#

Yes of curse i have other Minecraft Servers on the Same Servers.

#

What should i do now?

#

Hello? Afk? 5 Minutes are past XD

flint venture
#

@digital sphinx I dont know if you fixed this but bungee is listening on 127.0.0.1

#

so no one can join externaly

#

set listening ip to 0.0.0.0

#

Spigot servers behind bungee can stay on 127.0.0.1

digital sphinx
flint venture
#

where is it wrong

digital sphinx
#

and not servers on the same machine

flint venture
#

Read it carefully

#

it says

"edit the server.properties of each server, so that the server-ip value is set to 127.0.0.1"

#

You change the bungee config.yml file ๐Ÿ˜‰

digital sphinx
#

bungee config.yml = Server.properties. Or not?

flint venture
#

no

#

server.properties = server.properties

#

config.yml = config.yml

digital sphinx
#

okay

#

Oh i fixed it.

#

But now i joined Bungeecord

#

and the lobby was crashing

flint venture
#

I'm assuming you fixed it by change your bungee config ip to 0.0.0.0

#

What's being posted in the spigot console

digital sphinx
#

[01:26:53] [User Authenticator #1/INFO]: UUID of player Adrian0508 is 1d5eee77-3321-450b-bbac-9377eac155db
[01:26:54] [Server thread/INFO]: Adrian0508[/185.53.156.150:59525] logged in with entity id 255 at ([world]-304.69999998807907, 68.5625, 148.30000001192093)
[01:26:59] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5591ms or 111 ticks behind

#

But why its a illigitimate UUID

flint venture
#

Either,

#

Have you turned on ip-forwarding

#

on bungeecord

#

and set "bungeecord: true" in spigot.yml

#

Also that uuid is valid

#

upload your bungee config, spigot.yml and server.properties

digital sphinx
#

and set "bungeecord: true" in spigot.yml
@flint venture Yes

flint venture
#

to a paste site

digital sphinx
#

okay

#

@flint venture Is it right what i pastet in?

flint venture
#

everything looks ok

digital sphinx
#

Uff

frigid ember
#

If anyone knows what command i can do or command block to make it so if anyone on the server uses any tool , it won't use durability . DM me

flint venture
#

Any logs is bungee Adrian? Or any errors before they leave?

digital sphinx
#

No log folder in bungee

flint venture
#

i mean in console

#

Also Adrian, are you connect with a forge client?

digital sphinx
#

Also Adrian, are you connect with a forge client?
@flint venture No

#

Vannila

#

1.15.2

flint venture
#

spigot is 1.15.2 as well

#

as plugins?

digital sphinx
#

spigot is 1.15.2 as well
@flint venture yes

#

as plugins?
@flint venture I never download a Plugin

flint venture
#

Are you able to get in at all?

#

are it errors straight away

digital sphinx
#

Are you able to get in at all?
@flint venture How do you mean?

flint venture
#

when you connect

#

does it keep you instantly?

digital sphinx
#

I joined on Bungee.

#

It connectet me to lobby

#

and after 1 Minute

#

It maked the error

#

and lobby crashed

flint venture
#

The server crashed?

#

Or just you get kicked

digital sphinx
#

The completly screen got crashed

#

on my v Server

#

So i would say yes

flint venture
#

is there a spigot crash report?

#

or log

digital sphinx
flint venture
#

So

#

you've got 1 plugin called "Teleporter"

#

that shouldn't be it

digital sphinx
#

Its from my Developer

flint venture
#

but it does seem to lockup

#

try without the plugin

#

just incase

digital sphinx
#

ok

#

i restartet now bungee

#

and lobby(withoutplugin)

#

It take verylong

#

Yes

#

time overload in english or so

flint venture
#

your spigot server is freaking out for some reason

#

you're connect to bungee fine

#

but the spigot server seems to be not letting you in

digital sphinx
#

I only explain it if its a problem with the upgrade

#

I upgradet my normal vanilla 1.15.2 Server to a 1.15.2 Spigot Server

#

Could make this problems?

flint venture
#

no shouldn't be

#

so you're just using the spigot.jar now

#

not the minecraft_server.jar

digital sphinx
#

spigot-1.15.2-R0.1-SNAPSHOT.jar

#

That i use

flint venture
#

what args are you using

digital sphinx
flint venture
#

uh

#

maybe assign more than 1GB of ram

digital sphinx
#

how to do?

flint venture
#
screen -s Lobby java -Xmx4G -Xms4G -jar spigot-1.15.2-R0.1-SNAPSHOT.jar```
#

that's 4GB of ram

digital sphinx
#

But i have only 8gb on my Server

#

and its only the lobby

flint venture
#

try 2gb then

#

this is just to test of course

digital sphinx
#

Ohh

#

It crash

#

But a new reason

#

[02:04:05] [Server thread/INFO]: Starting minecraft server version 1.15.2
[02:04:05] [Server thread/INFO]: Loading properties
[02:04:06] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-2040c4c-893ad93 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
[02:04:06] [Server thread/INFO]: Server Ping Player Sample Count: 12
[02:04:06] [Server thread/INFO]: Using 4 threads for Netty based IO
[02:04:06] [Server thread/INFO]: Debug logging is disabled
[02:04:06] [Server thread/INFO]: Default game type: SURVIVAL
[02:04:06] [Server thread/INFO]: Generating keypair
[02:04:07] [Server thread/INFO]: Starting Minecraft server on 127.0.0.1:25566
[02:04:07] [Server thread/INFO]: Using epoll channel type
[02:04:07] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[02:04:07] [Server thread/WARN]: The exception was: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
[02:04:07] [Server thread/WARN]: Perhaps a server is already running on that port?
[02:04:07] [Server thread/INFO]: Stopping server
[02:04:07] [Server thread/INFO]: Saving players
[02:04:07] [Server thread/INFO]: Saving worlds

flint venture
#

server already running

digital sphinx
#

Oh

#

Okay

#

So okay iam now on the lobby server in minecraft

flint venture
#

eyy

digital sphinx
#

Wtf

#

Iam on the Freaking Lobby Server but the Screen is not there

flint venture
#

type screen -R

#

to list all active screens

#

tbh I make the screens first and run my script inside of them as im lazy

digital sphinx
#

Only Bungeecord

flint venture
#

is probabs lobby

#

type screen -R 3972

digital sphinx
#

yes

#

it was lobby

#

But why its not called lobby?

flint venture
#

no idea

#

personaly

#

I would rename the jar to spigot.jar
I would make a start.sh file inside the lobby folder with just

java -Xmx2G -Xms2G -jar spigot.jar```
And then to run it just type 

screen -S lobby
cd /home/lobby
./start.sh

then CTRL A+D to leave the screen
#

I dont like running a screen with a script as then the screen just dies when the script edns

#

but obviously this just my personal opinion

digital sphinx
#

But its in cd /Java/Bungeecord/Lobby

flint venture
#

yeh well ii dont know that so i just put a random cd dir

#

anyway im going now, good luck with your server

digital sphinx
#

Its sees like everything is working

#

Thank you @flint venture

frigid ember
#

hey guys, im getting ths error with maven

dusty topaz
#

can you send the contents of

<dependencies>

in text

frigid ember
#
   <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.2</version>
        </dependency>
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>craftbukkit</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.citizensnpcs</groupId>
            <artifactId>citizens</artifactId>
            <version>2.0.26-SNAPSHOT</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>

    </dependencies>
inland meteor
#

change from <artifactId>craftbukkit</artifactId> to <artifactId>bukkit</artifactId>

dusty topaz
#

and change <artifactId>bukkit</artifactId> to <artifactId>spigot-api</artifactId>

#

except, you already have that

#

so just delete it

#

:p

#

as explicitly stated on the wiki:

   <!--This adds the Bukkit API artifact to the build -->
   <!-- Do not include this in the pom.xml file if the Spigot API is already added -->
frigid ember
#

I need craftbukkit though or nms won't work

fading owl
#

Make sure to keep provided scope as well

knotty karma
#

i'm having trouble loading files in my BlockPopulator. What is the basis for the path I should use?

boreal tiger
#

Your class names should be CamelCase.

The file has to be in the resources folder

lucid bough
#

I'm not a Java programmer, but shouldn't you put final after the try / catch blocks?

#

seems like it would be try catch final in that order, could be wrong though lol

#

Oh, nevermind...it's a final variable lol

#

Anyone one good here with Spigot servers and FTB packs on 1.12.2?

#

I can never seem to get this one probe mod to work correctly on the server

fleet crane
#

JavaPlugin.class would try and get a bukkit resource

#

You just want YourPlugin.getResource

rocky kernel
#

Hello, does anybody have a example bukkit script on how to manipulate weapons and add new effects that can be added in the enchantment table? It would be great to learn thanks

dire whale
dusky roost
#

Can anyone tell me the difference between JavaPlugin#getLogger and Bukkit#getLogger ?
I'm still a bit confused after reading the Javadoc

#

Also, whats your opinion on Dependency Injection vs Static Factories?

fleet crane
#

One logs prefixed with your plugin, use it so people know where messages are coming from

storm vessel
#

Is there anyway to configure the server/use plugins to make it so that chunks with only afk players in them are "frozen"

flint crow
#

how do i change 1.15.2 to 1.14.4 ?

fleet crane
#

You have to reset your server

lucid bough
#

how do you add mods in spigot server, like applied energistics2 or others?

flint crow
#

what do you mean reset ? i haven't done anything yet

fleet crane
#

Well just use the older version then

knotty karma
#

@flint crow you'll need to deete the folders world, world_nether, and world_the_end, since world generation changed from 1.14 to 1.15.

fleet crane
#

I meant reset as you can't downgrade worlds

#

Only upgrade them

vocal solstice
#

Does this confuse anyones brain?

dusky roost
#

thanks @fleet crane

wanton delta
#

can Player#kickPlayer be called async?

#

(as a rare case, wont be common)

#

wait

#

i googled it

#

thats fine

dusky roost
#

i mean

#

I thought you weren't supposed to access any part of the Bukkit API asynchronously

#

@wanton delta

wanton delta
#

youre no

#

some things can be accessed

#

most can not

#

i didnt know if that was a special use case

dusky roost
#

Which things can be used?

wanton delta
#

i mean i dont know off the top of my head

#

player.chat comes to mind

dusky roost
#

do you mean the AsyncPlayerChatEvent

wanton delta
#

no

shell aurora
#

When you make start.bat, do you change spigot.jar to spigot-1.12.2.jar or is there a separate file named spigot.jar?

pallid panther
#

Okay so playerItemBreakEvent doesnโ€™t respond to armor breaking? Any solutions? An event to armor being broken that is?

trim void
#

In linux, is there a good way to reenter the server's command line without restarting the Spigot server?.

#

to conceivably run a server command from a script

novel phoenix
#

wdym reenter command line

trim void
#

the uhh "gui" that runs in the terminal showing updates from the server and allows you to make admin commands

neon zealot
#

i have a question

#

1.15 servers has chunk load (actually tps) problems

#

why spigot prefers 1.15 and dont support legacy versions?

maiden sky
#

Hello when I restart my server it gives me the error saying it canโ€™t find the start.sh
do you know how to help?

agile whale
#

You would need to setup the script if you want the server to restart with the command

#

Itโ€™s not an error but just telling you that /restart isnโ€™t going to work unless you set it up

novel phoenix
#

@trim void how did you launch your server

#

are you using screen?

trim void
#

I'm using a unix terminal. This is the exact command I used
java -Xms512M -Xmx1008M -jar /home/pi/minecraft/spigot-1.15.2.jar nogui

knotty karma
#

put that command inside of a file called start.sh

#

then make it executable by running chmod +x start.sh

#

then run ./start.sh to start your server

#

that way your startup script is in a file that Spigot can access and restart itself with in case of a crash.

trim void
#

great idea

#

say I need to access Spigot not in the case of a crash? Like the shell running Spigot was just closed or something?

knotty karma
#

that's the downside of that. If it crashes and restarts itself, the new process will be detached from the terminal you ran it in.

#

i personally do not configure auto-restart, because if your server crashes, then something is very wrong, and you should look at it before starting it up again

sturdy inlet
#

Could someone help me with my skript dm me

trim void
#

I'm speaking specifically outside of a crash

#

like if Spigot is still running fine but I lost access to the command line gui

knotty karma
#

how would that happen? if you run it in screen then you can always reattach (as long as you don't /restart your server)

trim void
#

not sure lol

#

just curious

#

thinking of writing a on/off-time script

#

to give the system a few hours in the middle of the north american night to shut down

agile rock
#

If i want to create a secure minecraft server, should I only have port 25565 and port 22 open?

knotty karma
#

open only the ports you need, and use pubkey for SSH

trim void
#

what's the utility for port 22? I thought 25565 was the only one needed open

knotty karma
#

SSH

#

(remote shell access)

agile rock
#

hmm ok, should i host my website on the same server as my minecraft server?

knotty karma
#

Are you using a proxy for your server?

agile rock
#

im planning on using a service called tcpshield

knotty karma
#

no, i mean like Bungee/Waterfall

agile rock
#

ah, as of right now no

knotty karma
#

then i'd say hold off on the website for now. I have my site hosted on the same VPS as my proxy, but my actual servers are elsewhere

#

My proxy has an openVPN server that my server connects to, so the server actually has no ports accessible from the internet.

gleaming totem
#

Dfesk why would he have to hold off on the website bc he doesnโ€™t have a proxy?

knotty karma
#

because if his site gets DOS'd while his MC servers are running, then it's easier to take down than if only a proxy is running. Proxy uses far less resources than server. Plus, proxy adds an extra layer of security anyways.

gleaming totem
#

So youโ€™re saying when bungee is set up itโ€™s harder to ddos the Mc server behind it on the same machine?

#

Never thought about that - very interesting

knotty karma
#

yep, the proxy acts as a first line of defense. You should never have your server exposed to the Internet. My server is only accessible via VPN, only my proxy/VPN has ports forwarded.

#

so basically to get into my server, someone would have to get into my VPN or proxy VM, then into my server from there

agile rock
#

Hmm interesting, yeah before I get my server up, I want to have a good understanding of the security/networking. By any chance, do you know of any good tutorials on this? If not all good, just gonna have to do some research. Also thanks for the advice!

knotty karma
#

no i don't really have any tutorials. I intern for my school's IT department, which is where I learned most of what I know. You could check r/sysadmin and probably find stuff there

#

Set up an A record called mc or something, and set it to not proxy, and then set your server's listening address to mc.mydomain.com
Set your website to only liten to mydomain.com and have that proxied through Cloudflare

#

Cloudflare has amazing DDoS protection

agile rock
#

Yeah there is alot of resources on these websites, ill take a look. Thanks!

knotty karma
#

no problem!

shell aurora
#

can anyone help me? I can't seem to be able to open the ports that I need to open but I can still get on my server using 0

knotty karma
#

How can I get a packaged file outside of the Main class (in a BlockPopulator, specifically)

#

if I do java com.dfsek.myPlugin.Main.class.getResource("file.txt"); it returns a URL

fiery jasper
#

what do you mean?

#

it might as well return the file location

restive lava
#

simply load it from the stream

#

Main.class.getResourceAsStream ๐Ÿคทโ€โ™‚๏ธ

fiery jasper
#

hey klaro

#

I have question

restive lava
#

yes?

fiery jasper
#

so am making a plugin right?

#

one command of the plugin opens a menu

restive lava
#

...

fiery jasper
#

everything is good

#

the items do work as well as the events

#

the problem comes when i try to add the targets name to set him on fire

#

since my command is /troll <player>

#

it only gives an error when i put the args from the command executor

#

when i put another text it works normally

#
 Could not pass event InventoryClickEvent to PrisionOP v0.1
org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:305) ~[server.jar:git-Spigot-c3c767f-33d5de3]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-c3c767f-33d5de3]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-c3c767f-33d5de3]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-c3c767f-33d5de3]
        at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:1588) [server.jar:git-Spigot-c3c767f-33d5de3]
        at net.minecraft.server.v1_8_R1.PacketPlayInWindowClick.a(SourceFile:31) [server.jar:git-Spigot-c3c767f-33d5de3]
#
Caused by: java.lang.NullPointerException
        at com.chuy.Commands.TrollMenu.clickInventory(TrollMenu.java:66) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_231]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301) ~[server.jar:git-Spigot-c3c767f-33d5de3]
cloud sparrow
#

Issue is line 66

fiery jasper
#

yeah

cloud sparrow
#

of clickInventory in class TrollMenu.

fiery jasper
#

thats the line i say it has

cloud sparrow
#

What is the line?

restive lava
#

Can you give us the line

fiery jasper
#

that line executes the player on fire

cloud sparrow
#

You likely have a variable that is NULL.

#

I need the code line.

#

not your explaination

fiery jasper
#

targetplayer.setFireTicks(1000);

#

it doesnt make sense

restive lava
#

targetplayer = null

fiery jasper
#

since when i put /troll on the player

cloud sparrow
#

targetplayer is NULL.

fiery jasper
#

it shows the player

#

name

cloud sparrow
#

well do you check if the player is online

#

like target == null

#

meaning they aren't online

#

before running it?

restive lava
#

๐Ÿƒโ€โ™‚๏ธ

fiery jasper
#

already done it

cloud sparrow
#

๐Ÿƒ

fiery jasper
#

it shows the player name on the items

#

on the other code part i have

#

here is some fragment of it

#
Player targetplayer = Troll.savedTargetPlayer;
    
    public void troll(Player p) {
        
        Inventory inv = Bukkit.createInventory(null, 9, colors("&6&lTroll&5&lGUI"));
        @SuppressWarnings("deprecation")
        ItemStack item1 = new ItemStack(327,1);
        ItemMeta meta1 = item1.getItemMeta();
        meta1.setDisplayName(colors("&6&lQuemar &r&5"+targetplayer.getPlayerListName()+"&6&l a la verga"));
restive lava
#

:giga:

fiery jasper
#

here

#

lemme show u a image

cloud sparrow
#

Why do you have targetplayer.getPlayerListName()

#

that should say p.getPlayerListName()

#

as it's a method

#

and u don't use it

fiery jasper
#

ok

#

listen

knotty karma
#

Using an InputStream will not work. I need the resource as a File in order to pass to WorldEdit's API

fiery jasper
#

that

#

targetplayer

#

is from the args

#

of the command

cloud sparrow
#

@knotty karma can you provide more detail?

fiery jasper
#

/troll <targetplayer>

#
Player targetPlayer = p.getServer().getPlayer(args[0]);
                            savedTargetPlayer = p.getServer().getPlayer(args[0]);
                            if (targetPlayer.getPlayerListName() != null) {
                                TrollMenu i = new TrollMenu();
#

thats in one class

#

then i use

cloud sparrow
#
if (args.length == 0) {
  // input name;
  return true;
}
Player targetPlayer = Bukkit.getPlayer(args[0]);
if (targetPlayer == null) {
    return; // Player isn't online.
}
troll(targetPlayer);
fiery jasper
#
public static Player savedTargetPlayer;
#

to send it to another class

#

the name is not null since it records in the items

#

but when i try to set it on fire or call its name on the inventoryclick event it causes error

#

for some reason

cloud sparrow
#

Create a instance of your plugin in that class if it's going to be continued to be used through dependency injection @knotty karma ?

#

as getResource() can only be accessed through the main class.

knotty karma
#

how would I go about that? (sorry, i'm relatively new to Java, mostly work in JS)

dusky roost
#

dependency injection basically means

fiery jasper
dusky roost
#

in the constructor for the class, add the dependency to the arguments for that classes constructor

knotty karma
#

ohh, so add my plugin's Main class as a dependency

dusky roost
#

yes

knotty karma
#

okay, and then I can call methods inside Main from within that class?

dusky roost
#

well yeah anything you set to public

#

lol

#

methods or fields

knotty karma
#

yea

dusky roost
#

ye

fiery jasper
#

i made it work

#

results i had to define the targetplayer again inside the click event

#

of the inventory

dusky roost
#

@knotty karma what do you think about java vs js

fiery jasper
#

thanks @cloud sparrow and @restive lava

dusky roost
#

you use node?

restive lava
#

ping?

knotty karma
#

i mostly use node. I like Java a lot, but there are a few things that i do not like lol

fiery jasper
#

sorry ๐Ÿ˜ฆ

knotty karma
#

specifically, my biggest pet peeve with Java is raising things to powers

#

lol

restive lava
#

np @fiery jasper

knotty karma
#

its so simple in JS

dusky roost
#

I mostly use java and I've used node before to make a rest api

fiery jasper
#

nice

knotty karma
#

ah

dusky roost
#

its cool using node and the wealth of packages

knotty karma
#

i use Electron quite a bit.

dusky roost
#

i used express

knotty karma
#

nice. Have you heard of Ionic?

dusky roost
#

I also one time used React for my front end, built the static files

#

and then used Tomcat as the backend

knotty karma
#

nice

dusky roost
#

it felt weird

knotty karma
#

Ionic is a framework similar to Electron, but it transpiles to iOS, Android, and Electron itself. Super cool that you only have to write your app once

dusky roost
#

what is it

knotty karma
#

wym? what's electron or what's Ionic?

dusky roost
#

is it a react library?

knotty karma
#

it's a node package. You can use React or Angular to build your app tho.

dusky roost
#

i mena

#

mean

#

how does react interact with it

#

why would u even want to use react with this

#

it looks like a replacement

knotty karma
#

well, when you start a project, you choose either React or Angular as a base for it.

#

so it integrates with React/angular

dusky roost
#

ah

knotty karma
#

Ionic is simply what allows it to run cross-platform

dusky roost
#

but can u not just use this with regular js?

knotty karma
#

it has been a while, i last used it several months ago lol, but I believe you have to choose either react or angular

lusty vortex
#

Do you even understand what you're doing with that code..?

knotty karma
#

yes. this is simply something i'm using to test the pasting of schematics

#

this i not what i intend to actually use

lusty vortex
#

Dependency injection is as simple as passing things through the constructor

frigid ember
#

Yeah, dependency injection is just kinda a programming concept?

#

I don't really see how dependency injection relates to what you're doing with pasting schematics

lusty vortex
#

Ikr ๐Ÿ˜†

knotty karma
#

i need to call methods in the Main class (getDataFolder, and eventually config file stuff)

lusty vortex
#

Then you need to create a structurePopulator object

#

Just look up "Java object creation tutorial"

#

Or check out some of the tutorials on the net that are just related to beginner java programming

#

And you DO know, you're only allowing that schematic to be placed at chunk coordinates 0, 0?

knotty karma
#

yes. that is why I made it only continue if the chunk coords were 0 0

#

because I simply want to get it to work before i start using noise to place them

frigid ember
#

So is your problem that this blockpopulator isn't working? Or are you just looking for a better way to do it than making a new instance of Main every time the populator is called?

knotty karma
#

the BlockPopulator is working fine. I simply need a way to get the plugin's data folder, mainpulate config.yml, etc. (basically call methods in Main) from my BlockPopulator

#

I have a functional custom generator, with BlockPopulators for trees and whatnot, I just need to paste schematics now.

frigid ember
#

In my main class I'd probably have a member variable public static Main instance; and set it to this on enable, that way you can call methods on that object just by doing Main.instance.whateverMethod()

#

You could also have an argument in your ChunkGenerator's constructor for the Main instance, which it saves in a variable, and then each of your BlockPopulators coud have a constructor that takes a Main instance as an argument and saves it to a variable. Then in your getDefaultWorldGenerator function on your main class pass this as the argument to the constructor, and in your getDefaultBlockPopulators() function on the ChunkGenerator you can pass the stored main instance in the ChunkGenerator to each of the BlockPopulator constructors

knotty karma
#

alright cool, i'll try that.

#

thanks!

frigid ember
#

np

keen compass
#

@knotty karma you either pass a reference to the class or make your main class have a static method that can be used in other classes

#

for what you are doing, a static method might be more appropriate

knotty karma
#

i tried a static method. you can't manipulate the config or get the data folder in a static method.

keen compass
#

yes you can

knotty karma
#
public static File getSchem(String name) {
  return new File(getDataFolder() + "/scm/" + name);
}
#

this errors. is there a different way to go about it?

keen compass
#
public class MainPluginclass extends JavaPlugin {
    private static MainPluginClass instance;

    public void onEnable() {
        instance = this;
    }

    public static MainPluginClass getInstance() {
        return instance;
    }
}

public class anotherClass {
    private static MainPluginClass plugin = MainPluginClass.getInstance();
}
#

that is how you make a static method and how you can call the static method

knotty karma
#

ohhhhhhhhh wow, i'm dum

#

lmao thanks

keen compass
#
public static File getSchem(String name) {
  return new File(getDataFolder(), "/scm/" + name);
}```
#

I hope you see my change

knotty karma
#

oh yeah, that too. sorry, that was sth i quickly typed up, that method was deleted long ago lol

keen compass
#

well you stated you were having problems with it, just before I posted some code lol. You had it right, just one + too many was all ๐Ÿ˜‰

knotty karma
#

yep, thanks for your help!

rocky pilot
#

hay question if i make a Spigot server and get the plugins i want to run the user just need the Spigot client right?

keen compass
#

there isn't a spigot client

#

Just use the client from Mojang and it will work ๐Ÿ™‚

rocky pilot
#

okay im use to bukkit from back in the day ๐Ÿ™‚

keen compass
#

Even bukkit didn't have a custom client either

rocky pilot
#

so what the hell am in thinking of lol

keen compass
#

probably thinking of back in the day of having to install optifine into the MC client to sometimes be playable decently

knotty karma
#

maybe Forge?

keen compass
#

or forge

rocky pilot
#

this was when MC was in beta way before MC was xsoft

keen compass
#

Yeah, Bukkit never had a custom client. There is forge though where you needed to modify the client to have forge modloader

#

But otherwise, as far as bukkit spigot or any other derivatives off those there is no custom client to connect to those kinds of server implementations

rocky pilot
#

okay thanks guys happy building

keen compass
#

Maybe you are thinking of spoutcraft

rocky pilot
#

yes!

#

thats what it was

keen compass
#

yeah spout is dead

#

so no need to worry about that ๐Ÿ˜‰

rocky pilot
#

okay thanks again ๐Ÿ™‚

keen compass
#

np, have fun with your server ๐Ÿ˜„

rocky pilot
#

ya just a friends only type of thing nothing to big

dusky roost
#

@knotty karma in the class that contains the populate method, create a field like Main instance;

#

and then in the constructor for that class, list as an argument Main instance

#

instantiate the field

#

using the instance

knotty karma
#

Frostaff's method worked fine for me

narrow crypt
dusky roost
#

Do you understand what the constructor is?

#

I mean yeah you can make it static

#

and use a static instance

#

but you should understand both ways

knotty karma
#

I believe I do... Basically it creates a separate instance of the Main class, correct?

keen compass
#

no it doesn't create a separate instance, it passes the references via the constructor

#

there is only ever 1 instance of your plugin

tiny dagger
#

example, when someone writes your name in the book

#

it doesn't create a copy of yourself does he?

keen compass
#
public class someClass {
    private MainPluginClass plugin;
    public someClass(Plugin plugin) {
        this.plugin = plugin;
    }
}

so where you see someClass(Plugin plugin) that is a constructor, and in that method constructor I pass in the Plugin reference because when you create that class or use that method it requires the Plugin instance to be passed in.

#

That is the way you should be passing your plugin reference most of the time to other classes. Sometimes, using the static method is fine. An example is you have a singleton class. There it is easier to use a static reference instead.

dusky roost
#

note that the constructor is a special method

#

its name is the same as the class name

#

and it must be public

novel phoenix
#

and it must be public
no

dusky roost
#

and you could have different kinds of constructors with different arguments

#

well

#

protected

#

at least

#

or no modifier

#

not private

novel phoenix
#

?

dusky roost
#

oh shit

#

my bad

novel phoenix
#

you can make private constructors

dusky roost
#

lol

keen compass
#

it can be private

#

that is how you make singleton classes

#

needs to be private for that

#

otherwise a person could get around your class needing to be singleton

narrow crypt
#

so i finally got the customconfig to work, but if i want to acces it from another class i used data = plugin.data; but data is private, should i just change it to public ?

novel phoenix
#

you can make singletons with DI

keen compass
#

yes you can, but doing it that way though doesn't ensure that there isn't another instance

#

have to do some extra stuff to ensure that if you do it that way

novel phoenix
#

the point of singleton is to get a reference using static method

keen compass
#

Point of singleton is that there is only one instance of that object or class

#

not whether you can get it with static or not

novel phoenix
#

I mean

#

if you DI in one singleton instance

#

doesn't matter how many of them you create after that

keen compass
#

ah right

novel phoenix
#

also singleton is wacky pattern anyway

#

and should be avoided

keen compass
#

well things that are handy is say you have a config manager class, don't want two of those ๐Ÿ˜‰

#

otherwise you end up getting different references to the config files lol

novel phoenix
#

tbf classes like ConfigManagers can be used with static methods only

#

without ever creating an instance of them

keen compass
#

depends on what they do, for most that is fine

#

I generally try to use static as less as possible. Instead of making a bunch of methods static, its easier to just make the class itself static

#

but with singleton pattern, you can ensure an instance is created if one isn't already too though. Which is what I normally do

dusky roost
#

@novel phoenix what about if you use the default config from JavaPlugin

novel phoenix
#

not speaking on Bukkit plugin behalf

keen compass
#

default config from JavaPlugin can be obtained either using Bukkit static method or getting a reference from your plugin

novel phoenix
#

just saying that if you ever need a singleton you better think about how to implement it the other way

dusky roost
#

yeah i mean you should know both

novel phoenix
#

and if there is no simple way around this you should still use DI otherwise good luck writing tests for that shit

keen compass
#

bukkit does fine with their tests ๐Ÿ˜‰

dusky roost
#

i think he means like

#

unit tests

novel phoenix
#

yea I've seen enough singleton implementation of DB for example

#

without using proper abstractions

#

P A I N

keen compass
#

Bukkit/craftbukkit both do unit tests in case you didn't know lol

#

well craftbukkit does, don't think bukkit does

novel phoenix
#

because Bukkit uses DI

#

to make a singleton

tranquil rampart
#

why my server close whe it is starting

keen compass
#

did you accept the eula in the config?

tranquil rampart
#

yes

keen compass
#

what does your startup script look like?

tranquil rampart
#

it writes Stopping server without any reason

keen compass
#

and do you have any errors in the logs?