#help-archived
1 messages ยท Page 47 of 1
Why a chest?
I don't know, I suppose it just caught my eye...
it is in PersistentDataContainer, not in the chest directly...
though
And what happens if the chest gets broke ๐
At 1,1,1? good luck with that ๐ I guess you could explode it with tnt, but meh... ๐
Yeah I think you should be saving to disk lul ๐
not saying it is ideal ๐
I probably will, this just seemed like a simpler solution
๐ค
This might help you https://www.spigotmc.org/wiki/config-files/
I know about them... I was just lazy, I don't know... I know it is not the correct approach...
but it is creative!
https://timings.spigotmc.org/?url=puwexoriba @dusty topaz would this one work?
Fair enough hahaha ๐
It just shows the majority of the tick is tickEntities
likely because of insane amounts of hoppers, droppers etc
(or pesky armourstands)
@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...
@dusty topaz there isnt even 20 hoppers or armor stands
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
@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 :/
how do i get that report?
/timings report
then in same folder as your world data, there should be timings folder with text file...
here are the reports
Do anyone know how can i see most downloaded plugins?
@tranquil rampart https://www.spigotmc.org/resources/?order=download_count
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
@dark shuttle thx
Google has been no help ๐ฆ
Anyone have any issues purchasing premium resources?
PayPal says "payment successful" but no many leaves my account and I dont get the plugin lmao
Been happening to a couple all day @flint venture
md_5 will probably look into it when hes up, but it's probably a paypal issue
i dont think so :p
i think paypal issue tbh
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 ...)
hmm
last updated 2017
I dont think its glitched I think you're using a horrifically outdated plugin
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
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
You need a plugin which moves players to spawn on join
if you use Essentials, im pretty sure that's in there... nvm
@dusty topaz here is the full report
ยฏ_(ใ)_/ยฏ
okay great answer
Doesn't look lik eit has the option
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?
try null
it may error
it may not
Oh dear. I should have been patient.
This will be fun to sort out
@flint venture @zenith siren * @param joinMessage join message. If null, no message will be sent
weyy they i was right
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
how can i search the plugin that i want?
send a timings report @median hill
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
@median hill @flint venture here is the full report
how can i search the plugin that i want?
how can i search for plugins?
james, you have the timing up there
There's not typical timings
@flint venture but it serach in all forum
It should give you a link
i need only plugins
Click Discussion, then post a question
https://www.spigotmc.org/go/timings?url=ixegopequv @flint venture @median hill
@uneven kraken Your spawn world has to many entities
@flint venture How do I rediscover them?
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
@flint venture so that has to do with the server dont beeing able to make the free ram work?
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
you can try this to find out where you have entities. https://www.spigotmc.org/resources/entitydetection-tile-entity-support.20588/
I have no idea, i dont control him. Wait and see
Depends
on the dev
@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
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?
@flint venture thats the point of the problem, we dont know why it do that
Thats what it does. That's what java does
im copying the flags
How do i add support for utf-8 characters in my plugin config
I have 10GB of RAM on my survival server, it's only using 5GB no big deal
@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
sorry im newbie in this
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
yeah but when the server really needs it, it just dont use it
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.
does sethunger internally check if its higher than the maximum?
@flint venture our CPU is at 60%rn and we have lagg
so the problem is the cpu not the ram right?
The problem is you've got too many entities in the spawn world
oh i forgot, spawn is the only world we have, a survival one
And Stellrow, setHunger isn't an option is it? Do you mean setFoodLevel?
is there a problem with the website?
yeah... @flint venture
ive bought 2 plugins and can't download htem
Yes
but noticed its looks like it so it doesnt matter anymore
@median hill Try this: https://www.spigotmc.org/threads/guide-server-optimizationโก.283181/
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
@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
try Paper
@flint venture this word is not very appreciated in here, I think
Maybe not, but it's extremely useful for timings
nope, it's not, but i'd say it's necessary in this use case lol
need advanced timings
Spigot Timings 2.0 when?
Any reason Spigot doesn't use Aikar v2 timings?
Because Aikar contributes to paper now
ah
so he puts his stuff in there lol
I mean other people can add timings to their project
here's mini with the real reason though :^)
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
aikar didn't like that it wasn't going on his servers?
understandable for both sides i guess
I mean you can host timings v2 yourself
stop pinging people lol
So if spigot was really against having it hosted on aikar's servers, they could host it themselves like they do with timings v1
they did host it themselves
i think that is the issue
either way, the reason is irrelevant ยฏ_(ใ)_/ยฏ
you can do whatever, its MIT for a reason
guys --> #general
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
should he really be upset on md for that? ๐ค
there might be more to it
you don't need to fork anything to use timings v2 on your own servers
--> #general
#nowhere
ping me one more time i dare you
?kick @fading owl
๐ข Kicked JasonM#1629
She was a little slow on that one
you could see them typing
md_5, btw, i dont know if its spigot or paypal. But plugin purchases seem to be really slow
just considering it
It was to strike fear into their hearts
The suspense is good
The inevitable banning
"Not CafeBabe is typing..."
@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
.-. this guy
and i got pinged again
oops not intended, sorry
He's still pinging people
stop pinging people oh my god
calling md an mf
He meant me
Dangerous, please learn some discord etiquette
ahhhhh whoops
?kick @frigid ember
๐ข Kicked Dangerous#7539
'no'
uh
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"
Why is peoples first reaction to buy it again
they're doing live site maintenance
Stupid
Alright look, dont judge me, i thought i messed up the first time so did it again
had to refund it once
People don't often think, unfortunately ๐ฆ
German reaction: Sue them before buying again
rip loading paypals status page
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
pretty sure the bot puts it on when it gets triggered
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...
it's to fight bot spam
yea I know...
If you remember the great bot spam of a couple days ago
we lost many men
is there a way to cancel the animation of food being eaten?
client side, I think
hmm
Is it possibly done through PlayerAnimationEvent?
Darn, nevermind. That event seems irrelevant.
yeah i guess there is just no way
you could cancel the eating thing and add the food bars manually
Unfortunately same goes with eating non-edible items ๐ฆ clientside too ๐ฆ
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.
@vale slate thats the problem i cancel the event but animation gets fired anyway
here again
How often does WorldSaveEvent get fired? (Or how often does spigot actually save the world?)
@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
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.
sadly not an option to catch packets
why?
probably clientside if no packets
^
its a simple plugin request,wich i don't think its worth ruining comp
oh ok
just gonna do what i can with it..
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
reading itemFood class
the problem is the animation gets fired anyway
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
its not a priority though..
Yeah likely not
is that just for blocks?
nope, you can for items too
animation goes anyway
hmm
oh... then I am out of ideas ๐ฆ
Because it is fired at the very beginning before the event, I just can't find this stupid class
yeah its done either way
slowly trying to solve the hole bukkit plugin request page ๐
wait
yeah this is why
well ehh
maybe not
guess thats just for main hand
@vernal spruce is it possible to freeze a player?
also seems is only calling left click?
server-sided
you can hack a way to do that..
but is that a viable way?
you tell me, let me know if it is
reload confirm
is it possible to freeze a player?
i asked if it was possible
it wasnt a declaration
the answer is yes
One question: How can you mess around with bounding boxes, that an Armorstand "sinks" in the ground?
The answer might be yes but is it achieveable through api?
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
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..
not worked with it myself but perhaps? ยฏ_(ใ)_/ยฏ
@dusty topaz nope
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
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
anyways, thank you for your time
well not pretty but setting the item to null then setting it back on stops the animation
What is the Problem?
how can text sound better
But in https://www.spigotmc.org/wiki/bungeecord-installation/#installing-bungeecord-on-linux is a extra dot
Okay
@digital sphinx It's probably giving the IP at the end of a sentence.
Yeah it is, the guide makes that a lil confusing tbf
for people that have never worked with IPs before ^
Okay i need to remove the dot also in the Spigot servers?
IP formatting should always be: 127.0.0.1:25565 (obviously change to the IPs you need
IP addresses should never have a trailing .
๐
Okay Thx
worth noting the format is ipv4:port
Should i change the localhost to 127.0.0.1 ???
localhost is okay
localhost usually resolves to 127.0.0.1
is it possible to have buildtools recompile spigot-server and craftbukkit?
But no error
the log is not showing any crash
[00:50:03] [Server thread/WARN]: **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
What is this?
that's when you set it to offline mode for bungee ^
tbf in this log, it doesn't even show that the server has shut down
try looking in the crash reports folder?
@inland meteor no one
good ol systemd
Yes
do you have a third or
But
what is (detached) state?
detached is when you leave a screen ^
I dont can login also in Bungeecord
So is lobby not online Adrian?
@inland meteor Its not in Online mode
Log of lobby
why cant you join bungee? I dont get it
if its in offline mode wouldnt u only be able to connect locally?
But i also can join direcktly on the lobby Server
nah thats not what that means
fair
can you show me your bungeecord config.yml
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:
- lobby
- 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
careful not to post anything sensative
Right.
what does it say
groups:
md_5:
- admin
unrelated, does this give md_5 access or?
ok
have you got a firewall that's blocking the port?
is it possible ur not using the correct IP
have you got a firewall that's blocking the port?
@inland meteor What are you mean?
Before 2 House i can join the game
what linux distro
is the bungee server currently running...
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)
you dont
is this for a premium resource @languid pewter
the api doesnt allow you to do that
@inland meteor yes
anyway I want opinions
@inland meteor that doesnt work anymore, I think that break the rules
dont worry, its ok
I'll check that
(dont comment, just upvote)
oki
and you're going to the ip:25577 right
@inland meteor I think so if you watch/look my screenshot
are u sure that URI points to ur service IP
Yes of curse i have other Minecraft Servers on the Same Servers.
What should i do now?
Hello? Afk? 5 Minutes are past XD
@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
Okay, but why https://www.spigotmc.org/wiki/bungeecord-installation/#installing-bungeecord-on-linux is wrong? ๐ฆ
where is it wrong
It says BungeeCord and servers ont the same machine
and not servers on the same machine
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 ๐
bungee config.yml = Server.properties. Or not?
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
[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
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
and set "bungeecord: true" in spigot.yml
@flint venture Yes
to a paste site
everything looks ok
Uff
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
Any logs is bungee Adrian? Or any errors before they leave?
No log folder in bungee
Also Adrian, are you connect with a forge client?
@flint venture No
Vannila
1.15.2
spigot is 1.15.2 as well
@flint venture yes
as plugins?
@flint venture I never download a Plugin
Are you able to get in at all?
@flint venture How do you mean?
I joined on Bungee.
It connectet me to lobby
and after 1 Minute
It maked the error
and lobby crashed
Its from my Developer
ok
i restartet now bungee
and lobby(withoutplugin)
It take verylong
Yes
time overload in english or so
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
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?
no shouldn't be
so you're just using the spigot.jar now
not the minecraft_server.jar
what args are you using
how to do?
screen -s Lobby java -Xmx4G -Xms4G -jar spigot-1.15.2-R0.1-SNAPSHOT.jar```
that's 4GB of ram
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
server already running
eyy
type screen -R
to list all active screens
tbh I make the screens first and run my script inside of them as im lazy
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
But its in cd /Java/Bungeecord/Lobby
yeh well ii dont know that so i just put a random cd dir
anyway im going now, good luck with your server
can you send the contents of
<dependencies>
in text
<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>
change from <artifactId>craftbukkit</artifactId> to <artifactId>bukkit</artifactId>
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 -->
I need craftbukkit though or nms won't work
Make sure to keep provided scope as well
i'm having trouble loading files in my BlockPopulator. What is the basis for the path I should use?
Your class names should be CamelCase.
The file has to be in the resources folder
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
JavaPlugin.class would try and get a bukkit resource
You just want YourPlugin.getResource
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
https://gyazo.com/c9c4b55b817ac5e116ce26fbf7931444 i keep getting this error when i try connect to another server after i join the bungeecord
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?
One logs prefixed with your plugin, use it so people know where messages are coming from
Is there anyway to configure the server/use plugins to make it so that chunks with only afk players in them are "frozen"
how do i change 1.15.2 to 1.14.4 ?
You have to reset your server
how do you add mods in spigot server, like applied energistics2 or others?
what do you mean reset ? i haven't done anything yet
Well just use the older version then
@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.
thanks @fleet crane
can Player#kickPlayer be called async?
(as a rare case, wont be common)
wait
i googled it
thats fine
i mean
I thought you weren't supposed to access any part of the Bukkit API asynchronously
@wanton delta
youre no
some things can be accessed
most can not
i didnt know if that was a special use case
Which things can be used?
do you mean the AsyncPlayerChatEvent
no
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?
Okay so playerItemBreakEvent doesnโt respond to armor breaking? Any solutions? An event to armor being broken that is?
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
wdym reenter command line
the uhh "gui" that runs in the terminal showing updates from the server and allows you to make admin commands
i have a question
1.15 servers has chunk load (actually tps) problems
why spigot prefers 1.15 and dont support legacy versions?
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?
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
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
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.
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?
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
Could someone help me with my skript dm me
I'm speaking specifically outside of a crash
like if Spigot is still running fine but I lost access to the command line gui
how would that happen? if you run it in screen then you can always reattach (as long as you don't /restart your server)
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
If i want to create a secure minecraft server, should I only have port 25565 and port 22 open?
open only the ports you need, and use pubkey for SSH
what's the utility for port 22? I thought 25565 was the only one needed open
hmm ok, should i host my website on the same server as my minecraft server?
Are you using a proxy for your server?
im planning on using a service called tcpshield
no, i mean like Bungee/Waterfall
ah, as of right now no
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.
Dfesk why would he have to hold off on the website bc he doesnโt have a proxy?
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.
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
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
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!
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
oh, another thing for your site, use Cloudflare: https://www.cloudflare.com/
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
Yeah there is alot of resources on these websites, ill take a look. Thanks!
no problem!
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
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
yes?
...
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]
Issue is line 66
yeah
of clickInventory in class TrollMenu.
thats the line i say it has
What is the line?
Can you give us the line
that line executes the player on fire
You likely have a variable that is NULL.
I need the code line.
not your explaination
targetplayer = null
since when i put /troll on the player
targetplayer is NULL.
well do you check if the player is online
like target == null
meaning they aren't online
before running it?
๐โโ๏ธ
already done it
๐
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"));
:giga:
Why do you have targetplayer.getPlayerListName()
that should say p.getPlayerListName()
as it's a method
and u don't use it
Using an InputStream will not work. I need the resource as a File in order to pass to WorldEdit's API
@knotty karma can you provide more detail?
/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
if (args.length == 0) {
// input name;
return true;
}
Player targetPlayer = Bukkit.getPlayer(args[0]);
if (targetPlayer == null) {
return; // Player isn't online.
}
troll(targetPlayer);
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
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.
how would I go about that? (sorry, i'm relatively new to Java, mostly work in JS)
dependency injection basically means
its not null since the item sets to play name
in the constructor for the class, add the dependency to the arguments for that classes constructor
ohh, so add my plugin's Main class as a dependency
yes
okay, and then I can call methods inside Main from within that class?
yea
ye
i made it work
results i had to define the targetplayer again inside the click event
of the inventory
@knotty karma what do you think about java vs js
thanks @cloud sparrow and @restive lava
you use node?
ping?
i mostly use node. I like Java a lot, but there are a few things that i do not like lol
sorry ๐ฆ
np @fiery jasper
its so simple in JS
I mostly use java and I've used node before to make a rest api
nice
ah
its cool using node and the wealth of packages
i use Electron quite a bit.
i used express
nice. Have you heard of Ionic?
I also one time used React for my front end, built the static files
and then used Tomcat as the backend
nice
it felt weird
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
what is it
wym? what's electron or what's Ionic?
is it a react library?
it's a node package. You can use React or Angular to build your app tho.
i mena
mean
how does react interact with it
why would u even want to use react with this
it looks like a replacement
well, when you start a project, you choose either React or Angular as a base for it.
so it integrates with React/angular
ah
Ionic is simply what allows it to run cross-platform
but can u not just use this with regular js?
it has been a while, i last used it several months ago lol, but I believe you have to choose either react or angular
Do you even understand what you're doing with that code..?
yes. this is simply something i'm using to test the pasting of schematics
this i not what i intend to actually use
Dependency injection is as simple as passing things through the constructor
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
Ikr ๐
i need to call methods in the Main class (getDataFolder, and eventually config file stuff)
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?
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
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?
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.
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
np
@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
i tried a static method. you can't manipulate the config or get the data folder in a static method.
yes you can
public static File getSchem(String name) {
return new File(getDataFolder() + "/scm/" + name);
}
this errors. is there a different way to go about it?
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
public static File getSchem(String name) {
return new File(getDataFolder(), "/scm/" + name);
}```
I hope you see my change
oh yeah, that too. sorry, that was sth i quickly typed up, that method was deleted long ago lol
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 ๐
yep, thanks for your help!
hay question if i make a Spigot server and get the plugins i want to run the user just need the Spigot client right?
okay im use to bukkit from back in the day ๐
Even bukkit didn't have a custom client either
so what the hell am in thinking of lol
probably thinking of back in the day of having to install optifine into the MC client to sometimes be playable decently
maybe Forge?
or forge
this was when MC was in beta way before MC was xsoft
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
okay thanks guys happy building
Maybe you are thinking of spoutcraft
okay thanks again ๐
np, have fun with your server ๐
ya just a friends only type of thing nothing to big
@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
Frostaff's method worked fine for me
I followed this tutorial for custom config files but when i copy paste it it underlines:
} catch (IOException | InvalidConfigurationException e) {
e.printStackTrace();
}
how? https://www.spigotmc.org/wiki/config-files/#using-custom-configurations
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
I believe I do... Basically it creates a separate instance of the Main class, correct?
no it doesn't create a separate instance, it passes the references via the constructor
there is only ever 1 instance of your plugin
example, when someone writes your name in the book
it doesn't create a copy of yourself does he?
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.
note that the constructor is a special method
its name is the same as the class name
and it must be public
and it must be public
no
and you could have different kinds of constructors with different arguments
well
protected
at least
or no modifier
not private
?
you can make private constructors
lol
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
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 ?
you can make singletons with DI
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
the point of singleton is to get a reference using static method
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
I mean
if you DI in one singleton instance
doesn't matter how many of them you create after that
ah right
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
tbf classes like ConfigManagers can be used with static methods only
without ever creating an instance of them
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
@novel phoenix what about if you use the default config from JavaPlugin
not speaking on Bukkit plugin behalf
default config from JavaPlugin can be obtained either using Bukkit static method or getting a reference from your plugin
just saying that if you ever need a singleton you better think about how to implement it the other way
yeah i mean you should know both
and if there is no simple way around this you should still use DI otherwise good luck writing tests for that shit
bukkit does fine with their tests ๐
yea I've seen enough singleton implementation of DB for example
without using proper abstractions
P A I N
Bukkit/craftbukkit both do unit tests in case you didn't know lol
well craftbukkit does, don't think bukkit does
why my server close whe it is starting
did you accept the eula in the config?
yes
what does your startup script look like?
it writes Stopping server without any reason
and do you have any errors in the logs?