#help-archived
1 messages · Page 202 of 1
I assume by hibernate you mean turn off, otherwise it's near pointless.
@odd knoll
Yes. Turn off and then on again when someone joins the server..
Yh, a plugin can't do that. You'll need something higher up.
i see
Hi So im having an issue When i try to join my friends survival server It gives me the error message "If u want to use IP forwarding please allow them in config settings" something like that and i dont know how to fix that anyone know whats happening?
have you looked at this thread? https://www.spigotmc.org/threads/if-you-wish-to-use-ip-forwarding-please-enable-it-in-your-bungeecord-config-as-well.220124/
@frigid ember best way to accomplish what you want is to have a plugin that interacts with a VM like virtualbox to turn a VM on or off as needed
I am not aware of any public plugins existing that does this
but it is doable
could the jvm be put to sleep on the OS?
@frigid ember are you trying to save CPU cycles or memory?
i’ve looked at the thread but i don’t know how to do what they’ve said on my windows 10 pc
perhaps a bungeecord plugin that if no connections puts the JVM process for the server to sleep, and wakes if there is a connection?
?
So you need to set up some stuff on your server and bungeecord
in spigot.yml there is a setting called bungeecord
how do i access spigot.yml?
it's in your servers folder
also in the bungeecord server folder there is a config.yml
its on your friends server
his bungeecord should also be setup with ip_forward: true
ok i’ll tell him that but i doubt he knows what that means
also i’m the only one on the server who is experiencing the problem btw
are you directly connecting to a Server in Offline mode or a to his Bungeecord instance?
Typically the bungeecord proxy is setup to connect to a server internally in offline mode, and authentication happens between the client and the proxy (online mode).
So, he's just running a server, maybe he has it in offline mode.
i don’t know what that means lmfao
but then wouldn’t everyone else have the same problem then?
Well, should ask him then. It's not your fault, it's his configuration.
because i’m the only one who has this problem
Maybe they are all using offline hacked clients
well, if he is not using bungeecord or any proxy (waterfall, etc.), then probably should set bungeecord: false in his spigot.yml.
ok i’ll tell him that but are u 100% sure it’s nothing with my set up?
because i’m still stuck on how this is only affecting me
Maybe someone else here has an idea?
^
Also, I'm not sure but that message might be bungeecord message. I'll have to check.
ok lmk thanks btw
sure, just trying to be helpful
@inland oxide technically you could, but you would need to modify the server code to handle it however and not some plugin since you have to modify the tick loop to handle being put to sleep arbitrarily and being woken up again arbitrarily.
generally easier to just use VM's for this and have a plugin that interfaces with the VM's API
does anyone here know why sometimes the Reflections API does not work?
hey guys, I am creating a book from my plugin using Spigot method (BaseComponent[])
but the book I get shows Invalid Book Tag
even the simple code would still give me that
@bronze acorn reflection while amazing what it can do, can't do everything. Its not a magical thing in the toolbox to do anything you possibly want 😛
more context, i have an abstract class in the package for commands, and it's only commands in that package. sometimes reflections decides to pick it up sometimes it doesnt
but the problem is it works sometimes
sometimes it just doesnt want to
bookMeta.spigot().addPage(base);
bookMeta.setTitle("YO");
book.setItemMeta(bookMeta);```
need to create the book itemstack first before messing with the metadata
ofc I created a book ItemStack
ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
BookMeta bookMeta = (BookMeta) book.getItemMeta();
i have that
and sometimes it wants to work
sometimes it doesnt
im 10% sure it's because of redis..
i lied it wasnt because of that code
@nova badge your problem is this line
book.setItemMeta(bookMeta);
you are resetting the metadata back to what it was before you set it
?
No?
I already modified bookMeta
He’s getting it, modifying it, and setting it
oh and not to mention, I tried to use the same code but with WRITABLE_BOOK instead of WRITTEN_BOOK
and it worked just fine
@keen compass I was thinking more for minimizing resource use for servers not in use. I might try it anyway for my servers other than a hub server. That way it can happen post connect to the bungeecord server, and startup only if a player tries to connect to another server that is offline.
but one year ago, I tried to do something like this using WRITTEN_BOOK with same method and it worked fine
I think you are using an older API version @nova badge ?
Still would take a while for the portal to transfer if the server has to startup
@keen compass 1.16.1
probably should check was is being applied then
add some debug to spit out the metadata
somewhere either the metadata is being reset
or the reference object isn't the same when you are setting it
well the thing is it's working with WRITABLE_BOOK
by just modifying the Material of ItemStack
while the rest of the code is untouched
ah, right
you need to specify that it is writable book and not some generic book item
depends on your reflection code @bronze acorn
ordering of commands in the list is not guaranteed
like i said it worked at different points but i havent touched that class it just stopped working
@bronze acorn well I do know that in more recent builds it was going to be changed in how reflection could interact with commands to prevent some abuse with it
and they do extend the right thng
this is in 1.8 spigot
do u mean reflections builds?
which java version?
it's never had this problem before it works fine everywhere else
8
i believe..
i'll check something really quickly
if you use Java 12+ reflection was changed btw
ah
it is the java version i believe, i added it to another server and it works fine
in Java 11 the methods that were going to be changed for reflection are deprecated but still usable
that's weird
the two servers i just tested on
they both use the same
uh
java version
would using another plugin with reflections affect it, probably?
IT IS
😮
yes
downside of using reflection is that it is universal
that is, no matter which plugin, they all interact the same and therefore can interfere with each other
Reflection isn't the same as objects existing in multiple plugins
you are literally changing the variables in memory, which affects everything. So Reflection is an all or nothing type of thing
hi, in multiverse worlds (not in the world named "world") i cant hi any entities
any1 could help plz
and use it in multiple plugins?
yes
any idea how to do it, because reflections doesn't let you choose a package after you initialize it
you're supposed to do it in the uh
how do i say this
this.reflections = new Reflections();
in those parentheses
it isn't about the Reflections object
oh
but rather the changes being made
i don't know a way around it 😭
for instance, the spigot.yml file exists for the server, but if multiple plugins attempt to modify it what do you think happens?
You could always check if it has been modified later on
however, if you have multiple plugins fighting for these changes, then you need to some how interact with that plugin so your plugin can co-exist
or forcefully change those values to what you need to do your thing and then change them back when you are done
or just completely don't care about other plugins and just forcefully keep the settings the way you want XD
any thoughts?
um.
funny how the kittens always go for the aswd keys
went and got some food so they must have jumped on the keyboard XD
It's wasd you swine
hey help
why do I not get a console window pop up when I launch a bukkit server? (I'm on a mac)
HELP
Are you using the nogui argument in your command
How are you launching the server
I just double-click the jar file
So in your mac terminal type java -jar -Xmx1G -Xms1G server.jar
You need to make sure you're in the same directory as where the server is actually located though
I think xmx is for total memory allocated and xms is startup memory
You'll probably want to change those numbers based on your plugins, player count, etc
1G means 1 gigabyte
?
If your server has a lot of players and needs more ram, then you need to allocate more ram or else it will probably crash or lag
Windows
ok
This command should work anywhere though
Nice
If you want extra performance you can also look at Aikar's startup flags just search it up on the internet
ok thx
Does anyone know of a plugin that can intercept and remove prefixes from other plugins? Some of the ones I'm using have non-configurable [ALLCAPS] prefix for every message the player gets, and it's really jarring on my rpg server since most of my plugin messages are configured to be immersion friendly. There are a TON of chat plugins, and searching for this function isn't doing me much good since they all have permissions prefix stuff.
Are you sure it can't be configured? What plugin is it?
Also I don't know of any chat interception plugins but I don't think they are a good idea
how would I go from BaseComponent[] to IChatBaseComponent?
not entirely related to spigot, but what would be the best way to communicate between a spigot server and a bungee server?
I'm going to be sending game status data, mutes & bans, and player data between then and will have back and forth communication
I don't want to use the channels built into bungee because it requires a player to be online, and I don't want to use sockets because I am not implementing SSL on my own.
(reposted from earlier, since nobody answered me at the time)
or even legacy text to IChatBaseComponent?
serialise to json, then deserialise using the NMS stuff
@pearl vector redis?
how would I use redis for this?
have no clue
oof
but you are asking for a communication method outside of both
not using the built in, and you are probably using unstructured data
I'm looking for a library I can use for it
so closest idea is redis
how are you going to send?
that's what I'm asking
@open ibex honestly I don't remember which ones they were, my server is currently in lite mode to do a render so I can't just enable them all and start spamming commands. I just know that I actively looked in their configs and didn't find any sort of prefix option.
I have no clue how I should do it, since I've never done networking before
its not like there is a common message broker
that's why I'm looking for an external library
are you going to open a pipe or socket?
I don't want to use sockets, because that's too low level
suppose you could use a tcp/ip socket in java
I'm hoping there's some library that already does all this stuff for me
I'm trying to keep my code clean
I think a plugin on bungee communicating data to a redis instance might be worth looking into
implementing a direct p2p protocol might be harder
at the end of the day, if you don't wanna go full DIY, use existing solutions such as redis, rabbitmq, etc; There are java libs for all of them
might be, but having a whole seperate server for that would be annoying
if you want event messaging, maybe rabbitmq
You're gonna need some form of way to coordinate data around
there is no simple solution.
The only way to do that reliably is to have a system which is literally designed to garauntee that
I'm planning to have 1-2 hub worlds, 1-3 game worlds and the bungee server, so not that much
unless you're able to garauntee that all your stuff is on a closed network where you can abuse network broadcasting...
that's why I want to look for a ready made solution
@trail hare Can you send a list of all your plugins, so I could try to find the one that's doing it?
for what you're asking, a proper message broker is gonna be your best option, bar implementing your own networking crud, etc, etc
if you want pub/sub then yeh, rabbitmq, or maybe look into vert.x
It's as cheap as you want, essentially
if you're just using it for a few servers, it's not gonna be shoving resources around like crazy
mostly setup for the server, since I want to configure some stuff before world gen
at the end of the day, if there was a holy grail solution for being abe to pass data around large networks, etc, without requiring dedicated things to co-ordinate that reliabily in some fashion, rabbit, etc, would be ded
I'm not looking for anything for a large network, just something to support a few servers
i mean if it's simple data, not events or such, could just use a database bridge
the problems which apply to large scale setups also apply to smaller ones
fair
these guys have done years of research and work into solving the very issue you're tryna solve
well, polling vs looking up in a database are different concepts
so if just needing to check ban users from a list or display them, a database query is fine
I think using a database bridge would work for some of it like syncing stats, but for other stuff like initialization conditions, I don't think it's the right thing
just depends if you need a screwdriver or a jack hammer
I just want the thing in between
people do do messaging with mysql, just basically have some table where they shove events
that feels really janky and like a bad solution
well, the problem with the thing inbetween is there is a lot of overhead for the messaging
if you can rethink your needs to fit the feasible solutions, might be useful
I'm just not sure which solution I need, since I haven't spent time looking at them
just trying to guage my options
I was originally looking at netty, since a few forum threads mention that
look at what it will take to implement them as well
I'd run over them, i stand that a message broker is gonna be the best option for messaging across a network
netty just provides the network tooling
but then every single netty tutorial went from 0 to 100 real quick
you'd need to do all the actual "ensuring that data gets thrown around how you want it" yourself, basically
at that point, you're likely gonna end up with one instance being the thing which actually throws the data around, unless you go crazy with tryna get stuff like some form of P2P going, which is where over-engineering goes for this type of stuff
I'm going to let the bungee server manage the other servers, so they will communicate between eachother through the bungee server
@open ibex I'll just note it next time the server is in full mode. I'm running over 50 plugins.
Thanks 😄
well, I'm going to go to sleep now since it's 12 am for me. Hopefully I'll do something with this information tomorrow instead of procrastinating like today
just curious, why do you say that bungee can't do a channel without a player?
I've seen it in docs and a few forum threads
apparently it uses the players for communication channels or some shit
I don't see anything in the PluginMessageEvent that is a player, maybe that's different
a plugin message might be different than a plugin channel message, not sure
It uses the players connection and takes advantage of vanillas plugin message stuff
I see the stuff on BungeeCord plugin channel, but there is a method in BungeeCordAPI for PluginMessageEvent, wondering if that can just be used to send data between servers
would have to handle on the server side by sending/receiving plugin message packet
probably.
or maybe it's just an event that's called when the plugin message is sent
yeh, probably that
it is that; there is no way to send arbitary data to a server from bungee as is
plugin message
I teleport all players out of the world before calling it but nothing happens
but that packet doesn't have to do anything with a player
you need to click save and then copy the link
but if there are no players on the server, well it's useless, right?
oshit I forgot to click save lmfao
You need a player to have a connection where you can stuff plugin messages between
I can't find mention of it in the docs, but I swear I saw it somewhere in them
That's why plugin messages can't be used for servers with no players, as there is no player connection available to shove data down
well you need to have a player to have anything really unless you are hacking the server to add another network protocol.
delete won't delete a folder
I want to configure some stuff preworld generation, so I can add populators
waitwhat
Well, a non-empty folder
preworld gen as in on STARTUP?
pretty much
I'd have spawn chunks diasbled, so there'd be a wider range to send the data
so, a plugin running on startup to get some info from outside to determine how to add populators?
but its not like bungeecord is going to tell it to start up
so its just reading the info right?
yes
so have the plugin read from a database or json file
create that file in bungeecord
I'm probably going to either have it already running and just start a new world, or do something jank and have bungeecord call an external program that runs a bash script
the bungeecord instand ance server instances might be on different hosts
I'm unsure as to if they will be the same host or not
then database
data like that seems a bit too short term to store in a database
but the spigot plugin runs at STARTUP, looks for the file, if found, uses the populators
or whatever data to regen the world
and the bungeecord could have all the commands to set the populators for specific servers when you start them up next
are you copying game servers manually or something?
could just make it shove some json file somewhere or something if you are
the game servers might have different configs on start up, which can be configured by the user
well, could make a json rest interface served by the bungeecord plugin that the spigot plugin looks at on STARUP
though, I also want to pass other data back and forth like staff chat messages, anti cheat messages, etc.
I really feel like a json rest interface doesn't suit this
well, could do the message broker thingy
I really wouldn't build stuff around the plugin message stuff if you're ever intending to scale up
You're basically against every easy solution, and don't wanna build your own solution that would basically run up to the same thing
anyway back to my question
using a proper message broker is gonna be the easy way to throw messages around reliably
but I'll look at redis and rabbitmq, since those seem like the best option
especially if you ever intend to scale past a single proxy instance
redis is just a database memory store pretty much
they have pubsub
I'm going to go to bed before I collapse and d i e
I'll look at all this tomorrow
anways, thanks for the help
night
o/
What are the differences between BaseComponent and IChatBaseComponent?
https://paste.md-5.net/tadonupija.java
It never unloads the overworld
I'm trying to use the nms methods to output to the ActionBar in 1.8.8.
You won't be able to do it at runtime
Before i was just converting from string, but after all these chat changes would like to go from legacy text to it
could do it in startup before vanilla loads the worlds
nah this would be running while the server is up. I want players to play on a fresh map every time without having to restart the server
man can anyone tell met the files i need to upload in a ftp to make a minecraft server and what else i need to do
You can though, can't you? Multiverse does it
not the main world.
in fact, you have to set the world to some other default world, then reboot then you can
that... complicates things a bit.
with MV that is
you'd need to unload every chunk, ensure that're no longer in the cache, and delete the existing region files
that's basically the only "real" way you'd manage to do it
man can anyone tell met the files i need to upload in a ftp to make a minecraft server and what else i need to do
build it local
easier options just gonna be to accept the limitation and create a new world to deal with that in
I'll probably just have a second world and on respawn it'll shove players into there rather than the main world
@frigid ember use BuildTools, make the spigot-1.16.1.jar and upload it with your sftp client
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
kay thnx @inland oxide
whe you get it up to the host, run it, update the eula file to yes
run again and setup your configs
can i upload it in any web creator like 000webhost
not sure, depends on your host. most have a web based upload capability, some have sftp credentials that you can use to connect with an sftp client.
I use FileZilla
good luck
so i just upload the folder and it starts working @inland oxide
Ok, so legacy text with color codes to IChatBaseComponent, how to?
There's a fromLegacyText method somewhere in the Spigot components
TextComponent.fromLegacyText I think
thats in the TextComponent as part of the bungeecord chat api
Yes
How do I set where portals lead?
So like let's say I have a world called "placeholder"
If I make a world called "placeholder_nether", would players automatically go there, or would I have to somehow manage to intercept the enter portal event and make them go to my new nether?
this is for 1.8.8, so...
Yeh, so, I'm using the nms methods to set the actionbar, and needs IChatBaseComponent.
it's ok thanks Pepper for trying
Is there actually a portal event?
yeah
wow, so busy with other thing, would assume you then you have getter/setter methods for the world
@wise flame PlayerPortalEvent#setTo(Location)
Would that override vanilla nether portal placement?
Because I want portals to link and work properly
actually
isn't it just going to create another portal at that new location?
if you dont disable it yes...
worst case scenario I'll use the default nether and default end
but use a secondary overworld
i mean, it would change where the player is sent to, but does it actually create a portal there, what if the portal is in the main world?
if you dont disable it yes...
seems sketchy
Ill test it out...
my guess is that there will still be a portal created in the nether dimension
fuck wait. I just realized that the portals will probably try to link with the overworld's portals
all you are doing is changing where the player is teleported to
and ignore my special world
since it's just inherited from player move event
I really, REALLY want to avoid using NMS
not because it'd be difficult, but because I want this to work in other versions
Looks like it teleports you to another location in the world but does not create a portal when the target location is in the overworld.
wait so target location
OH
WAIT
I don't need to use NMS at all
wait am I able to set the location?
weird. I was looking at the javadocs and didn't see it lol
You cant actually set the target location in the create event but the teleport event
Does CraftChatMessage exist in that version, kludge? There are a few util methods in there for that
(failing that https://github.com/TheLuca98/TextAPI/blob/master/src/main/java/io/github/theluca98/textapi/ActionBar.java#L93 )
Yeh, i think i just iterate on the BaseComponents and convert to json with toString, then feed that concatenated into the ChatSerializer
But now I'm wondering with the ChatAPI being on maven, can I build against it even for older Spigot versions?
or would I have to shade it in?
You'll have the older version of it available
so shading it wouldn't make sense
the Chat API from 1.8.8 doesn't even seem to have a ComponentBuilder that can append BaseComponent
Shouldnt reflections like this be cached somehow? This looks bad if you want to #send() it every tick to every player... and at least needs JIT2 to kick in to be viable.
I have this error Cannot resolve symbol 'BukkitAdapter' can someone help?
WorldGuard api?
worldedit
Do you use maven?
yes
Can you see the package com.sk89q.worldedit
external libraries
hey err\
It also should get autocompletet
how do I setup a server network
Have you set up a single server before?
@sage summit You need to add worldedit via maven. You cant just throw a jar at a maven project. That wont work.
@strong lantern https://www.spigotmc.org/wiki/bungeecord/
Everything that you need to know
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
@sage summit https://worldedit.enginehub.org/en/latest/api/
here
thanks
Wait ill make it easy for you as this is a bit hard to understand if you didnt use maven dependencies before.
<repository>
<id>sk89q-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
<dependency>
<groupId>com.sk89q.worldguard</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>7.0.3</version>
<scope>provided</scope>
</dependency>
Did you read the site ive sent you?
it joins server together so you can join the other servers that are connect easily, i think
Its basically a proxy for you servers
@strong lantern Here thats basically what Bungeecord does.
You dont directly connect to the different servers but to the proxy. And the proxy handles the connections after that and decides to what server the player should be sent.
While Player is not quite the right declaration...
Do you see it in your external libraries? Also why 7.0.0?
you gave me ones for the worldguard plugin so i just googled maven worldedit thing
Oh boy😂
Feels good to not have to deal with that shit
how do i make a minecraft server in a FTP website
Slapping the jar inside wont give you access to the api...
i put the jar in and it works thats it @vernal spruce
It does for me somehow @grim halo
which jar build tools jar or server.jar
As intellij has a noice button in module setting "add jar or dependency
can you do this shit on 000webhost ??????
Nope
@sage summit it works for me... Make sure to remove the old flatfile jar
which is the best free service i should use for this
There isnt a free service for minecraft server,if you want something decent or at least working its paid
i think its working now?
And whats the point when you have no specs to run the server on
Yes and this way you dont need to download the jar every week when the plugin updates. Like Stellrow would need to. 😛
but is it possible
@grim halo usually apis dont change in months and when they do they add small new things rather than changing
this would make a pattern with these blocks right?
World world = BukkitAdapter.adapt(player.getLocation().getWorld()); // Get the WorldEdit world from the spigot world by using BukkitAdapter
CuboidRegion selection = new CuboidRegion(world, BlockVector3.at(0, 80, 0), BlockVector3.at(10, 80, 10)); // make a selection with two points
try (EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1)) { // get the edit session and use -1 for max blocks for no limit, this is a try with resources statement to ensure the edit session is closed after use
// use the edit session here ...
RandomPattern pat = new RandomPattern(); // Create the random pattern
//Make the various WorldEdit blockstates by using the BukkitAdapter from the spigot blockdata
BlockState stone = BukkitAdapter.adapt(Material.STONE.createBlockData());
BlockState diamond = BukkitAdapter.adapt(Material.DIAMOND_BLOCK.createBlockData());
BlockState gold = BukkitAdapter.adapt(Material.GOLD_BLOCK.createBlockData());
BlockState iron = BukkitAdapter.adapt(Material.IRON_BLOCK.createBlockData());
// add the states with the chance
pat.add(stone, 0.5);
pat.add(diamond, 0.1);
pat.add(gold, 0.2);
pat.add(iron, 0.2);
//Pass in the region and pattern to setblocks to
editSession.setBlocks(selection, pat);
} catch (MaxChangedBlocksException ex) {
ex.printStackTrace();
}
Holographicdisplays i think was changed once a year i think and nothing major needed to replace the jar
Still. I have a plugin that has 9 hooks to other plugins. If i would need to go on each of their sites and constantly check for updates i would go insane
Usually you dont as you only use X methods from the api and once made someone wont touch the already named methods
I personally wouldnt start changing shit on a api just to make the rest update
Or for example if you want to use the latest apache commons or google guava... there is simply no way to get them without a dependency manager.
Or if you have a huge plugin that is module based with more than one dev... make this with jar files and you will take 5 times as long
Dont we have apache in spigot?
i made a website with 000webhost containing all the files from minecraft server,jar now what should i do to make it functional
we have a small section of apache commons and a tiny bit of guava.
For example Cafeine is not in there. Holy i could not live without that.
You cant run a minecraft server on a webhost especially a free one @frigid ember
Or have you ever tried using MongoDB without a dependency manager? Not possible
Mysql for the king
then what should i use
A paid host there isnt a good "free host" for minecraft
man i have been said this many times "you cant get it free" and i have got it surely there is one way or other
yeah from a shitty free host
@sage summit btw the latest worldedit api is 7.2.0-SNAPSHOT
wich closes ur server after 30min of no players online
or limit you to garbage performance
wich makes it better to just play singleplayer
yes
ok
man i have been said this many times "you cant get it free" and i have got it surely there is one way or other|
Only true free hosting is home hosting. Which includes security risks that I am sure you don't want.
i went to the file manager of free server hosters for minecraft like minehut and it contained the same files from server.jar so why does it work for them and not for me
also i was getting an error at
World world = BukkitAdapter.adapt(player.getLocation().getWorld());
Required type: org.bukkit.World
Provided: com.sk89q.worldedit.world.World
uhh
im just not gonna bother i guess,gotta let someone else deal with that
hosting from your own pc isn't that bad
German?
most likely public
oh then yeah don't host from home if you can help it
@wise flame when i host on my pc it says server is incapable after running for a minute or two and shuts down
If you want to host from home you need to set up a network in a demilitarized zone. Dont just host on your PC and let random ppls join
also i was getting an error at
World world = BukkitAdapter.adapt(player.getLocation().getWorld());
Required type: org.bukkit.World
Provided: com.sk89q.worldedit.world.World
updating to latest so might be that idk
If you want to host from home you need to set up a network in a demilitarized zone. Dont just host on your PC and let random ppls join
@grim halo my friends hosting his server on his pc i think...
basically get a new isp contract for a new internet connection @grim halo
ask for the "premium plan" and whoala you pay the same as a host
Only true free hosting is home hosting. Which includes security risks that I am sure you don't want.
@pastel arrow man i dont care about the risk just tell how to do it
m8 that risk will get ur ass whooped by ur father
ask for the "premium plan" and whoala you pay the same as a host
$25 a month is far more then a host. lol
man i dont care about the risk just tell how to do it
Port forward and start the server
I get a dedicated root. i7 4770, 32Gb ram, 1TB SSD, 1000Gbit up/downlink. For exactly 25.50 a month.
No problem
yes ddr3 XD
good enough
They are industrial server that run out
also 1tb ssd
So you can grab them.
I home host. Just not for outside use lol
nice
@sage summit https://worldedit.enginehub.org/en/latest/api/
gotta love maven
also should i have the jar as a library?
dont think ill ever use it
Thats not on maven... If you know how it works its just great. You wont ever have the same productivity and possibilities with flat jar files.
true
It just needs time. I worked with it for 50% of my programming career and i partially still dont know what im doing...
i removed the jar and it says i can import the bukkitadapter thing
for what you need
now this happened
@sage summit Do you see worldedit in the external lib?
@tame bough You should never instantiate your JavaPlugin class. Spigot does it once for you.
one that just says worldedit?
Maven: all the we stuff
Maven: all the we stuff
@grim halo its there, i see it
Did you remove the "extends JavaPlugin" ?
yes
you need javaplugin part
Dude... you need that. You should just nit instantiate it
\
Then you should really try to learn a bit more java.
You have a class A
Then calling new A() is creating a new instance of A.class and therefor instantiating it
Would this be the cause?
gtg now ill ask for help tomorrow
Cause Im not doing that anywhere else
also whats with the
What is your main class called? (The one that extends JavaPlugin)
DonationTracker
do you anywhere call new DonationTracker()?
@grim halo
Holy shit i am an idiot
check
Yes i did
first command
No prob. Just use this as you are in an instance of DonationTracker already
surprise intellij doesnt recognise javaplugin as a singleton
and warn you for trying to make a new instance
Its a bit weird because Spigot has its own ClassLoader
But that would be a nice addition to the mcdev plugin to be honest
i guess we cant ask for everything
Its a simple code style recognition... dont create new instances of JavaPlugin. Maybe ill PR that if they are open to it.
big chance to get accepted
I hate gradle. Feels clunky to use.
Kotlin is fine but i did not write that much with it.
Is there a way to stop any further worldgen on a world? I need to fly around the edge of my world and fill in cave exits that would hit the border.
Gradle is the best
actually, I guess those would be empty air...
@trail hare Cant you just set the worldborder and then generate everything in there?
I'm trying to get access to the edge where the players would walk up against the border while inside a mine, and block it off with stone.
Now that I think of it, it's going to be a pain to get in there anyway, since I have the padding around it. I think I'll just use /descend to get in each of them and block them with a worldedit brush.
Is it normal that I always recieve 2 items from any give command?
I think it only happens on the server and not on singleplayer
using 1.16.1
@vernal spruce i got intellij now what to do please help me out and i got intellij ultimate
Maybe ehm don’t deny requests from your proxy
@frigid ember Maybe there is a plugin that also gives you items...
@frigid ember For what do you need intellij
I mean
You should never create a new instance of JavaPlugin what?
If it was a singleton you shouldn’t either
@grim halo someone suggested to host a server with intellij i have no idea how to do it or what was he talkin about
Intellij is a ide to write plugins. You cant host a server with it.
-forceUpgrade
Getting 0% for 30 mins
is this normal?
No thats not normal
You can make it run the server while developing, but ehm hosting the server with IJ seems counterintuitive
?g chunkt spigotmc
Chunky*
No thats not normal
guess im screwed
Are you coming from 1.15?
hello [09:00:57] [Server thread/INFO]: 316000 Entities loaded.19.956425365732425/20
[09:00:57] [Server thread/INFO]: 1580 chunks loaded. Ram Usage: 4594/5461
is this score good?
server crashed btw
on this level
String.valueOf
@frigid ember Send your timings.
@idle zodiac Yes but you should generally dont do that unless you really know what you are doing.
i do
so
basically i want to recreate a world
it's a skyblock plugin btw
the server crashes when i try and replace all non-air typees with air tho
so this is kinda my last resort
Do you try to replace every block at once?
But relative to the heartbeat. Do you replace the blocks at once.
ye
You can always just spread the workload between multiple ticks.
Also if you delete and re-create a world on runtime the server will most likely lag for several seconds
But if you rly want to delete a world -> unload it and remove the directory
ok
also is there a way to get like a confirmation in spigot?
so like
Are you sure you want to recreate your island? Run /is recreate again to confirm.
that kind of thing
?paste
declaration: package: org.bukkit.conversations, class: Conversation
I guess this @idle zodiac
help ****
in 1.8?
yes i'm using 1.8 dont bully me
@idle zodiac Yes you can basically do anything you want as long as you know how to write propper code.
Using 1.8 is equivalent to getting a big sign that reads "pls bully me"
lol
@hollow thorn Show the line 653 of your StaffWeaponUse class.
@grim halo fixed. i used a method from my old project that seemed to work so ye
@EventHandler
public void onOpen(PlayerInteractEvent event){
if(event.getClickedBlock().getType() == Material.CHEST){
event.getClickedBlock() can return null
Your IDE should mark this in yellow.
also is there a way to get like a confirmation in spigot?
so like
Are you sure you want to recreate your island? Run /is recreate again to confirm.
that kind of thing
HI, I'm having a couple of issues with setting up Maven with Spigot... So first of all I can't seem to have it build into my plugins folder, which means I have to restart my server all the time and replace the .jar file which is extremely time consuming, and second, my file sizes are extremely big (17,000KB+), which leads me to think it's including the spigot.jar inside of my plugin. How can I fix this?
ikr it's so fiddly
And I guess I should also ask the question: is it okay not to use Maven? I feel like it has given me nothing but problems
How do you mean? I've done inventory guis without Maven in the past
nah i mean with an addon
Ah right
@river cradle On you spigot dependency the scope should be provided
<scope>provided</scope>
there is a plugin called inventorygui and you need mvaven to do stuff with it
@river cradle On you spigot dependency the scope should be provided
<scope>provided</scope>
@grim halo Well, it is
Then it will not be shaded
Josse just make a script to copy it over
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tech.jossecottenier</groupId>
<artifactId>islandsurvivalgenerator</artifactId>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<!-- <outputDirectory>${user.home}\Saved Games\Spigot Server\plugins</outputDirectory> -->
</build>
</project>
Then tell ij to move it over after building
why do I get a feeling there's a better way to do this:
https://paste.md-5.net/egowiyoruf.java
Don’t use the constructor like that
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>../libs</outputDirectory>
</configuration>
</plugin>
...
</plugins>
</build>
@bold anchor I'm unsure what you mean by that, I'm using Eclipse by the way
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>../libs</outputDirectory>
</configuration>
</plugin>
...
</plugins>
</build>
@grim halo Oh, will this output to a different directory?
Yes there are several maven plugins that can do that but the simplest is the maven jar plugin. Just set the outputDirectory to your plugins folder.
Thank you, it's underlined yellow so I suppose this means I have to install it somewhere?
@wise flame You normally do not want any constructor in your JavaPlugin class
The bukkit api is not prepared for you to do a lot of stuff there
It wants you to enable your code in the method called onEnable or onLoad
ah, I see. So I shouldn't do any of that stuff until it calls onEnable
?paste
Makes sense
@river cradle I created a system variable so i can just use {spigot.16.plugins} and it would redirect to the folder.
There is however a super nice setup where you can run the minecraft server directly in Eclipse or Intellij.
Meaning you can build and then directly press start in your ide without needing to copy anything
@hollow thorn Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_16_R1.block.CraftBlock cannot be cast to org.bukkit.block.Chest
Yeah, I've got the outputting to the folder now, thanks!
You can't cast a craftblock to a chest
You can if the block is a chest
And wow, the file size is suddenly 4 kB, apparently the other problem got solved too along the way? Thank guys!
But in this case it isn’t
com.javaminecraft.StaffWeaponUse.onOpen(StaffWeaponUse.java:660) ~[?:?] - the StaffWeaponUse.java:660 is where you see a line number for the error
thats casting a blokc to chest
So should I declare my variables at the top of my JavaPlugin class then wait to actually assign values to them in onEnable?
after its checked that said block is a chest
Is there a way to do something asynchronously?
I'd rather not have the server freeze while I generate worlds
though if it can't be helped, it can't be helped
@hollow thorn "org.bukkit.craftbukkit.v1_16_R1.block.CraftBlock cannot be cast to org.bukkit.block.Chest"
Why are you using the craftbukkit block?
bukkit runtask async it is
keep in mind that
if im doing BlockBreakEvent, the name of the event is the block that was broken or the entity that broke it?
it doesn't lock the async task
so if your code takes longer
it's gonna get poped again
wdym "takes longer"
let's say
oh wait I think I might know what you're talking about
you scheldue a bukkit async task each second
if your code takes longer that 20 sec
it doesn't wait to complete
it executes the code again
wait 20 seconds?
which might cause you problems
Where does that number come from?
anyone has any idea about my problem?
yeah I'll figure out how to deal with executors
private ReentrantLock lock = new ReentrantLock();
rather, question actually
fam just use synchronized
run blocking code synch 👌
the goal is for the server to still be able to handle players doing stuff while it generates worlds
What version are you going to do this on
1.16.1
that statement sucks
I'm a little confused... does bungeecord work with Bukkit?
Yes
ok phew
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
"Table 's16892_vite.vite' doesn't exist"
The table you're trying to modify doesn't exist.
what's a decimal
better use a double imo
can you confirm that the table was actually created?
The error is saying it doesn't exist
@Override
public void run() {
loc.add(loc.getDirection());
if(loc.getBlock().getType() != Material.AIR) {
cancel();
LOG.info("le shoot");
}
for(Entity ent : getEntitiesByLocation(loc, 0.545f)) {
if(ent instanceof LivingEntity) {
((LivingEntity) ent).damage(10, me);
((LivingEntity) ent).setFireTicks(10);
}
}
}}.runTaskTimer(Bukkit.getServer().getPluginManager().getPlugin("StaffWeapon"), 0L, 1L);``` for some reason this only runs once
trying to get the item in a players hand, why is this not working? ItemStack item = (ItemStack) p.getItemInHand();
afaik
But can you check if it did?
Because the error says that the table doesn't exist
any1 about my problem?
oh I was wrong
i think it's wrong
you don't have a closing bracket 🤔
how do you not know if the sql is even giving errors
what SQL language are you using
how do you not know if the sql is even giving errors
@frigid ember that thing will not even work
Because there is sql exceptions that must be caught
second, the SQL statement won't work due to it not being correct. Doesn't matter which SQL you are using.
You should also have a “IF NOT EXISTS” statement in there.
while not needed, highly recommended however 😉
any1 can help with my problem?
?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.
let me guess says something along the along the lines you have an error in the sql syntax?
that’s because you have an error with your create table syntax and it was already pointed out. You’re missing the closing “)”
Hallo liebes Team wie und wo kann ich das Citizens Plugin doawnloaden? Für die 1.16.1
Hallo liebes Team wie und wo kann ich das Citizens Plugin doawnloaden?
@simple sorrel This discord is not german
Who is the german discord ?
there's no german discord lol?
https://www.spigotmc.org/resources/citizens.13811/
if you want citizens its here (i may not have understood)
For the Version 1.16
1?
@tranquil plaza
Would also recommend you use prepared statements as well. Generally safer especially since you don't know much about sql 😉
did they do citizens for 1.16?
@tranquil plaza it’s the same with java... when you open parentheses you have to close them.
yes 1.16 is marked as tested version
EverSQL will tune your SQL queries instantly and automatically. Analyze MySQL slow query log files, visualize slow logs and optimize the slow SQL queries.
Yed
cool they did
link I provided will verify your SQL syntax is correct
yes 1.16 is marked as tested Version what?
and will point out what is wrong with it if not
Why i must buy 10€ for the plugin this is scam ?
???wtf
its a big plugin, it costs money
do you have any idea how much work there is behind Citizens
I will it for free
because the author of the plugin decided that’s it’s worth it’s not a scam lol
citizens is a HUGE plugin
Citizens has been a premium resource on Spigot for >1 year now
Give a plugin for npcs for free ?
and it deserves to be so
Citizens is also free
trial isnt it
yeah but you don't get support
@bold anchor who?
you are not required to buy plugins @simple sorrel You do have the option of browsing the free plugins resources instead. But yes some plugins on spigotmc are premium and cost money to use to them.
Read the resources page lol
Read the resources page lol
@bold anchor no he just wants download link 🤦
They're using the spigot page as a donation page
Its fucking shit
.......................
Stop tagging me thx
I can bis plugins
@simple sorrel because people own them? what do you mean why?
its like selling your chair? You own it right? So you can sell it as well if you wanted correct?
Yes i have
@simple sorrel plugins are a lot of work, they cost money and they deserve it because citizens is a huge and very complex plugin. there is a free version. Just look for it
Citizens IS FREE
@sturdy oar who i see it not ?
While your english might be bad, and probably should have stated such, you can make use of google translate which might help make it more clear in what you are trying to say 😉
You can get citizens for free btw
^^
if only people could use links
You can get citizens for free btw
@grim halo van you give me the Link?
Should just read the page
just read pls
@dusky sigil sure, but at the moment there isn't better alternatives. And no it isn't perfect but the one thing it does consistently is help get peoples message across between languages.
@keen compass that much is true
@simple sorrel Read the page and then decide yourself
Lol
sorry to repeat a message but its way up there is im bringing it here | trying to get the item in a players hand, why is this not working?
ItemStack item = (ItemStack) p.getItemInHand();
why are you casting
Yeah
doesnt work without the itemstack too
@dusky sigil which version?
casting now is pointless
p.getItemInHand() is deprecated
If you're on 1.9+ use the p.getInventory().getItemInMainHand();
dont use deprecated methods
need to use getItemInMainHand() and getItemInOffHand()
What can*t the free Version?
He is probably casting to the nms version
It's the full version
Ticko gtfo
The method getItemInMainHand() is undefined for the type Player Main.java /Mining/src/net/FlashPlex/Mining line 27 Java Problem
The free version is the same as the premium one. Just read the page and then decide if you want to support them or not,
second thing, you don't need to cast
i already removed that
I told you to get the inventory Ronsiv
I for my part do not use Citizens because it is laggy trash. But i admire the work they put into it.
unfortunately even if that is the case, it happens the be the most popular NPC plugin that is relied on. Even a dependency for most plugins
i think its great even with some minor lag.
I've never had any lag issues with Citizens
Sure... but i dont use plugins from other devs unless its ProtocolLib
i did my nps without citizens 👌
I have seen cases where Citizens is responsible for some things 😛
i had a bit of lag, nothing major
also maybe a few crashes
...yeah its a bit of laggy trash
But, as the case for most popular plugins
they tend to cause issues from time to time XD
popular is not an indicator of quality
I can admire hard work
Citizens is far from what i would label as "well made"
I think a big problem from big plugins is that they want to support everything down to 1.7
Yeah wouldn't say it is well made, can just acknowledge that it has improved a bit. But still not quite there in the quality department
If you dont plan on having more than 25 ppl on your server and limit the amount of npcs to about the same count then its fine.
At least its easy to use
Well, while you are right you can have your own opinions, it isn't hard to look at the code to make the judgement in quality work. For some of these plugins, I happen to know them since their initial releases 😛
i guess their tracker sucks
7smile
should have seen Citizens long time ago, was way worse then it was now 😉
I imagine it was
"WorldInitEvent cannot be triggered asynchronously from another thread."
There goes my asynchronous world creation. yay.
I guess I'll accept the limitation
why is this not working?
package net.FlashPlex.Mining;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
public class Main extends JavaPlugin implements Listener {
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
}
@Override
public void onDisable() {
}
public void OnMine(BlockBreakEvent event) {
Player p = event.getPlayer();
ItemStack item = p.getInventory().getItemInMainHand();
if (item.getEnchantmentLevel(Enchantment.LOOT_BONUS_BLOCKS) != 0) {
p.sendMessage("Fortune pick");
}
else {
}
}
}```
?paste
?paste