#help-archived

1 messages · Page 202 of 1

inland oxide
#

if gamerule doDaylightCycle is false, do ticks still occur for crops?

frigid ember
#

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

odd knoll
#

Yh, a plugin can't do that. You'll need something higher up.

frigid ember
#

i see

jovial zenith
#

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?

keen compass
#

@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

inland oxide
#

could the jvm be put to sleep on the OS?

#

@frigid ember are you trying to save CPU cycles or memory?

jovial zenith
#

i’ve looked at the thread but i don’t know how to do what they’ve said on my windows 10 pc

inland oxide
#

perhaps a bungeecord plugin that if no connections puts the JVM process for the server to sleep, and wakes if there is a connection?

jovial zenith
#

?

inland oxide
#

So you need to set up some stuff on your server and bungeecord

#

in spigot.yml there is a setting called bungeecord

jovial zenith
#

how do i access spigot.yml?

inland oxide
#

it's in your servers folder

#

also in the bungeecord server folder there is a config.yml

jovial zenith
#

how do i access that lmao

#

sorry i’m really bad at this type stuff

inland oxide
#

its on your friends server

#

his bungeecord should also be setup with ip_forward: true

jovial zenith
#

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

inland oxide
#

Are you using a legit client?

#

in Online mode?

jovial zenith
#

i’m not using anything

#

regular minecraft version 1.16

inland oxide
#

are you directly connecting to a Server in Offline mode or a to his Bungeecord instance?

jovial zenith
#

i’m connecting to his online server

#

i don’t think it’s a bungee cord instance

inland oxide
#

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.

jovial zenith
#

i don’t know what that means lmfao

#

but then wouldn’t everyone else have the same problem then?

inland oxide
#

Well, should ask him then. It's not your fault, it's his configuration.

jovial zenith
#

because i’m the only one who has this problem

inland oxide
#

Maybe they are all using offline hacked clients

jovial zenith
#

they aren’t lol

#

theyere using regular 1.16

#

or optifine 1.16

inland oxide
#

well, if he is not using bungeecord or any proxy (waterfall, etc.), then probably should set bungeecord: false in his spigot.yml.

jovial zenith
#

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

inland oxide
#

Maybe someone else here has an idea?

jovial zenith
#

^

inland oxide
#

Also, I'm not sure but that message might be bungeecord message. I'll have to check.

jovial zenith
#

ok lmk thanks btw

inland oxide
#

sure, just trying to be helpful

keen compass
#

@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

bronze acorn
#

does anyone here know why sometimes the Reflections API does not work?

nova badge
#

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

keen compass
#

@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 😛

bronze acorn
#

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

nova badge
#
bookMeta.spigot().addPage(base);                        
bookMeta.setTitle("YO");
book.setItemMeta(bookMeta);```
keen compass
#

need to create the book itemstack first before messing with the metadata

nova badge
#

ofc I created a book ItemStack

#

ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
BookMeta bookMeta = (BookMeta) book.getItemMeta();

bronze acorn
#

i have that

#

wait is that too big

#

?paste

worldly heathBOT
bronze acorn
#

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

keen compass
#

@nova badge your problem is this line
book.setItemMeta(bookMeta);

#

you are resetting the metadata back to what it was before you set it

nova badge
#

?

lone fog
#

No?

nova badge
#

I already modified bookMeta

lone fog
#

He’s getting it, modifying it, and setting it

nova badge
#

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

inland oxide
#

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

nova badge
#

but one year ago, I tried to do something like this using WRITTEN_BOOK with same method and it worked fine

keen compass
#

I think you are using an older API version @nova badge ?

inland oxide
#

Still would take a while for the portal to transfer if the server has to startup

nova badge
#

@keen compass 1.16.1

keen compass
#

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

nova badge
#

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

keen compass
#

ah, right

#

you need to specify that it is writable book and not some generic book item

bronze acorn
#

could anyone help with my reflections issue xd

#

whenever ur done

keen compass
#

depends on your reflection code @bronze acorn

#

ordering of commands in the list is not guaranteed

bronze acorn
#

like i said it worked at different points but i havent touched that class it just stopped working

nova badge
#

okay I fixed the issue

#

apparently you must set the Author

#

of the Written Book

keen compass
#

@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

bronze acorn
#

and they do extend the right thng

#

this is in 1.8 spigot

#

do u mean reflections builds?

keen compass
#

no, builds of MC server

#

spigot that is

bronze acorn
#

oh yeah it's running 1.8

#

so is the jar

keen compass
#

which java version?

bronze acorn
#

it's never had this problem before it works fine everywhere else

#

8

#

i believe..

#

i'll check something really quickly

keen compass
#

if you use Java 12+ reflection was changed btw

bronze acorn
#

ah

#

it is the java version i believe, i added it to another server and it works fine

keen compass
#

in Java 11 the methods that were going to be changed for reflection are deprecated but still usable

bronze acorn
#

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

#

😮

keen compass
#

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

bronze acorn
#

o

#

so then how would i like

#

hm

#

how do i change this then

frigid ember
#

hi, in multiverse worlds (not in the world named "world") i cant hi any entities

bronze acorn
#

would i make like

#

one instance of reflections

frigid ember
#

any1 could help plz

bronze acorn
#

and use it in multiple plugins?

frigid ember
#

yes

bronze acorn
#

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

keen compass
#

it isn't about the Reflections object

bronze acorn
#

oh

keen compass
#

but rather the changes being made

bronze acorn
#

i don't know a way around it 😭

keen compass
#

for instance, the spigot.yml file exists for the server, but if multiple plugins attempt to modify it what do you think happens?

bronze acorn
#

o

#

so is there a way to like

#

drop reflections

#

after i use it?

keen compass
#

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

bronze acorn
#

o

#

i'm very confused lmaoo

#

i'm trying to figure out a workaround from this

frigid ember
#

any thoughts?

inland oxide
#

um.

keen compass
#

sorry

#

was the kittens

inland oxide
#

funny how the kittens always go for the aswd keys

keen compass
#

went and got some food so they must have jumped on the keyboard XD

wise flame
#

It's wasd you swine

strong lantern
#

hey help

#

why do I not get a console window pop up when I launch a bukkit server? (I'm on a mac)

#

HELP

open ibex
#

Are you using the nogui argument in your command

strong lantern
#

what?

#

idk

#

how do I edit the command?

open ibex
#

How are you launching the server

strong lantern
#

I just double-click the jar file

open ibex
#

Oh

#

You're supposed to use startup flags in the command

strong lantern
#

how?

#

I need help

#

pls

#

I'm on a mac just in case u don't know

open ibex
#

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

strong lantern
#

wait what does each argument mean?

#

Ik I'm a big nood

#

*noob

open ibex
#

I think xmx is for total memory allocated and xms is startup memory

strong lantern
#

sorry if this is rlly annoying to explain

#

oh

open ibex
#

You'll probably want to change those numbers based on your plugins, player count, etc

#

1G means 1 gigabyte

strong lantern
#

😕

#

???

open ibex
#

?

strong lantern
#

wait

#

what operating system are u using?

open ibex
#

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

strong lantern
#

ok

open ibex
#

This command should work anywhere though

strong lantern
#

oh

#

it works

#

ty

open ibex
#

Nice

#

If you want extra performance you can also look at Aikar's startup flags just search it up on the internet

strong lantern
#

ok thx

trail hare
#

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.

open ibex
#

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

inland oxide
#

how would I go from BaseComponent[] to IChatBaseComponent?

pearl vector
#

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)

inland oxide
#

or even legacy text to IChatBaseComponent?

chrome lark
#

serialise to json, then deserialise using the NMS stuff

inland oxide
#

@pearl vector redis?

pearl vector
#

how would I use redis for this?

inland oxide
#

have no clue

pearl vector
#

oof

inland oxide
#

but you are asking for a communication method outside of both

#

not using the built in, and you are probably using unstructured data

pearl vector
#

I'm looking for a library I can use for it

inland oxide
#

so closest idea is redis

pearl vector
#

I'm probably going to send JSON data

#

but I can use other formats

inland oxide
#

how are you going to send?

pearl vector
#

that's what I'm asking

trail hare
#

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

pearl vector
#

I have no clue how I should do it, since I've never done networking before

inland oxide
#

its not like there is a common message broker

pearl vector
#

that's why I'm looking for an external library

inland oxide
#

are you going to open a pipe or socket?

pearl vector
#

I don't want to use sockets, because that's too low level

inland oxide
#

suppose you could use a tcp/ip socket in java

pearl vector
#

I'm hoping there's some library that already does all this stuff for me

#

I'm trying to keep my code clean

inland oxide
#

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

chrome lark
#

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

pearl vector
#

might be, but having a whole seperate server for that would be annoying

inland oxide
#

if you want event messaging, maybe rabbitmq

chrome lark
#

You're gonna need some form of way to coordinate data around

inland oxide
#

there is no simple solution.

chrome lark
#

The only way to do that reliably is to have a system which is literally designed to garauntee that

pearl vector
#

I'm planning to have 1-2 hub worlds, 1-3 game worlds and the bungee server, so not that much

chrome lark
#

unless you're able to garauntee that all your stuff is on a closed network where you can abuse network broadcasting...

pearl vector
#

that's why I want to look for a ready made solution

open ibex
#

@trail hare Can you send a list of all your plugins, so I could try to find the one that's doing it?

chrome lark
#

for what you're asking, a proper message broker is gonna be your best option, bar implementing your own networking crud, etc, etc

pearl vector
#

that might be what I'm looking for

#

but also feels a tad overkill

inland oxide
#

if you want pub/sub then yeh, rabbitmq, or maybe look into vert.x

chrome lark
#

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

inland oxide
#

elegance is in the eye of the beholder

#

what kind of data when no users are online?

pearl vector
#

mostly setup for the server, since I want to configure some stuff before world gen

chrome lark
#

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

pearl vector
#

I'm not looking for anything for a large network, just something to support a few servers

inland oxide
#

i mean if it's simple data, not events or such, could just use a database bridge

chrome lark
#

the problems which apply to large scale setups also apply to smaller ones

pearl vector
#

fair

chrome lark
#

these guys have done years of research and work into solving the very issue you're tryna solve

inland oxide
#

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

pearl vector
#

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

inland oxide
#

just depends if you need a screwdriver or a jack hammer

pearl vector
#

I just want the thing in between

chrome lark
#

people do do messaging with mysql, just basically have some table where they shove events

pearl vector
#

that feels really janky and like a bad solution

inland oxide
#

well, the problem with the thing inbetween is there is a lot of overhead for the messaging

chrome lark
#

it is

#

which is why rabbit

inland oxide
#

if you can rethink your needs to fit the feasible solutions, might be useful

pearl vector
#

I'm just not sure which solution I need, since I haven't spent time looking at them

#

just trying to guage my options

inland oxide
#

^

#

theres a starting point

pearl vector
#

I was originally looking at netty, since a few forum threads mention that

inland oxide
#

look at what it will take to implement them as well

chrome lark
#

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

pearl vector
#

but then every single netty tutorial went from 0 to 100 real quick

chrome lark
#

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

pearl vector
#

I'm going to let the bungee server manage the other servers, so they will communicate between eachother through the bungee server

trail hare
#

@open ibex I'll just note it next time the server is in full mode. I'm running over 50 plugins.

open ibex
#

Alright

#

You can dm me it if you want

trail hare
#

Thanks 😄

pearl vector
#

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

inland oxide
#

just curious, why do you say that bungee can't do a channel without a player?

pearl vector
#

I've seen it in docs and a few forum threads

#

apparently it uses the players for communication channels or some shit

inland oxide
#

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

chrome lark
#

It uses the players connection and takes advantage of vanillas plugin message stuff

inland oxide
#

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

chrome lark
#

it is that; there is no way to send arbitary data to a server from bungee as is

inland oxide
#

plugin message

wise flame
#

I teleport all players out of the world before calling it but nothing happens

inland oxide
#

but that packet doesn't have to do anything with a player

chrome lark
#

you need to click save and then copy the link

inland oxide
#

but if there are no players on the server, well it's useless, right?

wise flame
#

oshit I forgot to click save lmfao

chrome lark
#

You need a player to have a connection where you can stuff plugin messages between

pearl vector
#

I can't find mention of it in the docs, but I swear I saw it somewhere in them

wise flame
chrome lark
#

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

inland oxide
#

well you need to have a player to have anything really unless you are hacking the server to add another network protocol.

chrome lark
#

delete won't delete a folder

pearl vector
#

I want to configure some stuff preworld generation, so I can add populators

wise flame
#

waitwhat

chrome lark
#

Well, a non-empty folder

wise flame
#

wait so I have to get it to empty the folder first then?

#

got it

#

or

#

nvm

inland oxide
#

preworld gen as in on STARTUP?

pearl vector
#

pretty much

#

I'd have spawn chunks diasbled, so there'd be a wider range to send the data

inland oxide
#

so, a plugin running on startup to get some info from outside to determine how to add populators?

pearl vector
#

or I'd just create a new world called "game" or some shit

#

yes

inland oxide
#

but its not like bungeecord is going to tell it to start up

#

so its just reading the info right?

pearl vector
#

yes

inland oxide
#

so have the plugin read from a database or json file

#

create that file in bungeecord

pearl vector
#

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

inland oxide
#

then database

pearl vector
#

data like that seems a bit too short term to store in a database

inland oxide
#

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

chrome lark
#

are you copying game servers manually or something?

#

could just make it shove some json file somewhere or something if you are

pearl vector
#

the game servers might have different configs on start up, which can be configured by the user

inland oxide
#

well, could make a json rest interface served by the bungeecord plugin that the spigot plugin looks at on STARUP

pearl vector
#

though, I also want to pass other data back and forth like staff chat messages, anti cheat messages, etc.

inland oxide
#

but there are plugins for that

#

they all use the plugin messaging API

pearl vector
#

I really feel like a json rest interface doesn't suit this

inland oxide
#

well, could do the message broker thingy

chrome lark
#

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

inland oxide
#

anyway back to my question

pearl vector
#

I mean, some of the feel a little janky

#

¯_(ツ)_/¯

chrome lark
#

using a proper message broker is gonna be the easy way to throw messages around reliably

pearl vector
#

but I'll look at redis and rabbitmq, since those seem like the best option

chrome lark
#

especially if you ever intend to scale past a single proxy instance

inland oxide
#

redis is just a database memory store pretty much

chrome lark
#

they have pubsub

pearl vector
#

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

chrome lark
#

o/

inland oxide
#

What are the differences between BaseComponent and IChatBaseComponent?

wise flame
chrome lark
#

Ones bungee API, ones nms?

#

You can't unload the main world

wise flame
#

ugh

#

I need to regenerate the main world tho

inland oxide
#

I'm trying to use the nms methods to output to the ActionBar in 1.8.8.

chrome lark
#

You won't be able to do it at runtime

inland oxide
#

Before i was just converting from string, but after all these chat changes would like to go from legacy text to it

chrome lark
#

could do it in startup before vanilla loads the worlds

wise flame
#

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

frigid ember
#

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

inland oxide
#

whats the issue Skyy?

#

you can't regen the main world.

wise flame
#

You can though, can't you? Multiverse does it

inland oxide
#

not the main world.

#

in fact, you have to set the world to some other default world, then reboot then you can

wise flame
#

that... complicates things a bit.

inland oxide
#

with MV that is

chrome lark
#

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

frigid ember
#

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

inland oxide
#

build it local

chrome lark
#

easier options just gonna be to accept the limitation and create a new world to deal with that in

wise flame
#

I'll probably just have a second world and on respawn it'll shove players into there rather than the main world

inland oxide
#

@frigid ember use BuildTools, make the spigot-1.16.1.jar and upload it with your sftp client

#

?bt

worldly heathBOT
frigid ember
#

kay thnx @inland oxide

inland oxide
#

whe you get it up to the host, run it, update the eula file to yes

#

run again and setup your configs

frigid ember
#

can i upload it in any web creator like 000webhost

inland oxide
#

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

frigid ember
#

same here

#

i too use file zilla

inland oxide
#

good luck

frigid ember
#

so i just upload the folder and it starts working @inland oxide

inland oxide
#

Ok, so legacy text with color codes to IChatBaseComponent, how to?

open ibex
#

There's a fromLegacyText method somewhere in the Spigot components

#

TextComponent.fromLegacyText I think

inland oxide
#

thats in the TextComponent as part of the bungeecord chat api

open ibex
#

Yes

wise flame
#

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?

inland oxide
#

this is for 1.8.8, so...

open ibex
#

Oh

#

idk then sorry

inland oxide
#

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?

wise flame
#

yeah

inland oxide
#

wow, so busy with other thing, would assume you then you have getter/setter methods for the world

grim halo
#

@wise flame PlayerPortalEvent#setTo(Location)

wise flame
#

Would that override vanilla nether portal placement?

#

Because I want portals to link and work properly

#

actually

grim halo
#

You can enable or disable portal creation on the target pos

inland oxide
#

isn't it just going to create another portal at that new location?

grim halo
#

if you dont disable it yes...

wise flame
#

worst case scenario I'll use the default nether and default end

#

but use a secondary overworld

inland oxide
#

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?

grim halo
#

if you dont disable it yes...

inland oxide
#

seems sketchy

grim halo
#

Ill test it out...

inland oxide
#

my guess is that there will still be a portal created in the nether dimension

wise flame
#

fuck wait. I just realized that the portals will probably try to link with the overworld's portals

inland oxide
#

all you are doing is changing where the player is teleported to

wise flame
#

and ignore my special world

inland oxide
#

since it's just inherited from player move event

wise flame
#

I really, REALLY want to avoid using NMS

#

not because it'd be difficult, but because I want this to work in other versions

grim halo
#

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.

wise flame
#

wait so target location

#

OH

#

WAIT

#

I don't need to use NMS at all

#

wait am I able to set the location?

grim halo
#

@wise flame PlayerPortalEvent#setTo(Location)

#

As i told you before

wise flame
#

weird. I was looking at the javadocs and didn't see it lol

grim halo
#

You cant actually set the target location in the create event but the teleport event

chrome lark
#

Does CraftChatMessage exist in that version, kludge? There are a few util methods in there for that

inland oxide
#

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?

chrome lark
#

You'll have the older version of it available

inland oxide
#

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

grim halo
#

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.

sage summit
#

I have this error Cannot resolve symbol 'BukkitAdapter' can someone help?

grim halo
#

WorldGuard api?

sage summit
#

worldedit

grim halo
#

Do you use maven?

sage summit
#

yes

grim halo
#

Can you see the package com.sk89q.worldedit

sage summit
#

see it?

#

im still new ish to this sorry

grim halo
#

external libraries

strong lantern
#

hey err\

grim halo
#

It also should get autocompletet

strong lantern
#

how do I setup a server network

grim halo
#

Have you set up a single server before?

strong lantern
#

yes

#

also wtf is bungeecord

grim halo
#

@sage summit You need to add worldedit via maven. You cant just throw a jar at a maven project. That wont work.

sage summit
#

ok

#

where can i find what to put in the maven part?

grim halo
#

here

sage summit
#

thanks

grim halo
#

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>
sage summit
#

i have used it maybe once before, thanks!

#

wait, it says worldguard not world edit

strong lantern
#

I need help with bungeecord

#

how tf does it work

grim halo
#

Did you read the site ive sent you?

sage summit
#

it joins server together so you can join the other servers that are connect easily, i think

grim halo
#

Its basically a proxy for you servers

#

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

sage summit
#

still did not work

#

i reloaded the pom file as well

#

and reopened the project

grim halo
#

Do you see it in your external libraries? Also why 7.0.0?

sage summit
#

you gave me ones for the worldguard plugin so i just googled maven worldedit thing

vernal spruce
#

Oh boy😂

sage summit
#

i dont know which one to use so it may be the wrong one:/

vernal spruce
#

Feels good to not have to deal with that shit

frigid ember
#

how do i make a minecraft server in a FTP website

vernal spruce
#

I just slap the jar inside

#

Ftp is nothing else but a storage link

grim halo
#

Slapping the jar inside wont give you access to the api...

frigid ember
#

i put the jar in and it works thats it @vernal spruce

vernal spruce
#

It does for me somehow @grim halo

frigid ember
#

which jar build tools jar or server.jar

vernal spruce
#

As intellij has a noice button in module setting "add jar or dependency

frigid ember
#

can you do this shit on 000webhost ??????

vernal spruce
#

Nope

grim halo
#

@sage summit it works for me... Make sure to remove the old flatfile jar

frigid ember
#

which is the best free service i should use for this

vernal spruce
#

There isnt a free service for minecraft server,if you want something decent or at least working its paid

sage summit
#

i think its working now?

frigid ember
#

no but there are ftp acces webs with jar support for free

#

???

vernal spruce
#

And whats the point when you have no specs to run the server on

grim halo
#

Yes and this way you dont need to download the jar every week when the plugin updates. Like Stellrow would need to. 😛

frigid ember
#

but is it possible

vernal spruce
#

@grim halo usually apis dont change in months and when they do they add small new things rather than changing

sage summit
#

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();
}
vernal spruce
#

Holographicdisplays i think was changed once a year i think and nothing major needed to replace the jar

grim halo
#

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

vernal spruce
#

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

grim halo
#

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

vernal spruce
#

Dont we have apache in spigot?

frigid ember
#

i made a website with 000webhost containing all the files from minecraft server,jar now what should i do to make it functional

grim halo
#

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.

vernal spruce
#

You cant run a minecraft server on a webhost especially a free one @frigid ember

grim halo
#

Or have you ever tried using MongoDB without a dependency manager? Not possible

vernal spruce
#

Mysql for the king

frigid ember
#

then what should i use

vernal spruce
#

A paid host there isnt a good "free host" for minecraft

frigid ember
#

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

vernal spruce
#

yeah from a shitty free host

grim halo
#

@sage summit btw the latest worldedit api is 7.2.0-SNAPSHOT

vernal spruce
#

wich closes ur server after 30min of no players online

#

or limit you to garbage performance

#

wich makes it better to just play singleplayer

sage summit
#

k

#

do i just change the numbers for the version?

grim halo
#

yes

sage summit
#

ok

pastel arrow
#

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.

frigid ember
#

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

sage summit
#

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

wise flame
#

uhh

vernal spruce
#

im just not gonna bother i guess,gotta let someone else deal with that

wise flame
#

hosting from your own pc isn't that bad

vernal spruce
#

wait till some angry kid with 5$ gets mad

#

and ddos you

wise flame
#

wait are we talking about public servers?

#

or private?

teal plaza
#

German?

vernal spruce
#

most likely public

wise flame
#

oh then yeah don't host from home if you can help it

frigid ember
#

@wise flame when i host on my pc it says server is incapable after running for a minute or two and shuts down

grim halo
#

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

sage summit
#

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

vernal spruce
#

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

frigid ember
#

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

vernal spruce
#

m8 that risk will get ur ass whooped by ur father

pastel arrow
#

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

vernal spruce
#

when they learn out ur hole internet is down

#

cause of a ddos

grim halo
#

I get a dedicated root. i7 4770, 32Gb ram, 1TB SSD, 1000Gbit up/downlink. For exactly 25.50 a month.

#

No problem

vernal spruce
#

good price

#

ddr3?

grim halo
#

yes ddr3 XD

vernal spruce
#

good enough

grim halo
#

They are industrial server that run out

vernal spruce
#

also 1tb ssd

grim halo
#

So you can grab them.

pastel arrow
#

I home host. Just not for outside use lol

vernal spruce
#

nice

grim halo
vernal spruce
#

gotta love maven

sage summit
#

also should i have the jar as a library?

vernal spruce
#

dont think ill ever use it

grim halo
#

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.

vernal spruce
#

true

grim halo
#

It just needs time. I worked with it for 50% of my programming career and i partially still dont know what im doing...

vernal spruce
#

fair point

#

you dont usually screw with it more after you got it working

sage summit
#

i removed the jar and it says i can import the bukkitadapter thing

vernal spruce
#

for what you need

sage summit
tame bough
#

any idea whats casuing this

grim halo
#

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

sage summit
#

one that just says worldedit?

grim halo
tame bough
#

Now this is happening

sage summit
#

Maven: all the we stuff
@grim halo its there, i see it

grim halo
#

Did you remove the "extends JavaPlugin" ?

tame bough
#

yes

sage summit
#

you need javaplugin part

grim halo
#

Dude... you need that. You should just nit instantiate it

tame bough
#

i

#

dont know what that means

sage summit
#

extends JavaPlugin

#

you need it

tame bough
#

Ik tat

#

IM talking to smile

vernal spruce
#

wait

#

is he creating a new javaplugin instance?

tame bough
grim halo
#

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

tame bough
vernal spruce
#

hmm might be better pointing him

#

to the singleton definition

sage summit
#

gtg now ill ask for help tomorrow

tame bough
#

Cause Im not doing that anywhere else

vernal spruce
#

also whats with the

grim halo
#

What is your main class called? (The one that extends JavaPlugin)

vernal spruce
#

commandexecutor

#

casts

tame bough
#

DonationTracker

grim halo
#

do you anywhere call new DonationTracker()?

vernal spruce
#

@grim halo

tame bough
#

Holy shit i am an idiot

vernal spruce
#

check

tame bough
#

Yes i did

vernal spruce
#

first command

tame bough
#

Smh

#

I am so sorry

grim halo
#

No prob. Just use this as you are in an instance of DonationTracker already

vernal spruce
#

surprise intellij doesnt recognise javaplugin as a singleton

#

and warn you for trying to make a new instance

grim halo
#

Its a bit weird because Spigot has its own ClassLoader

#

But that would be a nice addition to the mcdev plugin to be honest

vernal spruce
#

i guess we cant ask for everything

grim halo
#

Its a simple code style recognition... dont create new instances of JavaPlugin. Maybe ill PR that if they are open to it.

vernal spruce
#

big chance to get accepted

grim halo
#

nvm... they use gradle puke

#

And kotlin...

timber thorn
#

Whats wrong with Gradle?

#

And with Kotlin?

grim halo
#

I hate gradle. Feels clunky to use.
Kotlin is fine but i did not write that much with it.

trail hare
#

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.

frigid ember
#

Gradle is the best

trail hare
#

actually, I guess those would be empty air...

grim halo
#

@trail hare Cant you just set the worldborder and then generate everything in there?

trail hare
#

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.

frigid ember
#

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

limber summit
#

what is that guys

#

please

#

it kicks everyone

bold anchor
#

Maybe ehm don’t deny requests from your proxy

limber summit
#

Yes but what is this plugin

#

who do that

#

is it flamecord?

grim halo
#

@frigid ember Maybe there is a plugin that also gives you items...

#

@frigid ember For what do you need intellij

bold anchor
#

I mean

#

You should never create a new instance of JavaPlugin what?

#

If it was a singleton you shouldn’t either

frigid ember
#

@grim halo someone suggested to host a server with intellij i have no idea how to do it or what was he talkin about

grim halo
#

Intellij is a ide to write plugins. You cant host a server with it.

solemn grove
grim halo
#

No thats not normal

bold anchor
#

You can make it run the server while developing, but ehm hosting the server with IJ seems counterintuitive

#

?g chunkt spigotmc

#

Chunky*

solemn grove
#

No thats not normal
guess im screwed

bold anchor
#

Are you coming from 1.15?

frigid ember
#

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

idle zodiac
#

Is there any way to delete a world?

#

in spigot coding i mean

bold anchor
#

String.valueOf

grim halo
#

@frigid ember Send your timings.

#

@idle zodiac Yes but you should generally dont do that unless you really know what you are doing.

idle zodiac
#

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

grim halo
#

Do you try to replace every block at once?

idle zodiac
#

no

#

ii use for loop

grim halo
#

But relative to the heartbeat. Do you replace the blocks at once.

idle zodiac
#

ye

grim halo
#

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

idle zodiac
#

ok

#

thanks very much!

grim halo
#

But if you rly want to delete a world -> unload it and remove the directory

idle zodiac
#

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

hollow thorn
#

?paste

worldly heathBOT
bold anchor
#

I guess this @idle zodiac

hollow thorn
#

help ****

idle zodiac
#

in 1.8?

hollow thorn
idle zodiac
#

yes i'm using 1.8 dont bully me

grim halo
#

@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"

idle zodiac
#

lol

grim halo
#

@hollow thorn Show the line 653 of your StaffWeaponUse class.

idle zodiac
#

@grim halo fixed. i used a method from my old project that seemed to work so ye

hollow thorn
#

@EventHandler
public void onOpen(PlayerInteractEvent event){

    if(event.getClickedBlock().getType() == Material.CHEST){
grim halo
#

event.getClickedBlock() can return null
Your IDE should mark this in yellow.

idle zodiac
#

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

river cradle
#

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?

idle zodiac
#

ikr it's so fiddly

river cradle
#

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

idle zodiac
#

it is, but you require it for certain things

#

like inventorygui and stuff

river cradle
#

How do you mean? I've done inventory guis without Maven in the past

idle zodiac
#

nah i mean with an addon

river cradle
#

Ah right

grim halo
#

@river cradle On you spigot dependency the scope should be provided
<scope>provided</scope>

idle zodiac
#

there is a plugin called inventorygui and you need mvaven to do stuff with it

river cradle
#

@river cradle On you spigot dependency the scope should be provided
<scope>provided</scope>
@grim halo Well, it is

grim halo
#

Then it will not be shaded

bold anchor
#

Josse just make a script to copy it over

river cradle
#
<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>
bold anchor
#

Then tell ij to move it over after building

wise flame
bold anchor
#

Don’t use the constructor like that

grim halo
#
  <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>
river cradle
#

@bold anchor I'm unsure what you mean by that, I'm using Eclipse by the way

wise flame
#

lol

#

it's funny because a week ago someone told me to do that

river cradle
#
  <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?

wise flame
#

and now I'm like "why"

#

I would suggest you use intellij

grim halo
#

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.

river cradle
#

Thank you, it's underlined yellow so I suppose this means I have to install it somewhere?

grim halo
#

@wise flame You normally do not want any constructor in your JavaPlugin class

wise flame
#

got it

#

Is there any specific reason why?

bold anchor
#

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

wise flame
#

ah, I see. So I shouldn't do any of that stuff until it calls onEnable

hollow thorn
#

?paste

worldly heathBOT
wise flame
#

Makes sense

hollow thorn
grim halo
#

@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

mellow wave
#

@hollow thorn Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_16_R1.block.CraftBlock cannot be cast to org.bukkit.block.Chest

river cradle
#

Yeah, I've got the outputting to the folder now, thanks!

mellow wave
#

You can't cast a craftblock to a chest

bold anchor
#

You can if the block is a chest

river cradle
#

And wow, the file size is suddenly 4 kB, apparently the other problem got solved too along the way? Thank guys!

bold anchor
#

But in this case it isn’t

mellow wave
#

ow

#

Table 's16892_vite.vite' doesn't exist

wise flame
#

com.javaminecraft.StaffWeaponUse.onOpen(StaffWeaponUse.java:660) ~[?:?] - the StaffWeaponUse.java:660 is where you see a line number for the error

hollow thorn
#

thats casting a blokc to chest

wise flame
#

So should I declare my variables at the top of my JavaPlugin class then wait to actually assign values to them in onEnable?

hollow thorn
#

after its checked that said block is a chest

wise flame
#

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

tiny dagger
#

there are multiple ways to run code async actually

#

FutureCompletable

#

Executors

wise flame
#

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

tiny dagger
#

Bukkit runtask async

#

threads

wise flame
#

bukkit runtask async it is

tiny dagger
#

keep in mind that

dusky sigil
#

if im doing BlockBreakEvent, the name of the event is the block that was broken or the entity that broke it?

tiny dagger
#

it doesn't lock the async task

#

so if your code takes longer

#

it's gonna get poped again

wise flame
#

wdym "takes longer"

tiny dagger
#

let's say

wise flame
#

oh wait I think I might know what you're talking about

tiny dagger
#

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

wise flame
#

wait 20 seconds?

tiny dagger
#

which might cause you problems

wise flame
#

Where does that number come from?

tiny dagger
#

executors are better imo

#

or implement a lock

dusky sigil
#

anyone has any idea about my problem?

wise flame
#

yeah I'll figure out how to deal with executors

tiny dagger
#

private ReentrantLock lock = new ReentrantLock();

dusky sigil
#

rather, question actually

tiny dagger
#

you can lock with this

#

so it won't overlap executions

sturdy oar
#

fam just use synchronized

tiny dagger
#

run blocking code synch 👌

wise flame
#

the goal is for the server to still be able to handle players doing stuff while it generates worlds

sturdy oar
#

What version are you going to do this on

wise flame
#

1.16.1

sturdy oar
#

that statement sucks

wise flame
#

why are you just saying it sucks and not saying why

#

that's not very helpful

#

lol

strong lantern
#

I'm a little confused... does bungeecord work with Bukkit?

grim halo
#

Yes

strong lantern
#

ok phew

grim halo
wise flame
#

"Table 's16892_vite.vite' doesn't exist"
The table you're trying to modify doesn't exist.

tiny dagger
#

what's a decimal

grim halo
tiny dagger
#

better use a double imo

wise flame
#

can you confirm that the table was actually created?

#

The error is saying it doesn't exist

hollow thorn
#
                  @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
worldly heathBOT
dusky sigil
#

trying to get the item in a players hand, why is this not working? ItemStack item = (ItemStack) p.getItemInHand();

wise flame
#

afaik

#

But can you check if it did?

#

Because the error says that the table doesn't exist

dusky sigil
#

any1 about my problem?

wise flame
#

oh I was wrong

sturdy oar
#

i think it's wrong

frigid ember
#

you don't have a closing bracket 🤔

#

how do you not know if the sql is even giving errors

sturdy oar
#

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

keen compass
#

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.

sturdy oar
#

I know

#

just learn SQL before using it 🤷‍♂️

balmy sentinel
#

You should also have a “IF NOT EXISTS” statement in there.

keen compass
#

while not needed, highly recommended however 😉

dusky sigil
#

any1 can help with my problem?

wise flame
#

that doesn't grammar

#

wtf

keen compass
#

?ask

worldly heathBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.

keen compass
#

let me guess says something along the along the lines you have an error in the sql syntax?

balmy sentinel
#

that’s because you have an error with your create table syntax and it was already pointed out. You’re missing the closing “)”

sturdy oar
#

test your statements before running them on JAVA

simple sorrel
#

Hallo liebes Team wie und wo kann ich das Citizens Plugin doawnloaden? Für die 1.16.1

sturdy oar
#

Hallo liebes Team wie und wo kann ich das Citizens Plugin doawnloaden?
@simple sorrel This discord is not german

simple sorrel
#

Who is the german discord ?

sturdy oar
#

there's no german discord lol?

simple sorrel
#

For the Version 1.16
1?

keen compass
#

@tranquil plaza
Would also recommend you use prepared statements as well. Generally safer especially since you don't know much about sql 😉

dusky sigil
#

did they do citizens for 1.16?

balmy sentinel
#

@tranquil plaza it’s the same with java... when you open parentheses you have to close them.

sturdy oar
#

yes 1.16 is marked as tested version

keen compass
simple sorrel
#

Yed

dusky sigil
#

cool they did

keen compass
#

link I provided will verify your SQL syntax is correct

simple sorrel
#

yes 1.16 is marked as tested Version what?

keen compass
#

and will point out what is wrong with it if not

simple sorrel
#

Why i must buy 10€ for the plugin this is scam ?

sturdy oar
#

???wtf

dusky sigil
#

its a big plugin, it costs money

sturdy oar
#

do you have any idea how much work there is behind Citizens

simple sorrel
#

I will it for free

balmy sentinel
#

because the author of the plugin decided that’s it’s worth it’s not a scam lol

dusky sigil
#

citizens is a HUGE plugin

sturdy oar
#

Citizens has been a premium resource on Spigot for >1 year now

simple sorrel
#

Give a plugin for npcs for free ?

dusky sigil
#

and it deserves to be so

bold anchor
#

Citizens is also free

dusky sigil
#

trial isnt it

sturdy oar
#

yeah but you don't get support

simple sorrel
#

@bold anchor who?

keen compass
#

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.

bold anchor
#

Read the resources page lol

simple sorrel
#

Boy

#

Why

sturdy oar
#

Read the resources page lol
@bold anchor no he just wants download link 🤦

mellow wave
#

They're using the spigot page as a donation page

simple sorrel
#

Its fucking shit

dusky sigil
#

.......................

bold anchor
#

Stop tagging me thx

simple sorrel
#

I can bis plugins

keen compass
#

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

simple sorrel
#

@keen compass i am Bad in english

#

I search a npc plugin for free.

sturdy oar
#

have you even read the spigot page lmao

#

Citizens IS FREE

simple sorrel
#

Yes i have

dusky sigil
#

@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

simple sorrel
#

Citizens IS FREE
@sturdy oar who i see it not ?

keen compass
#

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 😉

grim halo
#

You can get citizens for free btw

dusky sigil
#

google translate sucks

#

its not really direct a lot of times

sturdy oar
mellow wave
#

^^

sturdy oar
#

if only people could use links

bold anchor
simple sorrel
#

You can get citizens for free btw
@grim halo van you give me the Link?

bold anchor
#

Should just read the page

dusky sigil
#

just read pls

keen compass
#

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

dusky sigil
#

@keen compass that much is true

grim halo
#

@simple sorrel Read the page and then decide yourself

mellow wave
#

Did I really just get auto warned for spam

#

:/

bold anchor
#

Lol

dusky sigil
#

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();

sturdy oar
#

why are you casting

mellow wave
#

Yeah

dusky sigil
#

doesnt work without the itemstack too

keen compass
#

@dusky sigil which version?

tiny dagger
#

casting now is pointless

dusky sigil
#

1.15

#

without casting it still doesnt work

grim halo
#

p.getItemInHand() is deprecated

mellow wave
#

If you're on 1.9+ use the p.getInventory().getItemInMainHand();

grim halo
#

dont use deprecated methods

keen compass
#

need to use getItemInMainHand() and getItemInOffHand()

simple sorrel
#

What can*t the free Version?

bold anchor
#

He is probably casting to the nms version

mellow wave
#

It's the full version

bold anchor
#

Ticko gtfo

dusky sigil
#

The method getItemInMainHand() is undefined for the type Player Main.java /Mining/src/net/FlashPlex/Mining line 27 Java Problem

grim halo
#

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,

keen compass
#

second thing, you don't need to cast

dusky sigil
#

i already removed that

keen compass
#

the method should return an ItemStack

#

ah ok

mellow wave
#

I told you to get the inventory Ronsiv

dusky sigil
#

ohh

#

sorry that was stupid

grim halo
#

I for my part do not use Citizens because it is laggy trash. But i admire the work they put into it.

dusky sigil
#

i mean

#

i gotta admire /cmd add

#

works with like every plugin

keen compass
#

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

dusky sigil
#

i think its great even with some minor lag.

mellow wave
#

I've never had any lag issues with Citizens

grim halo
#

Sure... but i dont use plugins from other devs unless its ProtocolLib

tiny dagger
#

i did my nps without citizens 👌

keen compass
#

I have seen cases where Citizens is responsible for some things 😛

dusky sigil
#

i had a bit of lag, nothing major

#

also maybe a few crashes

#

...yeah its a bit of laggy trash

keen compass
#

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

dusky sigil
#

thats true

#

it is well made

#

though

keen compass
#

I would say it has gotten better

#

then from what it used to be 😛

dusky sigil
#

I can admire hard work

grim halo
#

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

keen compass
#

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

dusky sigil
#

Hmmm okay

#

your opinion is yours, mine is mines

grim halo
#

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

keen compass
#

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 😛

tiny dagger
#

i guess their tracker sucks
7smile

keen compass
#

should have seen Citizens long time ago, was way worse then it was now 😉

dusky sigil
#

I imagine it was

wise flame
#

"WorldInitEvent cannot be triggered asynchronously from another thread."
There goes my asynchronous world creation. yay.

#

I guess I'll accept the limitation

dusky sigil
#

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 {
                
            }
        }

    }```
wise flame
#

?paste

grim halo
#

?paste