#help-archived
1 messages ยท Page 6 of 1
getting information from the database and setting information to put into the database using OOP methods aswell
Trying to donate to SpigotMC, but every time I keep clicking the donate tab it just redirects back to home?
OOP is more than just creating getters and setters. It's avoiding static abuse, proper object-oriented code design
I have a thread on this if you'd like
thanks
The donate button in the header links to a specific widget, Jakes. Look on the right hand side
Ah I see it now! I feel like an idiot.
The minimum is $10 but you're welcome to donate more ^-^ As for the message, I'm fairly md distributes it evenly if you don't put anything
Can just be an appreciation notice if you'd like
Well, I've used Spigot for nearly eight years, and ive always been meaning to donate to show my appreciation but i was always short of money. So I'm just taking this chance to say thanks really
Happy to hear it ๐
Update the spigot software? Could just be an bug?
okay ill test it
No worries
A number of factors could be at play there. Plugins, item attributes, what looks like low TPS
Well, spigot Terms of Service don't say you will look at our code?
When you submit any User Content to us, you grant SpigotMC, its partners, affiliates, users, representatives and assigns a non-exclusive, unlimited, fully-paid, royalty-free, irrevocable, world-wide, universal, transferable, assignable license to display, distribute, store, broadcast, transmit, reproduce, modify, prepare derivative works, or use and reuse all or part of your User Content for the purposes of providing any services associated with the Platform. Additionally, you grant to SpigotMC a worldwide, perpetual, irrevocable, royalty-free license to use and incorporate into the Platform any suggestion, enhancement request, recommendation, correction or other feedback provided by you relating to the operation of our Platform.
wow
@subtle blade can you dm please?
They're open but I may not respond right away. Playing some games with friends
@dense pike still the same, using latest build now
Probably an TPS issue then.
tps is at 20
can you do a ./timings report
yeah what am i looking for?
Anything that might tell you why there's a delay
isnt really a delay tho, its just that my weapons feel weak, like yeah video look laggy but thats gyazo.
ill get a new video for ya
You can see the hearts not going down
Best Anti Bot plugin?
Hey everyone
does anyone here already dealed with making a custom belowName objective, per-player ?
Just like that
I posted on SpigotMC if anyone is willing to help
F-E on the screenshot, the * is the player Faction rank and Zeubi is the Faction Tag
has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 Pretty sure I compiled it to be version 11...
Yeah I fixed it
Can someone explain why right clicking white bar on top of window freezes the game
@subtle blade That error happens when I include hibernate as a dependency in the jar
I am having an issue with Hibernate because it seems to have elements from Java 12
then either update to java 12 or don't use hibernate ? :v)
it seems to be java 8 starting with hibernate version 5.2
@velvet halo how are you using hibernate ?
It works now dw.
Alright, anyone here proficient in the Quests plugin?
Please tell people what you did so they can replicate if they have the same problem
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>9</source>
<target>9</target>
</configuration>
</plugin>
```Changed 9 to 8
Obviously ๐
lol
I would imagine it would be in whatever order they are in, in the config
so i updated a server from 1.13.2 to 1.15.2 last night now i want to make sure i update the plugins we use as well do i just copy over the plugin's jar files and leave the configuration data there so we dont lose any claims , territory etc? Just want to make sure no one loses anything thanks everyone!
? Just copy everything, you can use the same folder even (keep a backup)


look through the src?
Are you trying to make a custom bungee list?
You'll need to make your own plugin I remember in the past to override it.
like alphabetically?
Ah.
for (final ServerInfo server : ProxyServer.getInstance().getServers().values())```
I could make a plugin tomorrow on it if u want.
for ( ServerInfo server : ProxyServer.getInstance().getServers().values() )
{
if ( !server.canAccess( sender ) )
{
continue;
}
List<String> players = new ArrayList<>();
for ( ProxiedPlayer player : server.getPlayers() )
{
players.add( player.getDisplayName() );
}
Collections.sort( players, String.CASE_INSENSITIVE_ORDER );
sender.sendMessage( ProxyServer.getInstance().getTranslation( "command_list", server.getName(), server.getPlayers().size(), Util.format( players, ChatColor.RESET + ", " ) ) );
}
Looks like md code
๐
Still slightly triggered by those spaces e.e
You can tell pretty much instantly lol
Triggered by spaces? You'd be a big fan of the plugin code I was shown recently that has zero indentation
no
lmaooooooo
Entire plugin, zero indentation.
lul

I wouldn't be triggered by that at all
my plugins now amazing amirite, https://paste.md-5.net/ebibixorog.java
At least a thousand lines of code.
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
this.getLogger().info("My plugin enabled");
}
}
Like this, but you'd have situations where there were just piles of } lines in a row closing things up
Why not just...
"String".toString()
.toString()
.toString()
...
...
Calm down please, let's all relax.
no, that's the best clearly
You know @unreal anchor
I've actually seen plugins like that uploaded to spigot
Choco I'm requesting a ban of KingAlterIV for threatening behavior! ๐
Optic, the plugin I'm talking about is on spigot, yep!
once or twice it was just the plugin.yml
a few different times it was 0 byte jar
I request a ban on mbaxter for telling me some new stuff ๐

I request a ban on these two because why not
I can live with that
Amazon IPs are blacklisted for the time being
Hey guys
@EventHandler
public void onHeadPlace(BlockPlaceEvent event) {
if (event.getBlockPlaced().getType().equals(Material.PLAYER_HEAD)) {
BlockFace blockFace = ((Directional) event.getBlock().getBlockData()).getFacing();
event.getPlayer().sendMessage(blockFace.toString());
}
}
I'm trying to get the Rotation of a Player head as a BlockFace when placed down but Skull#getRotation() is deprecated, says to use BlockData. Not sure how to go about this?
Have looked into using Directional, but I don't think I'm casting to the right place.
The above code produces:
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_15_R1.block.CraftBlock cannot be cast to org.bukkit.block.data.Directional
The exception you sent above won't be thrown by the code you sent. It's impossible. Though on the other hand, Skulls are not Directional. They're Rotatable I think
Directional uses the cardinal directions, Rotatable uses other additional block faces
So the above code you sent will work just fine, only you need to cast to Rotatable instead of Directional
Thanks for the reply!
My mistake, I copied the wrong exception from all the different things I tried.
That code threw this exception:
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_15_R1.block.impl.CraftSkullPlayer cannot be cast to org.bukkit.block.data.Directional
Thanks again. ๐
Woohoo! It works, thankyou! ๐

Is there a list of people recommended for server work hiring?
Hey Guys, not sure If the Spigot Discord can help, but my minecraft launcher says Im not connected to the internet when I am and I cant login. ANy suggestions?
You must make a thread on the forums @gleaming cradle.
ten four
@austere ridge #general.
kk
Hey, I just posted a thread. https://www.spigotmc.org/threads/updating-createpacketconstructor-protocollib.428085/#post-3747429
if you have any ProtocolLib expertise, i would be very grateful if you could help me out!
I have never ever used ProtocolLib before, and I currently need to update a lot of code that uses it, this is one of the many blockades i'm running into
Don't post here assuming quicker responses just wait for someone to see the thread.
It's just another way for me to reach out. People that may be willing to help that wont ever see my thread on the forums might see it here.
@sinful coyote i know i'm late to your conversation, but I have a resourced called "Martophs Medals" that's open source you can check out
but that was 1.12, things mayve changed since then
the A record and SRV record are the same name
you could delete the A record and replace "play.elyriamc.com" with the ip address
Now it says "Invalid data"
screeenshot again?
that's google, and priority and weight = 0 == most preferred for that name.
priority = first preference, then weight = preference at that priority
use for HA
yea i dont see then need to have weight/priority when directing to a mc server
@storm vessel you cannot use a numeric IP address in an SRV record
It still says "invalid data"
By spec, they must refer to a name.
Ok
are you sure?
Yes.
with cloudflare i can
cloudflare is special
LOL
not really sure what that is
can set a cname for root
wont work anywhere else
guaranteed
(unless they do cname flattening)
for a domain, say example.com
@ == your root record, yes?
You cannot set a CNAME there at most providers unless they do CNAME flattening.
It normally has to be an A record.
I mean, that's probably inaccurate. CF is the only I know that provides CNAME flattening though.
It may work elsewhere, but on Google for example it wouldn't work.
As they don't flatten CNAME records.
OH
i understand
yea
is that good or bad thing
cname flattening
the thing that annoys me most about cloudflare
is using SSH
i have to create a different A record that isn't proxied in order to access ssh
it's not bad, it just makes it so it acts as an A record
which idk if im doing something wrong
nope that's pretty much intentional by CF
What I do is just use an SSH config file instead of DNS for ssh access
i dont expose anything that can be used to access the backend server in DNS
wdym ssh config file
99% of the time my ssh access is just for development purposes
~/.ssh/config
inside:
Host server_nickname
HostName <numeric IP here>
then you can just type ssh server_nickname
nah i dont, sorry
thats ok
It is still not working. Could it be that I am trying to host the server on my own private Comcast internet?
So, if something suddenly doesnt work, should I assume that the JVM is GCing it?
Possibly because of dynamic IP?
Like, something that should be working; but I afk for so long its like it goes away?
@dusky herald not 100% sure due to the lack of information, could be code problem, could be laeking, could be GC
and @storm vessel i'm not sure, since DNS records really have nothing to do with the ip address
you have elyriamc domain correct, i would assume
Yes
I guess it appears to be ...
@storm vessel make sure that the A record is DIFFERENT from the SRV record name
because last time the A record was names "play" and the srv record was also named play
i hope you get that fixed, GC and leakages are the worst!
lol
I am now seeing that comcast found "suspicious activity" and closed all my ports
That may explain it
i have something called Mediacom... which im 99% sure is comcast
idk i dont have issues
I called them and told them to stop closing my ports because I have a hardware firewall and they said ok and never did it again.
FYI
Seems like it's due to their most recent software but recently had to call them.
Had to remove around 200 ports for my dedis
"Call Comcast" ... oh. my. god
LMAO
@frigid ember Wdym?
Shade_, is Google Domains the issue or Comcast the issue? because if youre having trouble CREATING the record, thats google
That's weird, I've never personally had a problem with comcast, but it seems that everyone has a different experience with em
if youre having trouble connecting, thats comcast
@storm vessel as in what's the domain name you're making the srv on? I was going to dig it and see if the SRV applied or not.
that's a quick way to tell which side the issue is on
but if you think it's comcast, then /shrug
I got it
elyriamc i think
yeah its not set yet
; <<>> DiG 9.10.6 <<>> _minecraft._tcp.play.elyriamc.com SRV
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 1687
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;_minecraft._tcp.play.elyriamc.com. IN SRV
;; AUTHORITY SECTION:
elyriamc.com. 187 IN SOA ns-cloud-a1.googledomains.com. cloud-dns-hostmaster.google.com. 11 21600 3600 259200 300
;; Query time: 32 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Apr 05 21:06:08 PDT 2020
;; MSG SIZE rcvd: 152
dont make the srv and A the same name
then I had to enter my IP in the first box and my parameters in the second
that is going to cause issues i think
shouldnt be an issue
oh
ok
maybe CF is different in that way too lol
i remember trying to do the same thing and not working out'
but yet again i can just make the SRV with the numeric ip so
yay cloudflare!
im starting to get nervous that my spigot thread is just too complicate
and that no one is gonna know how to help
So correct me if I'm wrong, but I can route a different sub domain to a web server, right?
ยฏ_(ใ)_/ยฏ
You can't expect a response within a hour or two and can wait up to a day dependent on the time @wanton delta.
People have lives and aren't paid to look at the threads.
@minor laurel its not about the time lol
@storm vessel you can route subdomains to individual links.
should be ok from the DNS end
its just about ive searched almost everwhere and usually if its not anywhere else it doesnt do good on the forums
or ip addresses, etc
Ok cool, thanks for all the help
i wish documentation was less vague ๐ก
whats the problem then
Lol
I'm definitely no pro, but you can at least humor us. Maybe someone does know a solution to your problem.
in protocol lib theres this ProtocolManager#createPacketConstructor method and i have no clue how to use it
docs are super vague
not seen any other threads about it
maybe theres no other threads because its easy and people dont need help with this lol
Hey there, I'm looking for a plugin that allows me to attach commands to it
Did you try this?
/**
* Construct a packet using the special builtin Minecraft constructors.
* @param type - the packet type.
* @param arguments - arguments that will be passed to the constructor.
* @return The packet constructor.
*/
public PacketConstructor createPacketConstructor(PacketType type, Object... arguments);
is there any plugin you guys know of that could do such thing
"arguments that will be passed to the constructor" im updating it from 1.12 to 1.15 and before it was String[] but now it says there isnt any constructor that matches
Explain by attach commands @devout sierra ?
@devout sierra what do you mean attatch commands
You mean create commands?
DeluxeCommands if so
@wanton delta you can use the manager to create a packet constructor but not to create a variable from the usages I have found.
well basically I take any item, lets say a stick or something... then write something like /attach <//wand> or whatever
and when I then right or leftclick that item, it executes that command
Did you look at the actual method?
I could make a plugin within 10-15 minutes if you want me to make one @devout sierra
or within a few.
that would be awesome
alright send me a friend request for your ideas and will release for free on spigot.
@dusky herald thats what i mean i have no clue how it works
itll be used for any of my minecraft projects tho, are you cool with that because I dont have money on my hand
i dont know what its looking for for the Object... parameter
on discord or spiggot?
i know
done
but it has changed since 1.12
and i dont know what to change it to
idk how people know what to put in
how do they know lol
currently i get java.lang.IllegalArgumentException: No suitable constructor could be found.
its a matter of what i need to use for the Object... arguments parameter
Maybe Packets?
nope
using net.minecraft.server.v1_15_12.PacketXXXX?
no
if u look at code examples
they're variables
like integers and strings and etc
stuff that you would find on https://wiki.vg/Protocol#Data_types
i tried seeing if the Object... parameter corresponded with the packet things, but they dont
Apparently you can disable Comcast's xFi Security which stops them from closing your ports without having to call them
add a PacketListener that detects tab completion
i have tried the bukkit/spigot methods
tehy do not work
i cannot get them to work
this will work once i know what to put for the parameter
Tab-Complete?
yea
that just appears to be like an auto-complete packet
for commands when you type
1 sec
well
What do you mean exactly by tab completion
I guess would be a good start
when you type a command
and press Tab?
I don't really think you would be able to get something to work if it's stuck on the client side...there'd be no way for the server to detect that the player did it
I mean, unless you can receive Keystrokes from the client
but I highly doubt you can do that.
Tab-Complete is a Clientbound packet, so it goes One way Server - > Client, but not Client -> Server
oh i think i found it
in 1.12 the only aruments was int and Array of String
now there are more
Ahh so its something you made work before huh?
yes
ProtocolLib isnt something I've worked with, so this is just speculation based on the information that I have right now lol
I probably should start working with it though lol
Object[] ?
lol
Object[] arrayExample = new Object[2];
arrayExample[0] = "Test test";
arrayExample[1] = true;
arrayExample[2] = ChatObject w/e
idk why you would be
lol
There's a reason some of the packets call for Object[] arrays
that would be one reason
then you could cast them later
String arrayString = (String) arrayExample[0];
boolean arrayBool = (boolean) arrayExample[1];
ChatObject arrayChat = (ChatObject) arrayExample[2];
but, you wont ever know if that object actually matches the same object type / data type
so you'd want to check at least...
yea i know
ive never seen that done before
RQ question does everyone on my spigot server have to install spigot?
Are you playing on the correct minecraft version?
if you're running a 1.8.8 server minecraft version requires 1.8.8 too
that'd be a good place to start

What's the best VoteListener that will allow me to give "Vote Keys" using Crates plugin?
I'm on 1.15.2, Spigot the same
NuVotifier and GAListener not a thing anymore?
Just found GAListener, now to get my host to let me use a port, lol
Not entirely sure how to get the specific key for the crate though, hmm..
Cause it's just a stupid tripwire, but it has a special name
crazycrates?
CratesPlus
ah, not sure
Key:
Item: TRIPWIRE_HOOK
Name: '%type% Crate Key'```
Like this is how you name it rofl
Yeah there's a give command.
Oh wait, hmm, I could run that via console and make that plugin, run the command technically right?
Just do %player% as the receiver?
yeah I would assume so
Lawd, thank ya LOL
/crate key %player% vote
assuming the plugin supports some kind of placeholder
I believe it does, will test and see
Not build breaking errors.
Could be as simple as variables that "might" not instantiate
Hey how do i load a map without it making a new world?
Well what does Methods.Color return, @final verge
for some reason spigot 1.14.4 isnt recognizing that OAK_SIGN exists
try restarting your IDE?
Ye i did
i also deleted the project and recloned from git
tried 1.14.3
all same issue
Well I'm trying to move my map to my spigot server, but when i move the map folder it wont load the map, it overrides the map to a normal terrain map.
I have chosen the level-name.
Okay, well, now I can't figure out how to get GAListener to work with Votifier...ragh...
for the love of god, @fleet crane plz add a second and maybe 3rd help channel. We're bottle necked. lol
Like I still want to ask MY q as well...
huhhhh
No that's stupid
So remliv it sounds like you want to quickly be able to load and unload world files.
multiverse wouldnt be yuour best solution
you probs want one of those other world management plugins...
I just want to change map.
What? Sanity is stupid? Come on that is crazy talk.
Are you talking to me, because it isn't so crazy for me.
Caused by: org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider] Anyone that has experience with hibernate know what this means?
Telling md_5 we need extra help channels. read chat.
Literally there are 4 people in one channel all trying to get help at the same time
Well what can you do
@velvet halo not a clue. what does google say?
most issues that arent quick answers should go to forums anyways
So how could i change map, because it just wont load the map i put in the folder, it gets overridden.
K screw it, I'm dropping my question.
<Pangamma> Help my dumb ass. I am trying to do autocomplete for a custom implementation of the /title command right now and the vanilla syntax is getting in my way.
<Pangamma> Basically I get the auto suggestions that you'd see on the spigot side. But I want to be able to show the suggestions from my overridden bungee command instead.
<Pangamma> How do I prevent autocomplete on the spigot side for that one command?
I have researched on google for an hour now @sharp mauve telling me to go on google and research is kind of rude. I only ask questions here if it is my last resort.
and people with experience like to help in these situations
I'm not trying to pull a stack overflow.
I'm just saying I havent googled it yet. What did google tell you?
I have not seen what you have seen yet.
[18:30:11] [Server thread/INFO]: HHH10001005: using driver [com.mysql.cj.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/minecraft?useSSL=false]
[18:30:11] [Server thread/INFO]: HHH10001001: Connection properties: {user=root, password=****}
[18:30:11] [Server thread/INFO]: HHH10001003: Autocommit mode: true
[18:30:11] [Server thread/INFO]: HHH000115: Hibernate connection pool size: 20 (min=1)
[18:30:11] [Server thread/INFO]: HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
``` I am successfully connecting but when I try to open a new session, create a transaction and then close the session it errors.
And?
Caused by: org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider] and
Says it is an unknown service
So... you can connect. And you can authenticate. And you can execute ONE transaction, just not two. Correct?
Google says check you didn't close the session
md_5 will you look at my ticket? Sorry for the last ping.
Rafal, correct me if I'm wrong, but you've been asking consistently over the last day? Constantly pestering him is not doing you any favours. Your personal spigot account, is the least of his concerns. Give it a couple weeks
For me it is a lot of worry
public void update(Object object) {
Core.async(() -> {
Transaction transaction = null;
try {
if(session.isOpen()) {
transaction = session.beginTransaction();
} else {
transaction = session.getTransaction();
}
transaction.begin();
session.merge(object);
transaction.commit();
} catch (Exception e) {
if (transaction != null) transaction.rollback();
} finally {
session.close();
}
});
}
``` This is what I have in my source code. I even check if there is an open session and close it everytime also.
oops
I am stupid
If someone has time, could I get some assistance in setting up GAListener alongside Votifier? I'm pretty new to the plugin game for Minecraft. I've gotten pretty far elsewhere, but this plugin has me stumped!
Problem: I'm not sure where I'm supposed to store the URLs for GAListener to Check. Also, is GAListener supposed to go in the Listener Folder under Votifier, or in the Plugins Folder naturally?
Best Regards,
Shark
Yeah you close the session but never open it again
LOL
uhhhhh
I messed up
yeah that. lol
HAHA
like when does it get opened...
@bitter haven check there's no errors in your log, otherwise simply copy the whole world folder. It does work, I do it on a daily basis
I think he;'s talking about a hotswap though, right?
Well i check
Still get the same error btw
Nvm, it works.
This is really weird
post updated code
public Service<T> open() {
if(databaseRegister.getSessionFactory().isClosed()) {
session = databaseRegister.getSessionFactory().openSession();
} else {
session = databaseRegister.getSessionFactory().getCurrentSession();
}
return this;
}
@Transactional()
public void update(Object object) {
Core.async(() -> {
Transaction transaction = null;
try {
if(session.isOpen()) {
transaction = session.getTransaction();
} else {
transaction = session.beginTransaction();
}
transaction.begin();
session.merge(object);
transaction.commit();
} catch (Exception e) {
if (transaction != null) transaction.rollback();
} finally {
session.close();
}
});
}
What are you trying to do
I don't know if it's a bug or not, but I can't logout of my account during the ban.I don't know if it's a bug or not, but I can't log out of my account during the ban.
Shouldnโt have posted a how to ddos thread :/
Prob not a bug prob intended to make sure you cant switch to another account
if session is not open, get a new session and open it.
I fixed it but ran into a new error.
if(session.isOpen()) {
transaction = session.getTransaction();
} else {
session = databaseRegister.getSessionFactory().openSession();
transaction = session.beginTransaction();
}
Y u no do this
It doesn't work that way...
or session.Open() or whatever
Alright. Still seems like you arent re-opening the session a second time though.
I dont know the exact syntax, but... from what I can gather, you are checking if it is open, and if it is NOT open, you do nothing to open it.
Yeah you are right
But you should do something to open it.
Soooo.... anyone know how to override the spigot autocomplete with a bungeecord tab completer?
@velvet halo https://pastebin.com/NXhX8UfT
Maybe this helps with data patterns?
Well Hibernate is an ORM so it works a bit differently
ehhh
ofc syntax will be different.
The process of managing a connection pool would be similar though
make sure connected, disconnect.... check connection... execute query, etc
Yeah!
Anyone knows why protocolsupportlegacysupport kicks 1.7 players for [19:59:28 INFO]: PlayerFile lost connection: Internal Exception: io.netty.handler.codec.EncoderException: MessageToMessageCodec$1 must produce at least one message. When there is a hologram in the world
GriefPrevention is great, but uh, I have Crates in my Spawn that I want people to be able to open with keys...is there a better spawn build protection thing?
Ah fucking worldguard...sigh. That plugin.
walks away, question burried in the never ending flood of other questions
I'll just have to put together a crappy fix
I haven't done it before pangamma
Hey does anyone know why it says 825 instead of 70 removed advancements? https://jcdn.io/javaw_mbgEh2aVSe.png
According to google there's 70 advancements but this vanilla command is saying otherwise & api says the same ๐ค
ok this channel is pointless lol
there are 825 advancements
I'm writing a Drupi script atm that tells you a player's "level" based on advancements, I'm trying to get that 70 number but it seems to be playing tricks. I reset all my advancements, then got one advancement which returns 50 levels for some reason
does that include deprecated advancements or something?
no
any chance you know where I can find a list of all advancements? I've only found that 70 on google
hmm
I thiink if you look up in the version's jar
in assets > advancements you can find them
& when I award all 855 advancements, my advancements page only shows around 70 (I haven't counted)
I just counted, just shows 69, not sure why since I'm running java version
hmm
I'm using org.bukkit.Bukkit.advancementIterator().forEachRemaining to iterate through all the advancements, but they don't seem to have any method to check the name of the advancements
Just the criteria, which just returns an array of things you need to get the advancement
in assets > advancements you can find them
does that mean I need to decompile the jar or something? I'm no good at Java
Hey Guys! Forge & Bukkit user here. I would like to create a MC server for my 6yo. My main problem is that "administrative stuff" (like WorldGuard) don't work on Forge and on Bukkit I cannot find any "extra items" (like furniture, guns etc). Is there any way to achieve this?
oooooh @runic wyvern, it's the recipes https://jcdn.io/cmd_O3cbWWjLkQ.png
turns out the advancement inherits getKey which returns those
I can work with this ๐
'''[08:33:42] [Server thread/ERROR]: Could not load 'plugins\plhider.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.kieranslayer.pl.Plmain'''
https://prnt.sc/rtvjt0
https://prnt.sc/rtvk0j
any ideas guys
im using intelliJ btw
How to add plugins to 1.16 server?
no plugins are 1.16 Compatible as the build tools for it hasn't been released yet
so youll be wasting your time bud
Anybody...? ๐
what are you trying to make the forge server with @serene inlet
the Forge server is working fine, but I can't find any way to make a PvP Arena
I've spent half a day with WorldProtector, but I can't find any way to enable PvP on a creative World
so if you want to add plugins youll need something like sponge todo so
I'm ready to do anything in order to achieve the target, no problem, I just don't know what I should do/use.
u wanna go general a talk bud
?
general-1 vc
k
How can i fix this so it stops im not doing anything abnormal.
Can someone help me retrieve my spigot acc? I 2faed it a couple years ago and I got a new phone so I donโt have the 2fa app I used or the backup codes.
email support via account email
That is my home pc i use he.net to browse using ipv6 as my isp doesn't support ipv6 natively yet.
whats the email?
nah thats re: 2fa
as for the IPs, hurricane electric IPs were ddosing the forums so they were blocked
is there any way to get my block of ip's from hurricane electric unblocked?
i have a /48 from them
Thanks @fleet crane I didnโt know what I needed to do lol
no, the block may be lifted generally if appropriate
i dont know but its the whole reason i cant access spigot because of a few bad apples
or in some cases many
I mean its a web forum
generally supposed to be accessed via home connections anyway
yeah mine is a bit different then a home connection so there isnt a way that you would whitelist my block?
nah sorry too much work for everyone that asks, it will be lifted if/when appropriate
ugh okay thanks
i am looking into seeing if my router supports preventing the use of ipv6 to spigot.org
Oh ye wow I get the same error message with my ovh vps too
I'm trying to understand, what's the recommended version of Forge for SpongeForge 1.12.2-2838-7.2.0?
on Forge the recommended 1.12 builds are 1.12.2 - 14.23.5.2847 (latest) and 1.12.2 - 14.23.5.2768 (recommended)
I think youre in the wrong place
Oh, sorry, wrong server!
either way thanks for the timely reply @fleet crane
i think i got it actually lol
i did actually get it i blocked outgoing connections using ipv6 to spigotmc.org
Is the website also slow for you guys?
I think its just the internet/networking
but yes, has been for last couple weeks
actual server performance is fine
what would be the easier way to get all the premium user names from a resource i own? ๐ค
check your paypal receipts
stupid question: how can i convert e.getEntity to Player?
You cast it, check if the Entity is an instanceof Player and then cast it
i dont really get what you mean?
Player player = (Player)entity;
}```
thanks!
@tiny dagger you can look into the Paypal IPN api
wait, is there something like e.getPlayer().isHit or something like that?
hey
I have a problem with my server running on spigot, can someone help me for a second
I will be sooooo thankful. Thanks
You can ask it and someone may be able to help
@vast fog what are you trying to do? There is this event: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.html
so We are running a survival map that has a size of 35 gb for like 4 months then we stopped for one month
I Compressed the map folder, this month I decompressed it and sent it to the server. But theres so much issue's going around right now
Some areas are crashing the server when some people loads them. But we cant really make sure where they are
the log is like this
To be honest I'm not totally sure, someone else may be able to help
I am using the latest Jansi library for console colors but when I run the plugin it throw me with this error
org.bukkit.plugin.InvalidPluginException: java.lang.NoSuchMethodError: org.fusesource.jansi.Ansi.fgBrightGreen()Lorg/fusesource/jansi/Ansi;
The plugin built fine I am not sure what cause the issue
You are including Jansi in your plugin?
depend: ?
I am using maven btw I use the install command to add the jansi.jar file into the project
and in pom.xml I added it as a dependency
ok I should shade it into my plugin .jar
Quick question how do you get the statistics of plants using the player.getStatistic()?
Here is all of the available statistics https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Statistic.html
those arent plants
Yah, I've seen all the available statistics, just can't fin plants
are those even tracked?
so is there a way to get the plants
If they aren't there they arent tracked
i've never seen thme on the client stats either
You could make your own statistic by making use of the blockbreakevent
Are there other API's that allow to get statistics of plants?
your own
What are you trying to get with plants?
check for planting seeds on soil or something
yeah in that case listen to the block break event and track everything thats a plant i guess
not sure if theres a generic interface for those tho
You need to do it yourself
No, I know, misunderstanding, I'm asking if plant statistics could be added to SpigotAPI?
nvm I think I got it
All statistics are in the api
@solemn grove spigot has console colours, just use ChatColor and sendMessage to the console
Bukkit.getConsoleSomethingSomething.sendMessage
ok
getConsoleSender is it.
Hello, my plugin connect correctly with my redis server but after an hour redis server stuck (and I can not end the service, I need to kill the PID of the procces) and plugin gets error, I think is because I don't close pool connection when server interacts with redis.
Before this error happens I had this code:
private void settingUpRedis() {
Jedis jedis = pool.getResource();
try{
String server = serverName;
jedis.hset("max_players", server, getServer().getMaxPlayers()+"");
}finally {
jedis.close();
}
}
But I saw a lot of people doing this, and I changed this lines:
private void settingUpRedis() {
try (Jedis jedis = pool.getResource()){
String server = serverName;
jedis.hset("max_players", server, getServer().getMaxPlayers()+"");
}
}
This is the error, and I get it in all the servers from my network
ah so, I don't need to close the connection?
The second code does the same thing as the first code
(it's called try with resources and calls .close automatically)
ok thanks I will check my code
int death = player.getStatistic(Statistic.DEATHS);
Team deaths = board.registerNewTeam("Deaths: ");
deaths.addEntry(ChatColor.GREEN + "");
deaths.setPrefix(ChatColor.WHITE + "Deaths: ");
deaths.setSuffix(ChatColor.GRAY + death);
why does this not work
int kill = player.getStatistic(Statistic.PLAYER_KILLS);โ
Team kills = board.registerNewTeam("Kills: ");
kills.addEntry(ChatColor.WHITE + "");
kills.setPrefix(ChatColor.WHITE + "Kills: ");
kills.setSuffix(ChatColor.GRAY + kill);
to what
i dont get how thats the problem
cuz i have to fix the other things first then uncomment
ill uncomment later tho
k
Hiยก ani can help me with FeatherBoardยดs error
@gloomy shuttle Sure. Give us the error.
@frigid ember https://paste.helpch.at/unevixawez.md , this are my config https://paste.helpch.at/suxuzewoba.xml
@gloomy shuttle
[08:45:24] [Craft Scheduler Thread - 30/ERROR]: [FeatherBoard] An error happened inside an animation effect ( [โ โ โ โ โ โ โ โ โ โ ] <round decimals="0">(*100)/</round>%)! This can lag your server if you do not fix it [08:45:24] [Craft Scheduler Thread - 0/WARN]: javax.script.ScriptException: <eval>:1:1 Expected an operand but found *
@frigid ember I tried to fix
I Change for this
- ' &8[<progressbar max="{placeholderapi_mcmmo_xp_needed_fishing}" scale="10" done="&bโ " remaining="&7โ ">{placeholderapi_mcmmo_xp_fishing}</progressbar>&8] &e<calc round>({placeholderapi_mcmmo_xp_fishing}*100)/{placeholderapi_mcmmo_xp_needed_fishing}</calc>%'
And now only give this error
[09:12:38] [Craft Scheduler Thread - 41/ERROR]: [FeatherBoard] An error happened inside an animation effect ( [โ โ โ โ โ โ โ โ โ โ ] <calc round>(*100)/</calc>%)! This can lag your server if you do not fix it
Can we make it so only verified users can join voice chat please ๐ ๐ฅบ
hi im having issue starting the server im new to making servers however i was told that the build is outdated despite me downloading 1.15.2
Error, this build is outdated ***
*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***
*** Server will start in 20 seconds ***
you should, update your spigot
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
where do i put that code?
Hi, question how to i can fix Timed Out problem?
Follow the instructions on installing Spigot using BuildTools
You need an application called Git
Download Git, then run Git
@gloomy shuttle We'd need to see your server log.
@frigid ember Only disconnect me xd
Then follow the instructions on that link under Running BuildTools
what is git bash
i am current unable to locate git bash according to website instructions
you should install it
should i but build tools in my server folder?
use it anywhere?
alright
im unable to git bash the build tool
windows
Wait
Don't install anything, just put this into a run.bat and run it
@echo off
IF NOT EXIST BuildTools (
mkdir BuildTools
)
cd BuildTools
curl -z BuildTools.jar -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
set /p Input=Enter the version: || set Input=latest
java -jar BuildTools.jar --rev %Input%
pause
Does anyone know how to get the average tick duration? I can't find anything about it in the docs, but it is shown in the server gui (pic), so it must be stored somewhere.
It isn't 1000 divided by the TPS, that only works when the server is running below 20tps
Bukkit.getAverageTickTime
I'm getting The method getAverageTickTime() is undefined for the type Bukkit
Hello! I'm rather stupid and can't find how i update my resources posted on spigotmc
It's on the right, under "Resource tools" -> "Post Resource Update"
Yes
great, had to know before i wiped my current description xD
I just want to make sure I am reading the wiki right. If I run buildtools after having a spigot version install it will just update it and I wont have to do any work at all.
Just run it and then I can run the server no problems
Anyone know of a plugin that links Patreon donors with users in a minecraft server?
I saw MCPatron, but it hasn't been active since 2017 and I can't seem to find a download for it anywhere
I have a plugin in progress but it's atm been inactive till I am re-active on working on it.
[18:26:18 ERROR]: Failed to save chunk
java.lang.IndexOutOfBoundsException: Index: 1859, Size: 1856
at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[?:1.8.0_242]
at java.util.ArrayList.set(ArrayList.java:448) ~[?:1.8.0_242]
at net.minecraft.server.v1_12_R1.RegionFile.a(SourceFile:269) ~[spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.RegionFile$ChunkBuffer.close(SourceFile:244) ~[spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:241) ~[?:1.8.0_242]
at java.io.FilterOutputStream.close(FilterOutputStream.java:159) ~[?:1.8.0_242]
at java.io.FilterOutputStream.close(FilterOutputStream.java:159) ~[?:1.8.0_242]
at net.minecraft.server.v1_12_R1.RegionFileCache.e(RegionFileCache.java:95) ~[spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.ChunkRegionLoader.b(ChunkRegionLoader.java:212) ~[spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.ChunkRegionLoader.processSaveQueueEntry(ChunkRegionLoader.java:195) [spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.ChunkRegionLoader.a(ChunkRegionLoader.java:167) [spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.FileIOThread.c(SourceFile:37) [spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at net.minecraft.server.v1_12_R1.FileIOThread.run(SourceFile:30) [spigot1122latest.jar:git-Spigot-dcd1643-e60fc34]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
[18:26:18 ERROR]: Failed to save chunk
can someone help about what this means?
I know that I got some corrupted chunks, Is this "sourcefile" represents the actual region's number?
@uneven cradle ^
@uneven cradle ^
Hey, I have linked up my bungee servers and they are hosted with Pterodactyl panel. But I get this error while trying to join.
(Ping reply)
bungee servers?
you only need one but did you setup a hub?
like I assume by bungee servers you mean multiple servers for the config
The issue is that your lobby server isn't online meaning bungeecord has nothing for them to connect to @teal lichen.
@cloud sparrow It is online.
Yes
system
1.12.2
yo system how do i set the suffix to deaths it dont work
wdym
- ""
or how do i do it
deathsTeam.setSuffix(ChatColor.GRAY + "" + deaths);
like this
alr
Any idea anyone why I can't link my Bungeecord servers up?
listeners:
- query_port: 1232
motd: '&1Another Bungee server'
tab_list: GLOBAL_PING
query_enabled: true
proxy_protocol: false
forced_hosts:
pvp.md-5.net: pvp
ping_passthrough: false
priorities:
- lobby
bind_local_address: true
host: 0.0.0.0:1232
max_players: 1
tab_size: 60
force_default_server: false
remote_ping_cache: -1
network_compression_threshold: 256
permissions:
default:
- bungeecord.command.server
- bungeecord.command.list
admin:
- bungeecord.command.alert
- bungeecord.command.end
- bungeecord.command.ip
- bungeecord.command.reload
log_pings: true
connection_throttle_limit: 3
server_connect_timeout: 5000
timeout: 30000
player_limit: -1
ip_forward: false
groups:
md_5:
- admin
remote_ping_timeout: 5000
connection_throttle: 4000
log_commands: false
stats: 5e27a1cf-04e3-4ae4-b61d-72ca36e43d9a
online_mode: true
forge_support: false
disabled_commands:
- disabledcommandhere
servers:
lobby:
motd: '&1Just another BungeeCord - Forced Host'
address: 62.171.180.54:3213
restricted: false
Sorry
I should have use pastebin
Wot
o
Do a live server? Wat
@frigid ember you do a live server by dragging the jar file from where you exported it into your server and turning it on, hence "live"
yea ok so ive been doing that alr
I thought you were asking how to compile though?
nah i was asking how to export in intel j
yea i figured it out
Use project module
yo anyone know the link to that site for when people ask for help it just types out their question
google?
thx blackveiled

how to make badlion windowed
where can i ask in gener
can u tell me there
My server keeps having lag spikes where the console says "Can't keep up! Is the server overloaded?", even though its only using 2-3 GB of the RAM I allocated for it (16 GB). This is happening with only me online. Are there any possible solutions?
Server Version: 1.15.2
OS: Windows 10
CPU: Intel i9-9900k
Startup Script:
@echo off
java -Xms16G -Xmx16G -XX:+UseConcMarkSweepGC -jar spigot-1.15.2.jar nogui
pause
I can provide more information if its needed to find a solution.
Plugins used: (Attached as image)
how do i make a line on a scoreboard
@frigid ember
like these
the white lines
Hey @frigid ember can I DM you?
system it didnt work
Team line = board.registerNewTeam("&f&m-------------");
line.addEntry(ChatColor.DARK_AQUA + "");
line.setPrefix(ChatColor.WHITE + "&f&m-------------");
this is my code
wdym
It's probably best to make a utility class with a method like this
public static String colorize(String message) {
return ChatColor.translateAlternateColorCodes('&', message);
}
how do i make the lines display in configure.yml
I have updated a plugin for 1.13+ and now I am working on its extension plugins, the extension plugins have the main plugin as a hard dependency in the plugin.yml. the problem I am having is the main plugins load some classes from the extensions. When that happens I get the "Main loaded class foo.class from extension and is not a depend soft depend or load before" warning. I can't have the extension plugins be a dependency of the main. How do I properly fix this?
@mental vortex Struggle with keeping up means that the server is struggling keeping up with the server's CPU basically. A plugin or something is causing the game state to slow, resulting in lower TPS.
Or you have too many plugins running simultaneously.
Combination of too many plugins / too many players online performing actions at the same time, etc...
Can this be caused by dynmap fullrender?
Team line = board.registerNewTeam(" ");
line.addEntry(ChatColor.DARK_AQUA + "");
line.setPrefix(ChatColor.STRIKETHROUGH + " ");
why does it not let me make it bigger than that
@frigid ember
It could be, you can experiment and unload it and see if the performance improves.
Thatd be a likely suspect.
so how do i make the length and bigger
You cant.
Thanks, I'll try.
I ran /dynmap fullrender to load the entire map I'm using and its been going for a few hours.
@mental vortex yeah that's probably what it is then. Constantly running, using up your servers CPU
no its gonna have the stikethorug it
where i going for repport a creator of plugin?
what
why are you reporting?
Report a plugin creator for what? Lol
i 200 iqed it
String spaces = " ";
Team line = board.registerNewTeam("");
line.addEntry(ChatColor.DARK_AQUA + "");
line.setPrefix(ChatColor.STRIKETHROUGH + spaces);
no xSwift it needs to be ------------
no it dont
200 iq, lol
en5
you 0 IQ'd it
because a plugin creator have a create a plugin but he dosen't work , and he dosen't want give me an answers :/ (20euros)
TheoPolo
@golden vault That's called circular dependency. If that is occurring, there is typically a flaw in the design of the program(s). Your dependent projects (your extensions) should always rely on the independent program. That being said, the independent program should remain independent. It should not be requiring or attempting to access it's dependent counterparts ๐
?kick @misty kettle spam
๐ข Kicked 242243666444419076
Anyone know if there's a way to auto equip armour?
nevertheless, the discord is not a place to be asking assistance for getting unbanned
so they get caught red handed and yet they still are entitled to an unban? wow
I wouldn't doubt it ,it was written a loooong time ago by someone else.
Hi everyone,
was hoping to get some advice on the structure of Plugins, or if there's any sort of standard when it comes to functionality that needs Listeners and a Command(CommandExecutor) to modify the same content.
As an example, let's say I have a simple plugin that counts the number of times that a player places down a block, but this value can also be incremented by a command. Each time the player writes the command or places down a block, they are messaged the number of times they've done so. (Trying to use a very simple example, but this would be for a much more complicated plugin).
I'm thinking that this plugin would have a structure like this:
BlockCounter.java
onEnable()
onDisable()
CountingManager Object
CountingManager.java:
Collection of Key/Values for PlayerName/int
CountListener Object
CountCommand Object
CountListener.java:
Implements Listener
Listens for BlockPlaceEvent and updates value/messages player
Has a reference to the CountingManager
CountCommand:
Implements CommandExecutor
Provides functionality for command and updates value/messages player
Has a reference to the CountingManager
Does this resemble any sort of standard practice?
I understand that one class can implement both Listener and CommandExecutor, and further that in non-complex plugins like this it might be better to just have one class that maintains the collection, implements the Listener and the CommandExecutor.
My questions are:
- For complex plugins, is this standard practice(Listener and CommandExecutor in separate classes with a governing "Manager" class)?
- Is this just a silly way to design plugins, and different functionality like this should just implement Listener and CommandExecutor in the same class, even for complex plugins?
I've had a flick through the source of a few different big open source plugins but they seem to all do these types of things differently. I understand that this might be a bit opinionated depending on the context, but was more wondering what approach more experienced users tend to take. ๐
Typically you'd want to keep them separate for better project structure. You're right to have a managing class to handle the block counting. What you could do: keep a single instance of the manager class in your main class, accessible through a getter. In other classes that require accessing the managing class, simply pass the instance of your main class through dependency injection.
Cheers, thanks for that guys. :)
Is it okay to @ staff like Choco?
Very well then haha, @subtle blade could I get an opinion on this?
I've written up a quick example for you. Much like how I implemented accessing the manager in the listener, you'd do for the command or any other place.
For crazy crates, can we make crate addons https://www.spigotmc.org/resources/crazy-crates.17599/ ?
implements Listener
Thanks! I appreciate that. ๐
To load a spawn location I have:
spawnLocation = (Location) getConfig().get("spawn");
And to set it, I use
Location loc = player.getLocation();
instance.setSpawnLocation(loc);
instance.getConfig().set("spawn", loc);
instance.saveConfig();
And it serializes in the configuration like this:
spawn:
==: org.bukkit.Location
world: Spawn
x: -31.49341326552553
y: 164.0
z: -14.470630113595808
pitch: 1.9499395
yaw: 0.14264306
Yet it is null when I run /spawn (after restarting, works prior to restart)
Doing some checking, Bukkit.getWorld("spawn") is null, but I'm, unsure why?
It's just a world I've created with multiverse and a generator
wdym
If the world folder is uppercase
I'm sure world names are case sensitive
It has to be uppercase
^
ah, the world name is lowercase (but even so, it's serializing from the players location, so why isn't it updating?)
๐ค
has it loaded
yep
o
What line is giving you a NullPointerException?
wonky
the object is null
Check your error, and find where exactly you're getting a null.
the world is probably not loaded ๐ค
Location location = instance.getSpawnLocation();
if (location == null) {
player.sendMessage(ChatColor.RED + "Spawn location is null. Please contact an administator.");
} else {
player.teleport(location);
player.sendMessage(teleportMessage);
}
I said where was null @dusky herald
Doing some checking, Bukkit.getWorld("spawn") is null, but I'm unsure why
Location is ConfigurationSerializable
Unless I misinterpret what you mean?
public class Location implements Cloneable, ConfigurationSerializable {
I tried doing that, and Bukkit.getWorld(string)) was null
You're using a String
So it's not an issue with serialization, it's something to do with the world being null
When you stored a World
No, you can serliaze a location and load it from a configuration file
It's actually how you're supposed to do it
That's not the issue, because it stores just like it would saving an itemstack
I think it's something to do with the world not loading properly with spigot, how would I check that?
Have you tried accessing the world another way?
broadcast the list of worlds to see if the world is loaded
should show stuff like [CraftWorld{name=Hub}, CraftWorld{name=world_nether}, CraftWorld{name=world_the_end}]
i'll just broadcast the name
๐คทโโ๏ธ
public Location getSpawnLocation() {
for (World world : Bukkit.getWorlds()) {
Bukkit.broadcastMessage(world.getName());
}
spawnLocation = (Location) getConfig().get("spawn");
return spawnLocation;
}
is where this came from
wonky
Literally
==: org.bukkit.Location
world: spawn
x: -31.49341326552553
y: 164.0
z: -14.470630113595808
pitch: 1.9499395
yaw: 0.14264306
I'm so confused
thonk
it works just fine in the default world
Shouldnt it be
so i'm thinking the issue is registering a world incorrectly or something
instance.getConfig().get("spawn")
are you loading it in onEnable ?
Ah
yes, but then its also loading on command in that method
Does it load before you run the method?
that's how i would've had it, but i'm loading it every time the method is called from the config
to test it wasn't that
I remember having a similar issue before when attempting to work with worlds creating by multiverse (or multiworld, don't remember which). Fixed it by adding a soft-depend for Multiverse in my plugin.yml so it can actually load the data before my plugin attempts to access anything
you can try that, but unsure if it'll be a solution for your problem
that sounds like it could be right
Yeah I mean I dont really see anything wrong with it.
yep, fixed it @keen moth
I would've never figured that out, so I have no idea how you did
Huh, maybe it does exist @quick arch
Seems like what he said, you create the location, but the world was never actually loaded yet so it comes up null
just not in the outdated version I'm using
wonky
awesome ๐
anyone happen to know off the top of their heads what the highest slowness potion effect level is that still allows mobs to move?
it ain't 6
not the highest globally, the highest where they can still move
pretty sure they're already not moving at 6
is arraylist get O(1)?
I believe they will still move at any value just unnoticable
Probably 1
I want to let an NPC lay on the ground (I spawned my own NPC with packets) and I get him laying him down but whatever I do it's always floating 0.5 blocks above the ground. As far as I know I tried all ways to move the npc but nothing works. How do it let the NPC lay on the ground?
Move Speed caps at 0-1
Question, how do you guys handle getting values from your settings/config file? Plugin.getInstance().getConfig().getString("path") is pretty painful when you have a lot of keys.
split it in ConfigSections?
That's not the question
I would save the config in a variable so you only have to do config.getString("Yeehaw") and if there's 1 big section then use ConfigSections
what type of data
He told you the answer.
I've seen people make an enum full of keys and then they make a get() method which returns the value but idk if thats good
wait do you wanna get all keys at once or?
No, I'm asking how to make my code cleaner.
i guess enum is the way to go
i used to do that for messages
especially since you don't have to touch config anymore and only add in the enum new keys
Okay, I will do that. Thanks
If you are verified you can directly upload images.
Hi anyone knows why all of my packets are broken on 1.14.4 - 1.15.2. I can create the packets and intelliJ shows no errors, but when i launch the server the packets simply don't work
was there some kind of change to nms in 1.14?
yes I understand that
but usually the methods change aswell
so you have to use a different constructor etc
for example in 1.13.2 I can create an invisible armorstand with a changed name easily, in 1.14 it is visible and it has no name
the packet is being created but it is broken
i'm not using reflection
i'm directly using the nms api
1 sec
WorldServer world = ((CraftWorld) loc.getWorld()).getHandle();
ArrayList<Integer> armorStands = new ArrayList<>();
for (int i = 0; i < text.size(); i++) {
IChatBaseComponent chatComponent = new ChatMessage(text.get(i));
EntityArmorStand armorStand = new EntityArmorStand(world, loc.getX() + 0.5, loc.getY() - 0.5 - 0.25 * i, loc.getZ() + 0.5);
armorStand.setNoGravity(true);
armorStand.setCustomName(chatComponent);
armorStand.setCustomNameVisible(true);
armorStand.setInvisible(true);
armorStands.add(armorStand.getId());
PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(armorStand);
EntityPlayer nmsPlayer = ((CraftPlayer) player).getHandle();
nmsPlayer.playerConnection.sendPacket(packet);
} ```
this exact code works on 1.13.2
didn't change anything in 1.14 except for nms package
Last time I checked an armor stand doesn't live but aside from that idk
fyi in the future just modify the armorstand rather than creating them multiple times and running extra methods than required.
it has to be player contextual
only one player has to see the armorstand that is created
that method doesnt exist
import net.minecraft.server.v1_15_R1.EntityArmorStand;
is what i'm using
Does anyone know a good tutorial for getting started with reflection?
https://prnt.sc/ru9yzc ???????
Looks like your config file is messed up
Go to a yaml parser and paste your yaml file in there and look at the errors
@zenith siren where did you get the info that 1.15 armorstand isn't extending entityLiving, i have decompiled the nms code and it seems that it is in fact entity living are you using an old build?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/ArmorStand.html it is extending it it looks like..., not implementing it
where did you find that method
i've searched through entityliving, entity, and armorstand classes
none of them contain it
?whois @frigid ember
675102090342825984
06 Feb 20 22:14 UTC
8 weeks 3 days and 21 hours
01 Apr 20 11:50 UTC
5 days and 8 hours
Custom Status:
17 Feb 20 13:30 UTC: แตแตแต
01 Apr 20 11:50 UTC: SystemEncryption

